Multi-agent systems (MAS) represent a significant evolution in Large Language Model (LLM) utility, shifting from monolithic models to collaborative teams of specialized agents. However, the effectiveness of these teams is highly dependent on coordination logic. A new framework, STRMAC (State-aware Routing framework for Multi-Agent Collaboration), addresses these challenges by treating multi-agent coordination as a dynamic routing problem rather than a fixed pipeline.
The Challenge of Rigid Coordination
Traditional multi-agent frameworks often rely on static sequences or high-level LLM "managers" to determine the next step in a task. This approach faces two primary obstacles:
- Order Sensitivity: The sequence in which agents are engaged significantly impacts performance. Empirical tests show that simply reordering the same set of agents can cause accuracy to fluctuate by over 10%.
- Combinatorial Explosion: As the number of agents ($N$) grows, the number of possible sequences ($N!$) becomes unmanageable. For a 10-agent team, there are over 3.6 million potential paths, making exhaustive search for an optimal route computationally prohibitive.
The STRMAC Framework
STRMAC introduces a state-aware router that dynamically selects the most appropriate agent for each step of a task by matching the current "problem state" with specific "agent expertise."
1. State-Aware Router Architecture
The router utilizes two distinct embedding spaces to facilitate selection:
- Agent Embeddings ($E_L$): These encode the unique expertise or private context of each agent using a frozen LLM encoder.
- State Embeddings ($E_R$): A lightweight "Router Encoder" (e.g., mDeBERTa-v3-base) processes the initial query and the cumulative interaction history to generate a vector representing the current state.
The system selects the next agent based on the cosine similarity between the state vector and available agent embeddings. This router is trained via contrastive learning, ensuring the state representation aligns closely with the agent most likely to contribute to a successful outcome.
2. Self-Evolving Data Generation
To overcome the $N!$ path problem, STRMAC employs a self-evolving pipeline for training data collection:
- Solution-Aware Search: A pruning strategy inspired by Monte Carlo Tree Search stops exploration once a correct answer is reached.
- Router-Guided Iteration: An initial router (v1) is trained on a small data subset. This router then predicts the most promising agents for subsequent data collection rounds, creating a feedback loop that focuses on high-quality training paths.
Experimental Results
The framework was evaluated on two complex benchmarks: PDDP (Patient Discharge Disposition Prediction), requiring integration of fragmented medical records, and EBFC (Evidence-Based Fact-Checking), which tests the ability to identify relevant evidence among distractors.
Key Performance Metrics
- Accuracy: STRMAC outperformed established baselines like "LLM-Debate" by up to 23.8% on the EBFC task.
- Efficiency: On the PDDP task, STRMAC utilized only 5.9% to 21.6% of the tokens required by the leading baseline, IG-MAS.
- Data Reduction: The self-evolving strategy reduced the data collection overhead by 90.1% compared to exhaustive search methods.
- Cross-Model Generalization: A router trained using data from a smaller model (Llama-8B) remained highly effective when managing larger models like Llama-70B or GPT-4o, suggesting that optimal routing logic is transferable across scales.
Conclusion
STRMAC demonstrates that efficient multi-agent collaboration does not require massive orchestration models. By employing a lightweight, state-aware router and a self-evolving training strategy, the framework achieves state-of-the-art performance with significantly reduced computational and data overhead. Future work will explore dynamic agent pools and routing for subjective, non-binary tasks.
Summary updated