The Spike, the Sparse and the Sink: Anatomy of Massive Activations and Attention Sinks

TL;DR

The study reveals massive activations and attention sinks in Transformers as architectural artifacts.

cs.AI 🔴 Advanced 2026-03-06 36 views
Shangwen Sun Alfredo Canziani Yann LeCun Jiachen Zhu
Transformer massive activations attention sinks pre-norm language models

Key Findings

Methodology

Through systematic experiments, the study investigates massive activations and attention sinks in Transformer models. Using decoder-only Transformers with pre-norm configuration, extreme outliers were observed in a few channels. By altering normalization, massive activations can be suppressed while retaining attention sinks.

Key Results

  • Result 1: Massive activations appear in intermediate layers, affecting implicit parameters with extreme outliers in a few channels.
  • Result 2: Attention sinks are primarily driven by the dimensionality of the attention space and training context-length distribution.
  • Result 3: Ablating pre-norm configuration decouples massive activations and attention sinks.

Significance

The study elucidates the causal relationship between two phenomena in Transformer architecture, providing deeper insights into modern language models' internal computations. This is significant for applications like quantization, pruning, and long-context inference.

Technical Contribution

The study identifies pre-norm configuration as the key factor for the co-occurrence of massive activations and attention sinks, proposing methods to suppress massive activations while retaining attention sinks.

Novelty

This is the first systematic exploration of the causal relationship between massive activations and attention sinks in Transformers, offering new architectural design insights.

Limitations

  • Limitation 1: The study focuses on decoder-only configurations, limiting its applicability to specific Transformer setups.
  • Limitation 2: The findings have not been extensively validated on other types of language models.

Future Work

Future research could explore the impact of different normalization configurations on other model types and how to optimize architectures without performance loss.

AI Executive Summary

Transformer language models have achieved significant success in natural language processing tasks, yet their internal computation mechanisms remain not fully understood. This study focuses on massive activations and attention sinks in Transformers, revealing these phenomena as architectural artifacts of modern Transformer design. Systematic experiments show that massive activations appear in intermediate layers, affecting implicit parameters, while attention sinks bias towards short-range dependencies. The study identifies pre-norm configuration as the key factor for these phenomena's co-occurrence, showing that altering this configuration can suppress massive activations while retaining attention sinks. This research provides new perspectives for understanding and optimizing Transformer architectures, significant for applications like quantization, pruning, and long-context inference. Future research could explore the impact of different normalization configurations on other model types and how to optimize architectures without performance loss.

Deep Analysis

Background

Since its introduction, the Transformer model has made significant advances in natural language processing. The architecture proposed by Vaswani et al. has become the foundation for large language models (LLMs). Despite its outstanding performance across various tasks, its internal computation mechanisms remain not fully understood. Studies by Radford et al. and Xiong et al. indicate that massive activations and attention sinks frequently occur in Transformers, yet their functional roles and causal relationships remain unclear.

Core Problem

Massive activations and attention sinks frequently co-occur in Transformers, often involving the same tokens. These phenomena significantly impact applications like quantization, pruning, and long-context inference, yet their functional roles and causal relationships remain unclear.

Innovation

This study systematically reveals the causal relationship between massive activations and attention sinks in Transformers for the first time. By altering normalization configurations, the study shows that massive activations can be suppressed while retaining attention sinks, providing new insights for optimizing Transformer architectures.

Methodology

  • �� Conduct experiments using decoder-only Transformers with pre-norm configuration
  • �� Observe massive activations and attention sinks across different layers
  • �� Alter normalization configurations to study their impact on phenomena
  • �� Analyze changes in implicit parameters and attention outputs

Experiments

Experiments were conducted using various Transformer models, including the Llama and Qwen series. By altering normalization configurations, the study observed massive activations and attention sinks across different layers. Ablation studies were also conducted to verify the causal relationship between phenomena.

Results

Results show that massive activations appear in intermediate layers, affecting implicit parameters, while attention sinks bias towards short-range dependencies. Ablating pre-norm configuration decouples massive activations and attention sinks.

Applications

The findings have significant implications for applications like quantization, pruning, and long-context inference. Optimizing Transformer architectures can improve computational efficiency and performance.

Limitations & Outlook

The study focuses on decoder-only configurations, limiting its applicability to specific Transformer setups. Future research could explore the impact of different normalization configurations on other model types and how to optimize architectures without performance loss.

Plain Language Accessible to non-experts

Imagine working in a large factory with many machines, each with different functions. Some machines suddenly become very active, like a conveyor belt speeding up—this is massive activation. Other machines attract attention, like a loud alarm—this is an attention sink. The study finds these phenomena result from the factory's design, not the machines themselves. By adjusting the factory layout, these occurrences can be reduced.

ELI14 Explained like you're 14

Imagine playing a big online multiplayer game. Some characters suddenly become super powerful, like they've unlocked hidden powers—this is massive activation. Other characters always grab everyone's attention, like stars of the game—this is an attention sink. The study finds these phenomena are due to game design, not the characters themselves. Changing the game rules can make it more balanced.

Glossary

Transformer

A neural network architecture used for natural language processing, capable of efficiently handling sequence data.

Used in this paper to study massive activations and attention sinks.

Massive Activations

Extreme outliers in a few channels within Transformers.

The study finds it as an artifact of architectural design.

Attention Sinks

Certain tokens attract disproportionate attention mass.

The study reveals its bias towards short-range dependencies.

Pre-norm Configuration

A Transformer configuration affecting massive activations and attention sinks.

Identified as the key factor for phenomena co-occurrence.

Llama

An open-source Transformer model widely used in experiments.

Used in this paper to observe massive activations and attention sinks.

Open Questions Unanswered questions from this research

  • 1 How to optimize Transformer architectures to reduce massive activations and attention sinks without affecting performance.
  • 2 The impact of different normalization configurations on other types of language models needs further exploration.

Applications

Immediate Applications

Model Optimization

By altering normalization configurations, Transformer models' computational efficiency and performance can be improved.

Long-term Vision

Architectural Design

Provides new insights for future language model designs, reducing unnecessary computational overhead.

Abstract

We study two recurring phenomena in Transformer language models: massive activations, in which a small number of tokens exhibit extreme outliers in a few channels, and attention sinks, in which certain tokens attract disproportionate attention mass regardless of semantic relevance. Prior work observes that these phenomena frequently co-occur and often involve the same tokens, but their functional roles and causal relationship remain unclear. Through systematic experiments, we show that the co-occurrence is largely an architectural artifact of modern Transformer design, and that the two phenomena serve related but distinct functions. Massive activations operate globally: they induce near-constant hidden representations that persist across layers, effectively functioning as implicit parameters of the model. Attention sinks operate locally: they modulate attention outputs across heads and bias individual heads toward short-range dependencies. We identify the pre-norm configuration as the key choice that enables the co-occurrence, and show that ablating it causes the two phenomena to decouple.

cs.AI cs.CL