TL;DR
This paper introduces RouterXBench, a comprehensive evaluation framework designed to fairly assess LLM routers across three dimensions: intrinsic ability, scenario alignment, and cross-domain robustness. The authors also propose ProbeDirichlet, a lightweight router that leverages internal hidden states aggregated via a learnable Dirichlet distribution to capture model uncertainty before answer generation, significantly outperforming existing logit- and embedding-based baselines.
What Problem Does This Paper Address?
In collaborative LLM systems, routing is a crucial strategy for balancing cost, latency, and accuracy. A router dynamically decides whether a query can be handled by a small, cheap local model (SLM) or if it needs to be offloaded to a powerful, expensive cloud model (LLM).
However, evaluating these routers is currently messy and unsystematic. Existing benchmarks rely on static thresholds or aggregate curve metrics that suffer from two major flaws:
- Scenario-Blindness: They fail to account for different deployment constraints (e.g., a safety-critical medical app requires high accuracy, whereas customer support might prioritize cost savings).
- Conflation of Skills: They entangle the router's intrinsic predictive ability with the raw capability of the large cloud model, making it hard to tell if a high score is due to a smart router or just an incredibly powerful backend LLM.
Furthermore, most routers are evaluated only on in-distribution data, ignoring how they perform when hit with unfamiliar, out-of-distribution (OOD) queries.
Methods
1. RouterXBench Evaluation Framework
To solve the evaluation crisis, the authors propose a triple-perspective framework:
- Router Ability: Measured using AUROC based on whether the SLM can answer correctly. This isolates the router's discriminative power independent of deployment thresholds or LLM strength.
- Scenario Alignment: Evaluates performance across three distinct operational bands:
- Low-band Performance Mean (LPM): For strict, budget-sensitive scenarios.
- High-band Call Rate (HCR): For accuracy-critical scenarios, measuring how much the router can rely on the SLM without dropping below a target accuracy.
- Mid-band Performance Mean (MPM): For balanced deployment regimes.
- Cross-Domain Robustness: Evaluates stability across diverse task distributions (In-Domain vs. Out-of-Distribution).
2. The ProbeDirichlet Router
Instead of relying on final output probabilities (which suffer from softmax overconfidence) or external text embeddings, ProbeDirichlet routes queries based on the SLM's internal hidden states.
Because different layers capture different levels of features (from low-level syntax to high-level semantics), ProbeDirichlet aggregates representations across all layers. To prevent overfitting to specific layers during training, it uses a Dirichlet distribution to stochastically sample layer weights (acting like a form of layer dropout). During inference, it switches to a deterministic expected value, eliminating sampling overhead and keeping the router incredibly lightweight.
Datasets
The framework was validated using GPT-5 as the large cloud model and Llama-3.1-8B-Instruct (along with the Qwen2.5 family) as the small local model. The datasets were split to test cross-domain generalization:
- In-Domain (ID) Training & Evaluation:
- Alpaca (General instruction-following)
- MMLU (Academic and professional knowledge)
- Big-Math (Mathematics)
- Out-of-Domain (OOD) Evaluation:
- Magpie (General dialogue)
- MMLU Pro (Harder academic questions with more distractors)
- MATH (Advanced mathematical problem-solving)
Key Insights and Ideas
- Internal Hidden States Matter: Internal representations preserve rich, hierarchical information about model uncertainty and task difficulty before an answer is generated. They vastly outperform raw lexical embeddings or final-layer logits, especially on complex reasoning tasks like mathematics.
- Data Diversity Yields Additive Gains: Training the router on a mixture of domains (e.g., text + math) doesn't cause negative interference. Instead, it forces the router to learn a universal, domain-agnostic notion of "difficulty" (like reasoning depth or context length), boosting OOD robustness.
- Simplicity Wins in Architecture: Adding architectural complexity to the router (like multi-layer MLPs) provides zero performance benefits and severely increases overfitting. A simple linear probe on top of the aggregated hidden states is all you need.
Key Results
- Superior Routing Accuracy: ProbeDirichlet achieved a 16.68% relative improvement in router ability (AUROC) over the best baseline methods across both ID and OOD tasks.
- Massive Cost Savings in High-Accuracy Regimes: In accuracy-critical scenarios (HCR), ProbeDirichlet demonstrated an 18.86% relative improvement, meaning it successfully kept more queries on the local SLM while still meeting strict accuracy targets.
- Broad Generalizability: The performance gains held true across different model families (Llama and Qwen), varying model scales, and even complex agentic workflows like multi-hop reasoning on HotpotQA.
Limitations and Future Work
The authors point out a fundamental limitation shared by all current routing paradigms: when both the small and large models fail on the same query, routing becomes useless. If both models converge on the same incorrect answer, the system either wastes money offloading it or delivers a silent failure to the user.
Future work will focus on expanding the model pool to include highly specialized expert models and integrating uncertainty-aware mechanisms that allow the system to say "I don't know" rather than defaulting to a wrong answer.
Summary updated