HieraMAS: Optimizing Intra-Node LLM Mixtures and Inter-Node Topology for Multi-Agent Systems
About
Multi-agent systems (MAS) built on large language models (LLMs) have shown strong performance across many tasks. Most existing approaches improve only one aspect at a time, such as the communication topology, role assignment, or LLM routing, while treating each agent as a single, indivisible unit. This misses the opportunity to use mixtures of LLMs within an agent to strengthen role-specific abilities. We propose HieraMAS, a hierarchical collaboration framework that combines intra-node LLM mixtures with an inter-node communication topology. HieraMAS introduces supernodes, where each functional role is implemented by multiple heterogeneous LLMs using a propose-synthesis structure. Optimizing HieraMAS creates unique credit-assignment challenges: final task performance depends heavily on the underlying LLMs' capabilities, which can lead reinforcement methods to incorrectly reward suboptimal configurations. To address this, we use a two-stage algorithm: (1) multi-level reward attribution, which provides fine-grained feedback at both the node level and the overall system level; (2) graph classification for topology selection, which treats choosing the communication structure as a holistic decision rather than optimizing edges one by one. Experiments on reasoning and coding benchmarks show that HieraMAS substantially outperforms existing methods while also delivering better cost-performance trade-offs.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Mathematical Reasoning | MATH | Accuracy96.67 | 162 | |
| Multi-task Language Understanding | MMLU-Redux | Accuracy95.2 | 22 | |
| Code Generation | HumanEval++ | Accuracy96.88 | 22 | |
| Aggregate Language and Logic Tasks | HumanEval++, MATH, MMLU-Redux | Average Accuracy94.61 | 11 | |
| Multi-task Language Understanding | MMLU-Redux (unseen categories) | Accuracy72 | 10 | |
| Code Generation | HumanEval++ | Training Cost (USD)0.53 | 7 | |
| Knowledge-intensive Question Answering | MMLU-Redux | Training Cost (USD)1.85 | 4 | |
| Mathematical Problem Solving | MATH | Training Cost (USD)2.03 | 4 | |
| Language Understanding | MMLU | Cost ($)1.29 | 3 | |
| Mathematical Reasoning | MATH | Cost ($)1.52 | 3 |