INFERENCEDYNAMICS: Efficient Routing Across LLMs through Structured Capability and Knowledge Profiling

Haochen Shi, Tianshi Zheng, Weiqi Wang, Baixuan Xu, Chunyang Li, Chunkit Chan, Tao Fan, Yangqiu Song, Qiang YangarXiv 2025

Abstract

Large Language Model (LLM) routing is a pivotal technique for navigating a diverse landscape of LLMs, aiming to select the best-performing LLMs tailored to the domains of user queries, while managing computational resources. However, current routing approaches often face limitations in scalability when dealing with a large pool of specialized LLMs, or in their adaptability to extending model scope and evolving capability domains. To overcome those challenges, we propose InferenceDynamics, a flexible and scalable multi-dimensional routing framework by modeling the capability and knowledge of models. We operate it on our comprehensive dataset RouteMix, and demonstrate its effectiveness and generalizability in group-level routing using modern benchmarks including MMLU-Pro, GPQA, BigGenBench, and LiveBench, showcasing its ability to identify and leverage top-performing models for given tasks, leading to superior outcomes with efficient resource utilization. The broader adoption of Inference Dynamics can empower users to harness the full specialized potential of the LLM ecosystem.

Introduction

In the rapidly expanding ecosystem of Large Language Models (LLMs), the industry has moved past the era of a single dominant model. Today, we operate in a specialized landscape where one model might excel at Python coding while another dominates in graduate-level physics. The primary challenge has shifted from building a singular "best" model to routing—intelligently dispatching user queries to the specific model best equipped to handle them.

InferenceDynamics is a routing framework that moves away from traditional "black-box" classifiers toward a structured, profile-based approach to model selection. By modeling the specific capabilities and knowledge domains of various models, it provides a scalable and adaptable solution for the modern LLM landscape.

Methodology: Structured Profiling

InferenceDynamics operates as a parameter-free routing framework through a three-step structured profiling process:

  1. Requirement Extraction: When a query arrives, an auxiliary "judge" model (such as GPT-4o-mini) identifies the specific capabilities (e.g., reasoning, multilingual, coding) and knowledge domains (e.g., finance, biology) required to answer it.
  2. Structured Profiling: Instead of training a neural network to route, the framework creates a "scorecard" for every candidate LLM. Models are evaluated on an "Index Set" of benchmarks to quantify their proficiency in specific functional areas.
  3. Dynamic Routing: The system calculates a weighted score for each candidate model based on how well its profile matches the query's requirements.

Crucially, the framework includes a cost penalty parameter ($\beta$). By adjusting this "knob," users can prioritize cheaper models unless the performance gain from an expensive model is significantly high. Because it relies on look-up profiles rather than a trained classifier, adding a new model to the pool only requires a one-time profiling run on the index set.

Performance and cost ratio changes as the cost penalty parameter β increases.

Experimental Setup and RouteMix

To evaluate the framework, we introduced RouteMix, a massive collection of 24 diverse benchmarks. This is divided into an Index Set of 20 datasets (including ARC, GSM8K, MATH, and MedQA) used to build the capability and knowledge profiles, and an Evaluation Set of 4 "Out-of-Distribution" (OOD) benchmarks: MMLU-Pro, GPQA, BigGenBench, and LiveBench.

Key Results and Insights

Our evaluation demonstrates that InferenceDynamics effectively leverages the specialized potential of the LLM ecosystem:

  • Superior Performance: The "Mixed Routing" strategy achieved an average score of 74.55 across evaluation benchmarks, surpassing the best single model in the pool (Gemini-1.5-Pro at 73.33) by a margin of 1.28 points.
  • Cost Efficiency: In cost-constrained scenarios, InferenceDynamics delivered performance comparable to the best single model while utilizing nearly half (50%) of the budget.
  • Granular Specialization: The data confirms that no single model dominates every category. For example, Qwen2.5-Max was selected for 91% of coding queries in LiveBench, even when competing against generally "stronger" models.
Comparison of routing performance against the best individual LLMs in the pool.

Discussion and Conclusion

InferenceDynamics addresses the "No Free Lunch" reality of LLMs by treating model selection as a profiling problem rather than a classification problem. By separating what a model knows (Knowledge) from how it processes information (Capability), the framework achieves more precise routing.

While dedicated fine-tuned classifiers might still yield slightly higher performance in hyper-specialized, static environments, InferenceDynamics provides a blueprint for a more modular, efficient, and scalable AI ecosystem. Its parameter-free nature ensures that as the pool of available models grows, the router’s performance consistently improves without the need for constant retraining.

Summary updated

BibTeX
@misc{shi2025inferencedynamics,
  author = {Haochen Shi and Tianshi Zheng and Weiqi Wang and Baixuan Xu and Chunyang Li and Chunkit Chan and Tao Fan and Yangqiu Song and Qiang Yang},
  title = {{INFERENCEDYNAMICS: Efficient Routing Across LLMs through Structured Capability and Knowledge Profiling}},
  year = {2025},
  eprint = {2505.16303},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.16303},
}
Figure