MACRO: Markov Chain Routing of Transformer Layers
Not on the map. Why?
Abstract (arXiv)
Standard Large Language Models (LLMs) execute layers sequentially. Dynamic layer routing, i.e. search for a different execution path through layers involving layer repetitions, skips and other moves, can improve performance. Existing routing approaches often require updating model weights, running expensive search loops per test instance, or demand ground-truth labels during inference. In this work, we propose Markov Chain Routing of Transformer Layers (MACRO), a framework that learns task-specific routes over LLM architectures without modifying underlying parameters. MACRO models layer routing as a context-dependent Markov policy conditioned on layer indices, computation budget phases, directional displacements, and operator context, supporting skip, repeat, and residual hidden-state addition operations. The Markov route distribution is updated via feedback on training data and decoded using a top-k Viterbi algorithm to isolate high-probability candidate programs. We evaluate MACRO across diverse reasoning and knowledge benchmarks on multiple open-weight LLMs. MACRO achieves a +5.0% average accuracy improvement over the unrouted baselines, with largest gains on small models. We outperform the best dynamic routing approach Dr. LLM by +7.2%, while reducing route-search time 9.4x (from 14.8 to 1.6 hours). Our code is publicly available at https://github.com/Batorskq/MACRO.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 31 of its 47 references that are in the map. First posted on arXiv 6 Aug 2026.
Builds on
31 of 47 references.
References · 31
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2023Let's Verify Step by Stepcited by 3,598
- 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,413
- 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,014
- 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,114
- 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,767
- 2024MMLU-Pro: A More Robust and Challenging Multi-Task Language Understanding Benchmarkcited by 1,758
- 2020What Disease does this Patient Have? A Large-scale Open Domain Question Answering Dataset from Medical Examscited by 1,324
- 2021Are NLP Models really able to Solve Simple Math Word Problems?cited by 861
- 2017Crowdsourcing Multiple Choice Science Questionscited by 742
- 2018Universal Transformerscited by 613
- 2019Reducing Transformer Depth on Demand with Structured Dropoutcited by 434
19 more
- 2025Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approachcited by 372
- 2024ShortGPT: Layers in Large Language Models are More Redundant Than You Expectcited by 369
- 2017SkipNet: Learning Dynamic Routing in Convolutional Networkscited by 328
- 2020DeeBERT: Dynamic Early Exiting for Accelerating BERT Inferencecited by 322
- 2021A Diverse Corpus for Evaluating and Developing English Math Word Problem Solverscited by 314
- 2024LayerSkip: Enabling Early Exit Inference and Self-Speculative Decodingcited by 302
- 2020BERT Loses Patience: Fast and Robust Inference with Early Exitcited by 267
- 2020DynaBERT: Dynamic BERT with Adaptive Width and Depthcited by 246
- 2019Depth-Adaptive Transformercited by 227
- 2020FastBERT: a Self-distilling BERT with Adaptive Inference Timecited by 224
- 2017BlockDrop: Dynamic Inference Paths in Residual Networkscited by 185
- 2024GSM-Plus: A Comprehensive Benchmark for Evaluating the Robustness of LLMs as Mathematical Problem Solverscited by 155
- 2023Looped Transformers are Better at Learning Learning Algorithmscited by 135
- 2023EE-LLM: Large-Scale Training and Inference of Early-Exit Large Language Models with 3D Parallelismcited by 69
- 2025Inner Thinking Transformer: Leveraging Dynamic Depth Scaling to Foster Adaptive Internal Thinkingcited by 56
- 2024Fast yet Safe: Early-Exiting with Risk Controlcited by 27
- 2025Adaptive Layer-skipping in Pre-trained LLMscited by 24
- 2025Skip a Layer or Loop it? Test-Time Depth Adaptation of Pretrained LLMscited by 14
- 2025Dr.LLM: Dynamic Layer Routing in LLMscited by 10
Built on by
Citing papers per year: 2026: 1.
1 paper.