atlas

Research map / Architectures and efficiency / Attention and transformers

Mind the Gap: a Spectral Analysis of Rank Collapse and Signal Propagation in Attention Layers

ICML 2025 · Architectures and efficiency › Attention and transformers · approach: Attention head mechanisms · 1 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.

Uses random matrix theory to show softmax attention at initialisation has a spectral gap that causes rank collapse in width (context length), and proposes removing the outlier eigenvalue (A minus 1/T all-ones) to mitigate rank collapse and gradient explosion.

Problem

Signal and gradient propagation through randomly initialised softmax attention layers is pathological: vanishing/exploding gradients and rank collapse in depth, and a newly identified rank collapse in width (growing context length) that is unique to attention.

Approach

Softmax attention matrices with isotropic inputs are i.i.d. Markov matrices whose top eigenvalue escapes to 1 forming a spectral gap; subtracting the rank-one mean component (1/T)·1 from the attention matrix removes the outlier, preventing stable-rank collapse in width and mitigating depth collapse and gradient explosion.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Subtract the uniform rank-one component from softmax attentionSingle attention layer · Isotropic input; increasing context lengthstable rank: 1 -> scales linearly in widthHelped
Subtract the uniform rank-one component at every layerDeep i.i.d. Markov attention network · Increasing context lengthstable rank: 1 -> scales linearly in widthHelped
Subtract the uniform rank-one component at every layerDeep i.i.d. Markov attention network · Increasing depthsquared gradient norm: T^{L-1} -> grow linearly with dHelped
Add LayerNorm to the attention block (ablation)Transformer at initialization · Increasing context lengthstable rankNo clear effect
Add skip connections to the attention block (ablation)Transformer at initialization · Increasing context lengthstable rankNo clear effect
Add LayerNorm and skip connections to the attention block (ablation)Transformer at initialization · Increasing context lengthstable rankNo clear effect
Replace the attention matrix with the identity matrix (ablation)Transformer at initialization · Increasing depthstable rankHurt
Use orthogonal value matrices (ablation)Transformer at initialization · Increasing depthstable rankHelped
Add LayerNorm or remove the spectral gapi.i.d. Markov attention network · Increasing depthgradient norm: exponentially exploding -> flatHelped
Remove all spectral outliers rather than only the largest (ablation)Deep transformers · Rank collapse and gradient normsrank-collapse mitigation: comparable resultsNo clear effect
Increase the context-to-embedding ratio beyond 1 (ablation)TinyBert and synthetic inputs · γ > 1stable rankNo clear effect
Use random token embeddings instead of pretrained-tokenizer embeddings (ablation)Randomly initialized RoBERTa encoder · Non-isometric input tokensspectral gapNo clear effect

Surprising findings

Limitations

Experimental setup

Datasets: sentences from the paper abstract (tokenised inputs) synthetic isotropic Gaussian inputs

Metrics: stable rank eigenvalue spectrum gradient norm

Baselines: vanilla softmax attention LayerNorm skip connections Differential Transformer

Builds on: Differential Transformer rank collapse analysis (Dong et al.) free probability i.i.d. Markov matrix spectral results

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