TL;DR
Mixture-of-Agents (MoA) systems deliver impressive accuracy by querying multiple LLMs and aggregating their answers, but they suffer from severe hardware inefficiencies due to skewed model popularity and highly variable generation lengths. MOSAIC solves this by combining an Integer Linear Program (ILP) scheduler that optimizes model placement and replication across GPUs with a confidence-aware gate that safely skips the expensive final aggregation step when experts agree. The result is an end-to-end speedup of up to 2.34× with virtually zero loss in accuracy.
What Problem Does This Paper Address?
To solve complex reasoning tasks, modern AI systems often deploy a Mixture-of-Agents (MoA) approach: a router sends a prompt to several specialized "expert" LLMs, and a final "aggregator" LLM synthesizes their responses into a single, high-quality answer.
While great for accuracy, this setup is a nightmare for hardware efficiency. The authors identify two massive bottlenecks:
- Load Imbalance and GPU Idling: Skill-based routers create highly skewed demands—some models are heavily favored while others are rarely picked. Furthermore, mixing standard instruction-tuned LLMs with long-reasoning models (LRMs) results in extreme variability in generation lengths (up to 13× difference in token counts). Standard round-robin scheduling leaves fast GPUs idling while waiting for slow, popular reasoning models to finish.
- Expensive Aggregation Prefill: The aggregator LLM must ingest the combined reasoning traces of all the experts. This makes the prefill stage incredibly long and computationally expensive.
Traditional fixes like naive Data Parallelism (DP)—replicating every model on every GPU—fail because loading large models repeatedly introduces a massive "load tax" and sharding small prompt batches tanks overall throughput.
Methods
MOSAIC (Mixture-of-Agent Scheduling via Adaptive Aggregation and Inference Concurrency) tackles these bottlenecks through a two-pronged strategy:
1. ILP-Based Multi-Model Scheduler
Instead of guessing how to distribute models, MOSAIC profiles each expert on a tiny calibration dataset to learn its average and maximum output token counts. It then models the scheduling challenge as an Integer Linear Program (ILP). The solver jointly optimizes:
- Model-to-worker placement: Deciding which GPU loads which model.
- Selective replication: Replicating heavy reasoning experts across multiple GPUs to share the load, while pinning lightweight models to a single worker.
- Per-worker prompt assignment: Distributing the exact number of queries to balance the total execution time across all GPUs.
2. Confidence-Aware Adaptive Aggregation
The authors noticed an intuitive trend: when diverse experts independently arrive at the exact same answer, they are usually right. MOSAIC introduces a "confidence gate" that calculates the consensus level among the experts. If the experts reach a clear majority (e.g., a 3:0 unanimous vote or a 2:1 split), MOSAIC bypasses the heavy aggregator LLM entirely and outputs the majority vote directly.
Datasets
The framework was evaluated using standard test splits on three prominent benchmarks:
- MMLU-Pro: 2,100 multiple-choice questions spanning STEM and humanities.
- MedMCQA: 4,183 medical multiple-choice questions.
- GPQA: 198 graduate-level science questions (a highly difficult dataset dominated by long-reasoning requests).
Small, train-only subsets (350–504 questions) were used strictly for offline profiling and calibration.
Key Insights and Ideas
- Dynamic Compute Profiles: A model's computational footprint isn't static. When grouped with other models, a router will naturally shift harder questions to specialized long-reasoning models, dynamically altering the average token count of both the reasoning and non-reasoning pools.
- The Over-Sharding Trap: Naive data parallelism hurts instruction-tuned models. Splitting small prompt batches across multiple GPUs starves the continuous-batching engines, dropping throughput by 40–60%.
- Consensus as a Shortcut: Harder questions naturally require longer reasoning traces and cause more disagreement among experts. Conversely, easier questions result in quick consensus and short traces. By using a confidence gate, MOSAIC selectively filters out the easy questions, reserving the expensive aggregator LLM only for the truly difficult queries.
Key Results
Evaluated on a 4-GPU NVIDIA A100 system, MOSAIC demonstrated massive performance leaps over a standard round-robin baseline:
- Expert-Stage Speedup: Achieved up to 2.54× speedup on the expert generation phase by eliminating GPU idling.
- Aggregator-Stage Speedup: Achieved up to 4.23× speedup by bypassing the aggregator LLM for up to 90% of queries on consensus-heavy datasets like MedMCQA.
- End-to-End Wall-Clock Reduction: Translated to an overall 1.71× to 2.34× speedup across the benchmarks.
- Preserved Accuracy: All of these speedups were achieved while matching the baseline accuracy within $\pm$0.1 percentage points.
Limitations and Future Work
While highly effective, MOSAIC currently relies on a static selection of the confidence criterion. Users must decide on the threshold hyperparameters (like skipping on a 3:0 vs. 2:1 vote) before running inference, and these thresholds do not adapt dynamically during runtime.
Additionally, the authors note that extending MOSAIC to more complex, heterogeneous agentic workflows (where agents perform non-LLM tasks like tool use or web searches) remains an open challenge, as the bottlenecks in those systems may not be driven solely by LLM inference latency.
Summary updated