๐ค AI Summary
This work addresses the lack of rigorous mathematical characterization of the underlying mechanisms in Transformers. We first model the self-attention mechanism as a continuous-time stochastic particle system and, leveraging mean-field theory and dynamical systems analysis, establish a rigorous theoretical framework for its long-term convergence and emergent cluster structure. We prove that self-attention dynamics implicitly induce semantic clustering in representation space, thereby revealing the mathematical origin of hierarchical representational organization in large language models (LLMs). Our analysis provides a novel mathematical foundation for understanding LLM interpretability, scaling laws, and implicit structural inductive biasesโbridging particle-based dynamical systems with deep learning theory.
๐ Abstract
Transformers play a central role in the inner workings of large language models. We develop a mathematical framework for analyzing Transformers based on their interpretation as interacting particle systems, which reveals that clusters emerge in long time. Our study explores the underlying theory and offers new perspectives for mathematicians as well as computer scientists.