NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Homogenized Transformers

Hugo Koubbi, Borjan Geshkovski, Philippe RigolletarXiv 2026

TL;DR

This paper provides a rigorous mathematical framework for deep, multi-head transformers at initialization by modeling token updates across layers as a continuous-time interacting particle system. By scaling depth, residual step size, and head count, the authors prove that the network's behavior converges to a well-defined "homogenized" limit (either a deterministic ODE or an SDE with common noise). They use this continuous framework to derive explicit, quantitative conditions under which deep transformers suffer from representation collapse.

What Problem Does This Paper Address?

While empirical "scaling laws" show that larger transformers systematically perform better, the underlying mathematical structure of these models at scale remains a black box. One major theoretical and practical challenge in deep transformers is representation collapse (also known as oversmoothing or rank collapse). As the network gets deeper, token representations tend to cluster together or flatten into a low-dimensional subspace, severely degrading the model's expressivity.

Previous mathematical analyses simplified this problem by assuming tied weights (using the exact same weights at every layer), which turns the network's depth into a simple deterministic iterated map. However, real transformers use independent weights at each layer. This paper addresses the fully heterogeneous setting—where weights are independent and identically distributed (i.i.d.) across both layers and heads, as they are at initialization—to understand if and how representation collapse structurally emerges from depth alone.

Methods

The authors treat the transformer's residual stream as a discrete-time interacting particle system. Because of layer normalization, the token embeddings are constrained to move on a unit sphere ($\mathbb{S}^{d-1}$).

To analyze this complex system, they apply homogenization, a technique from mathematical physics used to describe macroscopic behavior emerging from microscopic fluctuations. They break down the random multi-head attention updates into two parts:

  1. An expected mean attention field (which acts as a deterministic drift).
  2. Random fluctuations around that mean (which act as stochastic forcing).

By taking the continuous limit—where layer depth acts as continuous time and the residual step size $\eta$ shrinks toward zero—they prove that the discrete token updates converge to a system of Itô Stochastic Differential Equations (SDEs). Crucially, they show that the randomness from the independent heads and layers averages out into a common cylindrical noise term that drives all tokens simultaneously, rather than independent noise for each token. For an infinite number of tokens, this leads to a stochastic nonlinear Fokker–Planck equation.

Datasets

Not discussed in the paper. This work is purely theoretical and mathematical, focusing on proofs and qualitative phase analyses rather than empirical evaluation on datasets.

Key Insights and Ideas

  • Emergence of Common Noise: You might expect that randomizing weights across layers and heads would introduce independent, chaotic noise for each token. Instead, the math reveals that the fluctuations pool together into a common noise process that acts on all tokens collectively.
  • Collapse is Structural, Not Just an Optimization Artifact: An effective drift driving tokens toward low-dimensional clusters emerges purely from layer diversity, even without explicit contraction at a single-layer level. This proves that representation collapse is an intrinsic structural consequence of depth.
  • Three Distinct Scaling Regimes: Depending on how the residual scale ($\eta$) and the noise variance parameter ($\alpha$) scale with depth ($L$), the transformer's forward pass converges to entirely different mathematical objects:
Scaling regimes table
  • Quantifying the Edge of Chaos: In the Gaussian weight setting, the deterministic drift vanishes, leaving only an Itô correction term. This allows the authors to derive explicit, closed-form logistic equations tracking how token overlaps evolve, revealing precise trade-offs between embedding dimension ($d$), context length ($n$), and attention temperature ($1/\beta$).

Key Results

  • Rigorous Convergence Bounds (Theorem 1): The authors prove that the discrete transformer model converges to the continuous homogenized SDE limit with an explicit weak error bound of $O(\eta \cdot \max(1, \alpha))$, validating the use of continuous calculus to study discrete networks.
  • Phase Diagrams: The paper maps out the exact boundaries between the different scaling limits in the $(\eta, \alpha)$-plane:
Phase diagrams
  • The Logistic Law of Collapse (Theorems 2 & 3): Under centered Gaussian initializations, the empirical mean of token overlaps $m(t)$ is shown to follow a strict logistic ODE: $\dot{u} = u(1-u)$. As macroscopic time (depth) goes to infinity, $u(t) \to 1$, meaning all tokens completely collapse into a single cluster. However, the authors identify a "slow motion" regime (Theorem 4) where choosing $\beta$ such that $d\beta^{-1/2} = o(1)$ can significantly delay this collapse, preserving expressivity deeper into the network.

Limitations and Future Work

  • Initialization Only: The assumption that weights are i.i.d. across layers holds strictly true only at initialization. Once training begins, backpropagation introduces complex correlations between layers that this framework does not yet model.
  • Attention-Only Focus: The core proofs are derived for attention-only architectures. While the authors provide a brief sketch showing that Multi-Layer Perceptron (MLP) blocks can be seamlessly integrated as an additional drift or noise term, the full mathematical interplay remains to be explored.
  • Pessimistic Noise Estimates: The noise parameter $\alpha$ relies on a global, worst-case bound across all possible token configurations. The authors note that a configuration-dependent typical noise level would be a valuable refinement for future work.

Summary updated

BibTeX
@misc{koubbi2026homogenized,
  author = {Hugo Koubbi and Borjan Geshkovski and Philippe Rigollet},
  title = {{Homogenized Transformers}},
  year = {2026},
  eprint = {2604.01978},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.01978},
}
Figure