- Rating
- 4
- Clarity
- 3
- Confidence
- 2
- Originality
- 3
- Quality
- 3
- Significance
- 3
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
-
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?
-
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?
-
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.
Paper formatting concerns
No major formatting violation is clear from the provided manuscript.
W1 and Q1: Please clarify how the canonical invariant set V is obtained and what scope limitation this requirement imposes.
Yes, constructing Rdep 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 V, and perform subset-based inductiveness tests to construct G 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, V, or G.
In the submitted version, we define V in Section 3.1, Section 3.3 states that G is precomputed offline, and Appendix A.1 specifies that V 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_boundreturns the first position whose value is at least the target,upper_boundreturns the last position whose value is at most the target. The caller,search_range, combine their postconditions to proveassert(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.