mlsanityData to 14 Oct 2026

Training Dynamics of Multi-Head Softmax Attention for In-Context Learning: Emergence, Convergence, and Optimality

arXiv 2402.19442 ↗First posted 29 Feb 2024cs.LG cs.AI math.OCcited by 74

Not on the map. Why?

Abstract (arXiv)

We study the dynamics of gradient flow for training a multi-head softmax attention model for in-context learning of multi-task linear regression. We establish the global convergence of gradient flow under suitable choices of initialization. In addition, we prove that an interesting "task allocation" phenomenon emerges during the gradient flow dynamics, where each attention head focuses on solving a single task of the multi-task model. Specifically, we prove that the gradient flow dynamics can be split into three phases -- a warm-up phase where the loss decreases rather slowly and the attention heads gradually build up their inclination towards individual tasks, an emergence phase where each head selects a single task and the loss rapidly decreases, and a convergence phase where the attention parameters converge to a limit. Furthermore, we prove the optimality of gradient flow in the sense that the limiting model learned by gradient flow is on par with the best possible multi-head softmax attention model up to a constant factor. Our analysis also delineates a strict separation in terms of the prediction accuracy of ICL between single-head and multi-head attention models. The key technique for our convergence analysis is to map the gradient flow dynamics in the parameter space to a set of ordinary differential equations in the spectral domain, where the relative magnitudes of the semi-singular values of the attention weights determines task allocation. To our best knowledge, our work provides the first convergence result for the multi-head softmax attention model.

Key facts. Cited by 74 papers in the map (data through 14 Oct 2026). First posted on arXiv 29 Feb 2024.

Builds on

0 of 0 references.

No references here yet.

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 32; 2025: 27; 2026: 15.

74 papers.

Sort:

By area:

  1. 2025Training Dynamics of In-Context Learning in Linear Attentioncited by 46
  2. 2024In-Context Learning with Representations: Contextual Generalization of Trained Transformerscited by 38
  3. 2024Transformers are Minimax Optimal Nonparametric In-Context Learnerscited by 37
  4. 2024Mechanics of Next Token Prediction with Self-Attentioncited by 34
  5. 2025Transformers Learn to Implement Multi-step Gradient Descent with Chain of Thoughtcited by 32
  6. 2024Pretrained transformer efficiently learns low-dimensional target functions in-contextcited by 31
  7. 2024From Sparse Dependence to Sparse Attention: Unveiling How Chain-of-Thought Enhances Transformer Sample Efficiencycited by 29
  8. 2024How Well Can Transformers Emulate In-context Newton's Method?cited by 25
  9. 2025The emergence of sparse attention: impact of data distribution and benefits of repetitioncited by 25
  10. 2024Transformers Provably Learn Sparse Token Selection While Fully-Connected Nets Cannotcited by 22
  11. 2024Implicit Regularization of Gradient Flow on One-Layer Softmax Attentioncited by 19
  12. 2024One-Layer Transformer Provably Learns One-Nearest Neighbor In Contextcited by 16
38 more
  1. 2025Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and Timecited by 16
  2. 2024Exploring the Frontiers of Softmax: Provable Optimization, Applications in Diffusion Model, and Beyondcited by 15
  3. 2024Understanding the Language Model to Solve the Symbolic Multi-Step Reasoning Problem from the Perspective of Buffer Mechanismcited by 15
  4. 2024On the Training Convergence of Transformers for In-Context Classification of Gaussian Mixturescited by 15
  5. 2024How Transformers Utilize Multi-Head Attention in In-Context Learning? A Case Study on Sparse Linear Regressioncited by 14
  6. 2024Training Nonlinear Transformers for Chain-of-Thought Inference: A Theoretical Generalization Analysiscited by 14
  7. 2024Learning sum of diverse features: computational hardness and efficient gradient-based training for ridge combinationscited by 13
  8. 2024Non-asymptotic Convergence of Training Transformers for Next-token Predictioncited by 13
  9. 2024A Theoretical Understanding of Chain-of-Thought: Coherent Reasoning and Error-Aware Demonstrationcited by 13
  10. 2024Adversarial Training Can Provably Improve Robustness: Theoretical Analysis of Feature Learning Process Under Structured Datacited by 12
  11. 2025Gating is Weighting: Understanding Gated Linear Attention through In-context Learningcited by 12
  12. 2025How Transformers Learn Regular Language Recognition: A Theoretical Study on Training Dynamics and Implicit Biascited by 11
  13. 2025From Condensation to Rank Collapse: A Two-Stage Analysis of Transformer Training Dynamicscited by 10
  14. 2024Amuro and Char: Analyzing the Relationship between Pre-Training and Fine-Tuning of Large Language Modelscited by 9
  15. 2024Training Dynamics of Transformers to Recognize Word Co-occurrence via Gradient Flow Analysiscited by 9
  16. 2024Optimizing Attention with Mirror Descent: Generalized Max-Margin Token Selectioncited by 9
  17. 2024How Transformers Get Rich: Approximation and Dynamics Analysiscited by 8
  18. 2025Federated In-Context Learning: Iterative Refinement for Improved Answer Qualitycited by 8
  19. 2025Train Once, Reuse Everywhere: Generalizable Implicit In-Context Learning by Routing Attentioncited by 8
  20. 2025On the Role of Transformer Feed-Forward Layers in Nonlinear In-Context Learningcited by 7
  21. 2025What Happens During the Loss Plateau? Understanding Abrupt Learning in Transformerscited by 7
  22. 2024In-Context Learning of Linear Systems: Generalization Theory and Applications to Operator Learningcited by 6
  23. 2024Context-Scaling versus Task-Scaling in In-Context Learningcited by 6
  24. 2024On the Learn-to-Optimize Capabilities of Transformers in In-Context Sparse Recoverycited by 6
  25. 2025Transformers Meet In-Context Learning: A Universal Approximation Theorycited by 6
  26. 2025On the Convergence of Gradient Descent on Learning Transformers with Residual Connectionscited by 6
  27. 2025Decoupling Positional and Symbolic Attention Behavior in Transformerscited by 6
  28. 2024DETAIL: Task DEmonsTration Attribution for Interpretable In-context Learningcited by 5
  29. 2024On Mesa-Optimization in Autoregressively Trained Transformers: Emergence and Capabilitycited by 5
  30. 2024On the Benefits of Rank in Attention Layerscited by 5
  31. 2024Task Diversity Shortens the ICL Plateaucited by 5
  32. 2025Transformers versus the EM Algorithm in Multi-class Clusteringcited by 5
  33. 2025In-Context Occam's Razor: How Transformers Prefer Simpler Hypotheses on the Flycited by 5
  34. 2026Training Dynamics of Softmax Self-Attention: Fast Global Convergence via Preconditioningcited by 5
  35. 2025On the Robustness of Transformers against Context Hijacking for Linear Classificationcited by 4
  36. 2025Provable In-Context Learning of Nonlinear Regression with Transformerscited by 4
  37. 2025Softmax ≥ Linear: Transformers may learn to classify in-context by kernel gradient descentcited by 4
  38. 2024From Unstructured Data to In-Context Learning: Exploring What Tasks Can Be Learned and Whencited by 3

50 most cited of 74 All 74 (JSON)