What actually causes attention collapse in ultra-deep Transformers with 100+ layers, uniform attention scores or rank degeneration, and how do register tokens, coupled attention, and SkipNet-style gated skipping address it?
Answer
Both phenomena are real, but they are not the same object and only one of them is the root cause. Rank degeneration is a property of the token matrix: after enough layers every row of converges to the same vector, so the representation is effectively rank-1 and no head can distinguish positions any more. Uniform attention scores are one route to that state but not a requirement, because every softmax attention map is row-stochastic, and a product of row-stochastic matrices contracts any mean-zero component of the token set by the second-largest eigenvalue at each step, even when each individual map looks sharp and interpretable. Dong et al. proved the sharper version of this: pure self-attention without residual connections or MLPs loses rank doubly exponentially in depth, so the residual stream, the FFN nonlinearity, and the normalization placement are the load-bearing defenses that let 100-layer stacks exist at all. A third, opposite pathology is attention entropy collapse, where rows become nearly one-hot as the spectral norm of the query-key map grows; that destroys training stability rather than smoothing representations, and it is the failure that spectral reparameterization targets. Register tokens, cross-layer attention coupling, and gated layer skipping each attack a different factor of the product that drives the representation toward rank-1.
(1) Two Different Objects: entropy of the attention rows measures how a layer mixes, while the rank of measures what survives after mixing. A model can have healthy per-layer entropy and still be rank-collapsed at layer 90.
(2) Doubly Exponential Rank Loss: for attention-only stacks the distance to rank-1 obeys a cubic recursion, so it is numerically zero within a handful of layers, not after 100.
(3) Non-Uniform Attention Still Collapses: because , the all-ones vector is always a fixed point, and repeated application contracts everything else toward the Perron eigenvector.
(4) The Opposite Failure Mode: entropy collapse to near one-hot rows correlates with exploding query-key spectral norm and produces loss spikes; Reparam bounds it by spectral-normalizing the logit map with a learned scalar.
(5) Register Tokens: a handful of learnable non-content tokens (typically 4 to 16) give softmax a place to dump probability mass, so content rows are not forced to spread uniformly and the emergent high-norm artifact tokens disappear.
(6) Coupled Attention: adding the previous layer’s raw logits to the current layer’s logits means the effective attention is no longer a fresh independent stochastic matrix per layer, which preserves diversity and gives gradients a direct path across depth.
(7) Gated Skipping: a SkipNet-style gate that drops a block reduces the effective mixing depth below the nominal , shortening the product of contraction factors and cutting sequential latency at the same time.
The reason a 100-layer Transformer is not already dead is that a residual block computes rather than
. In path-decomposition terms, the identity path carries the full-rank input straight through, and only paths that traverse many attention modules are strongly contracted. The FFN nonlinearity adds a second defense by increasing the Lipschitz constant of the layer map away from a pure average, which is why the empirical decay of the distance to rank-1 in a working model looks geometric with a factor close to 1 instead of doubly exponential. The remaining problem at extreme depth is that these defenses only slow the contraction: with a per-layer factor of 0.95, a 120-layer stack still retains only about 0.2% of the initial token spread, which shows up as flat similarity matrices, near-duplicate hidden states in the last third of the network, and layers whose removal barely changes the loss.

Figure 1: The two collapse modes are measured on different axes. Left: rank degeneration is catastrophic for attention-only stacks, already below by layer 5, and merely slow once residuals and FFNs are present. Right: entropy can fail in either direction, drifting up toward the uniform limit
(over-smoothing) or down toward zero (entropy collapse and loss spikes), and a healthy deep model must stay in the band between them.
Mathematical Formulation:
Where:
is the token matrix at layer
, with
tokens of width
, and
is the total depth.
is the distance to the nearest rank-1 matrix whose rows are all equal;
is the all-ones vector and
the common row it would collapse to.
collects the head geometry, roughly
, where
and
bound the value and query-key weight norms and
is the head dimension.
- The cubic recursion compounds into a doubly exponential bound with exponent
, which is why attention-only depth is hopeless while residual depth is merely expensive.
is the row-stochastic attention map, so
is always its eigenvector with eigenvalue 1, and
is any mean-zero deviation across tokens,
.
is the second-largest eigenvalue modulus of
, strictly less than 1 whenever all entries are positive; the surviving spread after
layers scales like
.
is the entropy of attention row
; the upper bound
is the uniform row (maximal mixing) and 0 is the one-hot row (entropy collapse).
Collapse Speed, Two Regimes:
The first line is the attention-only regime: five layers are enough to destroy the representation. The second is the realistic regime for a 120-layer residual stack with a mild per-layer contraction, and it is the number that motivates the three interventions. Register tokens change the geometry of each individual so that content rows keep structure instead of hedging uniformly; the attention sink observed in decoder-only LLMs, where the first token absorbs a large share of the mass, is the same phenomenon arising without being designed. Coupled attention changes the product itself, since adding the previous layer’s logits makes consecutive maps correlated rather than independent draws. Gated skipping changes the number of factors in the product, and it also attacks a separate ultra-deep pathology: under Pre-LN the output variance grows with depth, so late blocks approach the identity and contribute almost nothing, which means paying their latency buys no capacity.

Figure 2: Three interventions at three different levels of the same product. Registers reshape each individual attention map, coupled attention correlates consecutive maps so the stack stops re-averaging from scratch, and the skip gate removes factors entirely by lowering the effective depth. The residual stream and FFN remain the baseline defense underneath all three.
| Property | Register tokens | Coupled attention | SkipNet-style gating |
|---|---|---|---|
| What it changes | The geometry of each single attention map | The correlation between consecutive maps | The number of maps in the product |
| Mechanism | Extra learnable non-content tokens absorb attention mass, so content rows need not spread uniformly | Pre-softmax logits of layer l minus 1 are added to layer l, giving a residual path through attention itself | A learned gate executes or bypasses a block per input, so effective depth is data dependent |
| Cost | Sequence grows to N plus R, so prefill cost grows quadratically in that length; registers are discarded at the head | Must retain the previous layer’s logit tensor, which is | Gate parameters plus non-differentiable routing, usually trained with a straight-through or RL estimator |
| Where it fails | Cannot be bolted on after pretraining, and too many registers waste context without adding capacity | Incompatible with kernels that never materialize the score matrix, so it fights FlashAttention-style fusion | Ragged per-example depth hurts batched throughput, and gates can collapse to always-on or always-off |
| Diagnostic it fixes | High-norm artifact tokens and noisy attention maps | Entropy drifting toward the uniform limit in late layers | Late blocks that behave as the identity and can be pruned for free |





















