Credit Where Credit Is Due: Contrastive Attribution Topology Search for Multi-Agent Systems
Organizations: University of Freiburg
Abstract
An LLM multi-agent system (MAS) is only as good as the agents it chooses to trust: its accuracy and cost hinge on its topology, meaning which agents are included and how they communicate. A single task score, however, does not reveal which agents help or hinder performance. We propose Contrastive Attribution Topology Search (CATS), which searches for compact teams within a fixed supergraph of specialized agents. An LLM attributer compares execution traces across candidate topologies and assigns credit to individual agents. CATS uses these credits to update supergraph edges while progressively pruning weak edges and agents, yielding a small team for deployment. With small open-weight models and matched candidate evaluations, CATS improves mean accuracy on BigCodeBench by 5.3 percentage points over score-only heuristic search while using 54 fewer deployment tokens. On MBPP, CATS matches the strongest baselines with fewer tokens than the other searches. In a HotpotQA prompt-poisoning stress test, CATS excludes all adversarially prompted agents in all three runs, whereas random search retains some at comparable accuracy. Per-agent credit thus supports both team optimization and the pruning of potentially harmful agents.
Figures & tables
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Benchmark | Seed | Agents | Edges |
|---|---|---|---|
| BigCodeBench | 13 | DC, IM, TD | start DC, DC IM, IM TD |
| 14 | DC, VE | start DC, start VE | |
| 15 | DB, DC | start DB, start DC | |
| MBPP | 13 | DC, IM, TD | start DC, start IM, start TD |
| 14 | DC, IM, TL | start DC, start IM, start TL, TL IM | |
| 15 | DC, IM | start DC, start IM, DC IM |
| Hyperparameter | Value |
|---|---|
| Search tasks | |
| Seeds (search and evaluation) | , , |
| Search steps, | |
| Candidates per step, | |
| Learning rate, | |
| Unfired-edge weight, |
| Method/read-out | Definition |
|---|---|
| Random search | Draw 16 candidates at fixed . Return the best search-set score, breaking ties by fewer agents and then random. |
| Score-only search | Sample candidates at each of steps. For candidate , compute the score-only advantage , where is its mean search-set score. Assign to every active agent and update edge logits using the same learning rate, unfired-edge rule, and pruning schedule as our method, but without LLM attribution. This heuristic omits the Bernoulli score-function factor required by REINFORCE [ 11 ] . Return the highest-scoring step- candidate, breaking ties by fewer agents and then the earlier candidate. |
| Direct LLM (MBPP) | One greedy zero-shot call, without tools, execution feedback, or retry. The prompt follows the task template of Austin et al. [1] . |
| Direct LLM (BigCodeBench) | One greedy zero-shot call, without tools, execution feedback, or retry. The prompt uses the instruction_prefix and response_prefix defaults from the official BigCodeBench generation harness . |
| ReAct single agent | One native-tool loop with the same prompt body on both benchmarks, and a tool-call budget of five. ReAct is the method of Yao et al. [13] . The exact string is from LangChain Hub entry hwchase17/react . {tools} and {tool_names} are filled with the environment toolset and the runtime’s native tool-use protocol block. |
| Hand-crafted MAS | A fixed planner–executor–verifier topology (Figure 4(d) ). |
| Benchmark | Snapshot and search split | Grading |
|---|---|---|
| BigCodeBench | v0.1.4 Instruct, 100 disjoint tasks | Last stored program against hidden tests |
| MBPP | Revision 4bb6404f , 100 disjoint tasks | Last stored program against hidden tests |
| HotpotQA | distractor , 100 disjoint tasks | Exact match on last submit_answer phrase |
| Seed 13 | Seed 14 | Seed 15 | ||||||||||
| Method | Score | Tokens | Score | Tokens | Score | Tokens | ||||||
| BigCodeBench | ||||||||||||
| CATS | 53 | 7.16 | 3/3 | — | 43 | 4.70 | 2/2 | — | 48 | 8.28 | 2/2 | — |
| Random | 35 | 9.06 | 5/6 | — | 28 | 11.08 | 2/2 | — | 42 | 5.93 | 1/1 | — |
| Score-only search | 45 | 6.62 | 3/3 | — | 37 | 23.71 | 4/5 | — | 46 | 13.75 | 5/8 | — |
| MBPP | ||||||||||||
| Pooled | Within-task | ||||
|---|---|---|---|---|---|
| Seed | pairs | ||||
| 13 | 1600 | 0.876 | 0.854 | 0.785 | 0.742 |
| 14 | 1600 | 0.879 | 0.834 | 0.841 | 0.802 |
| 15 | 1596 | 0.834 | 0.846 | 0.746 | 0.687 |
| Mean SD over seeds | — | 0.863 0.025 | 0.845 0.010 | 0.791 0.048 | 0.744 0.058 |
| Benchmark | Method | Task model | Attributer | Total |
|---|---|---|---|---|
| BigCodeBench | CATS | 14.88 | 1.54 | |
| Random search | 16.49 | 0 | ||
| Score-only search | 22.89 | 0 | ||
| MBPP | CATS | 12.00 | 1.53 | |
| Random search | 11.45 | 0 | ||
| Score-only search | 20.89 | 0 |
Multi-Agent LLM Systems
Multi-agent large language model systems coordinate multiple AI agents to solve tasks through communication, specialization, shared tools, and memory.
See all 1,032 papers