potentialpaper

Curriculum proof repair with learned counterexamples

Yuechun Sun, Jun Yang, Kexin Pei

NeurIPS 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. 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 and target counterexamples to specific invariants, TopoVerus introduces a curriculum with a topological graph reward based on invariant dependencies derived from inductiveness tests and encourages counterexample generation following the same topological order as these dependencies. 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. We release the training and evaluation code at https://github.com/Etha-Sun/Topoverus and the TopoVerus-32B weights at https://huggingface.co/YuechunSun/TopoVerus-32B.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
1 May 2026NeurIPS 2026submittedNeurIPS 2026Accept (poster)reviews ↓[1]PDF[1]
Missing a version?

NeurIPS 2026

Accept (poster) · 3 reviews · OpenReview

Updated 25 Nov 2026, 03:42 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (poster)
Read decision
Meta-review

This paper introduces TopoVerus, an LM powered approach to Verus proof repair. There is consensus amongst reviewers that this is an important problem and the proposed Topological Graph Reward is well motivated.

That said, reviewers have also raised several important questions; clarifications regarding these would be helpful.

Final justification

The authors have responded robustly to reviews, offering new empirical results and clarifications where requested. This strengthens an already positive consensus.

Area Chair BgWv · Meta-reviewOpenReview ↗
Read meta-review
Meta-review

This paper introduces TopoVerus, an LM powered approach to Verus proof repair. There is consensus amongst reviewers that this is an important problem and the proposed Topological Graph Reward is well motivated.

That said, reviewers have also raised several important questions; clarifications regarding these would be helpful.

Final justification

The authors have responded robustly to reviews, offering new empirical results and clarifications where requested. This strengthens an already positive consensus.

1 comment
Authors · CommentOpenReview ↗

Dear Area Chairs, Senior Area Chairs, and Program Chairs,

We really appreciate your efforts in overseeing the review process for our submission. We understand you have limited time to review each submission, so we summarize our work, rebuttals, and discussions briefly as follows:

TopoVerus trains counterexample generation as a diagnostic objective for Verus proof repair. Given a failed proof and verifier error, TopoVerus generates a structured source-level counterexample, a repair reasoning, and a repaired proof in one trajectory, and learns from whether the proof is verified by Verus. To improve credit assignment for dependent loop invariants, the Topological Graph Reward derives invariant dependencies from inductiveness tests and rewards the model to generate prerequisite invariants first. Across seven Verus benchmarks, TopoVerus outperforms the strongest baselines, Sonnet 4.5, and its learned counterexamples can also improve existing LM-based proof repair methods.

In response to the reviewers' questions and feedback, we have added the following clarifications and new experiments:

  • We provided a detailed description of the training data: 1,210 SFT repair examples derived from 249 source programs, with the same 249 programs used for RL. We also clarified that the split is made at the source problem level, so no evaluation problem or artifact derived from it is used in SFT or RL (reviewer aRG8).

  • We clarified that the reported weighted average is a average over all 471 evaluation problems, with each problem contributing equally. With each benchmark suite given equal weight, our model still achieves the highest Safe-Pass@1/@3, exceeding Claude Sonnet 4.5 by 2.4/3.7 points (reviewer tRAx, vvBk).

  • We added the baseline trained only with binary verifier feedback (CTX-Binary) to the iteration scaling experiment under the same evaluation setting. (reviewer vvBk).

  • We clarified that our Topological Graph Reward derives loop invariants and dependencies from a verified reference proof. This requirement does not incur additional annotation cost, as all benchmark programs already include verified versions. Without a verified version, it would be difficult to determine whether verification fails because of an incorrect specification or an incomplete proof, making the program unreliable for proof repair training (reviewers tRAx, vvBk).

  • We examined whether correct repairs, particularly those using invariant structures different from the reference proof, may receive lower dependency rewards during training. We found that 64.1% of Verus-accepted rollouts receive the maximum score (reviewer vvBk).

  • We examined whether training with a reward derived from a reference proof reduces the diversity of generated proofs. Across all benchmark groups, the model trained with the dependency reward shows proof diversity comparable to the baseline trained only with verifier feedback. We also clarified that the model has no access to the reference proof or its dependency graph at inference time (reviewers tRAx, vvBk).

  • We showed that, compared with the binary verifier reward baseline (CTX-Binary), the dependency reward model (CTX-Dep) generates a similarly broad set of invariants while improving their alignment with the topological order induced by the invariant dependency graph (mean edge satisfaction: 43.8% vs. 95.8%) (reviewer vvBk).

  • We analyzed the remaining gap to Sonnet 4.5 on VeruSAGE and showed that many tasks require long-context reasoning and lemma retrieval beyond both the capabilities of our 32B base model and the loop-invariant dependencies modeled by the current reward (reviewer tRAx).

We are grateful for the constructive feedback, careful consideration and coordination throughout the review process. Please let us know if any additional clarification would be helpful. We would be glad to provide further details.

Reviewer tRAxOpenReview ↗
Rating
4/6
Confidence
2/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

TopoVerus is an LM framework for repairing failed Verus proofs. The model generates a source-level counterexample (state, execution trace, violation) before producing a repair, and RL rewards the counterexample only when it leads to a verifier-passing proof. The main technical piece is a topological graph reward: the authors precompute a dependency graph over loop invariants from inductiveness tests, condense cycles with Tarjan's algorithm, and reward repairs that generate prerequisite invariants before dependent ones. Training uses GRPO on QwQ-32B with a safety gate that rejects edits to executable code or specs. Across seven Verus benchmarks, TopoVerus outperforms the cloud baselines on Safe-Pass, and the generated counterexamples also transfer to other repair models.

Strengths and weaknesses

Strengths

  • The problem itself is a good one to work on: counterexample-guided repair is a natural fit for LM proof tools, and "make the model generate the diagnostic the verifier won't give you" is a clean framing. Treating counterexample quality as "useful for repair" instead of "formally valid" then sidesteps the intractable reachability check.

  • The dependency reward comes from an actual computation (inductiveness tests, then graph, then SCC condensation), not a hand-tuned heuristic, and the appendix is honest about its complexity and approximation.

Weaknesses

  • The reward needs a precomputed canonical invariant set V per program, but I personally did not find where V comes from. It appears to require an already-verified solution, in which case the dependency reward can only be trained where a ground-truth proof already exists. This is a real scope limit and should be stated as an assumption, not left implicit.

  • The advantage concentrates on small, templated programs (VerusBench, ObfsBench) and largely disappears on VeruSAGE, the only systems-level benchmark, where closed models stay well ahead. This is the setting that matters most for real verification, and the paper does not address why the method fails to carry over.

  • CTX-Dep loses to CTX-Binary on HumanEval and LeetCode (Table 1), so the dependency reward is not uniformly helpful. Since these suites have only 15 and 5 problems, neither the wins nor the losses there carry weight, yet they feed the weighted average without comment.

Questions
  1. How is the canonical invariant set V obtained for each training program? Does it require a known verified proof, and if so, how does that constrain where the topological reward can be applied?

  2. Why does the advantage shrink so much on VeruSAGE? Is it model capacity, program size, or something about how the dependency graph scales on systems-level code?

  3. Why does CTX-Dep underperform CTX-Binary on HumanEval and LeetCode?

Limitations

The paper has an explicit limitations section covering the two main issues: the reward only targets loop invariants (not assertions or other structures), and counterexample validity is not formally guaranteed. Both are real and honestly stated. What is missing: the dependency on a canonical invariant set at preprocessing, the lack of variance reporting, and the small-benchmark issue.

Formatting concerns

No major formatting violation is clear from the provided manuscript.

1 comment
Authors · RebuttalOpenReview ↗
Rebuttal

W1 and Q1: Please clarify how the canonical invariant set VV is obtained and what scope limitation this requirement imposes.

Yes, constructing RdepR_{\mathrm{dep}} requires a verified ground-truth proof. For each RL training program, we verify the benchmark-provided reference proof with Verus, remove the refundant invariants recursively, extract its loop-invariant clauses as VV, and perform subset-based inductiveness tests to construct GG offline. Here, “canonical” refers only to the invariant set extracted from the selected reference proof.

This requirement limits where the topological reward can be constructed, namely, to training programs with an available verified reference proof. It does not limit the proof generation in evaluation, where the model receives only the failed proof and Verus feedback, without the reference proof, VV, or GG.

In the submitted version, we define VV in Section 3.1, Section 3.3 states that GG is precomputed offline, and Appendix A.1 specifies that VV consists of invariant clauses from a verified Verus program. We will further clarify this in the revision.

W2 and Q2: Why does the advantage shrink on VeruSAGE, and does the dependency graph scale to systems-level code?

Thank you for this question. We would like to clarify that the comparison on VeruSAGE should be interpreted in two parts: the ablation against CTX-Binary and the comparison against closed models. On VeruSAGE, CTX-Dep improves over CTX-Binary from 24.5/30.2% to 30.2/43.4% in Safe-Pass@1/@3, so the contribution of the dependency reward remains positive. The remaining gap is primarily to Sonnet-4.5, rather than to the RL ablation baseline (CTX-Binary).

CTX-Dep underperforms Sonnet-4.5 primarily because the VeruSAGE tasks contain less loop invariants, i.e., only 7 of the 53 tasks in our subset, and require other agentic capabilities such as long context reasoning (e.g., the tasks have 947 LoC on average), relevant lemma/proof retrival, etc., while our current reward focuses on learning dependencies among loop invariants and is not specifically optimized for agentic scenarios.

When loops do occur, VeruSAGE reports that their invariant blocks are more complex and identifies insufficiently strong invariants as an important contributor to Sonnet-4.5’s failures. A base-model capability gap may also contribute to the remaining difference. We will clarify this scope in the revision.

W3 and Q3: Why does CTX-Dep appear to underperform CTX-Binary on HumanEval and LeetCode?

We also observed this and further analyzed it. The difference is driven by single-task fluctuations on two small suites. On HumanEval, CTX-Dep is one task lower at Safe-Pass@1 (3/15 vs. 4/15), but one task higher at Safe-Pass@3 (5/15 vs. 4/15). On LeetCode, the methods tie at Safe-Pass@1 (1/5 each), while CTX-Binary solves one additional task at Safe-Pass@3 (2/5 vs. 1/5). A single task changes the suite-level rates by 6.7 and 20 percentage points, respectively.

As the reported weighted average is computed by problem count, HumanEval and LeetCode together contribute only 20 of the 471 evaluation problems and therefore do not dominate the aggregate. We will report the detailed task counts and explicitly discuss the sensitivity of these numbers in the updated version.

We conducted three additional evaluation runs. On HumanEval, CTX-Dep achieves 28.9 ± 10.2% whereas CTX-Binary achieves 26.7 ± 0.0%, at Safe-Pass@1. At Safe-Pass@3, both methods achieve 37.8%, with standard deviations of 3.8 and 10.2, respectively. This shows that the submitted one-task Safe-Pass@1 difference is not stable across multiple runs.

We also inspected the only LeetCode case solved by CTX-Binary but failed by CTX-Dep in the submitted run, 34-Findfirstlastpos.rs. This task implements two binary searches as separate functions: lower_bound returns the first position whose value is at least the target, upper_bound returns the last position whose value is at most the target. The caller, search_range, combine their postconditions to prove assert(nums@[first_pos as int] == target). CTX-Binary generated this assertion in the submitted run, whereas CTX-Dep failed to combine the postconditions from separate functions. This failure may reflect a limitation of the current dependency reward, which is consistent with a limitaion discussed in Section 6: the current framework focuses on loop-invariant synthesis, and extending it to richer proof structures remains future work.

Reviewer aRG8OpenReview ↗
Rating
4/6
Confidence
3/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The paper proposes TOPOVERUS, an LLM-based framework for Verus proof repair that generates structured counterexample-style diagnostics, a repair rationale, and revised proof annotations in a single trajectory. The model is trained with reinforcement learning from Verus feedback, augmented by a Topological Graph Reward that uses invariant-dependency structure to encourage prerequisite-respecting proof repairs. The paper evaluates this approach on multiple Verus benchmark suites and reports gains over prompted LLM baselines and internal ablations.

Strengths and weaknesses

Strengths

The paper identifies a concrete limitation of verifier-in-the-loop proof repair: raw verifier errors are often too coarse to provide sufficient diagnostic context. Building on counterexample-guided reasoning from prior verification work, the paper develops a counterexample-style diagnostic framework and shows that it improves repair performance.

The Topological Graph Reward is a meaningful and relatively novel reward-shaping mechanism for invariant repair, and it improves weighted Safe-Pass beyond binary verifier-only RL.

Weaknesses

The training-data description is incomplete. While the paper reports SFT/RL hyperparameters and states that RL uses 249 training samples, it does not clearly specify the provenance, size, or composition of the SFT data, nor does it provide file-level identification or dataset breakdown for the 249 RL training samples.

Because the training pipeline and data provenance are under-specified, it is difficult to rule out potential data contamination, especially given the use of verified programs and canonical invariants to construct dependency graphs. This needs further clarification.

The evidence for the Topological Graph Reward is positive overall but somewhat uneven across benchmarks. Compared with CTX-Binary, CTX-Dep shows clear gains on ObfsBench and VeruSAGE, but the improvements are less consistent on other benchmark suites, which slightly weakens the empirical support for the reward’s general effectiveness.

Questions

See weaknesses.

Limitations

Yes

Formatting concerns

No major concerns

1 comment
Authors · RebuttalOpenReview ↗
Rebuttal

W1: The provenance, size, and composition of the SFT and RL training data are under-specified.

Thank you for raising this important point. We agree that the current submission does not provide a sufficiently complete data manifest.

The SFT corpus contains 1,210 repair examples extracted from failed proof states encountered in prior iterative-repair trajectories, covering 249 source programs. Specifically, it contains 168 examples from 50 DafnyBench programs, 256 examples from 53 HumanEval programs, 80 examples from 23 LeetCode programs, and 706 examples from 123 cleaned-VerusBench programs. A source program may contribute multiple SFT examples because we retain both its initial failed proof and intermediate failed proof states encountered during iterative repair.

For each SFT example, Sonnet 4.6 is provided with the failed proof, its corresponding Verus diagnostic, the draft <think> from the original repair trajectory, and the verified Verus program. With direct access to these inputs, Sonnet generates the structured intermediate reasoning: a <think> block, a <counterexample> block containing [State], [Execution Trace], and [Violation], and a <reasoning> block containing an explicit repair plan. Our data-construction script extracts the format-conforming reasoning blocks, discards any code emitted by Sonnet, and appends the verified Verus program unchanged as the final Rust-code target. Thus, Sonnet synthesizes the intermediate reasoning with access to the target proof, while the supervised code target is always the fixed verified Verus program rather than Sonnet-generated code.

The RL corpus contains the same 249 source programs: 50 from DafnyBench, 53 from HumanEval, 23 from LeetCode, and 123 from cleaned-VerusBench. CTX-Binary and CTX-Dep use exactly the same training programs and optimization settings. CTX-Dep additionally uses the corresponding verified reference proof during offline preprocessing to construct the invariant-dependency graph.

The table below reports the source-pool size, number of SFT examples, RL-training and held-out evaluation splits, and split seed for each dataset. We will include this table and a detailed description of the data construction procedure in the revision. The accompanying code release will provide the complete program identifiers for each split and the exact upstream dataset revisions.

Dataset Source pool SFT examples SFT/RL train Held-out Evaluation Split seed
DafnyBench 67 168 50 17 42
HumanEval–AlphaVerus 68 256 53 15 42
LeetCode 28 80 23 5 42
VerusBench 149 706 123 26 42
Total 312 1,210 249 63 42

W2: Please clarify the data-splitting protocol and rule out contamination between training and evaluation.

Thank you for raising this concern. We split the data at the level of source problems (i.e., the original benchmark task before generating failed proof states, intermediate repair states, or dependency graphs), and all artifacts derived from a problem inherit the same split. The 249 training problems are disjoint from all evaluation problems. Therefore, no evaluation problem or artifact derived from it, including failed proof states, verified Verus programs, invariant sets VV, or dependency graphs GG, is used in SFT or RL.

For CTX-Dep, GG is constructed only for training problems and is used only to compute RdepR_{\mathrm{dep}} during RL. Neither VV nor GG is provided at test time. We will state this problem-level split protocol explicitly in the revision and release the code and split metadata, including the complete problem identifiers for each split and the exact upstream dataset revisions.

W3: The gains from the Topological Graph Reward appear uneven across benchmark suites.

We agree that this is an interesting observation. Both CTX-Binary and CTX-Dep are trained on problems from DafnyBench, HumanEval, LeetCode, and cleaned-VerusBench, so their differences on the corresponding in-distribution benchmark families are relatively small.

The larger gains are on VeriCogen, ObfsBench, and VeruSAGE, none of which is used for SFT or RL. Compared with CTX-Binary, CTX-Dep improves Safe-Pass@1/@3 by +4.5/+4.5, +11.3/+4.2, and +5.7/+13.2 percentage points on these three suites, respectively.

One possible explanation is that the dependency reward is more useful when proof templates and syntactic cues are less reliable. This is clearest on ObfsBench, where identifiers are obfuscated. VeriCogen may show a similar effect. On VeruSAGE, the smaller improvement may be because its systems-level tasks involve proof structures beyond the loop-invariant dependencies modeled by the current reward. The current results do not isolate these factors, and we will add a per-suite analysis and representative failure cases in the revision.

Reviewer vvBkOpenReview ↗
Rating
5/6
Confidence
3/5
Quality
3/4
Clarity
3/4
Significance
2/4
Originality
2/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The paper presents TopoVerus, a 32B model for repairing failed Verus proofs that reframes counterexample generation as a diagnostic learning problem. The model emits a structured [State]/[Trace]/[Violation] tuple, a repair rationale, and a repaired program in a single trajectory, and the counterexample earns credit indirectly through downstream verifier success. Another contribution is the Topological Graph Reward, which derives invariant dependencies offline from inductiveness tests and rewards the model for emitting prerequisite invariants before dependent ones, turning the sparse verifier signal into an intra-trajectory micro-curriculum. Across Verus benchmarks, the full model reports 61.6%/72.2% weighted Safe-Pass@1/@3, ahead of Sonnet-4.5 by +5.7/+6.3, and the learned counterexamples are shown to transfer to other repair models.

Strengths and weaknesses

Strengths

  • The transfer experiment is a well-designed isolated control. Holding the buggy program and verifier error fixed, and swapping only the counterexample source cleanly isolates the counter-example diagnostic's contribution from the generator's repair ability. It supports the claim that the diagnostics carry actionable information that is general across repairer.
  • Engineering is sound, and honestly states limitations. The dependency graph is precomputed offline so the reward is an O(|V|+|E|) lookup. The safety gate ensures reported gains aren't from editing executable code. The limitations section openly states the loop-invariant scope and the lack of counterexample validity guarantees.

Weaknesses

  • The main results margin takes advantage of dataset reweighting. The paper reports a weighted average. Under a plain macro average, the lead over Sonnet-4.5 shrinks from +5.7/+6.3 to +2.4/+2.2. And, at k=3 CTX-Dep falls below CTX-Binary on the plain average. The weighting systematically inflates every CTX variant and deflates many cloud baselines.
  • The dependency reward's test time scaling is never isolated. CTX-Binary is the key variant that separates RL with counter-example in COT from RL + topological reward. But it is absent from the entire test-time-scaling study (Figure 3). Given that the topological reward's k=3 benefit already evaporates under plain averaging, the test-time-scaling regime is exactly where this comparison matters most.
  • No GRPO comparison with unlabeled samples. CTX-Binary can be trained with unlabeled data, but every training instance in the paper still originates from a verified reference proof. The dependency reward is structurally label-dependent. The annotation cost is the method's main practical constraint relative to plain GRPO, but is never weighed against a label-free pipeline trained on more, unverified samples.
  • The dependency graph is anchored to a single reference proof. G faithfully encodes one proof's dependencies and omits any structure outside V. A correct repair that uses an equivalent but differently-formulated invariant set is invisible to the offline enumeration and is under-credited by R_dep. It can penalize correct, differently-structured proofs. The soundness and robustness of G to the choice of reference proof are not examined.
  • The motivating example over-attributes failures to prerequisites. Figure 2's narrative explains the dependency-unaware case's hallucinations (e.g., the fabricated mid=0, reasoning about an index outside the quantifier range) as consequences of missing prerequisites. But several of these are decided by the program's own execution or the faulty invariant's own quantifier structure, not by the absent invariants.
Questions
  1. Can you include CTX-Binary in the test-time-scaling curves (both sample and iteration axes)?
  2. How does verifier-only GRPO (CTX-Binary) trained on a substantially larger pool of unverified Verus programs compare? This would separate the value of the annotation from the value of the reward.
  3. If V is derived from a different valid proof, or from a model-generated verified proof rather than a gold one, how stable are the downstream Safe-Pass gains? Have you measured how often correct repairs use invariants outside V, and how much R_dep under-credits them?
  4. Could you make precise which diagnostic failures in the dependency-unaware case are attributable to missing prerequisite invariants? The example seems to credit the dependency mechanism with effects that the program/invariant structure already determines.
Limitations

yes

Final justification

After rebuttal, I edit my overall rating from borderline accept to accept. The following weaknesses have been addressed.

  • The main results margin takes advantage of dataset reweighting. Partially resolved by new macro average results, though the advantage of topology graph is still more limited under macro average compared to micro average.

  • The dependency reward's test time scaling is never isolated. Partially resolved by provide one test time scaling result. But sample scaling is not provided.

  • The dependency graph is anchored to a single reference proof. Resolved by the decomposition of invariant coverage and dependency-edge satisfaction. It shows a clear necessity why dependency topology graph is necessary.

Formatting concerns

N/A

3 comments
Authors · CommentOpenReview ↗

Rebuttal by Authors 1/3

We are grateful for your time, effort, and leaving encouraging comments. We address your comments and questions in the following.

W1: The reported aggregate may be affected by dataset weighting, and the macro-average comparison should be clarified.

We clarify that the reported “weighted average” does not use manually selected dataset weights. It is a micro-average over all 471 evaluation problems, so each problem contributes equally. We agree that this definition was not stated explicitly and will clarify it in the revision.

We also computed the unweighted macro-average across the seven benchmark suites. The macro-average first computes the performance on each benchmark suite and then averages the seven suite-level results, giving each suite equal weight regardless of its size.

As shown in the table below, CTX-Dep remains the best under macro averaging. It outperforms Sonnet-4.5 by 2.4/3.7 percentage points and CTX-Binary by 3.0/0.1 points in Safe-Pass@1/@3. Therefore, CTX-Dep does not underperform CTX-Binary at k=3k=3 under the macro-average calculation. We will report both micro- and macro-averages in the next version of the paper.

Method Micro Safe-Pass@1 Micro Safe-Pass@3 Macro Safe-Pass@1 Macro Safe-Pass@3
Sonnet-4.5 55.9% 65.9% 51.6% 57.8%
CTX-Binary 53.7% 67.9% 51.0% 61.4%
CTX-Dep 61.6% 72.2% 54.0% 61.5%

W2 and Q1: Please include CTX-Binary in the test-time-scaling comparisons and isolate the effect of the dependency reward.

We added CTX-Binary to the iteration-scaling experiment under the same setup as CTX-Dep, including the 63-task subset, prompts, inference budgets, and etc.

In iteration scaling, CTX-Dep remains ahead at every iteration budget beyond the first, reaching 69.8% Safe-Pass@1 at 32 iterations compared with 68.3% for CTX-Binary. The largest gap appears at two iterations (55.6% vs. 49.2%), suggesting that CTX-Dep improves more rapidly during the early repair iterations.

We will add CTX-Binary to the iteration-scaling panel of Figure 3. CTX-Dep shows faster improvement across repair iterations.

TT CTX-Binary Safe CTX-Dep Safe Δ\Delta Dep−Binary
1 47.6% 47.6% 0.0
2 49.2% 55.6% +6.4
4 57.1% 60.3% +3.2
8 61.9% 63.5% +1.6
16 68.3% 69.8% +1.5
32 68.3% 69.8% +1.5

W3 and Q2: The annotation cost is the method's main practical constraint relative to plain GRPO. Please separate the value of the dependency reward from the cost of reference-proof supervision by comparing against verifier-only GRPO trained on a larger pool of unverified programs.

We argue that training on verified programs does not incur additional annotation cost compared with unverified programs. Whenever we want to include an unverified program for training, there must be a verified program coming with it[1][2]. Otherwise, the program could be buggy and not verifiable, and potentially noisy for training. The unverified and verified programs come in pairs [2][3], thus there's no additional cost using verified programs. Moreover, we included the CTX-Binary baseline, which trains on the same number of unverified programs, and it underperforms CTX-Dep.

[1] Chen, Tianyu, et al. "Automated proof generation for rust code via self-evolution." International Conference on Learning Representations. Vol. 2025. 2025.

[2] Yang, Chenyuan, et al. "Autoverus: Automated proof generation for rust code." arXiv preprint arXiv:2409.13082 (2024).

[3] Yang, Jun, et al. "ExVerus: Verus Proof Repair via Counterexample Reasoning." arXiv preprint arXiv:2603.25810 (2026).

Authors · CommentOpenReview ↗

Rebuttal by Authors 2/3

W4 and Q3 (Part 1/2): Please evaluate how sensitive the dependency reward is to the choice of reference proof and whether correct repairs using alternative invariant structures outside VV are under-credited.

We appreciate this question, which allows us to further explain this aspect of our dependency reward. By construction, RdepR_{\mathrm{dep}} does not require an exact textual match to the reference invariants. As described in Section 3.3, the generated invariants are matched to nodes in VV using either exact substring matching or token-set Jaccard similarity with a threshold of 0.6. The reward then assigns graded credit through invariant coverage and dependency-edge satisfaction. Therefore, an invariant whose wording differs locally from the corresponding reference invariant can still be matched, which shows the robustness of our metrics. However, because VV is extracted from a particular reference proof, a verified correct repair that uses a substantially different invariant decomposition may still be under-credited.

To obtain a conservative empirical estimate of under-crediting during training, we analyze 1,920 detailed rollout logs collected from the training run. We define an under-credited case as a rollout that is accepted by Verus but receives a non-maximal dependency reward, i.e., Rdep<1R_{\mathrm{dep}}<1. Among the 596 rollouts accepted by Verus, 214 cases (35.9%) satisfy this definition, while the remaining 382 cases (64.1%) receive the maximum dependency reward.

This definition is conservative because it counts every accepted rollout with a non-maximal reward as under-credited, including cases whose reward is close to 1 because of a small difference from the reference proof. It therefore provides an upper-bound estimate under our operational definition, rather than isolating only correct proofs with substantially different invariant decompositions.

We next compare the diversity of the proofs generated by CTX-Binary and CTX-Dep at evaluation time. This analysis examines whether training with the dependency reward causes CTX-Dep to generate only a narrow set of proof forms. To focus on proof annotations, we define each repaired program's proof-only signature as the whitespace-normalized concatenation of all ghost-code spans extracted by Lynette, excluding executable and other non-proof text. Each task is evaluated with three independent repair chains, and the comparison includes tasks for which both models produce at least two safe verified repairs. We report three metrics: Ghost unique is the mean number of distinct proof-only signatures per task; Ghost rate divides this count by the number of available safe verified repairs; and Ghost distance is the mean pairwise token-Jaccard distance between signatures. Higher values indicate greater proof diversity.

Table 1. Diversity of proof-only signatures among paired safe verified repairs. Each cell reports CTX-Binary / CTX-Dep.

Benchmark Ghost unique Ghost rate Ghost distance
Four in-distribution benchmarks 2.524 / 2.357 84.9% / 79.4% 0.058 / 0.040
VeriCogen 2.522 / 2.217 94.2% / 88.4% 0.388 / 0.316
ObfsBench 2.618 / 2.640 96.9% / 93.9% 0.072 / 0.067
VeruSAGE 1.667 / 1.667 72.2% / 66.7% 0.220 / 0.202

The four in-distribution benchmarks comprise VerusBench, DafnyBench, HumanEval, and LeetCode. CTX-Dep continues to generate multiple distinct proof-only signatures across all benchmark groups. Its Ghost unique, Ghost rate, and Ghost distance are lower than those of CTX-Binary on most groups, while its Ghost-unique score is slightly higher on ObfsBench and equal on VeruSAGE. Taken together with the overall results, these findings indicate a favorable diversity–performance tradeoff: CTX-Dep is slightly less diverse by these measures, but it continues to generate multiple proof forms across all benchmark groups while improving micro-averaged Safe-Pass@1/@3 over CTX-Binary by 7.9/4.3 percentage points.

Authors · CommentOpenReview ↗

Rebuttal by Authors 3/3

W4 and Q3 (Part 2/2): Please evaluate how sensitive the dependency reward is to the choice of reference proof and whether correct repairs using alternative invariant structures outside VV are under-credited.

Continuing our response to W4 and Q3, we further examine whether the dependency reward changes the order in which matched invariants are generated. The following metrics correspond directly to the definition of RdepR_{\mathrm{dep}} in Section 3.3, Equation (6). Mean invariant coverage is the mean value of α=∣V′∣/∣V∣\alpha=|V'|/|V|, where V′V' is the set of canonical invariants matched in the generated proof. Mean edge satisfaction is the mean value of β\beta, namely the fraction of considered inter-SCC dependency edges for which the prerequisite invariant appears before the invariant that depends on it.

Table 2. Invariant coverage and dependency ordering on paired tasks accepted by Verus.

Metric CTX-Binary CTX-Dep Difference
Mean invariant coverage, α\alpha 98.6% 98.5% −0.1-0.1 points
Mean edge satisfaction, β\beta 43.8% 95.8% +52.1+52.1 points
Tasks with full edge satisfaction, β=1\beta=1 41.7% 95.8% +54.2+54.2 points
Mean Rdep=αβR_{\mathrm{dep}}=\alpha\beta 0.424 0.943 +0.519+0.519

CTX-Binary and CTX-Dep have nearly identical mean invariant coverage, 98.6% and 98.5%, respectively. The main difference is therefore not the number of canonical invariants matched in the generated proofs. Instead, CTX-Dep increases mean edge satisfaction from 43.8% to 95.8%, and increases the number of tasks with β=1\beta=1 from 41.7% to 95.8%. This means that, among the matched invariants and considered dependency edges, CTX-Dep is substantially more likely to generate the prerequisite invariant before the invariant that depends on it, which shows the effectiveness of our dependency reward.

Overall, the two analyses suggest that the dependency reward increases the fraction of considered dependency edges for which the prerequisite invariant appears before the invariant that depends on it. At the same time, CTX-Dep preserves nearly the same invariant coverage as CTX-Binary and continues to generate multiple distinct proof forms across all benchmark groups. However, the reward remains dependent on the selected reference proof, and verified correct repairs with different invariant decompositions may still be under-credited. We will add all of the analysis in the next version of our paper.

W5 and Q4: Figure 2 may over-attribute the dependency-unaware model’s fabricated mid = 0 and invalid instantiation at i = 1 to missing prerequisite invariants, even though these errors can also be identified from the program execution and the faulty invariant’s quantifier range; please clarify which failures are genuinely caused or exacerbated by the absence of prerequisite invariants.

Figure 2 shows a real model output selected from our qualitative case studies. We agree that the fabricated mid=0 and the invalid instantiation at i=1 are not necessarily implied by the missing prerequisite invariants. Our claim is not that each individual reasoning error is directly caused by the absence of I1I_1–I3I_3.

Rather, our qualitative analysis suggests that missing prerequisite invariants can make the target failure harder to isolate; e.g., the diagnostic in Figure 2 combines the local boundary error in I5I_5 with postcondition obligations at the function return and introduces details that are not supported by the program semantics or the invariant’s quantifier range, such as mid = 0 and i = 1.

We attribute this difficulty to an under-constrained proof state in which upstream obligations remain unresolved and fewer prerequisite facts are available for isolating the failure in I5I_5. The topological reward encourages the model to establish prerequisite invariants before diagnosing a dependent invariant, so that the diagnosis can focus on the remaining proof obligation. It does not guarantee that every generated state or trace is consistent with program execution. We will clarify this distinction in the discussion of Figure 2.

[1] Chen, Tianyu, et al. "Automated proof generation for rust code via self-evolution." International Conference on Learning Representations. Vol. 2025. 2025.

[2] Yang, Chenyuan, et al. "Autoverus: Automated proof generation for rust code." arXiv preprint arXiv:2409.13082 (2024).

[3] Yang, Jun, et al. "ExVerus: Verus Proof Repair via Counterexample Reasoning." arXiv preprint arXiv:2603.25810 (2026).

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…