Lune

STOC2025顶会

Provably Learning a Multi-head Attention Layer

Sitan Chen, Yuanzhi Li

摘要

The multi-head attention layer is one of the key components of the transformer architecture that sets it apart from traditional feed-forward models. Given a sequence length k, attention matrices Σ1,…,Σm∈ℝd× d, and projection matrices W1,…,Wm∈ℝd× d, the corresponding multi-head attention layer F: ℝk× d→ ℝk× d transforms length-k sequences of d-dimensional tokens X∈ℝk× d via F(X) ≜ ∑i=1m softmax(XΣiX⊤)XWi. In this work, we initiate the study of provably learning a multi-head attention layer from random examples and give the first nontrivial upper and lower bounds for this problem. Provided Wi, Σi satisfy certain non-degeneracy conditions, we give a (dk)O(m3)-time algorithm that learns F to small error given random labeled examples drawn uniformly from ± 1k× d. We also prove computational lower bounds showing that in the worst case, exponential dependence on the number of heads m is unavoidable. We chose to focus on Boolean X to mimic the discrete nature of tokens in large language models, though our techniques naturally extend to standard continuous settings, e.g. Gaussian. Our algorithm, which is centered around using examples to sculpt a convex body containing the unknown parameters, is a significant departure from existing provable algorithms for learning feed-forward networks, which predominantly exploit fine-grained algebraic and rotation invariance properties of the Gaussian distribution. In contrast, our analysis is more flexible as it primarily relies on various upper and lower tail bounds for the input distribution and “slices” thereof.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 16 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Unveiling Induction Heads: Provable Training Dynamics and Feature Learning in Transformers 引用了 Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection
  • Unveiling Induction Heads: Provable Training Dynamics and Feature Learning in Transformers 引用了 Language Models are Few-Shot Learners
  • Unveiling Induction Heads: Provable Training Dynamics and Feature Learning in Transformers 引用了 Transformers Learn In-Context by Gradient Descent
  • Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection 引用了 Language Models are Few-Shot Learners
  • Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection 引用了 Are Transformers universal approximators of sequence-to-sequence functions?
  • Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection 引用了 Transformers Learn In-Context by Gradient Descent
  • Non-asymptotic Convergence of Training Transformers for Next-token Prediction 引用了 Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection
  • Non-asymptotic Convergence of Training Transformers for Next-token Prediction 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Non-asymptotic Convergence of Training Transformers for Next-token Prediction 引用了 Language Models are Few-Shot Learners
  • Non-asymptotic Convergence of Training Transformers for Next-token Prediction 引用了 Transformers Learn In-Context by Gradient Descent
  • Training Dynamics of Transformers to Recognize Word Co-occurrence via Gradient Flow Analysis 引用了 Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection
  • Training Dynamics of Transformers to Recognize Word Co-occurrence via Gradient Flow Analysis 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Training Dynamics of Transformers to Recognize Word Co-occurrence via Gradient Flow Analysis 引用了 Are Transformers universal approximators of sequence-to-sequence functions?
  • Training Dynamics of Transformers to Recognize Word Co-occurrence via Gradient Flow Analysis 引用了 Transformers Learn In-Context by Gradient Descent
  • How Do Nonlinear Transformers Learn and Generalize in In-Context Learning? 引用了 Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection
  • How Do Nonlinear Transformers Learn and Generalize in In-Context Learning? 引用了 Language Models are Few-Shot Learners
  • How Do Nonlinear Transformers Learn and Generalize in In-Context Learning? 引用了 Transformers Learn In-Context by Gradient Descent
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale 引用了 Language Models are Few-Shot Learners
  • Implicit Optimization Bias of Next-token Prediction in Linear Models 引用了 Transformers Learn In-Context by Gradient Descent
  • Transformers Learn In-Context by Gradient Descent 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Transformers Learn In-Context by Gradient Descent 引用了 Language Models are Few-Shot Learners
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper16

  1. Unveiling Induction Heads: Provable Training Dynamics and Feature Learning in TransformersSiyu Chen, Heejune Sheen, Tianhao Wang, Zhuoran YangNeurIPS 2024 · 48 次引用
  2. How Do Nonlinear Transformers Learn and Generalize in In-Context Learning?Hongkang Li, Meng Wang, Songtao Lu, Xiaodong Cui 等ICML 2024 · 37 次引用
  3. Implicit Optimization Bias of Next-token Prediction in Linear ModelsChristos ThrampoulidisNeurIPS 2024 · 19 次引用
  4. Non-asymptotic Convergence of Training Transformers for Next-token PredictionRuiquan Huang, Yingbin Liang, Jing YangNeurIPS 2024 · 15 次引用
  5. Training Dynamics of Transformers to Recognize Word Co-occurrence via Gradient Flow AnalysisHongru Yang, Bhavya Kailkhura, Zhangyang Wang, Yingbin LiangNeurIPS 2024 · 14 次引用

它引用的 Paper27

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
  3. Transformers Learn In-Context by Gradient DescentJohannes von Oswald, Eyvind Niklasson, Ettore Randazzo, João Sacramento 等ICML 2023 · 729 次引用
  4. Are Transformers universal approximators of sequence-to-sequence functions?Chulhee Yun, Srinadh Bhojanapalli, Ankit Singh Rawat, Sashank J. Reddi 等ICLR 2020 · 481 次引用
  5. Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm SelectionYu Bai, Fan Chen, Huan Wang, Caiming Xiong 等NeurIPS 2023 · 356 次引用

相关 Paper

  1. What can a Single Attention Layer Learn? A Study Through the Random Features LensHengyu Fu, Tianyu Guo, Yu Bai, Song MeiNeurIPS 2023 · 47 次引用
  2. On the Computational Hardness of TransformersBarna Saha, Yinzhan Xu, Christopher Ye, Hantao YuSTOC 2026
  3. Provably Learning Attention with QueriesSatwik Bhattamishra, Kulin Shah, Michael Hahn, Varun KanadeICML 2026
  4. Memorization Capacity of Multi-Head Attention in TransformersSadegh Mahdavi, Renjie Liao, Christos ThrampoulidisICLR 2024 · 34 次引用
  5. Theoretical limitations of multi-layer TransformerLijie Chen, Binghui Peng, Hongxun WuFOCS 2025 · 2 次引用
黄昏的海面,两侧是细线勾勒的悬崖