Improving Transformer Models by Reordering their Sublayers
Not on the map. Why?
Abstract (arXiv)
Multilayer transformer networks consist of interleaved self-attention and feedforward sublayers. Could ordering the sublayers in a different pattern lead to better performance? We generate randomly ordered transformers and train them with the language modeling objective. We observe that some of these models are able to achieve better performance than the interleaved baseline, and that those successful variants tend to have more self-attention at the bottom and more feedforward sublayers at the top. We propose a new transformer pattern that adheres to this property, the sandwich transformer, and show that it improves perplexity on multiple word-level and character-level language modeling benchmarks, at no cost in parameters, memory, or training time. However, the sandwich reordering pattern does not guarantee performance gains across every task, as we demonstrate on machine translation models. Instead, we suggest that further exploration of task-specific sublayer reorderings is needed in order to unlock additional gains.
Key facts. Cited by 52 papers in the map (data through 14 Oct 2026). First posted on arXiv 10 Nov 2019.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 16; 2022: 10; 2023: 11; 2024: 8; 2025: 4; 2026: 3.
52 papers.
Sort:
By area:
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,103
- 2021A Survey of Transformerscited by 401
- 2021Understanding Robustness of Transformers for Image Classificationcited by 249
- 2021Thinking Like Transformerscited by 184
- 2022Structured Pruning Learns Compact and Accurate Modelscited by 170
- 2022Transformer Language Models without Positional Encodings Still Learn Positional Informationcited by 150
- 2024The Remarkable Robustness of LLMs: Stages of Inference?cited by 146
- 2021Finetuning Pretrained Transformers into RNNscited by 96
- 2022E-Branchformer: Branchformer with Enhanced merging for speech recognitioncited by 92
- 2022Branchformer: Parallel MLP-Attention Architectures to Capture Local and Global Context for Speech Recognition and Understandingcited by 91
- 2021Lessons on Parameter Sharing across Layers in Transformerscited by 85
- 2021NormFormer: Improved Transformer Pretraining with Extra Normalizationcited by 83
38 more
- 2023Energy Transformercited by 71
- 2023Conditional Adapters: Parameter-efficient Transfer Learning with Fast Inferencecited by 69
- 2022Finding Skill Neurons in Pre-trained Transformer-based Language Modelscited by 66
- 2024Model Compression and Efficient Inference for Large Language Models: A Surveycited by 64
- 2023From Language Modeling to Instruction Following: Understanding the Behavior Shift in LLMs after Instruction Tuningcited by 56
- 2023Finding and Editing Multi-Modal Neurons in Pre-Trained Transformerscited by 36
- 2023Brainformers: Trading Simplicity for Efficiencycited by 31
- 2021GNN-LM: Language Modeling based on Global Contexts via GNNcited by 27
- 2024Attend First, Consolidate Later: On the Importance of Attention in Different LLM Layerscited by 25
- 2024CompeteSMoE -- Effective Training of Sparse Mixture of Experts via Competitioncited by 23
- 2024Position: Understanding LLMs Requires More Than Statistical Generalizationcited by 21
- 2021Of Non-Linearity and Commutativity in BERTcited by 16
- 2021Which transformer architecture fits my data? A vocabulary bottleneck in self-attentioncited by 16
- 2025SEDM: Selective Self-Evolving Distributed Memory for Agentscited by 16
- 2021Inspecting the concept knowledge graph encoded by modern language modelscited by 15
- 2021Staircase Attention for Recurrent Processing of Sequencescited by 14
- 2022Meta-Learning the Difference: Preparing Large Language Models for Efficient Adaptationcited by 14
- 2022A Neural ODE Interpretation of Transformer Layerscited by 14
- 2021RankNAS: Efficient Neural Architecture Search by Pairwise Rankingcited by 12
- 2021Revisiting Simple Neural Probabilistic Language Modelscited by 10
- 2024MomentumSMoE: Integrating Momentum into Sparse Mixture of Expertscited by 9
- 2023Breaking through the learning plateaus of in-context learning in Transformercited by 8
- 2023Centered Self-Attention Layerscited by 7
- 2025Composer: A Search Framework for Hybrid Neural Architecture Designcited by 7
- 2021IOT: Instance-wise Layer Reordering for Transformer Structurescited by 5
- 2025Improving Routing in Sparse Mixture of Experts with Graph of Tokenscited by 4
- 2026Distinct mechanisms underlying in-context learning in transformerscited by 4
- 2022TrimBERT: Tailoring BERT for Trade-offscited by 3
- 2023NarrowBERT: Accelerating Masked Language Model Pretraining and Inferencecited by 3
- 2023Interpretability in Activation Space Analysis of Transformers: A Focused Surveycited by 3
- 2023Evolutionary Neural Architecture Search for Transformer in Knowledge Tracingcited by 3
- 2024Larger models yield better results? Streamlined severity classification of ADHD-related concerns using BERT-based knowledge distillationcited by 3
- 2025Modeling Expert Interactions in Sparse Mixture of Experts via Graph Structurescited by 3
- 2022FL-Tuning: Layer Tuning for Feed-Forward Network in Transformercited by 2
- 2024Rule Extrapolation in Language Models: A Study of Compositional Generalization on OOD Promptscited by 2
- 2022Efficient Sparsely Activated Transformerscited by 1
- 2026Greedy-Gnorm: A Gradient Matrix Norm-Based Alternative to Attention Entropy for Head Pruningcited by 1
- 2026An expressivity analysis of hierarchical modelling in deep transformers via bounded-depth grammarscited by 1
50 most cited of 52 All 52 (JSON)
- 2026An expressivity analysis of hierarchical modelling in deep transformers via bounded-depth grammars16 Jun 2026
- 2026Distinct mechanisms underlying in-context learning in transformers14 Apr 2026
- 2026Greedy-Gnorm: A Gradient Matrix Norm-Based Alternative to Attention Entropy for Head Pruning4 Feb 2026
- 2025Modeling Expert Interactions in Sparse Mixture of Experts via Graph Structures18 Oct 2025
- 2025Composer: A Search Framework for Hybrid Neural Architecture Design1 Oct 2025
- 2025SEDM: Selective Self-Evolving Distributed Memory for Agents11 Sep 2025
- 2025Improving Routing in Sparse Mixture of Experts with Graph of Tokens1 May 2025
- 2024Larger models yield better results? Streamlined severity classification of ADHD-related concerns using BERT-based knowledge distillation30 Oct 2024
- 2024MomentumSMoE: Integrating Momentum into Sparse Mixture of Experts18 Oct 2024
- 2024Rule Extrapolation in Language Models: A Study of Compositional Generalization on OOD Prompts9 Sep 2024
- 2024Attend First, Consolidate Later: On the Importance of Attention in Different LLM Layers5 Sep 2024
- 2024The Remarkable Robustness of LLMs: Stages of Inference?27 Jun 2024
38 more
- 2024Position: Understanding LLMs Requires More Than Statistical Generalization3 May 2024
- 2024Model Compression and Efficient Inference for Large Language Models: A Survey15 Feb 2024
- 2024CompeteSMoE -- Effective Training of Sparse Mixture of Experts via Competition4 Feb 2024
- 2023Finding and Editing Multi-Modal Neurons in Pre-Trained Transformers13 Nov 2023
- 2023Evolutionary Neural Architecture Search for Transformer in Knowledge Tracing2 Oct 2023
- 2023From Language Modeling to Instruction Following: Understanding the Behavior Shift in LLMs after Instruction Tuning30 Sep 2023
- 2023Breaking through the learning plateaus of in-context learning in Transformer12 Sep 2023
- 2023Centered Self-Attention Layers2 Jun 2023
- 2023Brainformers: Trading Simplicity for Efficiency29 May 2023
- 2023Conditional Adapters: Parameter-efficient Transfer Learning with Fast Inference11 Apr 2023
- 2023Energy Transformer14 Feb 2023
- 2023Greedy Ordering of Layer Weight Matrices in Transformers Improves Translation4 Feb 2023
- 2023Interpretability in Activation Space Analysis of Transformers: A Focused Survey22 Jan 2023
- 2023NarrowBERT: Accelerating Masked Language Model Pretraining and Inference11 Jan 2023
- 2022A Neural ODE Interpretation of Transformer Layers12 Dec 2022
- 2022Finding Skill Neurons in Pre-trained Transformer-based Language Models14 Nov 2022
- 2022E-Branchformer: Branchformer with Enhanced merging for speech recognition30 Sep 2022
- 2022Efficient Sparsely Activated Transformers31 Aug 2022
- 2022Meta-Learning the Difference: Preparing Large Language Models for Efficient Adaptation7 Jul 2022
- 2022Branchformer: Parallel MLP-Attention Architectures to Capture Local and Global Context for Speech Recognition and Understanding6 Jul 2022
- 2022FL-Tuning: Layer Tuning for Feed-Forward Network in Transformer30 Jun 2022
- 2022Structured Pruning Learns Compact and Accurate Models1 Apr 2022
- 2022Transformer Language Models without Positional Encodings Still Learn Positional Information30 Mar 2022
- 2022TrimBERT: Tailoring BERT for Trade-offs24 Feb 2022
- 2021NormFormer: Improved Transformer Pretraining with Extra Normalization18 Oct 2021
- 2021GNN-LM: Language Modeling based on Global Contexts via GNN17 Oct 2021
- 2021RankNAS: Efficient Neural Architecture Search by Pairwise Ranking15 Sep 2021
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation27 Aug 2021
- 2021LV-BERT: Exploiting Layer Variety for BERT22 Jun 2021
- 2021Thinking Like Transformers13 Jun 2021
- 2021A Survey of Transformers8 Jun 2021
- 2021Staircase Attention for Recurrent Processing of Sequences8 Jun 2021
- 2021Inspecting the concept knowledge graph encoded by modern language models27 May 2021
- 2021Which transformer architecture fits my data? A vocabulary bottleneck in self-attention9 May 2021
- 2021Lessons on Parameter Sharing across Layers in Transformers13 Apr 2021
- 2021Revisiting Simple Neural Probabilistic Language Models8 Apr 2021
- 2021Understanding Robustness of Transformers for Image Classification26 Mar 2021
- 2021Finetuning Pretrained Transformers into RNNs24 Mar 2021
50 newest of 52 All 52 (JSON)
- 2024CompeteSMoE -- Effective Training of Sparse Mixture of Experts via Competitioncited by 23
- 2024MomentumSMoE: Integrating Momentum into Sparse Mixture of Expertscited by 9
- 2025Improving Routing in Sparse Mixture of Experts with Graph of Tokenscited by 4
- 2025Modeling Expert Interactions in Sparse Mixture of Experts via Graph Structurescited by 3
- 2022Efficient Sparsely Activated Transformerscited by 1
- 2025Modeling Expert Interactions in Sparse Mixture of Experts via Graph Structures18 Oct 2025
- 2025Improving Routing in Sparse Mixture of Experts with Graph of Tokens1 May 2025
- 2024MomentumSMoE: Integrating Momentum into Sparse Mixture of Experts18 Oct 2024
- 2024CompeteSMoE -- Effective Training of Sparse Mixture of Experts via Competition4 Feb 2024
- 2022Efficient Sparsely Activated Transformers31 Aug 2022
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,103
- 2021A Survey of Transformerscited by 401
- 2021Understanding Robustness of Transformers for Image Classificationcited by 249
- 2021Thinking Like Transformerscited by 184
- 2022Structured Pruning Learns Compact and Accurate Modelscited by 170
- 2022Transformer Language Models without Positional Encodings Still Learn Positional Informationcited by 150
- 2024The Remarkable Robustness of LLMs: Stages of Inference?cited by 146
- 2021Finetuning Pretrained Transformers into RNNscited by 96
- 2022E-Branchformer: Branchformer with Enhanced merging for speech recognitioncited by 92
- 2022Branchformer: Parallel MLP-Attention Architectures to Capture Local and Global Context for Speech Recognition and Understandingcited by 91
- 2021Lessons on Parameter Sharing across Layers in Transformerscited by 85
- 2021NormFormer: Improved Transformer Pretraining with Extra Normalizationcited by 83
12 most cited of 44 All 44 (JSON)
- 2026An expressivity analysis of hierarchical modelling in deep transformers via bounded-depth grammars16 Jun 2026
- 2026Distinct mechanisms underlying in-context learning in transformers14 Apr 2026
- 2026Greedy-Gnorm: A Gradient Matrix Norm-Based Alternative to Attention Entropy for Head Pruning4 Feb 2026
- 2025Composer: A Search Framework for Hybrid Neural Architecture Design1 Oct 2025
- 2025SEDM: Selective Self-Evolving Distributed Memory for Agents11 Sep 2025
- 2024Rule Extrapolation in Language Models: A Study of Compositional Generalization on OOD Prompts9 Sep 2024
- 2024Attend First, Consolidate Later: On the Importance of Attention in Different LLM Layers5 Sep 2024
- 2024The Remarkable Robustness of LLMs: Stages of Inference?27 Jun 2024
- 2024Position: Understanding LLMs Requires More Than Statistical Generalization3 May 2024
- 2024Model Compression and Efficient Inference for Large Language Models: A Survey15 Feb 2024
- 2023Evolutionary Neural Architecture Search for Transformer in Knowledge Tracing2 Oct 2023
- 2023From Language Modeling to Instruction Following: Understanding the Behavior Shift in LLMs after Instruction Tuning30 Sep 2023
12 newest of 44 All 44 (JSON)