A Geometric Theory for Nonequilibrium Transformer Dynamics
Abstract
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.
Create a lesson
Metadata
- Categories
- cs.LG, math-ph, math.MP, math.PR, nlin.AO, stat.ML
- Comments
- 29 pages Submitted to Proc Roy Soc A
Related papers
FADE: Fractional Anomalous Dynamics Extrapolation for Training-Free Diffusion Transformers Acceleration
Shared title terminologycs.LGJinlong Yang, Lizilin, Jinke Wu et al.
Train-Only-Constrained LM for Synthetic Clinical Trajectories: Leak-Safe Calibration and Auditable Dynamics
Shared title terminologycs.LGYaser Kord, Moritz Hess
Quaternion-Tucker ZigZag Networks: Halving Transformer Backbone Parameters and Enabling Exact 2D Zero-Loss Continual Scaling
Shared title terminologycs.LGShubham Barmase
DLaR: Dynamic Stochasticity Control for Latent Reasoning in Large Language Models
Shared title terminologycs.LGXiaocheng Luo, Peng Xu, Zaifu Zhan et al.
DuoMI: Dual Mutual Information Regularization for Expert Reuse in Looped Transformers
Shared title terminologycs.LGXinlai Kang, Zhenhe Wu, Haoyu Wang et al.
On Grokking and the Dynamics of Generalization
Shared title terminologycs.LGMalik Amir