Quantifying Concentration Phenomena of Mean-Field Transformers in the Low-Temperature Regime
math.AP, cs.LG, math.DS
Submitted: 2026-05-11
Updated: 2026-11-17
Comments: 34 pages, 11 figures
License: http://creativecommons.org/licenses/by/4.0/
The gist: Transformers with self-attention modules as their core components have become an integral architecture in modern large language and foundation models.
Terminology
Abstract
Transformers with self-attention modules as their core components have become an integral architecture in modern large language and foundation models. In this paper, we study the evolution of tokens in deep encoder-only transformers at inference time which is described in the large-token limit by a mean-field continuity equation. Leveraging ideas from the convergence analysis of interacting multi-particle systems, with particles corresponding to tokens, we prove that the token distribution rapidly concentrates onto the push-forward of the initial distribution under a projection map induced by the key, query, and value matrices, and remains metastable for moderate times. Specifically, we show that the Wasserstein distance of the two distributions scales like sqrt (β+1) /β (Ct)+ (-ct) in terms of the temperature parameter β-1 to 0 and inference time t at least 0. For the proof, we establish Lyapunov-type estimates for the zero-temperature equation, identify its limit as t to infinity, and employ a stability estimate in Wasserstein space together with a quantitative Laplace principle to couple the two equations. Our result implies that for time scales of order β, which correspond to the early-phase behavior most relevant for practical finite-depth models, the token distribution concentrates at the identified limiting distribution. Numerical experiments confirm this and, beyond that, complement our theory by showing that for finite β and large t the dynamics enter a different terminal phase, dominated by the spectrum of the value matrix.
Sources
- The Asymptotic Behavior of Attention in Transformers
- Stochastic Scaling Limits and Synchronization by Noise in Deep Transformer Models
- Attention's forward pass and Frank-Wolfe
- Perceptrons and localization of attention's mean-field landscape
- Gemini: A Family of Highly Capable Multimodal Models
- On the Structure of Stationary Solutions to McKean-Vlasov Equations with Applications to Noisy Transformers
- On the Opportunities and Risks of Foundation Models
- A Unified Perspective on the Dynamics of Deep Transformers
- Critical attention scaling in long-context transformers
- Quantitative Clustering in Mean-Field Transformer Models
- Random Quadratic Form on a Sphere: Synchronization by Common Noise
- Dynamic metastability in the self-attention model
- The Llama 3 Herd of Models
- Normalization in Attention Dynamics
- Homogenized Transformers
- Nonlinear diffusion limit of non-local interactions on a sphere
- Synchronization of mean-field models on the circle
- The Mean-Field Dynamics of Transformers
- LLaMA: Open and Efficient Foundation Language Models
Related papers
- Regularity of critical immersions for scale-invariant curvature energies in even dimensions
- C 1, alpha Regularity of W 2,2 Q-Valued Maps with Small Laplacian
- Cumulative angular cancellation in Maz'ya's endpoint inequalities
- Strictly positive optimal Hardy weights on manifolds and graphs via Green potential
- A fast dynamo with zero topological entropy
- A counterexample to fixed-profile soliton resolution for the three-dimensional quintic wave equation