Dr.LLM: Dynamic Layer Routing in LLMs
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) process every token through all layers of a transformer stack, causing wasted computation on simple queries and insufficient flexibility for harder ones that need deeper reasoning. Adaptive-depth methods can improve efficiency, but prior approaches rely on costly inference-time search, architectural changes, or large-scale retraining, and in practice often degrade accuracy despite efficiency gains. We introduce Dr. LLM, Dynamic routing of Layers for LLMs, a retrofittable framework that equips pretrained models with lightweight per-layer routers deciding to skip, execute, or repeat a block. Routers are trained with explicit supervision: using Monte Carlo Tree Search (MCTS), we derive high-quality layer configurations that preserve or improve accuracy under a compute budget. Our design, windowed pooling for stable routing, focal loss with class balancing, and bottleneck MLP routers, ensures robustness under class imbalance and long sequences. On ARC (logic) and DART (math), Dr. LLM improves accuracy by up to +3.4%p while saving 5 layers per example on average. Routers generalize to out-of-domain tasks (MMLU, GSM8k, AIME, TruthfulQA, SQuADv2, GPQA, PIQA, AGIEval) with only 0.85% accuracy drop while retaining efficiency, and outperform prior routing methods by up to +7.7%p. Overall, Dr. LLM shows that explicitly supervised routers retrofit frozen LLMs for budget-aware, accuracy-driven inference without altering base weights. Code is available at https://github.com/parameterlab/dr-llm.
Key facts. Cited by 12 papers in the map (data through 14 Oct 2026). Builds on 29 of its 34 references that are in the map. First posted on arXiv 14 Oct 2025.
Builds on
29 of 34 references.
References · 29
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2020Measuring Massive Multitask Language Understandingcited by 7,963
- 2024Qwen2.5 Technical Reportcited by 4,942
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
- 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,509
- 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,073
- 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,975
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
- 2023GPQA: A Graduate-Level Google-Proof Q&A Benchmarkcited by 2,879
- 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,554
- 2023AGIEval: A Human-Centric Benchmark for Evaluating Foundation Modelscited by 716
17 more
- 2017BranchyNet: Fast Inference via Early Exiting from Deep Neural Networkscited by 596
- 2025Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approachcited by 415
- 2024ShortGPT: Layers in Large Language Models are More Redundant Than You Expectcited by 383
- 2020DeeBERT: Dynamic Early Exiting for Accelerating BERT Inferencecited by 332
- 2024LayerSkip: Enabling Early Exit Inference and Self-Speculative Decodingcited by 307
- 2020BERT Loses Patience: Fast and Robust Inference with Early Exitcited by 273
- 2024Mixture-of-Depths: Dynamically allocating compute in transformer-based language modelscited by 258
- 2023Looped Transformers as Programmable Computerscited by 237
- 2023Camels in a Changing Climate: Enhancing LM Adaptation with Tulu 2cited by 229
- 2023Looped Transformers are Better at Learning Learning Algorithmscited by 149
- 2025Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computationcited by 133
- 2020On the Effect of Dropping Layers of Pre-trained Transformer Modelscited by 118
- 2024DART-Math: Difficulty-Aware Rejection Tuning for Mathematical Problem-Solvingcited by 95
- 2024Calibrating Large Language Models Using Their Generations Onlycited by 65
- 2025Adaptive Layer-skipping in Pre-trained LLMscited by 27
- 2025Skip a Layer or Loop it? Test-Time Depth Adaptation of Pretrained LLMscited by 16
- 2024Router-Tuning: A Simple and Effective Approach for Enabling Dynamic-Depth in Transformerscited by 10
Built on by
Citing papers per year: 2025: 1; 2026: 11.
12 papers.
- 2026LoopMoE: Unifying Iterative Computation with Mixture-of-Experts for Language Modelingcited by 10
- 2026Skip a Layer or Loop It? Learning Program-of-Layers in LLMscited by 9
- 2026Reasoning-preserved Efficient Distillation of Large Language Models via Activation-aware Initializationcited by 2
- 2026MACRO: Markov Chain Routing of Transformer Layerscited by 2
- 2025Towards Understanding Layer Contributions in Tabular In-Context Learning Modelscited by 1
- 2026Reachability Is Not Realization: Tracing the Sources of LLM Benchmark Gainscited by 1
- 2026Programs-of-Layers in LLMs through the Lens of Cortical Areascited by 1
- 2026Do Dynamic Routers Need Memory? HeRo: History-Aware Routing for Efficient LLM Inferencecited by 0
- 2026When Less Compute Is More: Adaptive Early Exit Improves Pretrained Outlier Detectioncited by 0
- 2026Dynamic Routing as a New Dimension for Test-time Versatility of LLMscited by 0
- 2026Input-Blind Controls Produce Substantial Oracle Headroom for Layer Programs in Multiple-Choice Evaluationcited by 0
- 2026Running Fewer Loops Removes Refusal Behaviour in Recurrent-Depth Language Modelscited by 0
- 2026Running Fewer Loops Removes Refusal Behaviour in Recurrent-Depth Language Models10 Oct 2026
- 2026Input-Blind Controls Produce Substantial Oracle Headroom for Layer Programs in Multiple-Choice Evaluation7 Oct 2026
- 2026Dynamic Routing as a New Dimension for Test-time Versatility of LLMs3 Oct 2026
- 2026When Less Compute Is More: Adaptive Early Exit Improves Pretrained Outlier Detection26 Sep 2026
- 2026Programs-of-Layers in LLMs through the Lens of Cortical Areas25 Sep 2026
- 2026Do Dynamic Routers Need Memory? HeRo: History-Aware Routing for Efficient LLM Inference8 Sep 2026
- 2026MACRO: Markov Chain Routing of Transformer Layers6 Aug 2026
- 2026Reachability Is Not Realization: Tracing the Sources of LLM Benchmark Gains4 Aug 2026
- 2026Skip a Layer or Loop It? Learning Program-of-Layers in LLMs4 Jun 2026
- 2026LoopMoE: Unifying Iterative Computation with Mixture-of-Experts for Language Modeling3 Jun 2026
- 2026Reasoning-preserved Efficient Distillation of Large Language Models via Activation-aware Initialization28 May 2026
- 2025Towards Understanding Layer Contributions in Tabular In-Context Learning Models19 Nov 2025