Why "classic" Transformers are shallow and how to make them go deep
Not on the map. Why?
Abstract (arXiv)
Since its introduction in 2017, Transformer has emerged as the leading neural network architecture, catalyzing revolutionary advancements in many AI disciplines. The key innovation in Transformer is a Self-Attention (SA) mechanism designed to capture contextual information. However, extending the original Transformer design to models of greater depth has proven exceedingly challenging, if not impossible. Even though various modifications have been proposed in order to stack more layers of SA mechanism into deeper models, a full understanding of this depth problem remains lacking. In this paper, we conduct a comprehensive investigation, both theoretically and empirically, to substantiate the claim that the depth problem is caused by token similarity escalation; that is, tokens grow increasingly alike after repeated applications of the SA mechanism. Our analysis reveals that, driven by the invariant leading eigenspace and large spectral gaps of attention matrices, token similarity provably escalates at a linear rate. Based on the gained insight, we propose a new strategy of surgically removing excessive similarity in contrast to the existing approach of diminishing the SA mechanism explicitly or implicitly (such as in pre-norm transformers). Preliminary experimental results confirm the effectiveness of the proposed strategy in small-scale post-norm Transformer models.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 30 of its 43 references that are in the map. First posted on arXiv 11 Dec 2023.
Builds on
30 of 43 references.
References · 30
- 2017Attention Is All You Needcited by 59,932
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
- 2021On the Opportunities and Risks of Foundation Modelscited by 3,961
- 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,772
- 2019RandAugment: Practical automated data augmentation with a reduced search spacecited by 2,261
- 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,201
18 more
- 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,168
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
- 2020On Layer Normalization in the Transformer Architecturecited by 906
- 2019How Contextual are Contextualized Word Representations? Comparing the Geometry of BERT, ELMo, and GPT-2 Embeddingscited by 770
- 2021Attention is Not All You Need: Pure Attention Loses Rank Doubly Exponentially with Depthcited by 411
- 2019Learning Deep Transformer Models for Machine Translationcited by 309
- 2015Norm-Based Capacity Control in Neural Networkscited by 299
- 2020ReZero is All You Need: Fast Convergence at Large Depthcited by 260
- 2019Representation Degeneration Problem in Training Natural Language Generation Modelscited by 250
- 2020Understanding the Difficulty of Training Transformerscited by 210
- 2017All-but-the-Top: Simple and Effective Postprocessing for Word Representationscited by 205
- 2023Stabilizing Transformer Training by Preventing Attention Entropy Collapsecited by 154
- 2022Signal Propagation in Transformers: Theoretical Perspectives and the Role of Rank Collapsecited by 136
- 2021Contrastive Learning for Representation Degeneration Problem in Sequential Recommendationcited by 121
- 2021WhiteningBERT: An Easy Unsupervised Sentence Embedding Approachcited by 68
- 2023Deep Transformers without Shortcuts: Modifying Self-attention for Faithful Signal Propagationcited by 44
- 2022B2T Connection: Serving Stability and Performance in Deep Transformerscited by 16
- 2022Addressing Token Uniformity in Transformers via Singular Value Transformationcited by 14
Built on by
Citing papers per year: 2024: 1.
1 paper.