用多智能体辩论提升代码问题定位准确率
SWE-Debate: Competitive Multi-Agent Debate for Software Issue Resolution
- 构建代码依赖图生成故障传播路径,作为推理起点
- 三轮辩论使不同视角智能体协作,定位精度显著提升
- 适合需要高可靠性代码修复的工程团队使用
问题解决因大语言模型的强大推理能力取得了显著进展。近期基于智能体的框架如SWE-agent进一步推动了这一进展,使自主、工具使用的智能体能够处理复杂的软件工程任务。然而,现有方法主要依赖智能体独立探索,常陷入局部解,难以发现跨代码库的问题模式。为此,我们提出SWE-Debate,一种竞争性多智能体辩论框架,通过多样化推理路径实现更集中的问题定位。SWE-Debate首先通过遍历代码依赖图生成多个故障传播轨迹作为定位提案。随后,在专业化智能体间组织三轮辩论,每个智能体代表沿故障传播轨迹的不同推理视角。这种结构化竞争促使智能体协同收敛至统一的修复方案。最终,该方案被整合进基于MCTS的代码修改智能体以生成补丁。在SWE-bench基准上的实验表明,SWE-Debate在开源智能体框架中达到新的最先进水平,显著优于基线方法。
原文摘要 · Abstract (English)
Issue resolution has made remarkable progress thanks to the advanced reasoning capabilities of large language models (LLMs). Recently, agent-based frameworks such as SWE-agent have further advanced this progress by enabling autonomous, tool-using agents to tackle complex software engineering tasks. While existing agent-based issue resolution approaches are primarily based on agents' independent explorations, they often get stuck in local solutions and fail to identify issue patterns that span across different parts of the codebase. To address this limitation, we propose SWE-Debate, a competitive multi-agent debate framework that encourages diverse reasoning paths and achieves more consolidated issue localization. SWE-Debate first creates multiple fault propagation traces as localization proposals by traversing a code dependency graph. Then, it organizes a three-round debate among specialized agents, each embodying distinct reasoning perspectives along the fault propagation trace. This structured competition enables agents to collaboratively converge on a consolidated fix plan. Finally, this consolidated fix plan is integrated into an MCTS-based code modification agent for patch generation. Experiments on the SWE-bench benchmark show that SWE-Debate achieves new state-of-the-art results in open-source agent frameworks and outperforms baselines by a large margin.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。