How Robust Are Router-LLMs? Analysis of the Fragility of LLM Routing Capabilities

Aly M. Kassem, Bernhard Schölkopf, Zhijing JinarXiv 2025 · DOI

Abstract

Large Language Model (LLM) routing is a strategy used to optimize inference costs by directing queries to either a "weak" (cheap) or "strong" (expensive) model based on predicted difficulty. This paper investigates the robustness of these routers, revealing significant fragilities. We find that routers often rely on superficial category-based heuristics rather than true query complexity, leading to computational waste on simple tasks and critical safety vulnerabilities when malicious queries are routed to models with weaker guardrails.

Introduction

As Large Language Models (LLMs) grow in size, so do their inference costs. LLM routing has emerged as a popular solution: a "router" model intercepts a user query and decides whether it can be handled by a cheap, "weak" model (like Llama-3 8B) or requires an expensive, "strong" model (like GPT-4o). While effective for general performance, current evaluation methods often overlook how routers behave on trivial tasks or under adversarial conditions. If a router sends a "1+1" math problem to GPT-4o just because it contains numbers, it fails its primary goal of efficiency. This study introduces the DSC (Diverse, Simple, and Categorized) benchmark to expose these underlying weaknesses.

Methodology and the DSC Benchmark

To rigorously test routing logic, we developed the DSC benchmark, which includes intentionally simple subsets of common tasks alongside safety-critical queries. We evaluated five routing strategies: Matrix Factorization (MF), a BERT-based classifier, a Causal-LLM classifier (using Llama-3 8B), and commercial routers from major cloud providers.

Examples of queries from the DSC benchmark across Code, Math, and Safety categories.

A key metric introduced is the Flipping Rate (FR), which measures how easily a routing decision changes when irrelevant keywords (like "Python" or "STEM") are added to a simple prompt. This allows us to quantify the "twitchiness" of the routing logic.

Key Findings: The "Lazy Student" Problem

Our analysis reveals that routers behave like "lazy students," using simple keywords as proxies for difficulty rather than evaluating the actual task requirements.

Inefficiency through Category Heuristics

Routers tend to associate specific domains—primarily Math and Coding—with high difficulty regardless of the actual query. For instance, a simple subtraction problem is routed to GPT-4o nearly 100% of the time, even though a 7B-parameter model could solve it with equal accuracy. This results in significant wasted compute on tasks that do not require frontier-level intelligence.

Routing distribution for simple tasks, showing a near-total reliance on the strong model (GPT-4o) for Math and Code categories.

The Safety Backdoor

The most concerning finding is the "safety backdoor." Adversarial jailbreak attempts often mimic creative writing or roleplay—categories typically routed to weaker models to save costs. Because these smaller models (like Mistral-7B) often have less rigorous safety tuning than frontier models, the router inadvertently facilitates successful attacks. In tests using AdvBench, the Matrix Factorization router sent 96% of harmful queries to the weak model, resulting in a 100% Attack Success Rate (ASR), whereas GPT-4o would have blocked most of those same attacks.

Keyword Sensitivity and Training Imbalance

Routers are highly sensitive to irrelevant context. Adding a "STEM" or "Math" keyword to a basic writing prompt caused routers to switch from the weak to the strong model in 98% of cases. This fragility likely stems from the preference data used to train routers. In these datasets, strong models almost always beat weak models in technical domains, teaching the router a hard rule: Math/Code = Strong Model.

Conclusion and Future Work

Current LLM routers are fragile and prone to both economic inefficiency and security risks. The reliance on category-based heuristics suggests that training data for routers is currently too imbalanced. Future research should focus on developing routers capable of distinguishing intrinsic complexity from topic category and implementing safety-aware routing that prioritizes security over cost for suspicious inputs. Scaling up preference datasets to include more "tie" cases where weak models perform as well as strong ones is essential for teaching routers that "expensive" isn't always better.

Summary updated

BibTeX
@misc{kassem2025how,
  author = {Aly M. Kassem and Bernhard Schölkopf and Zhijing Jin},
  title = {{How Robust Are Router-LLMs? Analysis of the Fragility of LLM Routing Capabilities}},
  year = {2025},
  eprint = {2504.07113},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.07113},
}
Figure