Lune

ICLR2024Top-tier venue

Linear attention is (maybe) all you need (to understand Transformer optimization)

Kwangjun Ahn, Xiang Cheng, Minhak Song, Chulhee Yun, Ali Jadbabaie, Suvrit Sra

Abstract

Transformer training is notoriously difficult, requiring a careful design of optimizers and use of various heuristics. We make progress towards understanding the subtleties of training Transformers by carefully studying a simple yet canonical linearized shallow Transformer model. Specifically, we train linear Transformers to solve regression tasks, inspired by J. von Oswald et al. (ICML 2023), and K. Ahn et al. (NeurIPS 2023). Most importantly, we observe that our proposed linearized models can reproduce several prominent aspects of Transformer training dynamics. Consequently, the results obtained in this paper suggest that a simple linearized Transformer model could actually be a valuable, realistic abstraction for understanding Transformer optimization.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

43 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Transformers learn to implement preconditioned gradient descent for in-context learning cites Transformers Learn In-Context by Gradient Descent
  • Transformers learn to implement preconditioned gradient descent for in-context learning cites What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
  • A Theoretical Understanding of Self-Correction through In-context Alignment cites Transformers learn to implement preconditioned gradient descent for in-context learning
  • A Theoretical Understanding of Self-Correction through In-context Alignment cites Transformers Learn In-Context by Gradient Descent
  • A Theoretical Understanding of Self-Correction through In-context Alignment cites What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
  • Why are Adaptive Methods Good for Attention Models? cites Why Gradient Clipping Accelerates Training: A Theoretical Justification for Adaptivity
  • Convergence of Adam Under Relaxed Assumptions cites Why are Adaptive Methods Good for Attention Models?
  • Convergence of Adam Under Relaxed Assumptions cites Why Gradient Clipping Accelerates Training: A Theoretical Justification for Adaptivity
  • Transformers Learn In-Context by Gradient Descent cites What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
  • Why Transformers Need Adam: A Hessian Perspective cites Why are Adaptive Methods Good for Attention Models?
  • Why Transformers Need Adam: A Hessian Perspective cites Why Gradient Clipping Accelerates Training: A Theoretical Justification for Adaptivity
  • Why Transformers Need Adam: A Hessian Perspective cites Convergence of Adam Under Relaxed Assumptions
  • Exposing Attention Glitches with Flip-Flop Language Modeling cites What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers43

  1. Transformers learn to implement preconditioned gradient descent for in-context learningKwangjun Ahn, Xiang Cheng, Hadi Daneshmand, Suvrit SraNeurIPS 2023 · 324 citations
  2. Why Transformers Need Adam: A Hessian PerspectiveYushun Zhang, Congliang Chen, Tian Ding, Ziniu Li et al.NeurIPS 2024 · 149 citations
  3. Convergence of Adam Under Relaxed AssumptionsHaochuan Li, Alexander Rakhlin, Ali JadbabaieNeurIPS 2023 · 132 citations
  4. Exposing Attention Glitches with Flip-Flop Language ModelingBingbin Liu, Jordan T. Ash, Surbhi Goel, Akshay Krishnamurthy et al.NeurIPS 2023 · 90 citations
  5. A Theoretical Understanding of Self-Correction through In-context AlignmentYifei Wang, Yuyang Wu, Zeming Wei, Stefanie Jegelka et al.NeurIPS 2024 · 69 citations

Builds on14

  1. What Can Transformers Learn In-Context? A Case Study of Simple Function ClassesShivam Garg, Dimitris Tsipras, Percy Liang, Gregory ValiantNeurIPS 2022 · 883 citations
  2. Transformers Learn In-Context by Gradient DescentJohannes von Oswald, Eyvind Niklasson, Ettore Randazzo, João Sacramento et al.ICML 2023 · 729 citations
  3. Why Gradient Clipping Accelerates Training: A Theoretical Justification for AdaptivityJingzhao Zhang, Tianxing He, Suvrit Sra, Ali JadbabaieICLR 2020 · 598 citations
  4. Why are Adaptive Methods Good for Attention Models?Jingzhao Zhang, Sai Praneeth Karimireddy, Andreas Veit, Seungyeon Kim et al.NeurIPS 2020 · 397 citations
  5. Transformers learn to implement preconditioned gradient descent for in-context learningKwangjun Ahn, Xiang Cheng, Hadi Daneshmand, Suvrit SraNeurIPS 2023 · 324 citations

Related papers

  1. One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-AttentionArvind V. Mahankali, Tatsunori Hashimoto, Tengyu MaICLR 2024 · 160 citations
  2. Training Dynamics of Transformers to Recognize Word Co-occurrence via Gradient Flow AnalysisHongru Yang, Bhavya Kailkhura, Zhangyang Wang, Yingbin LiangNeurIPS 2024 · 14 citations
  3. Linear Transformers are Versatile In-Context LearnersMax Vladymyrov, Johannes von Oswald, Mark Sandler, Rong GeNeurIPS 2024 · 37 citations
  4. Trained Transformer Classifiers Generalize and Exhibit Benign Overfitting In-ContextSpencer Frei, Gal VardiICLR 2025
  5. Depth-Width Tradeoffs for Transformers on Graph TasksGilad Yehudai, Clayton Sanford, Maya Bechler-Speicher, Orr Fischer et al.NeurIPS 2025 · 10 citations
Dusk over the sea between two cliffs drawn in fine vertical lines