通过Bandit优化发现层次化软件工程代理:BOAD
BOAD: Discovering Hierarchical Software Engineering Agents via Bandit Optimization
AI总结:
BOAD通过多臂老虎机问题自动发现层次化多代理结构,提升软件工程任务的泛化能力。
摘要:
大型语言模型(LLMs)在推理和编码能力方面表现出色,但它们在解决长周期和分布外的现实软件工程(SWE)问题时表现不佳。现有系统通常依赖单一代理处理整个工作流——解读问题、导航大型代码库、实施修复——在一条推理链内完成。这种单体设计迫使模型保留无关上下文,导致虚假相关性和较差的泛化能力。受人类工程师分解复杂问题的方式启发,我们提出将SWE代理结构化为协调者,协调专门的子代理以完成定位、编辑和验证等子任务。挑战在于自动发现有效的层次结构:随着子代理数量的增长,搜索空间变得组合性,难以在团队中归因于个体子代理。我们通过将层次发现建模为多臂老虎机(MAB)问题来解决这些挑战,其中每个臂代表一个候选子代理,奖励衡量其与其他代理协作时的有用性。这种框架称为Bandit Optimization for Agent Design(BOAD),使在有限评估预算下高效探索子代理设计成为可能。在SWE-bench-Verified上,BOAD优于单代理和手动设计的多代理系统。在SWE-bench-Live上,包含更多近期和分布外问题的测试集,我们的36B系统在评估时排名第二,超过了GPT-4和Claude等更大模型。这些结果表明,自动发现的层次化多代理系统在解决具有挑战性的长周期SWE任务时显著提高了泛化能力。代码可在https://github.com/iamxjy/BOAD-SWE-Agent上获得。
英文摘要:
Large language models (LLMs) have shown strong reasoning and coding capabilities, yet they struggle to generalize to real-world software engineering (SWE) problems that are long-horizon and out of distribution. Existing systems often rely on a single agent to handle the entire workflow-interpreting issues, navigating large codebases, and implementing fixes-within one reasoning chain. Such monolithic designs force the model to retain irrelevant context, leading to spurious correlations and poor generalization. Motivated by how human engineers decompose complex problems, we propose structuring SWE agents as orchestrators coordinating specialized sub-agents for sub-tasks such as localization, editing, and validation. The challenge lies in discovering effective hierarchies automatically: as the number of sub-agents grows, the search space becomes combinatorial, and it is difficult to attribute credit to individual sub-agents within a team. We address these challenges by formulating hierarchy discovery as a multi-armed bandit (MAB) problem, where each arm represents a candidate sub-agent and the reward measures its helpfulness when collaborating with others. This framework, termed Bandit Optimization for Agent Design (BOAD), enables efficient exploration of sub-agent designs under limited evaluation budgets. On SWE-bench-Verified, BOAD outperforms single-agent and manually designed multi-agent systems. On SWE-bench-Live, featuring more recent and out-of-distribution issues, our 36B system ranks second on the leaderboard at the time of evaluation, surpassing larger models such as GPT-4 and Claude. These results demonstrate that automatically discovered hierarchical multi-agent systems significantly improve generalization on challenging long-horizon SWE tasks. Code is available at https://github.com/iamxjy/BOAD-SWE-Agent.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。