RadialRouter: Structured Representation for Efficient and Robust Large Language Models Routing

Ruihan Jin, Pengpeng Shao, Zhengqi Wen, Jinyang Wu, Mingkuan Feng, Shuai Zhang, Jianhua Tao

Abstract

The rapid advancements in large language models (LLMs) have led to the emergence of routing techniques, which aim to efficiently select the optimal LLM from diverse candidates to tackle specific tasks, optimizing performance while reducing costs. Current LLM routing methods are limited in effectiveness due to insufficient exploration of the intrinsic connection between user queries and the characteristics of LLMs. To address this issue, in this paper, we present RadialRouter, a novel framework for LLM routing which employs a lightweight Transformer-based backbone with a radial structure named RadialFormer to articulate the query-LLMs relationship. The optimal LLM selection is performed based on the final states of RadialFormer. The pipeline is further refined by an objective function that combines Kullback-Leibler divergence with the query-query contrastive loss to enhance robustness. Experimental results on RouterBench show that RadialRouter significantly outperforms existing routing methods by 9.2% and 5.8% in the Balance and Cost First scenarios, respectively. Additionally, its adaptability toward different performance-cost trade-offs and the dynamic LLM pool demonstrates practical application potential.

Introduction

In the current AI landscape, the availability of diverse Large Language Models (LLMs)—ranging from lightweight open-source models like Mistral-7B to proprietary giants like GPT-4—presents a unique optimization challenge. Deploying a massive LLM for every query is economically inefficient, while using a small model for complex tasks compromises quality. LLM routing serves as a "traffic controller" to bridge this gap.

However, existing routing paradigms often fall short. Simple pair-wise routers or cascades frequently fail to capture the nuanced strengths of a diverse model pool. Similarity-based methods often rely on static embeddings that do not account for the dynamic relationship between a specific query and a model's specialized capabilities.

Comparison of different LLM routing paradigms, highlighting the RadialRouter approach.

Methodology: The RadialRouter Framework

RadialRouter addresses these limitations by explicitly modeling the structured interrelation between queries and LLMs using a novel architecture called RadialFormer.

RadialFormer Architecture

Unlike standard Transformers that utilize all-to-all attention, RadialFormer adopts a radial (star) topology. In this structure, a central Relay Node represents the input query, while multiple Satellite Nodes represent the candidate LLMs in the pool. Communication is restricted: satellite nodes only interact with the central relay node. This design reduces computational complexity from $O(l^2d)$ to $O(ld)$, ensuring high-speed inference.

Optimization Strategy

The framework is optimized using a dual-loss objective function:

  1. KL Divergence Loss ($\mathcal{L}_{KL}$): Instead of a hard classification, the router is trained to match the probability distribution of performance across all models. This allows the system to understand which models are viable alternatives, enhancing robustness.
  2. Query-Query Contrastive Loss ($\mathcal{L}_{q-q}$): This loss ensures that semantically similar queries are mapped to similar routing decisions, making the system resilient to variations in phrasing.
The RadialRouter pipeline, illustrating feature initialization, RadialFormer updates, and optimal LLM selection.

Experimental Evaluation

The researchers evaluated RadialRouter using RouterBench, covering domains such as commonsense reasoning (Hellaswag, ARC), knowledge understanding (MMLU), mathematics (GSM8K), and coding (MBPP). The model pool included 11 LLMs, spanning both open-source (Llama, Mixtral, Yi) and proprietary (GPT-4, Claude) series.

Key Results

  • Performance Gains: RadialRouter achieved significant improvements over state-of-the-art methods. In the "Balance" scenario, it outperformed the next best method by 9.2%, and by 5.8% in the "Cost First" scenario.
  • Efficiency: The radial architecture proved highly efficient, with a batch inference time of 10.7ms, compared to 15.8ms for standard Transformer backbones.
  • Scalability: The system demonstrated consistent performance improvements as the model pool size increased, indicating strong potential for managing large, heterogeneous ensembles.

Conclusion

RadialRouter introduces a structured, efficient approach to LLM routing. By leveraging the RadialFormer architecture and a dual-loss optimization strategy, it effectively balances performance and cost. Future work will focus on training-free adaptation for new models and extending the framework to multi-modal tasks.

Summary updated

BibTeX
@misc{jin2025radialrouter,
  author = {Ruihan Jin and Pengpeng Shao and Zhengqi Wen and Jinyang Wu and Mingkuan Feng and Shuai Zhang and Jianhua Tao},
  title = {{RadialRouter: Structured Representation for Efficient and Robust Large Language Models Routing}},
  year = {2025},
  eprint = {2506.03880},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.03880},
}
Figure