Source-linked AI summary
Attention Sinks and Compression Valleys in LLMs are Two Sides of the Same Coin
Enrique Queipo-de-Llano, Álvaro Arroyo, Federico Barbero, Xiaowen Dong, Michael Bronstein, Yann LeCun, Ravid Shwartz-Ziv
TL;DR
The paper addresses the unresolved relationship between attention sinks and compression valleys, proposing that both arise from massive residual-stream activations. It proves a link to representational compression and reports synchronized empirical emergence, then uses this account to describe depth-wise computation and task-dependent layer depth.
Problem
Attention sinks and compression valleys have been explained separately, and their precise origins and formal relationship remain unclear.
Source: §1 · p. 1Method
The paper combines a theoretical analysis of how dominant token norms constrain representation geometry with experiments and targeted ablations, then proposes a three-phase account of computation across depth.
Source: §1 · pp. 1–2, §3.3 · p. 5Results
Embedding-style tasks peak in compressed mid-layers, while generation benefits from late refinement and full depth.
Source: §6 · p. 10Takeaways & Limitations
The Mix-Compress-Refine account distinguishes task-dependent optimal depths: intermediate layers for embedding tasks and full-depth processing for generation.
Source: §6 · p. 10For Llama-3-8B, very large BOS activations across nearly all layers make per-layer correlation ill-defined and suppress its overall magnitude while inflating variance.
Source: §2 · p. 4
Abstract
from arXiv · showhide
Attention sinks and compression valleys have attracted significant attention as two puzzling phenomena in large language models, but have been studied in isolation. In this work, we present a surprising connection between attention sinks and compression valleys, tracing both to the formation of massive activations in the residual stream. We prove theoretically that massive activations necessarily produce representational compression and establish bounds on the resulting entropy reduction. Through experiments across several models (410M-120B parameters), we confirm that when the beginning-of-sequence token develops extreme activation norms in the middle layers, both compression valleys and attention sinks emerge simultaneously. Targeted ablation studies validate our theoretical predictions. This unified view motivates us to propose the Mix-Compress-Refine theory of information flow, as an attempt to explain how LLMs organize their computation in depth by controlling attention and representational compression via massive activations. Specifically, we posit that Transformer-based LLMs process tokens in three distinct phases: (1) broad mixing in the early layers, (2) compressed computation with limited mixing in the middle layers, and (3) selective refinement in the late layers. Our framework helps explain why embedding tasks perform best at intermediate layers, whereas generation tasks benefit from full-depth processing, clarifying differences in task-dependent representations.
1 INTRODUCTION
The introduction links attention sinks and compression valleys to massive residual-stream activations, addressing the lack of a formal connection between them. It presents Mix-Compress-Refine as a three-phase account of depth-wise computation and task-dependent optimal layer depth.
1 INTRODUCTION
- Prior accounts explain sinks and compression separately, leaving their precise origins and formal relationship unresolved.The cited explanations include positional bias and over-mixing prevention for sinks, and information bottleneck theory for compression.Source: §1 · p. 1
- Massive residual-stream activations, typically on BOS, are proposed as the shared mechanism behind attention sinks and compression valleys.The paper argues that a dominant token norm creates a dominant singular value and thereby drives compression; experiments cover models from 410M to 120B parameters.Source: §1 · p. 1
- The paper proves that a single token’s dominant norm necessarily creates a dominant singular value, explaining representational compression.The introduction reports experiments across several models as confirmation of the unified mechanism.Source: §1 · p. 1
- Mix-Compress-Refine describes broad early mixing, compressed middle-layer computation with limited mixing, and selective late refinement.The introduction associates embedding-task peaks with compression and generation-task benefits with full-depth processing.Source: §1 · p. 2
2 BACKGROUND AND RELATED WORK
The background describes attention sinks and compression valleys as established but separately explained phenomena. It positions this work as connecting them through massive activations and a unified account of information flow across depth.
2 BACKGROUND AND RELATED WORK
- Attention sinks are heads’ focus on semantically uninformative tokens, while compression valleys are middle-layer drops in representation entropy.The background notes that compression coincides with increased anisotropy and near-linear layer transitions, yet compressed representations can perform well on embedding tasks.Source: §2 · p. 2
- Prior work links massive activations on special tokens, particularly BOS, to attention sinks, but not to representational structure or a unified theory.Massive activations are described as extremely large-magnitude residual-stream features that can act as input-agnostic biases.Source: §2 · pp. 2–3
- Earlier depth-wise studies examine rank collapse, token clustering, information propagation, layer outputs, and late-layer refinement without explaining why stages form.The cited studies use simplified settings or analyze particular dynamics and probes; the background says none provides a unified mechanism predicting when stages appear.Source: §2 · p. 3
- This work addresses the gap by documenting synchronized sinks and compression, proposing residual-stream norms as their shared regulator, and relating the mechanism to task behavior.The proposed three-stage account distinguishes embedding-style from generation tasks.Source: §2 · p. 3
3 MASSIVE ACTIVATIONS DRIVE BOTH ATTENTION SINKS AND COMPRESSION
The section reports synchronized emergence of massive activations, compression, and attention sinks, then presents a theoretical link between a dominant token norm and compression. The empirical patterns are observed across models and are consistent across inputs and training checkpoints.
3.1 EMPIRICAL CORRELATION: SYNCHRONIZED EMERGENCE ACROSS MODELS
- In Pythia 410M and 6.9B, entropy, sink rate, and BOS norm emerge together around training step 1k and remain synchronized through 143k steps.The figure tracks these quantities across training checkpoints.Source: Figure 2 · p. 4
- BOS norm increases correlate with lower entropy (r = −0.9 ± 0.18) and higher sink rate (r = 0.58 ± 0.251) across models.The three patterns align when BOS norms rise by factors of 10^3–10^4, typically in layers 0–5 depending on model depth.Source: §3.1 · p. 4
- In Pythia 410M, the transition consistently occurs at layer 5 regardless of input, while sink rates vary with prompt content.The layer index is fixed for each model, and the massive activation is described as deterministic.Source: §3.1 · p. 4
3.2 THEORETICAL FRAMEWORK: MASSIVE ACTIVATIONS IMPLY COMPRESSION
- The section’s theorem states that massive activations induce spectral dominance, providing a theoretical basis for the observed compression.The accompanying corollary gives compression bounds in terms of the norm ratio c = M/R and alignment α.Source: §3.2 · p. 4
2. Anisotropy: p1 ≥p
The section explains how activation magnitude and alignment constrain spectral dominance and entropy, and reports that theoretical bounds closely match measurements in compressed layers. Targeted ablations test the role of massive activations in both compression and sink formation.
2. Anisotropy: p1 ≥p
- A larger norm ratio or stronger alignment widens the spectral gap and tightens the upper bound on singular-value entropy.The section says large c or α near 1 drives entropy toward zero; during compression, αR remains small relative to M, so σ1 is effectively dictated by M.Source: §2 · p. 5
- In Pythia 410M’s compressed middle layers, predicted and observed bounds nearly overlap, while they remain loose in early layers without massive activations.The representation matrix is described as effectively rank-one plus small perturbations when the BOS norm becomes massive.Source: §2 · p. 5, Figure 3 · p. 5
3.3 EVIDENCE FROM TARGETED ABLATIONS
- In LLaMA3 8B, removing the BOS MLP contribution prevents the entropy drop and sink formation; ablating all activation stages eliminates compression.Ablating any single stage in models with multiple activation stages partially reduces compression, suggesting a cumulative contribution.Source: §3.3 · pp. 5–6
- The authors hypothesize that early broad mixing and later next-token pressures leave middle layers available for extreme features that regulate mixing and induce compression.They present this as a hypothesis about why sinks and compression concentrate at mid-depth.Source: §3.3 · p. 6
4 MIX-COMPRESS-REFINE: A THEORY OF INFORMATION FLOW
The Mix-Compress-Refine framework describes three depth-wise phases demarcated by the emergence and dissipation of massive activations: broad mixing, compressed computation with limited mixing, and selective refinement.
4 MIX-COMPRESS-REFINE: A THEORY OF INFORMATION FLOW
- Massive activations demarcate three phases: early broad mixing, middle compression with halted mixing, and late norm equalization with selective refinement.The framework attributes the phase boundaries to the emergence and later dissipation of massive activations.Source: §4 · p. 6
4.1 PHASE 1: INFORMATION MIXING (LAYERS 0–20%)
- Early diffuse attention enables broad integration of token representations; mixing scores exceed 0.7 before dropping when massive activations emerge.The mixing phase ranges from the first layer in some models to approximately 20% of depth in others.Source: §4.1 · p. 6
4.2 PHASE 2: COMPRESSION AND HALTED MIXING (LAYERS 20–85%)
- Massive activations, typically on BOS, induce compression and attention sinks that act as approximate no-ops, limiting further mixing while preserving the residual stream.The authors describe compressed middle-layer representations as retaining a few dominant directions that preserve high-level context while discarding redundancies.Source: §4.2 · p. 6
- Sink strength varies with prompt complexity in the middle layers, while early-layer mixing scores show near-zero variation between high- and low-sink prompts.The comparison uses top- and bottom-sink prompts from 20K FineWeb-Edu prompts.Source: §4.2 · p. 7, Figure 5 · p. 7
4.3 PHASE 3: SELECTIVE REFINEMENT (LAYERS 85–100%)
- Late layers reverse compression as content-token norms rise toward BOS norms and attention shifts from sinks to sharp positional patterns.Identity and near-diagonal heads can write local signals into the residual stream rather than defaulting to zero-update BOS sinks.Source: §4.3 · pp. 7–8
5 IMPLICATIONS FOR DOWNSTREAM PERFORMANCE
The paper finds that optimal depth depends on the task: embedding performance peaks in compressed middle layers, while generation improves through later refinement. It relates this difference to the distinct representational needs of the tasks.
5.1 THE DISTINCT PERFORMANCE PATTERNS ACROSS TASKS
- WikiText-2 perplexity declines from > 10^4 in early layers to 10–25 at full depth, with the sharpest improvements in Phase 3.The authors associate late improvements with norm equalization and positional or identity heads enabling token-specific refinements.Source: §5.1 · p. 8
- For sufficiently large models, multiple-choice accuracies stay largely flat until roughly 40–60% depth, then rise sharply through later processing.The paper reports this pattern across ARC Easy, ARC Challenge, HellaSwag, and WinoGrande evaluations.Source: §5.1 · pp. 8–9
- Embedding performance peaks at 25–75% depth, while generation improves through late refinement and benefits from full-depth processing.Across 32 MTEB tasks, embedding performance at 25–75% relative depth outperforms early and late layers by 10–20%.Source: §5 · p. 8, §5.1 · p. 9, §5.2 · p. 10
5.2 WHY DO DIFFERENT PHASES NEED DIFFERENT TASKS?
- Embedding-style objectives benefit from compressed middle-layer states, whereas generation and reasoning require restored capacity for token-specific refinement.The paper links the embedding pattern to low-dimensional task-relevant structure and describes Phase 3 as restoring higher entropy.Source: §5.2 · pp. 9–10
- Selecting an optimal layer should match the processing phase to the objective; phase-aware early exiting is proposed as a potentially promising design choice.The paper distinguishes embedding benchmarks from next-token-prediction-aligned tasks in motivating this suggestion.Source: §5.2 · p. 10
6 CONCLUSION
The conclusion presents massive activations as the link between attention sinks and compression valleys, and summarizes a three-phase account of computation across depth. It relates this account to different depth preferences for embedding and generation tasks.
6 CONCLUSION
- A single high-norm token necessarily induces a dominant singular value, yielding low matrix entropy and high anisotropy, with quantitatively bounded effects.The conclusion identifies this result as the theoretical link between massive activations and representational compression.Source: §6 · p. 10
- The proposed framework describes early broad mixing, middle compression and curtailed mixing via sinks, and late norm equalization with sharp positional refinement.Massive activations appear and later disappear across these phases.Source: §6 · p. 10
- Embedding-style tasks peak in compressed mid-layers, whereas generation improves through late refinement and benefits from full depth.The paper presents this distinction as a downstream implication of its depth-wise framework.Source: §6 · p. 10
- The framework is presented as a step toward a more mechanistic account of how LLMs allocate computation across depth.The authors hope the framework will help connect head-level mechanisms with representation geometry.Source: §6 · p. 10
A.1 ARCHITECTURE
- Decoder-only Transformers use causal masking, making attention matrices lower-triangular; row-wise softmax makes them row-stochastic.The architecture description also specifies L layers, hidden dimension d, and H attention heads per layer.Source: §A.1 · p. 14
A.2 THEORETICAL RESULTS
The theoretical analysis links a dominant token representation to singular-value dominance and reduced matrix-based entropy, with activation magnitude and alignment governing the bounds. The additional analysis describes how layerwise changes in BOS norm, entropy, and sink rate are compared.
A.2 THEORETICAL RESULTS
- A dominant BOS representation makes the leading singular value dominate, with bounds governed by its norm and the alignment of other token representations.The analysis identifies activation magnitude as especially influential empirically, while retaining alignment in the bounds.Source: §A.2 · p. 15
- A large activation norm can grow the leading singular value even when the other token representations are weakly aligned or orthogonal.The proof identifies activation magnitude and alignment as separate factors in singular-value dominance.Source: §A.2 · p. 15
- The entropy bound is maximized when the remaining singular-value mass is uniform, and its upper bound approaches zero as c grows or α approaches 1.Additional structure in the remaining spectrum, such as a second spike, lowers true entropy beneath that maximum.Source: §A.2 · p. 16
- The theoretical analysis assumes one massive BOS activation; with multiple massive activations, its c-based bounds become more permissive.The authors suggest extending the analysis by treating the first n tokens as massive activations.Source: §A.2 · p. 16
B ADDITIONAL RESULTS
- The additional analysis correlates same-layer BOS-norm and entropy changes with sink-rate changes one layer later, averaging modelwise correlations using Fisher z transforms.Metrics are z-scored across layers before taking differences, emphasizing abrupt changes rather than absolute values.Source: B ADDITIONAL RESULTS · p. 17
- The work focuses on decoder-only Transformers and BOS-centered activations, while targeted MLP-ablation causal claims have model-dependent exceptions.The theory assumes a single massive row, although real models may have multiple interacting massive activations.Source: B ADDITIONAL RESULTS · p. 17
B.1 BROADER ANALYSIS OF MODELS
The broader analysis tests the proposed dynamics across datasets, model families, scales, and targeted ablations. It also reports model-specific patterns in GPT OSS and Gemma 7B.
B.1 BROADER ANALYSIS OF MODELS
- Results on The Stack, FineWeb, and MATH are described as similar to GSM8K, reinforcing the reported input-independence across code, prose, and math prompts.The corresponding figures show entropy, sink rate, and BOS measures for each dataset.Source: §B.1 · p. 17, Figure 9 · p. 18, Figure 10 · p. 18
- The authors report the emergence of compression, attention sinks, and massive activations in Pythia models and 70B–120B models.The large-model examples are LLaMA3 70B, Qwen2 72B, and GPT OSS 120B.Source: §B.1 · p. 17, Figure 12 · p. 18, Figure 13 · p. 18
- The theoretical bounds are tight in middle layers, where the leading singular value tracks BOS norm, then dominance declines toward the network’s second half.The weaker bounds are also reported as very tight.Source: §B.1 · p. 19, Figure 15 · p. 19, Figure 16 · p. 19
- In Pythia 410M, MLPs appear to cause massive activations, and lowering their norm corresponds to increased representational entropy and fewer attention sinks.Attention sinks are less predictable than entropy in these ablations, though their trend is generally downward as activation norm falls.Source: §B.1 · pp. 19–20, Figure 19 · p. 20, Figure 20 · p. 20
- GPT OSS has learnable sink logits but no learnable value sink token; the authors hypothesize it uses BOS activations for bias-like behavior and compression.Alternating dense and locally banded sparse attention may explain its oscillating sink patterns across layers.Source: §B.1 · pp. 20–21, Figure 21 · p. 21
- Gemma 7B creates norm disparity by lowering other tokens’ initially high norms, then re-equalizes them in late layers.The authors attribute its high initial norms to the embedding layer and note identity heads in early and later layers.Source: §B.1 · p. 21, Figure 22 · p. 21
B.2 MIXING AND SINK DETECTION METRICS
The section introduces row-entropy and column-concentration diagnostics for attention mixing and sinkiness, then examines their layerwise patterns and limitations.
Mixing and sink detection metrics
- Mixing Score drops from 0.7–0.75 to 0.3–0.4 after the first few layers, while ColSum Rate rises with massive activations; Bloom 1.7B resumes mixing late.The authors attribute Bloom 1.7B’s late mixing to its lack of rotary positional embeddings.Source: §B.2 · p. 21, Figure 23 · p. 22
- ColSum Concentration is one minus normalized column-sum entropy, and is tightly related to BOS sink score when a head is BOS-dominated.High concentration means a few columns receive most attention mass; the BOS score comparison indicates it can serve as a token-agnostic sink detector.Source: §B.2 · p. 22, Figure 24 · p. 22
- Neither diagnostic alone separates all regimes: ColSum Concentration misses identity heads, while row entropy cannot distinguish sinks, identities, and previous-token heads.The proposed combined Mix2D score was not informative in practice and was not included.Source: §B.2 · p. 22
- The Sink-Versus-Identity Index tracks Phase 3 shifts toward high BOS-plus-diagonal attention, including sink, identity, and hybrid patterns.Figure 25 plots heads by SVI and BOS-plus-diagonal attention, colored by layer; early heads tend to have low values on both axes.Source: §B.2 · pp. 22–23, Figure 25 · p. 23
- In Bloom 1.7B and Qwen2 7B, BOS attention emerges only with massive activations; middle-layer sink amount varies by input, but early-layer mixing does not.Figures 26 and 27 compare top prompts with top–bottom prompt differences in BOS sink and mixing scores.Source: §B.2 · p. 23, Figure 26 · p. 23, Figure 27 · p. 23
B.3 ADDITIONAL RESULTS ON DOWNSTREAM TASKS
Layerwise evaluations find that multiple-choice accuracy is flat through the compression valley before improving, while linear-probe accuracy peaks in middle layers; TunedLens preserves LogitLens behavior.
Downstream task results
- Layerwise next-token output entropy, used as a confidence proxy, decreases more rapidly toward Phase 3.The evaluation also computes next-token cross-entropy loss and perplexity; Figure 28 presents output entropy by layer.Source: §B.3 · p. 23, Figure 28 · p. 24
- Five-shot evaluation boosts final multiple-choice accuracies but does not change the overall layerwise behavior.The experiments cover ARC Easy, ARC Challenge, HellaSwag, and WinoGrande.Source: §B.3 · p. 24
- Multiple-choice accuracy remains relatively flat through Phase 2, then begins improving near 50% of network depth.The authors interpret the pattern as requiring both compression and late-layer specialization.Source: Figure 29 · p. 24, §B.3 · p. 24
- TunedLens evaluation on three models shows no meaningful layerwise-behavior differences from LogitLens on multiple-choice datasets.TunedLens uses a trained per-layer affine transformation onto vocabulary instead of the model’s own unembedding layer.Source: §B.3 · p. 24, Figure 30 · p. 24
- Linear-probe accuracy peaks in middle layers across models and datasets, and the appendix reports average main scores across 32 MTEB tasks.The authors suggest classification-relevant linear features emerge transiently in compressed middle representations; Figure 32 reports the MTEB averages.Source: Figure 31 · p. 24, §B.3 · p. 25, Figure 32 · p. 25