SWE-Exp:基于经验驱动的软件问题解决
SWE-Exp: Experience-Driven Software Issue Resolution
July 31, 2025
作者: Silin Chen, Shaoxin Lin, Xiaodong Gu, Yuling Shi, Heng Lian, Longfei Yun, Dong Chen, Weiguo Sun, Lin Cao, Qianxiang Wang
cs.AI
摘要
近期,大型语言模型(LLM)代理在软件问题解决方面取得了显著进展,得益于多代理协作和蒙特卡洛树搜索(MCTS)等先进技术的应用。然而,当前的代理如同无记忆的探索者,将每个问题孤立处理,未能保留或复用以往修复经验中的知识。这导致了失败路径的重复探索,错失了将成功的问题解决方法应用于类似问题的机会。为解决这一问题,我们提出了SWE-Exp,一种经验增强型方法,它从先前的代理轨迹中提炼出简洁且可操作的经验,实现跨问题的持续学习。我们的方法引入了一个多维度经验库,既捕捉成功的修复尝试,也记录失败的案例。具体而言,它从不同层面提取可复用的问题解决知识——从高层次的问题理解到具体的代码变更。实验表明,在开源代理框架下,SWE-Exp在SWE-bench-Verified上达到了41.6%的Pass@1解决率,处于领先地位。我们的方法确立了一种新范式,即自动化软件工程代理系统性地积累并利用修复专业知识,从根本上从试错探索转向基于经验的战略性问题解决。
English
Recent advances in large language model (LLM) agents have shown remarkable
progress in software issue resolution, leveraging advanced techniques such as
multi-agent collaboration and Monte Carlo Tree Search (MCTS). However, current
agents act as memoryless explorers - treating each problem separately without
retaining or reusing knowledge from previous repair experiences. This leads to
redundant exploration of failed trajectories and missed chances to adapt
successful issue resolution methods to similar problems. To address this
problem, we introduce SWE-Exp, an experience - enhanced approach that distills
concise and actionable experience from prior agent trajectories, enabling
continuous learning across issues. Our method introduces a multi-faceted
experience bank that captures both successful and failed repair attempts.
Specifically, it extracts reusable issue resolution knowledge at different
levels - from high-level problem comprehension to specific code changes.
Experiments show that SWE-Exp achieves state-of-the-art resolution rate (41.6%
Pass@1) on SWE-bench-Verified under open-source agent frameworks. Our approach
establishes a new paradigm in which automated software engineering agents
systematically accumulate and leverage repair expertise, fundamentally shifting
from trial-and-error exploration to strategic, experience-driven issue
resolution.