mlsanityData to 7 Oct 2026

Re:Form -- Reducing Human Annotations in Scalable Formal Software Verification with RL in LLMs: A Preliminary Study on Dafny

arXiv 2507.16331 ↗First posted 22 Jul 2025cs.CLcited by 9

Not on the map. Why?

Abstract (arXiv)

Existing informal language-based (e.g., human language) Large Language Models (LLMs) trained with Reinforcement Learning (RL) face a significant challenge: their verification processes, which provide crucial training signals, are neither reliable nor scalable. In fact, the prevalent large proprietary models could hardly generate verifiable programs. A promising yet largely uncharted alternative is formal language-based reasoning. Grounding LLMs in rigorous formal systems where generative models operate in formal language spaces (e.g., Dafny) enables the automatic and mathematically provable verification of their reasoning processes and outcomes. This capability is pivotal for achieving large-scale, reliable formal software verification. It is a common practice to employ human-annotated chain-of-thought and answers to induce the reasoning and coding capabilities of LLMs. Unfortunately, it becomes unacceptably all-consuming to provide such priors for supervising complex programming tasks. In this work, we systematically explore ways to reduce human annotations with the formal language, Dafny, as the main environment for our pilot study. Our pipeline mainly relies on introducing an automatic and scalable data curation pipeline, and careful RL designs integrated with feedback from the formal language verifier. We introduce DafnyComp, a benchmark of compositional formal programs with auto-formalized specifications for specification reasoning. Our supervised fine-tuning (SFT) stage enables even small models (e.g., 0.5B) to generate syntactically valid and verifiable Dafny code, surpassing proprietary models. RL with regularization further improves performance, achieving stronger generalization to out-of-domain tasks and outperforming all strong baselines on the challenging DafnyComp benchmark.

Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). First posted on arXiv 22 Jul 2025.

Builds on

0 of 0 references.

No references here yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 5; 2026: 4.

9 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024The Fusion of Large Language Models and Formal Methods for Trustworthy AI Agents: A Roadmap
  2. 2024GoEX: Perspectives and Designs Towards a Runtime for Autonomous LLM Applications
  3. 2026Pushing the Boundaries of Natural Reasoning: Interleaved Bonus from Formal-Logic Verification
  4. 2024Towards AI-Assisted Synthesis of Verified Dafny Methods
  5. 2024If LLM Is the Wizard, Then Code Is the Wand: A Survey on How Code Empowers Large Language Models to Serve as Intelligent Agents
  6. 2024Proof of Thought : Neurosymbolic Program Synthesis allows Robust and Interpretable Reasoning
  7. 2025Can Large Language Models Learn Formal Logic? A Data-Driven Training and Evaluation Framework
  8. 2026Automating Formal Verification with Reinforcement Learning and Recursive Inference