arXiv:2601.22129cs.SEcs.AI2026-01被引 9

SWE-Replay通过复用历史轨迹提升代码生成效率,降低成本且性能不降。

SWE-Replay: Efficient Test-Time Scaling for Software Engineering Agents

  • 复用先前试验的轨迹,在关键节点选择重用或重新探索。
  • 在SWE-Bench Verified上成本降低17.4%,性能最高提升3.8%。
  • 适用于生成自定义bash脚本的现代代码代理,无需依赖不准确的评估模型。

测试时扩展已被广泛用于增强大语言模型(LLM)代理在软件工程(SWE)任务中的能力。然而,标准方法反复从头采样轨迹,计算成本高昂。尽管近期方法尝试通过专用价值代理降低开销,但可能因模型校准偏差而失效,且难以泛化到能合成自定义bash脚本作为工具的现代代理。本文提出SWE-Replay,首个无需依赖潜在噪声价值估计的高效且可泛化的测试时扩展技术。SWE-Replay通过复用先前试验的轨迹优化扩展过程,动态决定在关键中间步骤是否从头探索或利用存档经验。该决策基于仓库探索的潜力与推理重要性,而非外部LLM质量评估。评估显示,在SWE-Bench Verified上,SWE-Replay持续优于朴素扩展,成本降低最多达17.4%,同时性能最高提升3.8%。在SWE-Bench Pro和多语言数据集上的进一步验证表明其良好泛化性,确立了其作为高效测试时扩展的坚实基础。

原文摘要 · Abstract (English)

Test-time scaling has been widely adopted to enhance the capabilities of Large Language Model (LLM) agents in software engineering (SWE) tasks. However, the standard approach of repeatedly sampling trajectories from scratch is computationally expensive. While recent methods have attempted to mitigate costs using specialized value agents, they can suffer from model miscalibration and fail to generalize to modern agents that synthesize custom bash scripts as tools. In this paper, we introduce SWE-Replay, the first efficient and generalizable test-time scaling technique for modern agents without reliance on potentially noisy value estimates. SWE-Replay optimizes the scaling process by recycling trajectories from prior trials, dynamically choosing to either explore from scratch or exploit archived experience by branching at critical intermediate steps. This selection of intermediate steps is driven by the potential and reasoning significance of repository exploration, rather than external LLM-based quality estimates. Our evaluation shows that, on SWE-Bench Verified, SWE-Replay consistently outperforms naive scaling, reducing costs by up to 17.4% while maintaining or even improving performance by up to 3.8%. Further evaluation on SWE-Bench Pro and Multilingual validates the generalizability of SWE-Replay, establishing it as a robust foundation for efficient test-time scaling of software engineering agents.

代码生成测试扩展LLM代理

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