arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.23803cs.SEcs.AI
收藏

思考更长,而非模型更大:通过扩展测试时计算增强软件工程智能体

Thinking Longer, Not Larger: Enhancing Software Engineering Agents via Scaling Test-Time Compute

Tongyi Lab, Alibaba Group(阿里巴巴集团通义实验室)

Yingwei Ma, Yongbin Li, Yihong Dong, Xue Jiang, Rongyu Cao, Jue Chen, Fei Huang, Binhua Li

AI总结:

本文提出统一的测试时计算扩展框架,通过内部轨迹合成与外部过程搜索,使32B开源模型在SWE-bench Verified上达到46%问题解决率,超越更大闭源模型。

摘要:

近年来,软件工程智能体的进展展现了其在自动化程序改进方面的可观能力。然而,它们对闭源或资源密集型模型的依赖给私有环境中的部署带来了重大挑战,由此引出一个关键问题:可个人部署的开源大语言模型(LLM)如何实现可比的代码推理性能?为此,我们提出一个统一的测试时计算(Test-Time Compute,TTC)扩展框架,利用增加推理时计算而非更大的模型。该框架包含两种互补策略:内部 TTC 与外部 TTC。在内部,我们引入一种“开发情境化轨迹合成”方法,利用真实软件仓库来引导多阶段推理过程,例如故障定位与补丁生成。我们进一步通过拒绝采样提升轨迹质量,从准确性与复杂度两方面严格评估轨迹。在外部,我们提出一种新颖的“基于开发过程的搜索”策略,由奖励模型与执行验证进行引导。该方法能够在关键开发决策点进行有针对性的计算分配,克服了现有“仅端点”验证方法的局限。在 SWE-bench Verified 上的评估表明,我们的 32B 模型实现了 46% 的问题解决率,超越了显著更大的模型,如 DeepSeek R1 671B 和 OpenAI o1。此外,我们提供了 SWE 智能体中测试时扩展现象的经验验证,揭示模型会为越来越具挑战性的问题动态分配更多 token,从而有效增强推理能力。我们公开所有训练数据、模型和代码,以促进未来研究。https://github.com/yingweima2022/SWE-Reasoner

英文摘要:

Recent advancements in software engineering agents have demonstrated promising capabilities in automating program improvements. However, their reliance on closed-source or resource-intensive models introduces significant deployment challenges in private environments, prompting a critical question: \textit{How can personally deployable open-source LLMs achieve comparable code reasoning performance?} To this end, we propose a unified Test-Time Compute scaling framework that leverages increased inference-time computation instead of larger models. Our framework incorporates two complementary strategies: internal TTC and external TTC. Internally, we introduce a \textit{development-contextualized trajectory synthesis} method leveraging real-world software repositories to bootstrap multi-stage reasoning processes, such as fault localization and patch generation. We further enhance trajectory quality through rejection sampling, rigorously evaluating trajectories along accuracy and complexity. Externally, we propose a novel \textit{development-process-based search} strategy guided by reward models and execution verification. This approach enables targeted computational allocation at critical development decision points, overcoming limitations of existing "end-point only" verification methods. Evaluations on SWE-bench Verified demonstrate our \textbf{32B model achieves a 46\% issue resolution rate}, surpassing significantly larger models such as DeepSeek R1 671B and OpenAI o1. Additionally, we provide the empirical validation of the test-time scaling phenomenon within SWE agents, revealing that \textbf{models dynamically allocate more tokens to increasingly challenging problems}, effectively enhancing reasoning capabilities. We publicly release all training data, models, and code to facilitate future research. https://github.com/yingweima2022/SWE-Reasoner

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑