atlas

Research map / Architectures and efficiency / Attention and transformers

When Attention Sink Emerges in Language Models: An Empirical View

ICLR 2025 · Architectures and efficiency › Attention and transformers · approach: Sparse and structured attention · 2 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Empirically studies when attention sink emerges during LM pre-training, finding it depends on training steps, data, loss/weight decay, and softmax normalization, and disappears with sigmoid attention without normalization up to 1B parameters.

Problem

Attention sink, where autoregressive LMs place large attention on the first token regardless of semantics, is widely exploited but poorly understood; it is unclear when and why it emerges during pre-training.

Approach

Shows attention sink acts as key biases storing excess attention scores, emerges during pre-training after effective optimization, and is (at least partly) caused by softmax's sum-to-one dependence among attention scores; removing that dependence (sigmoid attention without normalization) prevents emergence.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
train on random-token sequences instead of natural languageGPT2-XL · Random inputSink₁ᵋ (%): 77.00 -> 70.29Hurt
use repeated-token sequences instead of natural languageMistral-7B, LLaMA2-7B Base, and LLaMA3-8B Base · Repeated-token inputSink₁ᵋ (%): 97.49 -> 0.00; 92.47 -> 0.00; 99.02 -> 0.00Hurt
instruction-tune the base modelMistral-7B · Base vs ChatSink₁ᵋ (%): 97.49 -> 88.34No clear effect
replace Rotary with another positional embedding (ablation)60M LLaMA model · Pile-CC validationSink₁ᵋ (%): Rotary 18.18; NoPE 20.35; Absolute PE 32.73; Learnable PE 33.13; Relative PE 35.53; ALiBi 20.78No clear effect
replace pre-norm with post-norm (ablation)60M LLaMA model · Pile-CC validationSink₁ᵋ (%): 13.54%No clear effect
add key biases and set value biases to zero (ablation)60M LLaMA model · Pile-CC validationSink₁ᵋ (%): 18.18 -> 0.04Hurt
replace normalized softmax with unnormalized sigmoid attention (ablation)60M LLaMA model · Pile-CC validationSink₁ᵋ (%): 18.18 -> 0.44$^*$Hurt
normalize sigmoid attention scores (ablation)60M LLaMA model · Pile-CC validationSink₁ᵋ (%): 0.44$^*$ -> 30.24Helped
replace softmax with sigmoid attention without normalization (ablation)1B LM · 1B modelSink₁ᵋ (%): 45.11% -> 2.46%Hurt
increase weight decay from 0.1 to 0.5 (ablation)60M LLaMA model · Pile-CC validationSink₁ᵋ (%): 18.18 -> 41.08Helped
increase weight decay further to 2.0 (ablation)60M LLaMA model · Pile-CC validationvalid loss: 3.73 -> 4.23Hurt
use a smaller training-data amount (ablation)60M LLaMA model · Pile-CC pre-trainingSink₁ᵋHurt

Surprising findings

Limitations

Experimental setup

Datasets: The Pile Pile-CC validation

Benchmarks: Pile-CC validation loss HellaSwag

Metrics: Sink_k^epsilon (threshold-based attention sink metric) validation loss l2-norm of hidden states/keys/values

Baselines: softmax attention learnable sink token KV biases ReLU attention

Builds on: attention sink (StreamingLLM) massive activations linear attention softmax-off-by-one

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy