SWE-VERIFIER: Selective Verification for Cost-Efficient Coding Agents
Organizations: University of Michigan · The University of Texas at Austin
Abstract
Coding agents spend substantial computation generating actions and processing long interaction histories. Poor action choices can steer agents into low-value states, wasting computation and increasing API costs. Sampling and verifying alternative actions can improve the agent's decisions, but applying this procedure at every step adds substantial overhead. We introduce SWE-Verifier, a lightweight generative model that selectively triggers candidate sampling and verification. It scores the coding agent's proposed action to determine when additional candidate sampling is needed, then ranks the resulting actions before execution. We train SWE-Verifier from Qwen3.5-4B using preference data that groups contrasting actions with their resulting environment observations and rubric-guided teacher scores. Using the mini-swe-agent harness, SWE-Verifier improves resolution from 75.47% to 77.20% on MiniMax-M2.7 at 1.09 times cost and generalizes to DeepSeek-V4-Flash without training on its actions, improving resolution from 72.60% to 74.27% at 1.13 times cost. Across both models, SWE-Verifier verifies fewer than 4% of steps and achieves comparable or higher resolution than the trajectory and all-step baselines at substantially lower cost. These results demonstrate that selective candidate sampling and lightweight verification provide complementary gains in coding-agent performance and inference efficiency. Our model, code, and data are available at https://github.com/zkjzou/SWE-Verifier.
Figures & tables
| Policy | Strategy | Verifier Setting | Resolve (%) | Total Cost ( ) | Steps (Verified %) |
| MiniMax-M2.7 | None | No verification | 75.47 1.40 | 1.00 | 46.38 (0.00%) |
| Trajectory | LLM-as-a-Verifier@3 | 75.85 0.87 | 3.50 | – | |
| Oracle@3 | 82.20 | 3.00 | – | ||
| All-step | Self-Verification | 75.27 1.86 | 3.35 | 38.51 (100.00%) | |
| Qwen3.5-4B | 76.40 0.69 | 2.26 | 39.98 (100.00%) | ||
| Selective | Untrained | 76.93 1.21 | 1.20 | 44.05 (12.61%) |
| Gate | Selector | Resolve (%) | Steps (Verified %) | Policy Cost ( ) | Total Cost ( ) |
| No verification | – | 68.48 3.48 | 57.89 (0.00%) | 1.00 | 1.00 |
| Threshold | |||||
| SWE-Verifier (Untrained) | MiniMax-M2.7 | 71.12 3.48 | 55.50 (5.41%) | 1.05 | 1.18 |
| SWE-Verifier (Untrained) | 70.63 0.57 | 59.43 (5.54%) | 1.16 | 1.16 | |
| SWE-Verifier (Score Only) | MiniMax-M2.7 | 73.27 2.62 | 59.21 (5.13%) | 1.14 | 1.29 |
| SWE-Verifier (Score Only) | 71.95 3.78 | 61.45 (5.79%) | 1.24 | 1.24 | |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Resolve | Resolve | Steps | Verify Rate | Policy Cost | Total Cost | |
| MiniMax-M2.7 baseline | 75.5% | +0.0 | 46.4 | 0% | 1.00 | 1.00 |
| Trajectory-level upper bound | ||||||
| Oracle@3 | 82.2% | +6.7 | 139.1 | – | 3.00 | 3.00 |
| Step-level verifier | ||||||
| All Steps | ||||||
| verifier ( ) | 76.2% | +0.7 | 38.2 | 100% | 1.15 | 2.16 |
| Verification strategy | Policy input cost | Policy output cost | Verifier input cost | Verifier output cost |
| Baseline | ||||
| Trajectory-level | ||||
| Step-level | ||||
| Small step-level verifier |
Coding Agents
Coding agents use language models, tools, and feedback to modify software and complete engineering tasks.
See all 139 papers