Attention is not all you need: pure attention loses rank doubly exponentially with depth
Yihe Dong, Jean-Baptiste Cordonnier, Andreas Loukas
摘要
Attention-based architectures have become ubiquitous in machine learning. Yet our understanding of the reasons for their effectiveness remains limited. This work proposes a new way to understand self-attention networks: we show that their output can be decomposed into a sum of smaller terms, each involving the operation of a sequence of attention heads across layers. Using this decomposition, we prove that self-attention possesses a strong inductive bias towards "token uniformity". Specifically, without skip connections or multi-layer perceptrons (MLPs), the output converges doubly exponentially to a rank-1 matrix. On the other hand, skip connections and MLPs stop the output from degeneration. Our experiments verify the identified convergence phenomena on different variants of standard transformer architectures 1 .
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 186 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention 引用了 ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
- ConViT: Improving Vision Transformers with Soft Convolutional Inductive Biases 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Vision GNN: An Image is Worth Graph of Nodes 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Vision GNN: An Image is Worth Graph of Nodes 引用了 MetaFormer is Actually What You Need for Vision
- Scaling Up Your Kernels to 31×31: Revisiting Large Kernel Design in CNNs 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Scaling Up Your Kernels to 31×31: Revisiting Large Kernel Design in CNNs 引用了 MetaFormer is Actually What You Need for Vision
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale 引用了 Language Models are Few-Shot Learners
- AdaptFormer: Adapting Vision Transformers for Scalable Visual Recognition 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- AdaptFormer: Adapting Vision Transformers for Scalable Visual Recognition 引用了 Language Models are Few-Shot Learners
- MetaFormer is Actually What You Need for Vision 引用了 ConViT: Improving Vision Transformers with Soft Convolutional Inductive Biases
- MetaFormer is Actually What You Need for Vision 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- MetaFormer is Actually What You Need for Vision 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper186
- Scaling Up Your Kernels to 31×31: Revisiting Large Kernel Design in CNNsXiaohan Ding, Xiangyu Zhang, Jungong Han, Guiguang DingCVPR 2022 · 1,298 次引用
- AdaptFormer: Adapting Vision Transformers for Scalable Visual RecognitionShoufa Chen, Chongjian Ge, Zhan Tong, Jiangliu Wang 等NeurIPS 2022 · 1,291 次引用
- MetaFormer is Actually What You Need for VisionWeihao Yu, Mi Luo, Pan Zhou, Chenyang Si 等CVPR 2022 · 1,114 次引用
- ConViT: Improving Vision Transformers with Soft Convolutional Inductive BiasesStéphane d'Ascoli, Hugo Touvron, Matthew L. Leavitt, Ari S. Morcos 等ICML 2021 · 1,021 次引用
- Vision GNN: An Image is Worth Graph of NodesKai Han, Yunhe Wang, Jianyuan Guo, Yehui Tang 等NeurIPS 2022 · 668 次引用
它引用的 Paper10
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
- ALBERT: A Lite BERT for Self-supervised Learning of Language RepresentationsZhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel 等ICLR 2020 · 7,418 次引用
- Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie 等NeurIPS 2020 · 3,159 次引用
- Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 次引用
相关 Paper
- Incorporating Residual and Normalization Layers into Analysis of Masked Language ModelsGoro Kobayashi, Tatsuki Kuribayashi, Sho Yokoi, Kentaro InuiEMNLP 2021 · 28 次引用
- Inductive Biases and Variable Creation in Self-Attention MechanismsBenjamin L. Edelman, Surbhi Goel, Sham M. Kakade, Cyril ZhangICML 2022 · 154 次引用
- Influence Patterns for Explaining Information Flow in BERTKaiji Lu, Zifan Wang, Piotr Mardziel, Anupam DattaNeurIPS 2021 · 22 次引用
- Always Skip AttentionYiping Ji, Hemanth Saratchandran, Peyman Moghadam, Simon LuceyICCV 2025
- Consensus Is All You Get: The Role of Attention in TransformersÁlvaro Rodríguez Abella, João Pedro Silvestre, Paulo TabuadaICML 2025
