Homogenized Transformers

Hugo Koubbi, Borjan Geshkovski, Philippe Rigollet
4/2/2026
math.PRcs.LGstat.ML

No confident code implementation found for this paper.

Abstract

We study a random model of deep multi-head self-attention in which the weights are resampled independently across layers and heads, as at initialization of training. Viewing depth as a time variable, the residual stream defines a discrete-time interacting particle system on the unit sphere. We prove that, under suitable joint scalings of the depth, the residual step size, and the number of heads, this dynamics admits a nontrivial homogenized limit. Depending on the scaling, the limit is either deterministic or stochastic with common noise; in the mean-field regime, the latter leads to a stochastic nonlinear Fokker--Planck equation for the conditional law of a representative token. In the Gaussian setting, the limiting drift vanishes, making the homogenized dynamics explicit enough to study representation collapse. This yields quantitative trade-offs between dimension, context length, and temperature, and identifies regimes in which clustering can be mitigated.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

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

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2604.01978.svg)](https://codeofpaper.com/paper/2604.01978)

Discussion