Attention is Not All You Need: Pure Attention Loses Rank Doubly Exponentially with Depth

Authors: Yihe Dong, Jean-Baptiste Cordonnier, Andreas Loukas

License: CC BY 4.0

Results of the summarizing process for the arXiv paper: 2103.03404v1

  • Comprehensive Summary
  • Key points
  • Layman's Summary
  • Blog article
This paper addresses the effectiveness of attention-based architectures in machine learning and proposes a new way to understand self-attention networks. The authors show that the output of these networks can be decomposed into smaller terms, each involving the operation of a sequence of attention heads across layers. Using this decomposition, they 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. However, skip connections and MLPs prevent the output from degenerating. The authors conduct experiments on different variants of standard transformer architectures to verify their identified convergence phenomena. They also study the effects of path length on performance in three tasks: memorization, sorting, and convex hull. The results show that short paths carry predictive power with accuracy above 0.8, 0.6, and 0.65 in the respective tasks while longer paths do not perform much better than random guessing. Length zero paths contain no useful information about the task. The depths (L), number of heads (H), and hidden dimensions (d) for the three models are: L:6, H:2, d :250 for memorization; L:6, H:2, d:48 for sorting; and L:6, H:3, d:84 for convex hull. Overall, this work provides insights into why attention-based architectures are effective and sheds light on how path length affects performance in certain tasks by conducting experiments on different variants of standard transformer architectures with varying depths (L), number of heads (H), and hidden dimensions (d). The results demonstrate that short paths carry predictive power while longer paths do not perform much better than random guessing and length zero paths contain no useful information about the task.
AI-generated keywords: Attention-based architectures

AI-generated Key Points

  • The paper discusses the effectiveness of attention-based architectures in machine learning.
  • The authors propose a new way to understand self-attention networks by decomposing their output into smaller terms involving the operation of attention heads across layers.
  • Self-attention has a strong inductive bias towards "token uniformity", which can cause output convergence to a rank-1 matrix without skip connections or multi-layer perceptrons (MLPs).
  • Skip connections and MLPs prevent output degeneration.
  • Experiments were conducted on different variants of standard transformer architectures to verify identified convergence phenomena and study the effects of path length on performance in three tasks: memorization, sorting, and convex hull.
  • Short paths carry predictive power with accuracy above 0.8, 0.6, and 0.65 in the respective tasks while longer paths do not perform much better than random guessing.
  • Length zero paths contain no useful information about the task.
  • The models used for the experiments had varying depths (L), number of heads (H), and hidden dimensions (d).
Also access our AI generated: Comprehensive summary, Lay summary, Blog-like article; or ask questions about this paper to our AI assistant.

Abstract: 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.

Submitted to arXiv on 05 Mar. 2021

Tools for this paper

Explain it differently 3 free rewrites left today
Export BibTeX · RIS (Zotero, Mendeley, EndNote) · Markdown (Notion, Obsidian) · Premium
Citation alerts Premium
Journal club Slides to present it Premium
For journalists Press kit and hype check Premium

Ask questions about this paper to our AI assistant

You can also chat with multiple papers at once here.

Figures and plots

Ask about a figure by number or use its question button to request visual analysis. Up to two figures and four image panels per question. Values read from plots are approximate; check the original data.

AI assistant instructions?

Assess the quality of the AI-generated content by voting

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

The previous summary was created more than a year ago and can be re-run (if necessary) by clicking on the Run button below.

Similar papers summarized with our AI tools

Navigate through even more similar papers through a

tree representation

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.