BOAD: Discovering Hierarchical Software Engineering Agents via Bandit Optimization

Iris Xu, Guangtao Zeng, Zexue He, Charles Jin, Aldo Pareja, Dan Gutfreund, Chuang Gan, Zhang-Wei Hong · 2025

Read BOAD: Discovering Hierarchical Software Engineering Agents via Bandit Optimization by Iris Xu, Guangtao Zeng, Zexue He, Charles Jin, Aldo Pareja, Dan Gutfreund, Chuang Gan, Zhang-Wei Hong (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2512-23631.txt.

Introduction

Iris Xu and seven co-authors redesign how AI agents fix real software bugs. A single agent handling the whole job, from reading an issue to navigating a codebase to editing and validating, accumulates irrelevant context and generalizes poorly. Human engineers instead split the work among specialists, but hand-designing the team is guesswork.

Their framework, BOAD, discovers the team structure automatically by treating each candidate sub-agent as an arm in a multi-armed bandit problem, where rewards measure how much the sub-agent helps its collaborators. An orchestrator coordinates specialists for localization, editing, and validation. On SWE-bench-Verified the discovered hierarchy beat single-agent and manually designed multi-agent systems, and on the fresher SWE-bench-Live benchmark the team's thirty-six-billion-parameter system ranked second overall, ahead of larger proprietary models.

Catalog record

CREATORIris Xu, Guangtao Zeng, Zexue He, Charles Jin, Aldo Pareja, Dan Gutfreund, Chuang Gan, Zhang-Wei Hong
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE84 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2512-23631

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

BOAD: Discovering Hierarchical Software Engineering Agents via Bandit Optimization Iris Xu, Guangtao Zeng, Zexue He, Charles Jin, Aldo Pareja, Dan Gutfreund, Chuang Gan, Zhang-Wei Hong Abstract 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 . 1 Introduction Large language models (LLMs) have achieved remarkable progress in natural language processing [ 38 ] and reasoning [ 21 ] , and are increasingly adopted in solving complex coding problems [ 58 ] . Yet solving real-world software engineering (SWE) problems remains challenging [ 25 ] for LLMs, particularly for issues that fall outside the training distribution [ 54 ] . Despite strong results on SWE-bench-Verified [ 25 ] , state-of-the-art systems struggle on more recent and out-of-distribution issues in SWE-bench-Live [ 54 ] . We hypothesize that one reason current SWE agents generalize poorly is their reliance on a single agent to solve a problem within a single reasoning chain. Solving a software engineering task requires handling multiple sub-tasks—such as locating relevant files, editing code, and running tests—each of which depends only on a subset of information. For example, during code editing, the model only needs to know which line to modify, not how that file was previously located. Retaining such irrelevant context introduces spurious correlations [ 57 ; 36 ] , leading models trained on long reasoning chains to overfit to training distributions and degrade on out-of-distribution problems. Motivated by the need to limit irrelevant context during long reasoning processes, we introduce explicit hierarchical structure to LLM-based agents. This design choice mirrors how human engineers solve complex problems—cognitive science studies show that humans reduce cognitive load by decomposing complex tasks into manageable sub-tasks and integrating their outcomes to form the final solution [ 32 ; 37 ; 33 ] . Recent work [ 55 ] demonstrates that decomposing a complex task into smaller sub-tasks improves LLM performance. In software engineering, such decomposition commonly maps to stages like bug reproduction, fault localization, code modification, and validation [ 45 ; 24 ; 31 ] . This same idea appears as temporal abstraction in hierarchical reinforcement learning (HRL) [ 11 ] : instead of solving problems step by step, the agent delegates control to reusable sub-agents, each defined as a policy for a specific sub-task [ 40 ] . An orchestrator coordinates these sub-agents by selecting which one to activate, and each sub-agent runs until it completes its sub-task [ 40 ; 19 ; 10 ] . Planning at the level of sub-agents shortens the effective decision horizon and abstracts away low-level details, allowing the orchestrator to focus on high-level structure. This abstraction supports generalization because sub-agents capture task-invariant skills—such as repo navigation, information retrieval, or code modification—that can be recomposed across different tasks and contexts, rather than overfitting to task-specific action sequences. Although hierarchical multi-agent systems for SWE tasks appear promising, prior attempts have achieved only limited success. Existing approaches [ 8 ; 34 ; 14 ] typically rely on manually constructed systems, where sub-agents are assigned to predefined sub-tasks (e.g., locating faulty files) and coordinated by a human-designed orchestrator. These designs depend heavily on human intuition to decompose tasks and assign agent roles, but such decompositions often fail to align with how LLM-based agents actually reason and behave. Because LLM behavior is difficult to predict, workflows that appear logical to humans can perform poorly in practice (Section 5 ). This motivates automating multi-agent design, which removes the need for manual specification and enables the discovery of effective agent designs that may not be obvious to human designers. While prior work has explored optimizing the design of single-agent SWE systems [ 51 ] , these methods do not address the additional challenges of multi-agent coordination, where agents must interact and share information dynamically. Other approaches optimize fixed, multi-step workflows involving multiple LLM calls [ 26 ; 52 ; 23 ] , but they still rely on predefined pipelines. In contrast, SWE agents operate in open-ended environments where execution order and interactions are not fixed in advance. Automating multi-agent design introduces two main challenges. First, as the number of sub-agents grows, the design space expands combinatorially, and evaluating each multi-agent design on SWE tasks is far slower than on simpler reasoning benchmarks like multi-hop QA [ 23 ] . Second, the evaluation signal is coarse and noisy—success or failure of the multi-agent system reveals little about each sub-agent’s contribution. A team of sub-agents may succeed even if one sub-agent consistently makes mistakes and others compensate, making it difficult to assign credit accurately. To address these challenges, we take a bottom-up approach: rather than exhaustively searching over all combinations of sub-agents, we first identify promising sub-agents individually and then compose them into a team. This makes the search space grow linearly instead of exponentially with the number of sub-agents. The key difficulty is credit assignment—a sub-agent’s value cannot be measured in isolation since it must collaborate with others to solve an issue (e.g., a localizer alone cannot edit code). Instead of judging success by whether the entire team solves a problem, we estimate each sub-agent’s helpfulness, measuring how much it contributes to solving the problem when in combination with other sub-agents. We use LLM-as-a-judge [ 29 ] to assess this contribution from the agent’s behavior during the problem-solving trajectory, yielding a more informative signal than a binary success or failure outcome. Once helpfulness is defined, the next question is how to efficiently discover effective sub-agents. Evaluating a sub-agent once is insufficient because its performance depends on its teammates and the task instance, both of which vary stochastically. Yet repeatedly testing all sub-agents would be prohibitively expensive. To balance exploration (trying under-tested sub-agents) and exploitation (focusing on those that have performed well), we formulate multi-agent design as a multi-armed bandit (MAB) problem [ 17 ; 1 ; 20 ; 50 ] , where each arm corresponds to a

Read the complete text