mlsanityData to 14 Oct 2026

Learning to Skip the Middle Layers of Transformers

arXiv 2506.21103 ↗First posted 26 Jun 2025cs.LG cs.CLcited by 10

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

  1. 2024ReMoE: Fully Differentiable Mixture-of-Experts with ReLU Routing19 Dec
  2. 2024MoH: Multi-Head Attention as Mixture-of-Head Attention15 Oct
  3. 2024MoEUT: Mixture-of-Experts Universal Transformers25 May
  4. 2023SwitchHead: Accelerating Transformers with Mixture-of-Experts Attention13 Dec
  5. 2022Mixture of Attention Heads: Selecting Attention Heads Per Token11 Oct
  6. 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity11 Jan

Other references · 42

  1. 2022Training language models to follow instructions with human feedbackcited by 15,971
  2. 2024The Llama 3 Herd of Modelscited by 14,715
  3. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  4. 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,509
  5. 2013Estimating or Propagating Gradients Through Stochastic Neurons for Conditional Computationcited by 2,079
  6. 2020GLU Variants Improve Transformercited by 1,804
  7. 2020GShard: Scaling Giant Models with Conditional Computation and Automatic Shardingcited by 1,631
  8. 2019Root Mean Square Layer Normalizationcited by 1,480
  9. 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,346
  10. 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,160
  11. 2024DeepSeekMoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Modelscited by 867
  12. 2021CogView: Mastering Text-to-Image Generation via Transformerscited by 694
30 more
  1. 2023Eliciting Latent Predictions from Transformers with the Tuned Lenscited by 623
  2. 2017BranchyNet: Fast Inference via Early Exiting from Deep Neural Networkscited by 596
  3. 2021ByT5: Towards a token-free future with pre-trained byte-to-byte modelscited by 509
  4. 2019Reducing Transformer Depth on Demand with Structured Dropoutcited by 439
  5. 2024ShortGPT: Layers in Large Language Models are More Redundant Than You Expectcited by 383
  6. 2023Finding Neurons in a Haystack: Case Studies with Sparse Probingcited by 334
  7. 2017SkipNet: Learning Dynamic Routing in Convolutional Networkscited by 332
  8. 2020DeeBERT: Dynamic Early Exiting for Accelerating BERT Inferencecited by 332
  9. 2024LayerSkip: Enabling Early Exit Inference and Self-Speculative Decodingcited by 307
  10. 2013Learning Factored Representations in a Deep Mixture of Expertscited by 278
  11. 2024Mixture-of-Depths: Dynamically allocating compute in transformer-based language modelscited by 258
  12. 2019Depth-Adaptive Transformercited by 236
  13. 2024The Unreasonable Ineffectiveness of the Deeper Layerscited by 226
  14. 2024Flex Attention: A Programming Model for Generating Optimized Attention Kernelscited by 185
  15. 2015Conditional Computation in Neural Networks for faster modelscited by 167
  16. 2024The Remarkable Robustness of LLMs: Stages of Inference?cited by 146
  17. 2024Byte Latent Transformer: Patches Scale Better Than Tokenscited by 146
  18. 2024Not All Layers of LLMs Are Necessary During Inferencecited by 96
  19. 2021The Neural Data Router: Adaptive Control Flow in Transformers Improves Systematic Generalizationcited by 62
  20. 2025Forgetting Transformer: Softmax Attention with a Forget Gatecited by 53
  21. 2024From Tokens to Words: On the Inner Lexicon of LLMscited by 48
  22. 2024SpaceByte: Towards Deleting Tokenization from Large Language Modelingcited by 34
  23. 2025Peri-LN: Revisiting Normalization Layer in the Transformer Architecturecited by 34
  24. 2024Block Transformer: Global-to-Local Language Modeling for Fast Inferencecited by 32
  25. 2024MrT5: Dynamic Token Merging for Efficient Byte-level Language Modelscited by 28
  26. 2025Hierarchical Autoregressive Transformers: Combining Byte- and Word-Level Processing for Robust, Adaptable Language Modelscited by 22
  27. 2023Learning to Skip for Language Modelingcited by 19
  28. 2024Residual Stream Analysis with Multi-Layer SAEscited by 19
  29. 2025From Bytes to Ideas: Language Modeling with Autoregressive U-Netscited by 15
  30. 2025Leveraging the true depth of LLMscited by 7

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 10.

10 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Adaptive Computation Depth via Learned Token Routing in Transformers
  2. 2026LEAP: Layer-wise Exit-Aware Pretraining for Efficient Transformer Inference
  3. 2026Mixture of Chapters: Scaling Learnt Memory in Transformers
  4. 2025Pause Tokens Strictly Increase the Expressivity of Constant-Depth Transformers
  5. 2026Symmetry Breaking in Transformers for Efficient and Interpretable Training
  6. 2021Mesa: A Memory-saving Training Framework for Transformers
  7. 2026Sparse Token Routing in Efficient Transformers
  8. 2025What Layers When: Learning to Skip Compute in LLMs with Residual Gates