arXiv:2604.16529cs.SEcs.AI2026-04被引 10

通过压缩轨迹信息提升代码智能体的测试时计算能力

Scaling Test-Time Compute for Agentic Coding

论文配图:Scaling Test-Time Compute for Agentic Coding
图 1 · 摘自论文原文
  • 将代码生成轨迹转化为结构化摘要,保留关键进展与错误模式
  • 在SWE-Bench Verified上使Claude-4.5-Opus性能从70.9%提升至77.6%
  • 适合需要长周期推理的自动化编程场景,尤其关注测试时优化

测试时扩展已成为提升大语言模型性能的有效方法。然而,现有方法更适合生成短文本且可直接比较或排序的场景。长周期代码智能体则不同:每次尝试会产生包含动作、观察、错误和部分进展的完整轨迹。此时挑战不再是如何生成更多尝试,而在于如何以有效形式表示过往经验以便选择和复用。本文提出一种基于轨迹回放紧凑表示的测试时扩展框架。该框架将每个回放转换为结构化摘要,保留其关键假设、进展与失败模式,同时剔除低信噪比的细节。该表示支持两种互补的推理时扩展方式:并行扩展采用递归锦标赛投票(RTV),通过小群体比较逐步筛选;顺序扩展则通过条件化新回放于先前尝试的摘要提炼结果,实现平行蒸馏-精炼(PDR)。本方法在SWE-Bench Verified和Terminal-Bench v2.0上一致提升前沿代码智能体表现。例如,使用该方法后,Claude-4.5-Opus在SWE-Bench Verified(mini-SWE-agent)上从70.9%提升至77.6%,在Terminal-Bench v2.0(Terminus 1)上从46.9%提升至59.1%。结果表明,长周期智能体的测试时扩展本质上是表征、选择与复用的问题。

原文摘要 · Abstract (English)

Test-time scaling has become a powerful way to improve large language models. However, existing methods are best suited to short, bounded outputs that can be directly compared, ranked or refined. Long-horizon coding agents violate this premise: each attempt produces an extended trajectory of actions, observations, errors, and partial progress taken by the agent. In this setting, the main challenge is no longer generating more attempts, but representing prior experience in a form that can be effectively selected from and reused. We propose a test-time scaling framework for agentic coding based on compact representations of rollout trajectories. Our framework converts each rollout into a structured summary that preserves its salient hypotheses, progress, and failure modes while discarding low-signal trace details. This representation enables two complementary forms of inference-time scaling. For parallel scaling, we introduce Recursive Tournament Voting (RTV), which recursively narrows a population of rollout summaries through small-group comparisons. For sequential scaling, we adapt Parallel-Distill-Refine (PDR) to the agentic setting by conditioning new rollouts on summaries distilled from prior attempts. Our method consistently improves the performance of frontier coding agents across SWE-Bench Verified and Terminal-Bench v2.0. For example, by using our method Claude-4.5-Opus improves from 70.9% to 77.6% on SWE-Bench Verified (mini-SWE-agent) and 46.9% to 59.1% on Terminal-Bench v2.0 (Terminus 1). Our results suggest that test-time scaling for long-horizon agents is fundamentally a problem of representation, selection, and reuse.

代码生成测试时扩展智能体推理优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。