CS Paper Radar

Equilibrium measures for anisotropic exponential interaction energies with applications to transformers

Oleksii Kachaiev, Martin Burger, Samira Kabri, Yury Korolev, Tim Roith

cs.LG math.APmath.PR ·submitted 2026-11-14 17:27 UTC · v1
unusual

Abstract

We study the minimization of anisotropic exponential interaction energies over probability measures on the sphere, motivated by mean-field models of self-attention in transformer architectures. For every symmetric positive definite interaction matrix, we relate the minimizer to a corresponding anisotropic Brownian motion and use the Feynman--Kac formula and elliptic regularity theory to show that it admits a smooth, strictly positive density on the sphere. We further show that it is the only stationary measure with full support for the dynamics considered. We use the stochastic viewpoint to derive an algorithm for sampling from the minimizer. In dimension two, we also propose a numerical scheme for approximating its density based on a Mathieu series expansion.

Comment
23 pages, 3 figures

Closest papers

Nearest neighbours by meaning across the whole index.

A Geometric Theory for Nonequilibrium Transformer Dynamics

cs.LG math-phmath.PRnlin.AO+1 ·2026-11-07 ·Aythami Bethencourt de León, Darryl D. Holm
theory similarity 0.55
Abstract · 29 pages Submitted to Proc Roy Soc A

We develop a variational and geometric theory based on statistical physics for the joint evolution of Transformer attention and token representations at fixed model parameters. To this end, we introduce a free energy for the attention and model the evolution of the attention weights by its Fisher--Rao gradient flow. At fixed token representations, we prove that the softmax matrix is the unique free-energy minimiser and that every positive attention trajectory converges to it. For prescribed time-dependent representations, we show that the attention dynamics becomes linear after a change to logit variables. This result yields tracking bounds relative to the instantaneous softmax and sufficient conditions for attention to converge to a fixed matrix. Hamiltonian dynamics for the representations and their momenta are then coupled to the attention relaxation driven by the same energy. This coupling results in an energy-dissipation law. We also develop two alternative Hamiltonians incorporating the attention value map. We prove global well-posedness of the attention flow and all three coupled systems.

0.30

Stability of Measure-to-Measure Transformers on Sub-Gaussian Data

cs.LG stat.ML ·2026-10-06 ·Frank Cole, Nicholas H. Nelsen, Takashi Furuya
similarity 0.54
Abstract

Transformers have exhibited impressive empirical success across various domains, but their theoretical foundations remain less developed. This work constitutes a mathematical study of the measure-to-measure operators defined by transformers. We show that transformers map sub-Gaussian inputs to sub-Gaussian outputs; this ensures that taking arbitrary-length compositions of the softmax operator is well-defined. We then show that transformers are Hölder continuous with respect to the 1-Wasserstein distance on appropriate spaces of sub-Gaussian inputs. This allows us to establish estimates on the error propagation along a transformer between a sub-Gaussian input and its empirical approximation. We also study a mean-field analog of the cross-attention mechanism, which is an operator from a pair of probability measures to a single probability measure. We show that cross-attention exhibits different Hölder regularity and sample-complexity in its two input arguments. Last, we apply our results to deduce approximation guarantees for measure-to-measure transformers. Together, these results provide a firm stability and finite-sample theory for transformers on sub-Gaussian data.

0.53

A Mixture-Gated Theory of Anisotropic Representation Dynamics in Transformers

cs.LG ·2026-10-16 ·Nguyen Do, My T. Thai
similarity 0.51
Abstract · 62 pages

Small differences between internal representations can shrink or grow as they pass through a Transformer layer, affecting how information is preserved and how sensitive the model is to perturbations. Yet it remains unclear when changes in attention weights can turn a representation difference that would otherwise shrink into one that grows. We develop a Mixture-Gated Theory of Anisotropic Representation Dynamics that separates self-attention into value transport, query gating, and key gating. Our analysis reveals how the geometry of attended representations constrains gating and how interactions between these mechanisms can reverse contraction induced by value transport. We formalize this phenomenon as gating-induced regime switching, where a representation difference contracts under fixed attention routing but expands under full attention. We derive a necessary and sufficient spectral criterion that certifies the existence or absence of switching and identifies switching directions without exhaustive search. Beyond existence, our theory characterizes maximum relative switching strength, certifies the severity of contraction that gating can overcome, and determines the largest dimension of a subspace in which every nonzero direction switches. Experiments across four Transformer architectures validate these predictions through analytical and finite-forward comparisons, revealing distinct and joint query--key gating mechanisms and nontrivial switching subspaces. Our results provide a mechanistic and spectral understanding of how attention routing can alter local representation dynamics.

0.17

On the Statistical Mechanics of Attention

cs.LG cond-mat.dis-nncond-mat.stat-mechcs.AI+1 ·2026-10-12 ·Jerry Yao-Chieh Hu, Yu-An Chen, Maojiang Su, Han Liu
similarity 0.51
Abstract

We revisit the statistical mechanics of Transformer attention via modern Hopfield models. We present a free-energy formalism to characterize parameter regimes and critical thresholds for robust attention inference. The resulting free-energy landscape incorporates randomness in query states and attention weights. Attention then emerges as the equation of motion of the corresponding statistical-mechanical system (i.e., modern Hopfield model) through the standard free-energy minimization principle. This allows us to identify first-order phase transitions in attention between glassy and robust-inference phases. We further extend to attentions with stochastic queries and keys. Together, our results provide a rigorous statistical-mechanics framework for characterizing phase structure and inference reliability across a family of Transformer attention mechanisms.

0.17

Trust-Region Optimization for Smooth Potential-Interaction Energies in Wasserstein Space

cs.LG stat.MLmath.OCmath.PR ·2026-10-06 ·You Wan, Ting Gao, Jinqiao Duan
theory similarity 0.51
Abstract · 24 pages, 4 figures, 1 table; code and data in the ancillary files

Finding low-energy configurations of interacting particles and approximating probability distributions lead to the minimization of potential-interaction energies in Wasserstein space. These energies can be nonconvex, making it important to exploit second-order information while controlling the reliability of local approximations. We study trust-region optimization of smooth potential-interaction energies on the Wasserstein space of probability measures with finite second moment. The method uses a quadratic model along pushforward curves, an $L^2(ρ)$ step radius, and a Steihaug-Toint subsolver with an explicit self-adjoint second-variation operator. A ratio test determines acceptance and guides the radius update. Under a lower energy bound and globally bounded Hessians of the potential and interaction kernel, we prove that the objective is nonincreasing, the Wasserstein-gradient norms converge to zero, and an $\varepsilon$-stationary iterate is reached within $O(\varepsilon^{-2})$ total outer trials, including rejected trials. If the potential is quadratically coercive, every weak accumulation point is stationary. The analysis applies to arbitrary initial measures with finite second moment. For empirical measures, the iteration is a finite-dimensional trust-region method in the $L^2(ρ_N)$ inner product, with complexity constants independent of particle number and dimension when the initial objective gaps are uniformly bounded. Numerical experiments include a smooth soft-particle energy, maximum-mean-discrepancy minimization for non-Gaussian targets, component ablations, and scaling studies in particle number and dimension.

0.27

Neural Scaling Laws of Transformer Operator Network

cs.LG stat.ML ·2026-09-27 ·Haoran Yan, Zhongjie Shi, Yuanzhe Xi, Peng Chen, Wenjing Liao
similarity 0.49
Abstract · 47 pages, 5 figures

Transformers have emerged as powerful architectures for learning solution operators of physical systems. Empirically the prediction error has been observed to decrease when the data size and model size increase, suggesting neural scaling behavior. Yet a theoretical understanding of such scaling laws for transformer-based operator learning remains limited. In this work, we develop a theoretical framework for characterizing the approximation and generalization errors of transformer-based operator learning. Our analysis builds on a local-to-global approximation principle that is naturally aligned with the softmax attention mechanism and yields discretization-invariant output functions. On approximation theory, we derive a universal approximation error of transformer-based operator learning for Hölder-regular operators. On generalization theory, we establish a power scaling law between the prediction error and the training data size. The rate of convergence represented by the scaling exponent explicitly reflects the dimensions of the input and output domains, the regularity of the underlying functions and operators, and crucially, the intrinsic dimension of the input function class. By exploiting this intrinsic low-dimensional structure, our analysis yields a power-law generalization rate for operator learning, in contrast to the logarithmic-type power-law rates appearing in existing analyses of operator learning with feedforward neural networks. Numerical experiments validate the predicted power-law scaling and confirm that the convergence rate varies systematically with the intrinsic dimension of the input function class.

0.30

Spectral Conditioning of Weighted Multivariate Vandermonde Operators via Radial Beurling--Selberg Approximation

eess.SP math.NA ·2026-11-13 ·Joseph Gabet, Maxime Ferreira Da Costa, Kiryung Lee
theory similarity 0.49
Abstract

We establish explicit eigenvalue bounds for Gram matrices of weighted multivariate Vandermonde operators with separated nodes on a torus. The squared magnitudes of the weights are samples of a nonnegative radial spectral energy density whose profile has bounded variation, finite energy, and finite weighted variation cost; compact support is not required. The estimate holds in every dimension and depends on the periodic Euclidean separation and the weighted variation integral. For compactly supported profiles, our analysis combines a signed layer decomposition with the ball approximants of Holt and Vaaler; the noncompactly supported case follows by truncation. Combining the resulting radial envelopes with a bandlimited sampling identity based on Poisson summation yields the spectral bounds by eliminating off-diagonal interactions and nonzero diagonal aliases. The result covers nonmonotone profiles and discontinuous radial low-pass filters, and it is complemented by a global elementary upper bound on the Holt--Vaaler cost that exhibits two radial regimes.

0.24

Mean-field Token Steering

cs.AI math.OCcs.LGeess.SY+1 ·2026-11-14 ·Md Zulfiqur Haider, Asmaa Eldesoukey, Abhishek Halder, Yongxin Chen
similarity 0.49
Abstract

We consider stochastic token steering through a deep stack of transformer layers as a mean-field control problem for an interacting particle system on the unit sphere, where interactions arise from the attention mechanism. In the mean-field limit, the token population evolves via a controlled integro-partial differential equation where the feedback control acts as a corrective vector field guiding the population toward an aggregate configuration of tokens in the representation space. We deduce the minimum effort control to accomplish this task over a fixed time horizon interpreted as normalized layer depth. We show that the resulting controlled dynamics for the token population can be understood as a mean-field Schrödinger bridge adapted to the sphere geometry. Building on this, we propose a novel generalization of the dynamic Sinkhorn recursion to compute the consistent token evolution. Numerical experiments confirm that the proposed approach achieves exact steering of the token population.

0.22