arXiv:2610.29755cs.SEOct 2026

Manuscript Offprint

arXiv:2610.29755

VeruSteer: Learning What to Repair Next in Verus

Chao Jiang, Ding Wang, Chaohua Yang, Dugang Liu, Zhiwu Xu, Cheng Wen, Zhong Ming, Yuwei Liu, Xinyi Wan, Lin Huang

CHAO JIANG, Shenzhen University, China

DING WANG, Shenzhen University, China

CHAOHUA YANG, Shenzhen University, China

DUGANG LIU ®^{\text{®}}, Shenzhen University, China

ZHIWU XU, Shenzhen University, China

CHENG WEN, Shenzhen University, China

ZHONG MING, Shenzhen University, China

YUWEI LIU, Ant Group, China

XINYI WAN, Ant Group, China

LIN HUANG, Ant Group, China

LLM-based verification systems repair Rust proofs by revising programs in response to Verus diagnostics. When several error types are reported, pipelines such as AutoVerus and VeruSAGE select the next repair target using a preset priority. Yet each repair changes the program and the errors that follow, so the same reported types can require different choices at different states. We present VeruSteer, which learns to select error types from the outcomes of alternative repair trajectories. It constructs repair trees offline and compares paths from the same initial program by verification success, repair rounds, and final verification progress. These comparisons supervise a selector that combines step-wise imitation with trajectory preference ranking. The selector uses self-attention over the program, verifier feedback, and earlier selections to rank the currently reported types. It replaces the default priority within a single repair trajectory, keeping the existing repair agents and adding no repair or verifier calls for selection. We evaluate VeruSteer by replaying its choices on stored AutoVerus and VeruSAGE test trees under four generation configurations. Across 1,270 test trees, VeruSteer increases verified outcomes from 185 to 194 (14.57% to 15.28%), gaining 12 successes and losing three for a net improvement of 0.71 percentage points. Among trees where the default fails but a recorded alternative verifies, VeruSteer succeeds on 3 of 4 AutoVerus trees and 9 of 11 VeruSAGE trees. Among trees with recorded alternatives where the default verifies, it retains success on 14 of 15 AutoVerus trees and 12 of 14 VeruSAGE trees. It also finds shorter successful trajectories and improves final progress on some trees where all recorded trajectories fail. These replay results provide evidence that learning repair order from trajectory outcomes can yield a modest overall verification gain with existing repair agents.

CCS Concepts: • Software and its engineering → Software verification and validation; Formal software verification; • Computing methodologies → Machine learning.

Additional Key Words and Phrases: Program Verification, Verus, Proof Repair, Specification Synthesis, Large Language Models, Sequential Recommendation

Authors' Contact Information: Chao Jiang, Shenzhen University, College of Computer Science and Software Engineering, Shenzhen, China, chaoccc22@gmail.com; Ding Wang, Shenzhen University, College of Computer Science and Software Engineering, Shenzhen, China, lifetruthuuu@gmail.com; Chaohua Yang, Shenzhen University, College of Computer Science and Software Engineering, Shenzhen, China, chaohua.ych@gmail.com; Dugang Liu, Shenzhen University, College of Computer Science and Software Engineering, Shenzhen, China, dugang.ldg@gmail.com; Zhiwu Xu, Shenzhen University, College of Computer Science and Software Engineering, Shenzhen, China, xuzhiwu@szu.edu.cn; Cheng Wen, Shenzhen University, College of Computer Science and Software Engineering, Shenzhen, China, wencheng@xidian.edu.cn; Zhong Ming, Shenzhen University, College of Computer Science and Software Engineering, Shenzhen, China, mingz@szu.edu.cn; Yuwei Liu, Ant Group, Ant Research, Hangzhou, China, lyw458372@antgroup.com; Xinyi Wan, Ant Group, Ant Research, Hangzhou, China, wanxinyi.wxy@antgroup.com; Lin Huang, Ant Group, Ant Research, Hangzhou, China, linyu.hl@antgroup.com.

  1. ACM 2475-1421/2027/4-ART1

https://doi.org/10.1145/nnnnnnn.nnnnnnn

1:2

D. Wang, C. Jiang, D. Liu, Z. Xu, C. Wen, Z. Ming, Y. Liu, X. Wan, and L. Huang

ACM Reference Format:

Chao Jiang, Ding Wang, Chaohua Yang, Dugang Liu, Zhiwu Xu, Cheng Wen, Zhong Ming, Yuwei Liu, Xinyi Wan, and Lin Huang. 2027. VeruSteer: Learning What to Repair Next in Verus. Proc. ACM Program. Lang. 11, OOPSLA1, Article 1 (April 2027), 26 pages. https://doi.org/10.1145/nnnnnnn.nnnnnnn

1 Introduction

Verus [16] verifies Rust [24] programs against formal specifications, using proof annotations to help an SMT solver discharge the resulting obligations. A verification attempt may fail because the program has compilation or type errors, or because Verus cannot prove an obligation such as an assertion, a loop invariant, or an arithmetic-safety condition. An unproved obligation does not by itself establish a program bug: the program may instead lack the annotations needed to justify it. LLM-based systems such as AutoVerus [36] and VeruSAGE [37] address these failures through iterative repair. Repair can preserve the existing implementation, specifications, and useful proof annotations while using verifier diagnostics to focus revisions on unresolved obligations, rather than regenerating the entire annotated program.

When several diagnostics are reported together, a repair pipeline must decide which one to address next. AutoVerus and VeruSAGE classify verifier diagnostics into categories, which we call error types, and invoke a specialized repair agent for the selected type. They make this selection using a preset priority over error types, falling back to diagnostic order when none of the priority-listed types is present. This rule does not consider the program, diagnostic details, or earlier repair attempts. These signals can matter: the program determines how proof obligations depend on one another, diagnostics identify the conditions that remain unproved, and the repair history records which changes have already been tried and what they achieved.

The consequences of target selection extend beyond the current round. In our motivating example, the loop is annotated with the invariant sum == arithmetic_sum(i as nat); its body increments i and adds it to sum. Preserving this invariant requires establishing that the old sum plus the incremented index equals arithmetic_sum at the new index. Together with a bound on this mathematical sum, the same relation can justify that the machine-integer addition does not overflow. The invariant failure therefore identifies a proof relation useful to both obligations, making it a promising first repair target in this example. In the recorded tree, the invariant-first branch reaches verification after subsequent assertion and overflow repairs, whereas the overflow-first branch leaves an assertion unproved through the remaining budget (Section 3.1). Moreover, later states on the successful trajectory report the same error types but require different selections, so no fixed ordering reproduces that trajectory.

We study how often such differences arise in 3,224 repair trees over 684 tasks, collected with AutoVerus and VeruSAGE (Section 3.2). A repair tree records alternative repair sequences from one initial program: nodes are program states with verifier feedback, branches record repairs targeting different reported error types, and each root-to-leaf path is a repair trajectory. Branches within a tree use the same repair configuration and budget. Of the 718 trees with alternative trajectories, 32.0% contain an alternative that verifies where the default fails, verifies in fewer rounds, or ends with greater progress when all trajectories fail. Among states with a uniquely best type under the recorded outcomes, choosing the most frequently best type for each reported set recovers that choice at only 62.0% of states. These observations motivate selecting repair targets from their context and judging choices by the trajectories they produce.

Adaptive target selection already appears in StarVerus [13], whose LLM planner analyzes the program and diagnostics to choose a repairer. This establishes a precedent for contextual selection, but leaves open how to learn such a policy explicitly from observed repair outcomes. We investigate supervision derived from comparisons of alternative repair trajectories, rather than relying on a

1:3

prompted planner’s analysis alone. An ordinary run observes the result of its selected target but not where other targets would have led, and the value of a selection may emerge only after several further repairs. Comparing complete trajectories from the same starting program provides evidence about this delayed effect.

We present VeruSteer, a framework for learning error-type selection from repair trajectories. During offline data construction, VeruSteer branches on the reported error types, using the pipeline's existing agents and acceptance checks to record one repair outcome for each type. The resulting paths expose different repair orders under the same budget. We derive preferences from whether a path verifies, how many rounds a successful path needs, and how much verification progress an unsuccessful path makes. Comparisons within each tree let both successful and failed paths contribute supervision.

VeruSteer formulates this selection as next-item prediction in sequential recommendation: a trajectory forms the interaction sequence, and error types are the candidate items. Its error type repair selector uses a self-attention encoder over the current program, verifier feedback, and repair history to score the types available at each state. It learns through two objectives: step-wise imitation of preferred trajectories and pairwise ranking based on their outcomes. At deployment, one ranking chooses the next target and the underlying pipeline performs the repair. This follows a single trajectory under the original budget and adds no repair or verifier call for selection.

We evaluate VeruSteer by replaying its choices on stored test trees from both pipelines, with two generation LLMs and two prompting settings. We measure whether it retains outcomes already achieved by the default rule and finds better alternatives when the trees contain them. Where the default fails but an alternative verifies, VeruSteer recovers 75.0% of the available verification improvements on AutoVerus and 81.8% on VeruSAGE. On trees with alternative trajectories where the default verifies, it preserves 93.3% and 85.7% of those successes, respectively. It also finds shorter verified trajectories and improves final progress on trees where no trajectory verifies.

On VeruSAGE, replacing the selector with Random or rules learned from error types alone reduces recovery of verification opportunities to 43.6–54.5%. Ablations further show that the program and diagnostics, both training losses, and the representations of earlier selections and state order contribute to this recovery.

This paper makes the following contributions:

• Characterizing error selection. We formulate the choice of repair target in terms of trajectory outcomes, and construct a corpus of repair trees that shows both the opportunities missed by preset priorities and how the better choice depends on context.

• Learning from alternative trajectories. We develop VeruSteer, which combines preferences from successful and failed repair paths with a sequence model that selects among the currently reported error types of an existing repair pipeline.

• Controlled evaluation of repair selection. We compare selectors over the same recorded transitions in AutoVerus and VeruSAGE, measuring default-outcome preservation and alternative recovery, and examine selection strategies, model components, and contextual inputs.

References (27)