A Mathematical Theory of Attention
Not on the map. Why?
Abstract (arXiv)
Attention is a powerful component of modern neural networks across a wide variety of domains. However, despite its ubiquity in machine learning, there is a gap in our understanding of attention from a theoretical point of view. We propose a framework to fill this gap by building a mathematically equivalent model of attention using measure theory. With this model, we are able to interpret self-attention as a system of self-interacting particles, we shed light on self-attention from a maximum entropy perspective, and we show that attention is actually Lipschitz-continuous (with an appropriate metric) under suitable assumptions. We then apply these insights to the problem of mis-specified input data; infinitely-deep, weight-sharing self-attention networks; and more general Lipschitz estimates for a specific type of attention studied in concurrent work.
Key facts. Cited by 43 papers in the map (data through 7 Oct 2026). First posted on arXiv 6 Jul 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 2; 2022: 2; 2023: 12; 2024: 8; 2025: 12; 2026: 7.
43 papers.
Sort:
- 2023A mathematical perspective on Transformerscited by 160
- 2021Inductive Biases and Variable Creation in Self-Attention Mechanismscited by 144
- 2023What and How does In-Context Learning Learn? Bayesian Model Averaging, Parameterization, and Generalizationcited by 112
- 2022Vision Transformers provably learn spatial structurecited by 92
- 2023A Theoretical Understanding of Shallow Vision Transformers: Learning, Generalization, and Sample Complexitycited by 77
- 2023An Over-parameterized Exponential Regressioncited by 45
- 2023Solving Regularized Exp, Cosh and Sinh Regression Problemscited by 44
- 2023How Smooth Is Attention?cited by 44
- 2024Transformers are Universal In-context Learnerscited by 42
- 2023The Closeness of In-Context Learning and Weight Shifting for Softmax Regressioncited by 41
- 2023Universality and Limitations of Prompt Tuningcited by 30
- 2021Redesigning the Transformer Architecture with Insights from Multi-particle Dynamical Systemscited by 29
31 more
- 2023A Mathematical Abstraction for Balancing the Trade-off Between Creativity and Reality in Large Language Modelscited by 29
- 2024Measure-to-measure interpolation using Transformerscited by 28
- 2025The Intrinsic Dimension of Prompts in Internal Representations of Large Language Modelscited by 17
- 2022An Analysis of Attention via the Lens of Exchangeability and Latent Variable Modelscited by 15
- 2023Why Softmax Attention Outperforms Linear Attentioncited by 15
- 2024Interpretable Lightweight Transformer via Unrolling of Learned Graph Smoothness Priorscited by 8
- 2024Understanding Catastrophic Forgetting In LoRA via Mean-Field Attention Dynamicscited by 7
- 2024Universal Approximation of Mean-Field Models via Transformerscited by 7
- 2024Global Convergence in Training Large-Scale Transformerscited by 5
- 2025Transformers Can Overcome the Curse of Dimensionality: A Theoretical Study from an Approximation Perspectivecited by 5
- 2025Transformers through the lens of support-preserving maps between measurescited by 5
- 2023Learning to Decouple Complex Systemscited by 3
- 2025Token Sample Complexity of Attentioncited by 3
- 2025Softmax as Linear Attention in the Large-Prompt Regime: a Measure-based Perspectivecited by 3
- 2024Towards understanding how attention mechanism works in deep learningcited by 2
- 2025Sliced ReLU attention: Quasi-linear contextual expressivity via sortingcited by 2
- 2026Propagation of Chaos in Contextual Flow Mapscited by 2
- 2025Towards Sampling Data Structures for Tensor Products in Turnstile Streamscited by 1
- 2026Algebraic Invariants of Lightning Self-Attentioncited by 1
- 2026The physics of AI weather modelscited by 1
- 2023Manifold-Preserving Transformers are Effective for Short-Long Range Encodingcited by 0
- 2024Local Attention Mechanism: Boosting the Transformer Architecture for Long-Sequence Time Series Forecastingcited by 0
- 2025Dual Filter: A Transformer-like Inference Architecture for Hidden Markov Modelscited by 0
- 2025Attention with Trained Embeddings Provably Selects Important Tokenscited by 0
- 2025Revisiting Transformers with Insights from Image Filtering and Boostingcited by 0
- 2025Physical models realizing the transformer architecture of large language modelscited by 0
- 2025Change of Thought: Adaptive Test-Time Computationcited by 0
- 2026Extreme Meta-Classification for Large-Scale Zero-Shot Retrievalcited by 0
- 2026Measuring Optimal Transport in Transformer Depthcited by 0
- 2026Universal Approximation of Measure-to-Measure Operators by Pushforwardscited by 0
- 2026Attention Kernels for Learning Maps Between Heavy-Tailed Measurescited by 0
- 2026Attention Kernels for Learning Maps Between Heavy-Tailed Measures30 Sep 2026
- 2026Universal Approximation of Measure-to-Measure Operators by Pushforwards28 Sep 2026
- 2026Measuring Optimal Transport in Transformer Depth1 Sep 2026
- 2026Extreme Meta-Classification for Large-Scale Zero-Shot Retrieval23 Jun 2026
- 2026The physics of AI weather models22 May 2026
- 2026Propagation of Chaos in Contextual Flow Maps16 May 2026
- 2026Algebraic Invariants of Lightning Self-Attention17 Apr 2026
- 2025Softmax as Linear Attention in the Large-Prompt Regime: a Measure-based Perspective12 Dec 2025
- 2025Sliced ReLU attention: Quasi-linear contextual expressivity via sorting12 Dec 2025
- 2025Token Sample Complexity of Attention11 Dec 2025
- 2025Towards Sampling Data Structures for Tensor Products in Turnstile Streams4 Oct 2025
- 2025Transformers through the lens of support-preserving maps between measures30 Sep 2025
31 more
- 2025Change of Thought: Adaptive Test-Time Computation17 Jul 2025
- 2025Revisiting Transformers with Insights from Image Filtering and Boosting12 Jun 2025
- 2025Attention with Trained Embeddings Provably Selects Important Tokens22 May 2025
- 2025Physical models realizing the transformer architecture of large language models21 May 2025
- 2025Dual Filter: A Transformer-like Inference Architecture for Hidden Markov Models1 May 2025
- 2025Transformers Can Overcome the Curse of Dimensionality: A Theoretical Study from an Approximation Perspective18 Apr 2025
- 2025The Intrinsic Dimension of Prompts in Internal Representations of Large Language Models17 Jan 2025
- 2024Towards understanding how attention mechanism works in deep learning24 Dec 2024
- 2024Measure-to-measure interpolation using Transformers7 Nov 2024
- 2024Global Convergence in Training Large-Scale Transformers31 Oct 2024
- 2024Universal Approximation of Mean-Field Models via Transformers6 Oct 2024
- 2024Local Attention Mechanism: Boosting the Transformer Architecture for Long-Sequence Time Series Forecasting4 Oct 2024
- 2024Transformers are Universal In-context Learners2 Aug 2024
- 2024Interpretable Lightweight Transformer via Unrolling of Learned Graph Smoothness Priors6 Jun 2024
- 2024Understanding Catastrophic Forgetting In LoRA via Mean-Field Attention Dynamics23 Feb 2024
- 2023How Smooth Is Attention?22 Dec 2023
- 2023A mathematical perspective on Transformers17 Dec 2023
- 2023Manifold-Preserving Transformers are Effective for Short-Long Range Encoding22 Oct 2023
- 2023Why Softmax Attention Outperforms Linear Attention18 Oct 2023
- 2023A Mathematical Abstraction for Balancing the Trade-off Between Creativity and Reality in Large Language Models4 Jun 2023
- 2023What and How does In-Context Learning Learn? Bayesian Model Averaging, Parameterization, and Generalization30 May 2023
- 2023Universality and Limitations of Prompt Tuning30 May 2023
- 2023The Closeness of In-Context Learning and Weight Shifting for Softmax Regression26 Apr 2023
- 2023An Over-parameterized Exponential Regression29 Mar 2023
- 2023Solving Regularized Exp, Cosh and Sinh Regression Problems28 Mar 2023
- 2023A Theoretical Understanding of Shallow Vision Transformers: Learning, Generalization, and Sample Complexity12 Feb 2023
- 2023Learning to Decouple Complex Systems3 Feb 2023
- 2022An Analysis of Attention via the Lens of Exchangeability and Latent Variable Models30 Dec 2022
- 2022Vision Transformers provably learn spatial structure13 Oct 2022
- 2021Inductive Biases and Variable Creation in Self-Attention Mechanisms19 Oct 2021
- 2021Redesigning the Transformer Architecture with Insights from Multi-particle Dynamical Systems30 Sep 2021
- 2023A mathematical perspective on Transformerscited by 160
- 2021Inductive Biases and Variable Creation in Self-Attention Mechanismscited by 144
- 2023What and How does In-Context Learning Learn? Bayesian Model Averaging, Parameterization, and Generalizationcited by 112
- 2022Vision Transformers provably learn spatial structurecited by 92
- 2023A Theoretical Understanding of Shallow Vision Transformers: Learning, Generalization, and Sample Complexitycited by 77
- 2023An Over-parameterized Exponential Regressioncited by 45
- 2023Solving Regularized Exp, Cosh and Sinh Regression Problemscited by 44
- 2023How Smooth Is Attention?cited by 44
- 2024Transformers are Universal In-context Learnerscited by 42
- 2023The Closeness of In-Context Learning and Weight Shifting for Softmax Regressioncited by 41
- 2023Universality and Limitations of Prompt Tuningcited by 30
- 2021Redesigning the Transformer Architecture with Insights from Multi-particle Dynamical Systemscited by 29
12 most cited of 43 All 43 (JSON)
- 2026Attention Kernels for Learning Maps Between Heavy-Tailed Measures30 Sep 2026
- 2026Universal Approximation of Measure-to-Measure Operators by Pushforwards28 Sep 2026
- 2026Measuring Optimal Transport in Transformer Depth1 Sep 2026
- 2026Extreme Meta-Classification for Large-Scale Zero-Shot Retrieval23 Jun 2026
- 2026The physics of AI weather models22 May 2026
- 2026Propagation of Chaos in Contextual Flow Maps16 May 2026
- 2026Algebraic Invariants of Lightning Self-Attention17 Apr 2026
- 2025Softmax as Linear Attention in the Large-Prompt Regime: a Measure-based Perspective12 Dec 2025
- 2025Sliced ReLU attention: Quasi-linear contextual expressivity via sorting12 Dec 2025
- 2025Token Sample Complexity of Attention11 Dec 2025
- 2025Towards Sampling Data Structures for Tensor Products in Turnstile Streams4 Oct 2025
- 2025Transformers through the lens of support-preserving maps between measures30 Sep 2025
12 newest of 43 All 43 (JSON)