cs.LGOct 21, 2026

SWE-VERIFIER: Selective Verification for Cost-Efficient Coding Agents

Authors: Kaijian Zou, Vaibhav Chennareddy, Yunxiang Zhang, Naihao Deng, Longju Bai, Jiaxin Pei, Rada Mihalcea, Lu Wang

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

Appendix figures & tables9 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. SWE-Critix: Post-Training Generalist Verifiers for Assessing Coding-Agent Trajectories

    Oct 9, 2026Jiajun Hu, Chun Yong ChongLLM Agent VerificationAI Coding Agents

  2. The Verification Horizon: No Silver Bullet for Coding Agent Rewards

    Jun 24, 2026Binghai Wang, Chenlong Zhang, Dayiheng Liu +10Reward ModelingReward Hacking

  3. Teaching Agents to Code Reliably

    Oct 2, 2026Muhammad Ahmed Mohsin, Myeongsoo Kim, Kangrui Ruan +3Repository-Level Program RepairAI Coding Agents