Learning to Skip the Middle Layers of Transformers
On the map: Mixture-of-experts → Expert routing strategies
Abstract (arXiv)
Conditional computation is a popular strategy to make Transformers more efficient. Existing methods often target individual modules (e.g., mixture-of-experts layers) or skip layers independently of one another. However, interpretability research has demonstrated that the middle layers of Transformers exhibit greater redundancy, and that early layers aggregate information into token positions. Guided by these insights, we propose a novel architecture that dynamically skips a variable number of layers from the middle outward. In particular, a learned gating mechanism determines whether to bypass a symmetric span of central blocks based on the input, and a gated attention mechanism prevents subsequent tokens from attending to skipped token positions. Residual norms are controlled with a 'sandwich' or 'perilayernorm' scheme and gate sparsity with an adaptive regularization loss. We had aimed to reduce compute requirements for 'simpler' tokens and potentially foster an emergent multi-level representational hierarchy but, at the scales investigated, our approach does not achieve improvements in the trade-off between validation cross-entropy and estimated FLOPs compared to dense baselines with fewer layers. We release our code at https://github.com/tim-lawson/skip-middle.
Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). Placed in Expert routing strategies, one of 12 directions in Mixture-of-experts. Builds on 48 of its 53 references that are in the map. First posted on arXiv 26 Jun 2025.
Builds on
48 of 53 references.
Closest ancestors · 6
Same direction, newest first
- 2024ReMoE: Fully Differentiable Mixture-of-Experts with ReLU Routing19 Dec
- 2024MoH: Multi-Head Attention as Mixture-of-Head Attention15 Oct
- 2024MoEUT: Mixture-of-Experts Universal Transformers25 May
- 2023SwitchHead: Accelerating Transformers with Mixture-of-Experts Attention13 Dec
- 2022Mixture of Attention Heads: Selecting Attention Heads Per Token11 Oct
- 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity11 Jan
Other references · 42
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,509
- 2013Estimating or Propagating Gradients Through Stochastic Neurons for Conditional Computationcited by 2,079
- 2020GLU Variants Improve Transformercited by 1,804
- 2020GShard: Scaling Giant Models with Conditional Computation and Automatic Shardingcited by 1,631
- 2019Root Mean Square Layer Normalizationcited by 1,480
- 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,346
- 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,160
- 2024DeepSeekMoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Modelscited by 867
- 2021CogView: Mastering Text-to-Image Generation via Transformerscited by 694
30 more
- 2023Eliciting Latent Predictions from Transformers with the Tuned Lenscited by 623
- 2017BranchyNet: Fast Inference via Early Exiting from Deep Neural Networkscited by 596
- 2021ByT5: Towards a token-free future with pre-trained byte-to-byte modelscited by 509
- 2019Reducing Transformer Depth on Demand with Structured Dropoutcited by 439
- 2024ShortGPT: Layers in Large Language Models are More Redundant Than You Expectcited by 383
- 2023Finding Neurons in a Haystack: Case Studies with Sparse Probingcited by 334
- 2017SkipNet: Learning Dynamic Routing in Convolutional Networkscited by 332
- 2020DeeBERT: Dynamic Early Exiting for Accelerating BERT Inferencecited by 332
- 2024LayerSkip: Enabling Early Exit Inference and Self-Speculative Decodingcited by 307
- 2013Learning Factored Representations in a Deep Mixture of Expertscited by 278
- 2024Mixture-of-Depths: Dynamically allocating compute in transformer-based language modelscited by 258
- 2019Depth-Adaptive Transformercited by 236
- 2024The Unreasonable Ineffectiveness of the Deeper Layerscited by 226
- 2024Flex Attention: A Programming Model for Generating Optimized Attention Kernelscited by 185
- 2015Conditional Computation in Neural Networks for faster modelscited by 167
- 2024The Remarkable Robustness of LLMs: Stages of Inference?cited by 146
- 2024Byte Latent Transformer: Patches Scale Better Than Tokenscited by 146
- 2024Not All Layers of LLMs Are Necessary During Inferencecited by 96
- 2021The Neural Data Router: Adaptive Control Flow in Transformers Improves Systematic Generalizationcited by 62
- 2025Forgetting Transformer: Softmax Attention with a Forget Gatecited by 53
- 2024From Tokens to Words: On the Inner Lexicon of LLMscited by 48
- 2024SpaceByte: Towards Deleting Tokenization from Large Language Modelingcited by 34
- 2025Peri-LN: Revisiting Normalization Layer in the Transformer Architecturecited by 34
- 2024Block Transformer: Global-to-Local Language Modeling for Fast Inferencecited by 32
- 2024MrT5: Dynamic Token Merging for Efficient Byte-level Language Modelscited by 28
- 2025Hierarchical Autoregressive Transformers: Combining Byte- and Word-Level Processing for Robust, Adaptable Language Modelscited by 22
- 2023Learning to Skip for Language Modelingcited by 19
- 2024Residual Stream Analysis with Multi-Layer SAEscited by 19
- 2025From Bytes to Ideas: Language Modeling with Autoregressive U-Netscited by 15
- 2025Leveraging the true depth of LLMscited by 7
Built on by
Citing papers per year: 2026: 10.
10 papers.
- 2026Locate, Steer, and Improve: A Practical Survey of Actionable Mechanistic Interpretability in Large Language Modelscited by 27
- 2026A Brain-like Synergistic Core in LLMs Drives Behaviour and Learningcited by 6
- 2026Reclaiming Lost Text Layers for Source-Free Cross-Domain Few-Shot Learningcited by 5
- 2026Jailbreaking Leaves a Trace: Understanding and Detecting Jailbreak Attacks from Internal Representations of Large Language Modelscited by 4
- 2026Reroute, Don't Remove: Recoverable Visual Token Routing for Vision-Language Modelscited by 3
- 2026Adaptive Head Budgeting for Efficient Multi-Head Attentioncited by 1
- 2026BEAM: Binary Expert Activation Masking for Dynamic Routing in MoEcited by 1
- 2026Dynamic-in-Few-Step: Unifying Dynamic Computation and Few-Step Distillation for Efficient Video Generationcited by 0
- 2026SPIDER: Multi-Layer Semantic Token Pruning and Adaptive Sub-Layer Skipping in Multimodal Large Language Modelscited by 0
- 2026Dynamic Routing as a New Dimension for Test-time Versatility of LLMscited by 0
- 2026Dynamic Routing as a New Dimension for Test-time Versatility of LLMs3 Oct 2026
- 2026SPIDER: Multi-Layer Semantic Token Pruning and Adaptive Sub-Layer Skipping in Multimodal Large Language Models28 Sep 2026
- 2026Dynamic-in-Few-Step: Unifying Dynamic Computation and Few-Step Distillation for Efficient Video Generation7 Jul 2026
- 2026Reroute, Don't Remove: Recoverable Visual Token Routing for Vision-Language Models10 Jun 2026
- 2026BEAM: Binary Expert Activation Masking for Dynamic Routing in MoE14 May 2026
- 2026Adaptive Head Budgeting for Efficient Multi-Head Attention24 Apr 2026
- 2026Reclaiming Lost Text Layers for Source-Free Cross-Domain Few-Shot Learning5 Mar 2026
- 2026Jailbreaking Leaves a Trace: Understanding and Detecting Jailbreak Attacks from Internal Representations of Large Language Models12 Feb 2026
- 2026Locate, Steer, and Improve: A Practical Survey of Actionable Mechanistic Interpretability in Large Language Models20 Jan 2026
- 2026A Brain-like Synergistic Core in LLMs Drives Behaviour and Learning11 Jan 2026
Similar, not cited
Close in wording, no citation either way
- 2026Adaptive Computation Depth via Learned Token Routing in Transformers
- 2026LEAP: Layer-wise Exit-Aware Pretraining for Efficient Transformer Inference
- 2026Mixture of Chapters: Scaling Learnt Memory in Transformers
- 2025Pause Tokens Strictly Increase the Expressivity of Constant-Depth Transformers
- 2026Symmetry Breaking in Transformers for Efficient and Interpretable Training
- 2021Mesa: A Memory-saving Training Framework for Transformers
- 2026Sparse Token Routing in Efficient Transformers
- 2025What Layers When: Learning to Skip Compute in LLMs with Residual Gates