Transformers often display an attention sink: probability mass concentrates on a fixed, content-agnostic position. Are sinks a byproduct of the optimization/training regime? Or are they sometimes functionally necessary in softmax Transformers? We prove that, in some settings, it is the latter: computing a simple trigger-conditional behavior necessarily induces a sink in softmax self-attention models. Our results formalize a familiar intuition: normalization over a probability simplex must force attention to collapse onto a stable anchor to realize a default state (e.g., when the model needs to ignore the input). We instantiate this with a concrete task: when a designated trigger token appears, the model must return the average of all preceding token representations, and otherwise output zero, a task which mirrors the functionality of attention heads in the wild (Barbero et al., 2025; Guo et al., 2024). We also prove that non-normalized ReLU attention can solve the same task without any sink, confirming that the normalization constraint is the fundamental driver of sink behavior. Experiments validate our predictions and demonstrate they extend beyond the theoretically analyzed setting: softmax models develop strong sinks while ReLU attention eliminates them in both single-head and multi-head variants.
Center for Foundation Models and Generative AI & Department of Computer Science, Northwestern University, USA(基础模型与生成人工智能中心及计算机科学系,西北大学,美国);School of Mathematical Sciences, Fudan University(复旦大学数学科学学院);University of California, Berkeley, USA(加州大学伯克利分校,美国);Center for Foundation Models and Generative AI & Department of Computer Science & Department of Statistics and Data Science, Northwestern University, USA(基础模型与生成人工智能中心及计算机科学系与统计与数据科学系,西北大学,美国)
Attention Sinks and Outliers in Attention Residuals
Department of Computer Science, Northwestern University(西北大学计算机科学系);Department of Computer Science and Engineering, University of Michigan(密歇根大学计算机科学与工程系);Department of Statistics and Data Science, University of California Los Angeles(加州大学洛杉矶分校统计与数据科学系);Department of Electrical and Computer Engineering, University of California San Diego(加州圣地亚哥大学电气与计算机工程系);Department of Computer Science, Rutgers University-New Brunswick(新泽西州立大学鲁特学院计算机科学系);Department of Computer Science and Engineering, Texas A&M University(德克萨斯农工大学计算机科学与工程系);Department of Computer Science, Columbia University(哥伦比亚大学计算机科学系)
Shanghai Qi Zhi Institute(上海启智研究院);College of AI, Tsinghua University(清华大学人工智能学院);Shanghai Jiao Tong University(上海交通大学);California Institute of Technology(加州理工学院);University of Amsterdam(阿姆斯特丹大学)
Sliding Window Attention Training for Efficient Large Language Models
City University of Hong Kong(香港城市大学);Xi’an Jiaotong University(西安交通大学);Jarvis Research Center, Tencent YouTu Lab(腾讯优图实验室研究部);Westlake University(西湖大学);University of Science and Technology of China(中国科学技术大学);Southern University of Science and Technology(南方科技大学)