Curriculum proof repair with learned counterexamples
Not on the map. Why?
Abstract (arXiv)
Language models (LMs) have substantially lowered the barrier to applying formal verification for building reliable and secure software. Existing approaches commonly follow the verifier-in-the-loop paradigm, but the verifier often provides only coarse, binary pass/fail feedback, which offers little actionable signal on how the proof should be repaired. Recent work shows that counterexamples provide more actionable feedback by grounding proof failures in concrete program states, but generating useful ones at inference time requires costly iterative refinement. We present TopoVerus, an LM-based framework for Verus proof repair that internalizes counterexample-guided diagnosis as a model capability, producing useful counterexamples in a single pass. Our key insight is to train counterexample generation not as a standalone validation task, but as a data-driven diagnostic objective: a counterexample is useful when conditioning on it helps the model produce a safe, verifier-passing proof. Given a failed Verus proof and verifier error, TopoVerus generates a structured source-level counterexample, repair rationale, and repaired proof in one trajectory, optimized with reinforcement learning from Verus feedback and a proof-code safety gate. To guide the order of invariant repairs, TopoVerus introduces a curriculum with a topological graph reward based on invariant dependencies derived from inductiveness tests, which encourages counterexample generation to follow the same topological order. Across seven Verus benchmarks with 471 problems, TopoVerus achieves 61.6%/72.2% weighted-average Safe-Pass@1/Safe-Pass@3, outperforming the strongest baseline, Claude Sonnet 4.5, by 5.7/6.3 points. We also show that TopoVerus's learned counterexamples can directly augment the reasoning of existing LM-based proof repair approaches, improving their success rate by 64.3% compared to chain-of-thought diagnostics.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Builds on 31 of its 56 references that are in the map. Submitted 10 Nov 2026.
Builds on
31 of 56 references.
References · 31
- 2021Evaluating Large Language Models Trained on Codecited by 8,938
- 2024GPT-4o System Cardcited by 4,895
- 2023LeanDojo: Theorem Proving with Retrieval-Augmented Language Modelscited by 457
- 2020Generative Language Modeling for Automated Theorem Provingcited by 419
- 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 377
- 2024DeepSeek-Prover: Advancing Theorem Proving in LLMs through Large-Scale Synthetic Datacited by 263
- 2022HyperTree Proof Search for Neural Theorem Provingcited by 211
- 2025Kimina-Prover Preview: Towards Large Formal Reasoning Models with Reinforcement Learningcited by 203
- 2020Automatic Curriculum Learning For Deep RL: A Short Surveycited by 156
- 2023Baldur: Whole-Proof Generation and Repair with Large Language Modelscited by 133
- 2023RLTF: Reinforcement Learning from Unit Test Feedbackcited by 124
- 2025CWM: An Open-Weights LLM for Research on Code Generation with World Modelscited by 99
19 more
- 2026Qwen3-Coder-Next Technical Reportcited by 83
- 2023Verus: Verifying Rust Programs using Linear Ghost Types (extended version)cited by 59
- 2024AutoVerus: Automated Proof Generation for Rust Codecited by 58
- 2024AlphaVerus: Bootstrapping Formally Verified Code Generation through Self-Improving Translation and Treefinementcited by 44
- 2023Finding Inductive Loop Invariants using Large Language Modelscited by 41
- 2024Automated Proof Generation for Rust Code via Self-Evolutioncited by 39
- 2025Thinking vs. Doing: Agents that Reason by Scaling Test-Time Interactioncited by 38
- 2025A benchmark for vericoding: formally verified program synthesiscited by 28
- 2025VeruSAGE: A Study of Agent-Based Verification for Rust Systemscited by 21
- 2024Laurel: Unblocking Automated Verification with Large Language Modelscited by 15
- 2025VeriStruct: AI-assisted Automated Verification of Data-Structure Modules in Veruscited by 13
- 2025Towards Repository-Level Program Verification with Large Language Modelscited by 8
- 2026SortedRL: Accelerating RL Training for LLMs through Online Length-Aware Schedulingcited by 8
- 2025RAG-Verus: Repository-Level Program Verification with LLMs using Retrieval Augmented Generationcited by 7
- 2026Learning to Disprove: Formal Counterexample Generation with Large Language Modelscited by 7
- 2026Vero: Can AI Agents Build Formally Verified Software Repositories?cited by 6
- 2026ExVerus: Verus Proof Repair via Counterexample Reasoningcited by 5
- 2026P3: Joint Program-and-Proof Planning for Verified Code Generationcited by 5
- 2016Efficient Generation of Inductive Validity Cores for Safety Propertiescited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Repairing LLM-Generated Specifications with Deterministic Diagnosis
- 2026Counterexample Generation via Per-Theorem Symbolic Verifiers: When Imitation Hurts and Reinforcement Repairs
- 2025Can Language Models Falsify? Evaluating Algorithmic Reasoning with Counterexample Creation
- 2025Proof2Silicon: Prompt Repair for Verified Code and Hardware Generation via Reinforcement Learning
- 2026Verify, Repair, Repeat, or Stop? Robust Stopping for Noisy Verify-Repair Loops in LLM Agents
- 2026Learning to Repair Lean Proofs from Compiler Feedback
- 2025HoarePrompt: Structural Reasoning About Program Correctness in Natural Language
- 2026From Errors to Proofs: Minimal-Core-Guided Repair for Neuro-Symbolic Constraint Solving