English
Related papers

Related papers: Attention Sinks Are Provably Necessary in Softmax …

200 papers

Large Language Models (LLMs), despite their impressive capabilities, often fail to accurately repeat a single word when prompted to, and instead output unrelated text. This unexplained failure mode represents a vulnerability, allowing even…

Machine Learning · Computer Science 2025-03-13 Itay Yona , Ilia Shumailov , Jamie Hayes , Federico Barbero , Yossi Gandelsman

The original softmax-based attention mechanism (regular attention) in the extremely successful Transformer architecture computes attention between $N$ tokens, each embedded in a $D$-dimensional head, with a time complexity of $O(N^2D)$.…

Machine Learning · Computer Science 2025-10-28 Armin Gerami , Ramani Duraiswami

Transformer-based models have emerged as one of the most widely used architectures for natural language processing, natural language generation, and image generation. The size of the state-of-the-art models has increased steadily reaching…

Hardware Architecture · Computer Science 2025-01-15 Rya Sanovar , Srikant Bharadwaj , Renee St. Amant , Victor Rühle , Saravan Rajmohan

We propose the first method to show theoretical limitations for one-layer softmax transformers with arbitrarily many precision bits (even infinite). We establish those limitations for three tasks that require advanced reasoning. The first…

Transformers have transformed the field of natural language processing. This performance is largely attributed to the use of stacked self-attention layers, each of which consists of matrix multiplies as well as softmax operations. As a…

Hardware Architecture · Computer Science 2021-03-18 Jacob R. Stevens , Rangharajan Venkatesan , Steve Dai , Brucek Khailany , Anand Raghunathan

We study gradient flow on the exponential loss for a classification problem with a one-layer softmax attention model, where the key and query weight matrices are trained separately. Under a separability assumption on the data, we show that…

Machine Learning · Computer Science 2024-03-14 Heejune Sheen , Siyu Chen , Tianhao Wang , Harrison H. Zhou

Transformer models have been widely adopted in various domains over the last years, and especially large language models have advanced the field of AI significantly. Due to their size, the capability of these networks has increased…

Machine Learning · Computer Science 2023-11-10 Yelysei Bondarenko , Markus Nagel , Tijmen Blankevoort

The self-attention module is a key component of Transformer-based models, wherein each token pays attention to every other token. Recent studies have shown that these heads exhibit syntactic, semantic, or local behaviour. Some studies have…

Computation and Language · Computer Science 2020-08-14 Madhura Pande , Aakriti Budhraja , Preksha Nema , Pratyush Kumar , Mitesh M. Khapra

Despite their empirical success, the internal mechanism by which transformer models align tokens during language processing remains poorly understood. This paper provides a mechanistic and theoretical explanation of token alignment in LLMs.…

Machine Learning · Computer Science 2025-12-19 Hadi Daneshmand

Transformer language models have driven significant progress across various fields, including natural language processing and computer vision. A central component of these models is the self-attention (SA) mechanism, which learns rich…

Machine Learning · Computer Science 2025-05-22 Suvadeep Hajra

Self-attention based Transformer has demonstrated the state-of-the-art performances in a number of natural language processing tasks. Self-attention is able to model long-term dependencies, but it may suffer from the extraction of…

Computation and Language · Computer Science 2019-12-30 Guangxiang Zhao , Junyang Lin , Zhiyuan Zhang , Xuancheng Ren , Qi Su , Xu Sun

Attention layers are the core component of transformers, the current state-of-the-art neural network architecture. Alternatives to softmax-based attention are being explored due to its tendency to hinder effective information flow. Even at…

Machine Learning · Computer Science 2025-06-17 Thiziri Nait Saada , Alireza Naderi , Jared Tanner

The Softmax attention mechanism in Transformer models is notoriously computationally expensive, particularly due to its quadratic complexity, posing significant challenges in vision applications. In contrast, linear attention provides a far…

Computer Vision and Pattern Recognition · Computer Science 2025-03-12 Qihang Fan , Huaibo Huang , Ran He

Attention mechanisms are central to the success of large language models (LLMs), enabling them to capture intricate token dependencies and implicitly assign importance to each token. Recent studies have revealed the sink token, which…

Computation and Language · Computer Science 2025-08-19 Seungjun Shin , Jaehoon Oh , Dokwan Oh

We study the dynamics of gradient flow for training a multi-head softmax attention model for in-context learning of multi-task linear regression. We establish the global convergence of gradient flow under suitable choices of initialization.…

Machine Learning · Computer Science 2024-06-11 Siyu Chen , Heejune Sheen , Tianhao Wang , Zhuoran Yang

We study the training dynamics of gradient descent in a softmax self-attention layer trained to perform linear regression and show that a simple first-order optimization algorithm can converge to the globally optimal self-attention…

Machine Learning · Computer Science 2026-03-03 Gautam Goel , Mahdi Soltanolkotabi , Peter Bartlett

Large multimodal models (LMMs) "see" images by leveraging the attention mechanism between text and visual tokens in the transformer decoder. Ideally, these models should focus on key visual information relevant to the text token. However,…

Computer Vision and Pattern Recognition · Computer Science 2025-03-06 Seil Kang , Jinyeong Kim , Junhyeok Kim , Seong Jae Hwang

The core component of attention is the scoring function, which transforms the inputs into low-dimensional queries and keys and takes the dot product of each pair. While the low-dimensional projection improves efficiency, it causes…

Machine Learning · Computer Science 2025-09-10 Yilun Kuang , Noah Amsel , Sanae Lotfi , Shikai Qiu , Andres Potapczynski , Andrew Gordon Wilson

Transformers have demonstrated great power in the recent development of large foundational models. In particular, the Vision Transformer (ViT) has brought revolutionary changes to the field of vision, achieving significant accomplishments…

Machine Learning · Computer Science 2024-11-25 Jiarui Jiang , Wei Huang , Miao Zhang , Taiji Suzuki , Liqiang Nie

This paper studies the role of sinks and diagonal patterns as attention switch and anti-oversmoothing mechanisms. We analyze geometric conditions under which sinks can be represented, showing a necessary alignment between the embedding of…

Machine Learning · Computer Science 2026-05-12 Peter Súkeník , Cristina López Amado , Christoph H. Lampert , Marco Mondelli