English

The Mean-Field Dynamics of Transformers

Machine Learning 2026-02-02 v4 Mathematical Physics Dynamical Systems math.MP Probability

Abstract

We develop a mathematical framework that interprets Transformer attention as an interacting particle system and studies its continuum (mean-field) limits. By idealizing attention on the sphere, we connect Transformer dynamics to Wasserstein gradient flows, synchronization models (Kuramoto), and mean-shift clustering. Central to our results is a global clustering phenomenon whereby tokens cluster asymptotically after long metastable states where they are arranged into multiple clusters. We further analyze a tractable equiangular reduction to obtain exact clustering rates, show how commonly used normalization schemes alter contraction speeds, and identify a phase transition for long-context attention. The results highlight both the mechanisms that drive representation collapse and the regimes that preserve expressive, multi-cluster structure in deep attention architectures.

Keywords

Cite

@article{arxiv.2512.01868,
  title  = {The Mean-Field Dynamics of Transformers},
  author = {Philippe Rigollet},
  journal= {arXiv preprint arXiv:2512.01868},
  year   = {2026}
}

Comments

to appear as Proceedings of the ICM2026, Philadelphia, USA

R2 v1 2026-07-01T08:04:05.305Z