Efficient and Interpretable Multi-Agent LLM Routing via Ant Colony Optimization
Authors: Xudong Wang, Chaoning Zhang, Jiaquan Zhang, Chenghao Li, Qigan Sun, Sung-Ho Bae, Peng Wang, Ning Xie, Jie Zou, Yang Yang, Hengtao Shen
Organizations: School of Computing, Kyung Hee University, Yongin-si 17104, South Korea · School of Computer Science and Engineering, University of Electronic Science and Technology of China, Chengdu 611731, China · School of Information and Software Engineering, University of Electronic Science and Technology of China, Chengdu 610054, China · School of Computer Science and Technology, Tongji University, Shanghai 200092, China
Large Language Model (LLM)-driven Multi-Agent Systems (MAS) have demonstrated strong capability in complex reasoning and tool use, and heterogeneous agent pools further broaden the quality--cost trade-off space. Despite these advances, real-world deployment is often constrained by high inference cost, latency, and limited transparency, which hinders scalable and efficient routing. Existing routing strategies typically rely on expensive LLM-based selectors or static policies, and offer limited controllability for semantic-aware routing under dynamic loads and mixed intents, often resulting in unstable performance and inefficient resource utilization. To address these limitations, we propose AMRO-S, an efficient and interpretable routing framework for Multi-Agent Systems (MAS). AMRO-S models MAS routing as a semantic-conditioned path selection problem, enhancing routing performance through three key mechanisms: First, it leverages a supervised fine-tuned (SFT) small language model for intent inference, providing a low-overhead semantic interface for each query; second, it decomposes routing memory into task-specific pheromone specialists, reducing cross-task interference and optimizing path selection under mixed workloads; finally, it employs a quality-gated asynchronous update mechanism to decouple inference from learning, optimizing routing without increasing latency. Extensive experiments on five public benchmarks and high-concurrency stress tests demonstrate that AMRO-S consistently improves the quality--cost trade-off over strong routing baselines, while providing traceable routing evidence through structured pheromone patterns.
Figures & tables
Fig. 1: Overview of the AMRO-S routing mechanism. Tasks are routed through three stages, collection, analysis, and solution, via probabilistic path sampling guided by dynamic pheromone signals. After execution, high-quality paths receive reinforced pheromones, increasing their selection likelihood.
Fig. 2: Architecture of AMRO-S. (a) Offline construction of layered graph G=(V,E) and pheromone specialists. (b) Online routing via SFT-SLM weights w(q) across three stages, where nodes represent (LLM, Method, Role) instances. (c) Asynchronous evolution using LLM-Judge quality gating ( g∈{0,1} ) for background pheromone reinforcement without serving overhead.
Method
LLM
Mul.
Rout.
MMLU
GSM8K
MATH
HumanEval
MBPP
Avg.
Reference Models
Vanilla (Ref)
GPT-4o
N
N
88.7
96.1
76.6
90.2
87.2
87.76
Vanilla (Ref)
Claude-3.5-Sonnet
N
N
88.3
96.4
78.0
93.7
89.1
89.10
Single-Agent Baselines
Vanilla
GPT-4o-mini
N
N
77.81
93.17
66.09
85.71
72.2
79.00
Vanilla
Gemini-1.5-flash
N
N
80.04
92.67
74.39
82.61
73.0
80.54
TABLE I: Performance comparison on five benchmarks. Mul. and Rout. denote Multi-Agent and Dynamic Routing, respectively. The LLM Pool* comprises cost-effective models (GPT-4o-mini, Gemini-1.5-flash, Claude-3.5-haiku, Llama-3.1-70b).
Framework
Dataset
Model
Original
+MasRouter
+AMRO-S (Ours)
Acc.
Cost
Acc.
Cost
Acc.
Cost
MacNet
MMLU
GPT
82.98%
7.81
83.25%
7.65
83.50%
7.50
Gemini
81.74%
8.90
81.95%
8.65
82.10%
8.40
HumanEval
GPT
86.82%
0.49
87.20%
0.48
87.50%
0.47
Gemini
88.72%
0.53
88.85%
0.52
89.00%
0.50
GSM8K
GPT
94.69%
2.14
94.85%
2.08
95.00%
2.00
TABLE II: Adaptability and Cost-Efficiency Evaluation on Existing Multi-Agent Frameworks. We integrate the classifier-based MasRouter and our pheromone-based AMRO-S into three representative frameworks (MacNet, GPTSwarm, HEnRY). GPT: GPT-4o-mini; Gemini: Gemini-1.5-flash.
ID
Setting
Router Backbone
Strategy
Mul.
Rout.
GSM8K
MATH
MMLU
HumanEval
MBPP
Avg.
Constituents (Single-Agent Baselines)
(A)
Single
Gpt-4o-mini
N/A
×
×
93.17
66.09
77.81
85.71
72.20
79.00
(B)
Single
Gemini-1.5-flash
N/A
×
×
92.67
74.39
80.04
82.61
73.00
80.54
(C)
Single
Claude-3.5-haiku
N/A
×
×
91.80
68.20
78.50
86.40
74.50
79.88
(D)
Single
Llama-3.1-70b
N/A
×
×
94.10
68.00
82.30
80.50
71.80
79.34
Router and Strategy Ablation
TABLE III: Ablation Study on Router Components. Analysis of single-agent baselines versus different router backbones and strategies.
Model
SFT
Math
Code
General
Avg.
Llama-3.2-1B-Instruct
×
78.50%
82.10%
85.40%
82.00%
Qwen2.5-1.5B
×
84.20%
88.50%
89.10%
87.26%
GPT-4o-mini
×
95.20%
96.10%
96.20%
95.83%
Qwen2.5-1.5B
✓
97.90%
98.20%
97.50%
97.86%
Llama-3.2-1B-Instruct
✓
98.10%
97.90%
97.80%
97.93%
TABLE IV: SLM Intent Recognition Accuracy. Comparison of zero-shot baselines and fine-tuned models (SFT) across different intents.
Processes
20
50
100
200
500
1000
AMRO-S Efficiency Metrics
Time (s)
3849.60
2430.40
1863.75
1382.90
1062.30
823.21
Time (min)
64.16
40.51
31.06
23.05
17.71
13.72
Speedup
1.0 ×
1.6 ×
2.1 ×
2.8 ×
3.6 ×
4.7 ×
Accuracy Comparison
WRR(Baseline)
96.00%
95.80%
95.20%
93.50%
91.50%
88.20%
TABLE V: Stress test under varying concurrency. “Processes” denotes the number of parallel workers; speedup is relative to 20 processes.
Fig. 3: Converged pheromone specialists of AMRO-S for three domains: mathematical reasoning Tmath , code generation Tcode , and general reasoning Tgen . Color intensity indicates the learned routing preference, where deeper teal denotes stronger preference and lighter tones denote weaker preference.
LLM agent routing selects models, tools, skills, or collaboration workflows for each task or step to balance capability, cost, latency, and reliability.
The rapid integration of Large Language Models (LLMs) has driven the evolution of Multi-Agent Systems (MAS), where specialized agents collaborate to execute complex workflows. Effective orchestration in these environments requires robust routing mechanisms to efficiently allocate tasks to the most suitable agent. However, existing routers fundamentally rely on unverified proxies, ranging from textual self-descriptions to static surrogate representations, to gauge an agent's competence. This reliance on non-empirical data creates a critical gap between an agent's projected profile and its actual operational capabilities, introducing severe security vulnerabilities. Malicious agents can easily misrepresent their proficiencies or harbor covert backdoors that evade both standard external analysis and static representation-learning techniques. In this work, we introduce ANTAP (Automatic Non-Textual Agent Picker), an evaluation-driven routing architecture that discards indirect proxies in favor of active capability testing. By dynamically querying agents to ascertain their true competencies empirically, ANTAP distills performance into fixed behavioral operators within a shared semantic space. At inference time, routing is performed via a purely non-textual algebraic projection, establishing a "linguistic firewall" that renders metadata-based attacks inexpressible. In our experiments, ANTAP achieves near-zero ASR against description-based injection attacks, compared to 67.3% and above for the description-based router baseline. Against adaptive embedding attacks, ANTAP achieves substantially lower ASR than the embedding-based baseline, with a 20% reduction, while remaining resilient to description manipulation by design.
Dvir Alsheich, Adar Peleg, Ben Hagag +3
1Technion - Israel Institute of Technology · 2Carnegie Mellon University
Recent advances in Large Language Models (LLMs) have catalyzed the development of multi-agent systems (MAS) for complex reasoning tasks. However, existing MAS typically rely on pre-defined or pre-compiled communication topologies, which limits their flexibility and adaptability to dynamic task requirements. In this work, we propose Differentiable Mixture-of-Agents (DMoA), a self-evolving multi-agent framework that enables elastic and adaptive agent collaboration during inference. Instead of statically constructing workflows, DMoA dynamically routes and activates agents at each reasoning step, allowing the system to implicitly simulate diverse communication topologies and adapt to evolving demands. To achieve this, we design a differentiable, context-aware routing mechanism that leverages recurrent structures to incorporate historical and contextual information, producing sparse agent activations in a step-wise manner. Furthermore, we introduce predictive entropy as self-supervised signals to optimize the routing process, enabling efficient test-time adaptation without external annotations. Extensive experiments across 9 benchmarks demonstrate that DMoA achieves state-of-the-art performance while exhibiting strong efficiency, robustness, and ensembling capabilities.
The emergence of multi-agent systems powered by large language models (LLMs) has unlocked new frontiers in complex task-solving, enabling diverse agents to integrate unique expertise, collaborate flexibly, and address challenges unattainable for individual models. However, the full potential of such systems is hindered by rigid agent scheduling and inefficient coordination strategies that fail to adapt to evolving task requirements. In this paper, we propose STRMAC, a state-aware routing framework designed for efficient collaboration in multi-agent systems. Our method separately encodes interaction history and agent knowledge to power the router, which adaptively selects the most suitable single agent at each step for efficient and effective collaboration. Furthermore, we introduce a self-evolving data generation approach that accelerates the collection of high-quality execution paths for efficient system training. Experiments on challenging collaborative reasoning benchmarks demonstrate that our method achieves state-of-the-art performance, achieving up to 23.8% improvement over baselines and reducing data collection overhead by up to 90.1% compared to exhaustive search.
Jingbo Wang, Sendong Zhao, Haochun Wang +2
Research Center for Social Computing and Information Retrieval,Harbin Institute of Technology, China