arXiv:2512.23631cs.LGcs.AI2025-12被引 5

用强化学习自动设计分层软件工程智能体,提升复杂任务泛化能力。

BOAD: Discovering Hierarchical Software Engineering Agents via Bandit Optimization

  • 将多智能体层级结构设计转化为强化学习中的多臂赌博机问题
  • 在SWE-bench-Verified上超越单智能体和人工设计系统,在Live数据集排名第二
  • 适合需要长周期、高泛化能力的自动化代码修复场景

大型语言模型虽具强大推理与编码能力,但在长周期、分布外的真实软件工程任务中表现不佳。现有系统常依赖单一智能体完成从问题理解、代码库导航到修复实现的全流程,导致上下文冗余、虚假关联与泛化能力差。受人类工程师分解复杂问题的启发,我们提出将软件工程智能体构建为协调者,指挥专业化子智能体完成定位、编辑、验证等子任务。核心挑战在于如何自动发现高效层级结构:随着子智能体增多,组合搜索空间急剧膨胀,且难以衡量个体贡献。为此,我们将层级发现建模为多臂赌博机问题,每个臂代表一个候选子智能体,奖励反映其协作时的实际帮助度。该框架称为带子优化的智能体设计(BOAD),可在有限评估预算下高效探索子智能体方案。在SWE-bench-Verified上,BOAD优于单智能体与人工设计的多智能体系统;在更具挑战性的SWE-bench-Live上,360亿参数系统位列榜单第二,超越GPT-4与Claude等更大模型。结果表明,自动发现的分层多智能体系统显著提升复杂长周期软件任务的泛化性能。代码已开源:https://github.com/iamxjy/BOAD-SWE-Agent。

原文摘要 · Abstract (English)

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.

软件工程多智能体强化学习自动设计

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