Transformers as Support Vector Machines
Not on the map. Why?
Abstract (arXiv)
Since its inception in "Attention Is All You Need", transformer architecture has led to revolutionary advancements in NLP. The attention layer within the transformer admits a sequence of input tokens X and makes them interact through pairwise similarities computed as softmax(XQK^top X^top), where (K,Q) are the trainable key-query parameters. In this work, we establish a formal equivalence between the optimization geometry of self-attention and a hard-margin SVM problem that separates optimal input tokens from non-optimal tokens using linear constraints on the outer-products of token pairs. This formalism allows us to characterize the implicit bias of 1-layer transformers optimized with gradient descent: (1) Optimizing the attention layer with vanishing regularization, parameterized by (K,Q), converges in direction to an SVM solution minimizing the nuclear norm of the combined parameter W=KQ^top. Instead, directly parameterizing by W minimizes a Frobenius norm objective. We characterize this convergence, highlighting that it can occur toward locally-optimal directions rather than global ones. (2) Complementing this, we prove the local/global directional convergence of gradient descent under suitable geometric conditions. Importantly, we show that over-parameterization catalyzes global convergence by ensuring the feasibility of the SVM problem and by guaranteeing a benign optimization landscape devoid of stationary points. (3) While our theory applies primarily to linear prediction heads, we propose a more general SVM equivalence that predicts the implicit bias with nonlinear heads. Our findings are applicable to arbitrary datasets and their validity is verified via experiments. We also introduce several open problems and research directions. We believe these findings inspire the interpretation of transformers as a hierarchy of SVMs that separates and selects optimal tokens.
Key facts. Cited by 67 papers in the map (data through 7 Oct 2026). Builds on 77 of its 102 references that are in the map. First posted on arXiv 31 Aug 2023.
Builds on
77 of 102 references.
References · 77
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023GPT-4 Technical Reportcited by 18,132
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
- 2020Training data-efficient image transformers & distillation through attentioncited by 4,560
- 2018Neural Tangent Kernel: Convergence and Generalization in Neural Networkscited by 2,597
- 2021Decision Transformer: Reinforcement Learning via Sequence Modelingcited by 1,528
- 2021Multiscale Vision Transformerscited by 896
- 2018A Convergence Theory for Deep Learning via Over-Parameterizationcited by 784
38 more
- 2020Prevalence of Neural Collapse during the terminal phase of deep learning trainingcited by 713
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
- 2018Gradient Descent Provably Optimizes Over-parameterized Neural Networkscited by 655
- 2017The Implicit Bias of Gradient Descent on Separable Datacited by 649
- 2021Offline Reinforcement Learning as One Big Sequence Modeling Problemcited by 636
- 2019Benign Overfitting in Linear Regressioncited by 544
- 2021Attention is Not All You Need: Pure Attention Loses Rank Doubly Exponentially with Depthcited by 411
- 2019Implicit Regularization in Deep Matrix Factorizationcited by 402
- 2017A Deep Reinforced Model for Abstractive Summarizationcited by 364
- 2023Trained Transformers Learn Linear Models In-Contextcited by 331
- 2017A Structured Self-attentive Sentence Embeddingcited by 318
- 2017Implicit Regularization in Matrix Factorizationcited by 318
- 2019Gradient Descent Maximizes the Margin of Homogeneous Neural Networkscited by 308
- 2020Kernel and Rich Regimes in Overparametrized Modelscited by 302
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
- 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 286
- 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 274
- 2018Learning Overparameterized Neural Networks via Stochastic Gradient Descent on Structured Datacited by 260
- 2018Characterizing Implicit Bias in Terms of Optimization Geometrycited by 259
- 2023Looped Transformers as Programmable Computerscited by 224
- 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 220
- 2016A Decomposable Attention Model for Natural Language Inferencecited by 214
- 2018Just Interpolate: Kernel "Ridgeless" Regression Can Generalizecited by 190
- 2020Directional convergence and alignment in deep learningcited by 172
- 2019Towards Explaining the Regularization Effect of Initial Large Learning Rate in Training Neural Networkscited by 162
- 2016Long Short-Term Memory-Networks for Machine Readingcited by 161
- 2021Inductive Biases and Variable Creation in Self-Attention Mechanismscited by 144
- 2019Implicit regularization for deep neural networks driven by an Ornstein-Uhlenbeck like processcited by 123
- 2021Label Noise SGD Provably Prefers Flat Global Minimizerscited by 121
- 2018Convergence of Gradient Descent on Separable Datacited by 108
- 2021What Happens after SGD Reaches Zero Loss? --A Mathematical Frameworkcited by 106
- 2023Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformercited by 101
- 2015Low-rank Solutions of Linear Matrix Equations via Procrustes Flowcited by 97
- 2020Classification vs regression in overparameterized regimes: Does the loss function matter?cited by 97
- 2022Vision Transformers provably learn spatial structurecited by 92
- 2020Shape Matters: Understanding the Implicit Bias of the Noise Covariancecited by 88
- 2018Overparameterized Nonlinear Learning: Gradient Descent Takes the Shortest Path?cited by 87
- 2018Risk and parameter convergence of logistic regressioncited by 81
50 most cited of 77 All 77 (JSON)
Built on by
Citing papers per year: 2023: 11; 2024: 30; 2025: 17; 2026: 9.
67 papers.
Sort:
By area:
- 2024How Transformers Learn Causal Structure with Gradient Descentcited by 114
- 2023In-Context Convergence of Transformerscited by 112
- 2023JoMA: Demystifying Multilayer Transformers via JOint Dynamics of MLP and Attentioncited by 52
- 2023Transformers Learn to Achieve Second-Order Convergence Rates for In-Context Linear Regressioncited by 47
- 2025Training Dynamics of In-Context Learning in Linear Attentioncited by 44
- 2024An Information-Theoretic Analysis of In-Context Learningcited by 39
- 2024Attention with Markov: A Framework for Principled Analysis of Transformers via Markov Chainscited by 39
- 2023On the Optimization and Generalization of Multi-head Attentioncited by 37
- 2024How Do Nonlinear Transformers Learn and Generalize in In-Context Learning?cited by 35
- 2024From Self-Attention to Markov Models: Unveiling the Dynamics of Generative Transformerscited by 34
- 2024Mechanics of Next Token Prediction with Self-Attentioncited by 34
- 2025Transformers Learn to Implement Multi-step Gradient Descent with Chain of Thoughtcited by 32
38 more
- 2023A Fast Optimization View: Reformulating Single Layer Attention in LLM Based on Tensor and SVM Trick, and Solving It in Matrix Multiplication Timecited by 30
- 2024A phase transition between positional and semantic learning in a solvable model of dot-product attentioncited by 30
- 2024Compressible Dynamics in Deep Overparameterized Low-Rank Learning & Adaptationcited by 26
- 2024In-Context Learning with Transformers: Softmax Attention Adapts to Function Lipschitznesscited by 22
- 2024Transformers Provably Learn Sparse Token Selection While Fully-Connected Nets Cannotcited by 21
- 2024Self-attention Networks Localize When QK-eigenspectrum Concentratescited by 19
- 2023Towards Causal Foundation Model: on Duality between Causal Inference and Attentioncited by 17
- 2024Implicit Regularization of Gradient Flow on One-Layer Softmax Attentioncited by 16
- 2024On the Training Convergence of Transformers for In-Context Classification of Gaussian Mixturescited by 15
- 2024Do LLMs dream of elephants (when told not to)? Latent concept association and associative memory in transformerscited by 14
- 2024Training Nonlinear Transformers for Chain-of-Thought Inference: A Theoretical Generalization Analysiscited by 14
- 2024Transformers Learn Low Sensitivity Functions: Investigations and Implicationscited by 13
- 2024How Transformers Utilize Multi-Head Attention in In-Context Learning? A Case Study on Sparse Linear Regressioncited by 13
- 2024Non-asymptotic Convergence of Training Transformers for Next-token Predictioncited by 13
- 2023Learning to (Learn at Test Time)cited by 12
- 2023Unmasking Transformers: A Theoretical Approach to Data Recovery via Attention Weightscited by 11
- 2024Attention Meets Post-hoc Interpretability: A Mathematical Perspectivecited by 11
- 2024Next-token prediction capacity: general upper bounds and a lower bound for transformerscited by 11
- 2025Gating is Weighting: Understanding Gated Linear Attention through In-context Learningcited by 11
- 2025Mirror, Mirror of the Flow: How Does Regularization Shape Implicit Bias?cited by 10
- 2025How Transformers Learn Regular Language Recognition: A Theoretical Study on Training Dynamics and Implicit Biascited by 10
- 2025Generalization or Hallucination? Understanding Out-of-Context Reasoning in Transformerscited by 10
- 2024Optimizing Attention with Mirror Descent: Generalized Max-Margin Token Selectioncited by 9
- 2024Learning on Transformers is Provable Low-Rank and Sparse: A One-layer Analysiscited by 8
- 2024Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysiscited by 7
- 2024How Transformers Get Rich: Approximation and Dynamics Analysiscited by 7
- 2023A Theoretical Insight into Attack and Defense of Gradient Leakage in Transformercited by 6
- 2023One Pass Streaming Algorithm for Super Long Token Attention Approximation in Sublinear Spacecited by 6
- 2024On the Learn-to-Optimize Capabilities of Transformers in In-Context Sparse Recoverycited by 6
- 2025Structured Initialization for Vision Transformerscited by 6
- 2024Learning Linear Attention in Polynomial Timecited by 5
- 2025On the Convergence of Gradient Descent on Learning Transformers with Residual Connectionscited by 5
- 2025Position: We Need An Algorithmic Understanding of Generative AIcited by 5
- 2024Structured Initialization for Attention in Vision Transformerscited by 4
- 2025Transformer Meets Twicing: Harnessing Unattended Residual Informationcited by 3
- 2024Differentially Private Kernel Density Estimationcited by 2
- 2025Diagonalizing the Softmax: Hadamard Initialization for Tractable Cross-Entropy Dynamicscited by 2
- 2026Unlabeled Data Can Provably Enhance In-Context Learning of Transformerscited by 2
50 most cited of 67 All 67 (JSON)
- 2026The Stability of Singular Distribution: A Spectral Perspective on the Two-Phase Dynamics of Language Model Pre-training26 May 2026
- 2026The Implicit Bias of Depth: From Neural Collapse to Softmax Codes21 May 2026
- 2026Emergence of Frontier Superposition: M"obius attractor and Cascade Supervision12 May 2026
- 2026Transformers Learn the Optimal DDPM Denoiser for Multi-Token GMMs11 Apr 2026
- 2026Never Saddle for Reparameterized Steepest Descent as Mirror Flow2 Mar 2026
- 2026Gaussian Match-and-Copy: A Minimalist Benchmark for Studying Transformer Induction7 Feb 2026
- 2026Breaking the Reversal Curse in Autoregressive Language Models via Identity Bridge2 Feb 2026
- 2026Provably Learning Attention with Queries23 Jan 2026
- 2026Unlabeled Data Can Provably Enhance In-Context Learning of Transformers15 Jan 2026
- 2025Diagonalizing the Softmax: Hadamard Initialization for Tractable Cross-Entropy Dynamics3 Dec 2025
- 2025Towards Understanding Transformers in Learning Random Walks28 Nov 2025
- 2025Harnessing Optimization Dynamics for Curvature-Informed Model Merging14 Sep 2025
38 more
- 2025Position: We Need An Algorithmic Understanding of Generative AI10 Jul 2025
- 2025On the Existence of Universal Simulators of Attention23 Jun 2025
- 2025Generalization or Hallucination? Understanding Out-of-Context Reasoning in Transformers12 Jun 2025
- 2025On the Convergence of Gradient Descent on Learning Transformers with Residual Connections5 Jun 2025
- 2025Structured Initialization for Vision Transformers26 May 2025
- 2025Attention with Trained Embeddings Provably Selects Important Tokens22 May 2025
- 2025How Transformers Learn In-Context Recall Tasks? Optimality, Training Dynamics and Generalization21 May 2025
- 2025How Transformers Learn Regular Language Recognition: A Theoretical Study on Training Dynamics and Implicit Bias2 May 2025
- 2025Mirror, Mirror of the Flow: How Does Regularization Shape Implicit Bias?17 Apr 2025
- 2025Ordinary Least Squares as an Attention Mechanism13 Apr 2025
- 2025Gating is Weighting: Understanding Gated Linear Attention through In-context Learning6 Apr 2025
- 2025Transformer Meets Twicing: Harnessing Unattended Residual Information2 Mar 2025
- 2025Transformers Learn to Implement Multi-step Gradient Descent with Chain of Thought28 Feb 2025
- 2025Training Dynamics of In-Context Learning in Linear Attention27 Jan 2025
- 2024Provable optimal transport with transformers: The essence of depth and prompt engineering25 Oct 2024
- 2024Optimizing Attention with Mirror Descent: Generalized Max-Margin Token Selection18 Oct 2024
- 2024On the Learn-to-Optimize Capabilities of Transformers in In-Context Sparse Recovery17 Oct 2024
- 2024On the Training Convergence of Transformers for In-Context Classification of Gaussian Mixtures15 Oct 2024
- 2024How Transformers Get Rich: Approximation and Dynamics Analysis15 Oct 2024
- 2024A Theoretical Survey on Foundation Models15 Oct 2024
- 2024Learning Linear Attention in Polynomial Time14 Oct 2024
- 2024Training Nonlinear Transformers for Chain-of-Thought Inference: A Theoretical Generalization Analysis3 Oct 2024
- 2024Non-asymptotic Convergence of Training Transformers for Next-token Prediction25 Sep 2024
- 2024Differentially Private Kernel Density Estimation3 Sep 2024
- 2024How Transformers Utilize Multi-Head Attention in In-Context Learning? A Case Study on Sparse Linear Regression8 Aug 2024
- 2024Do LLMs dream of elephants (when told not to)? Latent concept association and associative memory in transformers26 Jun 2024
- 2024Learning on Transformers is Provable Low-Rank and Sparse: A One-layer Analysis24 Jun 2024
- 2024Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis19 Jun 2024
- 2024Transformers Provably Learn Sparse Token Selection While Fully-Connected Nets Cannot11 Jun 2024
- 2024Compressible Dynamics in Deep Overparameterized Low-Rank Learning & Adaptation6 Jun 2024
- 2024Next-token prediction capacity: general upper bounds and a lower bound for transformers22 May 2024
- 2024Structured Initialization for Attention in Vision Transformers1 Apr 2024
- 2024Implicit Regularization of Gradient Flow on One-Layer Softmax Attention13 Mar 2024
- 2024Mechanics of Next Token Prediction with Self-Attention12 Mar 2024
- 2024Transformers Learn Low Sensitivity Functions: Investigations and Implications11 Mar 2024
- 2024How Do Nonlinear Transformers Learn and Generalize in In-Context Learning?23 Feb 2024
- 2024How Transformers Learn Causal Structure with Gradient Descent22 Feb 2024
- 2024From Self-Attention to Markov Models: Unveiling the Dynamics of Generative Transformers21 Feb 2024
50 newest of 67 All 67 (JSON)
- 2025Transformers Learn to Implement Multi-step Gradient Descent with Chain of Thoughtcited by 32
- 2024Training Nonlinear Transformers for Chain-of-Thought Inference: A Theoretical Generalization Analysiscited by 14
- 2025Generalization or Hallucination? Understanding Out-of-Context Reasoning in Transformerscited by 10
- 2026Breaking the Reversal Curse in Autoregressive Language Models via Identity Bridgecited by 2
- 2026Emergence of Frontier Superposition: M"obius attractor and Cascade Supervisioncited by 0
- 2026Emergence of Frontier Superposition: M"obius attractor and Cascade Supervision12 May 2026
- 2026Breaking the Reversal Curse in Autoregressive Language Models via Identity Bridge2 Feb 2026
- 2025Generalization or Hallucination? Understanding Out-of-Context Reasoning in Transformers12 Jun 2025
- 2025Transformers Learn to Implement Multi-step Gradient Descent with Chain of Thought28 Feb 2025
- 2024Training Nonlinear Transformers for Chain-of-Thought Inference: A Theoretical Generalization Analysis3 Oct 2024
- 2024How Transformers Learn Causal Structure with Gradient Descentcited by 114
- 2023In-Context Convergence of Transformerscited by 112
- 2023JoMA: Demystifying Multilayer Transformers via JOint Dynamics of MLP and Attentioncited by 52
- 2025Training Dynamics of In-Context Learning in Linear Attentioncited by 44
- 2024An Information-Theoretic Analysis of In-Context Learningcited by 39
- 2024Attention with Markov: A Framework for Principled Analysis of Transformers via Markov Chainscited by 39
- 2023On the Optimization and Generalization of Multi-head Attentioncited by 37
- 2024How Do Nonlinear Transformers Learn and Generalize in In-Context Learning?cited by 35
- 2024From Self-Attention to Markov Models: Unveiling the Dynamics of Generative Transformerscited by 34
- 2024Mechanics of Next Token Prediction with Self-Attentioncited by 34
- 2023A Fast Optimization View: Reformulating Single Layer Attention in LLM Based on Tensor and SVM Trick, and Solving It in Matrix Multiplication Timecited by 30
- 2024A phase transition between positional and semantic learning in a solvable model of dot-product attentioncited by 30
12 most cited of 60 All 60 (JSON)
- 2026The Stability of Singular Distribution: A Spectral Perspective on the Two-Phase Dynamics of Language Model Pre-training26 May 2026
- 2026The Implicit Bias of Depth: From Neural Collapse to Softmax Codes21 May 2026
- 2026Never Saddle for Reparameterized Steepest Descent as Mirror Flow2 Mar 2026
- 2026Gaussian Match-and-Copy: A Minimalist Benchmark for Studying Transformer Induction7 Feb 2026
- 2026Provably Learning Attention with Queries23 Jan 2026
- 2026Unlabeled Data Can Provably Enhance In-Context Learning of Transformers15 Jan 2026
- 2025Diagonalizing the Softmax: Hadamard Initialization for Tractable Cross-Entropy Dynamics3 Dec 2025
- 2025Towards Understanding Transformers in Learning Random Walks28 Nov 2025
- 2025Harnessing Optimization Dynamics for Curvature-Informed Model Merging14 Sep 2025
- 2025Position: We Need An Algorithmic Understanding of Generative AI10 Jul 2025
- 2025On the Existence of Universal Simulators of Attention23 Jun 2025
- 2025On the Convergence of Gradient Descent on Learning Transformers with Residual Connections5 Jun 2025
12 newest of 60 All 60 (JSON)