Paperlane

no. 17 · Wednesday 18 November 2026

Quantifying Concentration Phenomena of Mean-Field Transformers in the Low-Temperature Regime

Albert Alcalde, Leon Bungert, Konstantin Riedl and Tim Roith

math.AP · v3 · code

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{{\log(β+1)}/β}\exp(Ct)+\exp(-ct)$ in terms of the temperature parameter $β^{-1}\to 0$ and inference time $t\geq 0$. For the proof, we establish Lyapunov-type estimates for the zero-temperature equation, identify its limit as $t\to\infty$, 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 $\logβ$, 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.

code
github.com/albertalcalde/mean-field-transformer-concentration
comments
Accepted at the NeurIPS 2026 Conference: https://neurips.cc/virtual/2026/loc/paris/poster/149032 Funded by the European Union's HORIZON-MSCA-2021-DN-01-01, through ModConFlex ("Modelling and control of flexible structures interacting with fluids"; No. 101073558; DOI: 10.3030/101073558). Code: https://github.com/albertalcalde/mean-field-transformer-concentration, code DOI: 10.5281/zenodo.23726583
fields
Analysis of PDEs, Dynamical Systems
pdf ↗ page arXiv:2605.10931 ↗