Re:Form -- Reducing Human Annotations in Scalable Formal Software Verification with RL in LLMs: A Preliminary Study on Dafny
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
Citing papers per year: 2025: 5; 2026: 4.
9 papers.
- 2025The Landscape of Agentic Reinforcement Learning for LLMs: A Surveycited by 195
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2026AlgoVeri: An Aligned Benchmark for Verified Code Generation on Classical Algorithmscited by 11
- 2025VeriEquivBench: An Equivalence Score for Ground-Truth-Free Evaluation of Formally Verifiable Codecited by 7
- 2025Local Success Does Not Compose: Benchmarking Large Language Models for Compositional Formal Verificationcited by 6
- 2026Harnesses for Inference-Time Alignment over Execution Trajectoriescited by 2
- 2025Differentiable Evolutionary Reinforcement Learningcited by 1
- 2026ExVerus: Verus Proof Repair via Counterexample Reasoningcited by 1
- 2026Rethinking Agentic Reinforcement Learning In Large Language Modelscited by 0
- 2026Harnesses for Inference-Time Alignment over Execution Trajectories15 May 2026
- 2026Rethinking Agentic Reinforcement Learning In Large Language Models30 Apr 2026
- 2026ExVerus: Verus Proof Repair via Counterexample Reasoning26 Mar 2026
- 2026AlgoVeri: An Aligned Benchmark for Verified Code Generation on Classical Algorithms10 Feb 2026
- 2025Differentiable Evolutionary Reinforcement Learning15 Dec 2025
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025VeriEquivBench: An Equivalence Score for Ground-Truth-Free Evaluation of Formally Verifiable Code7 Oct 2025
- 2025Local Success Does Not Compose: Benchmarking Large Language Models for Compositional Formal Verification27 Sep 2025
- 2025The Landscape of Agentic Reinforcement Learning for LLMs: A Survey2 Sep 2025
Similar, not cited
Close in wording, no citation either way
- 2024The Fusion of Large Language Models and Formal Methods for Trustworthy AI Agents: A Roadmap
- 2024GoEX: Perspectives and Designs Towards a Runtime for Autonomous LLM Applications
- 2026Pushing the Boundaries of Natural Reasoning: Interleaved Bonus from Formal-Logic Verification
- 2024Towards AI-Assisted Synthesis of Verified Dafny Methods
- 2024If LLM Is the Wizard, Then Code Is the Wand: A Survey on How Code Empowers Large Language Models to Serve as Intelligent Agents
- 2024Proof of Thought : Neurosymbolic Program Synthesis allows Robust and Interpretable Reasoning
- 2025Can Large Language Models Learn Formal Logic? A Data-Driven Training and Evaluation Framework
- 2026Automating Formal Verification with Reinforcement Learning and Recursive Inference