Transformers are Minimax Optimal Nonparametric In-Context Learners
Juno Kim, Tai Nakamaki, Taiji Suzuki
摘要
In-context learning (ICL) of large language models has proven to be a surprisingly effective method of learning a new task from only a few demonstrative examples. In this paper, we study the efficacy of ICL from the viewpoint of statistical learning theory. We develop approximation and generalization error bounds for a transformer composed of a deep neural network and one linear attention layer, pretrained on nonparametric regression tasks sampled from general function spaces including the Besov space and piecewise -smooth class. We show that sufficiently trained transformers can achieve -- and even improve upon -- the minimax optimal estimation risk in context by encoding the most relevant basis representations during pretraining. Our analysis extends to high-dimensional or sequential data and distinguishes the pretraining and in-context generalization gaps. Furthermore, we establish information-theoretic lower bounds for meta-learners w.r.t. both the number of tasks and in-context examples. These findings shed light on the roles of task diversity and representation learning for ICL.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 13 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Transformers learn to implement preconditioned gradient descent for in-context learning 引用了 Language Models are Few-Shot Learners
- Transformers learn to implement preconditioned gradient descent for in-context learning 引用了 Transformers Learn In-Context by Gradient Descent
- Transformers learn to implement preconditioned gradient descent for in-context learning 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
- 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 引用了 Transformers Learn In-Context by Gradient Descent
- Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
- In-Context Learning Is Provably Bayesian Inference: A Generalization Theory for Meta-Learning 引用了 Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection
- In-Context Learning Is Provably Bayesian Inference: A Generalization Theory for Meta-Learning 引用了 Language Models are Few-Shot Learners
- In-Context Learning Is Provably Bayesian Inference: A Generalization Theory for Meta-Learning 引用了 Transformers Learn In-Context by Gradient Descent
- In-Context Learning Is Provably Bayesian Inference: A Generalization Theory for Meta-Learning 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
- When Do Transformers Outperform Feedforward and Recurrent Networks? A Statistical Perspective 引用了 Transformers learn to implement preconditioned gradient descent for in-context learning
- Understanding In-Context Learning on Structured Manifolds: Bridging Attention to Kernel Methods 引用了 Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection
- Understanding In-Context Learning on Structured Manifolds: Bridging Attention to Kernel Methods 引用了 Language Models are Few-Shot Learners
- Understanding In-Context Learning on Structured Manifolds: Bridging Attention to Kernel Methods 引用了 Transformers Learn In-Context by Gradient Descent
- Understanding In-Context Learning on Structured Manifolds: Bridging Attention to Kernel Methods 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
- Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and Time 引用了 Transformers learn to implement preconditioned gradient descent for in-context learning
- Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and Time 引用了 Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection
- Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and Time 引用了 Language Models are Few-Shot Learners
- Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and Time 引用了 Transformers Learn In-Context by Gradient Descent
- Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and Time 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
- Transformers Learn In-Context by Gradient Descent 引用了 Language Models are Few-Shot Learners
- Transformers Learn In-Context by Gradient Descent 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
- What Can Transformers Learn In-Context? A Case Study of Simple Function Classes 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper13
- Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and TimeBlake Bordelon, Mary I. Letey, Cengiz PehlevanICLR 2026 · 14 次引用
- Understanding In-Context Learning on Structured Manifolds: Bridging Attention to Kernel MethodsZhaiming Shen, Alexander Hsu, Rongjie Lai, Wenjing LiaoICLR 2026 · 13 次引用
- In-Context Learning Is Provably Bayesian Inference: A Generalization Theory for Meta-LearningTomoya Wakayama, Taiji SuzukiICML 2026 · 12 次引用
- When Do Transformers Outperform Feedforward and Recurrent Networks? A Statistical PerspectiveAlireza Mousavi-Hosseini, Clayton Sanford, Denny Wu, Murat A. ErdogduNeurIPS 2025 · 6 次引用
- Posterior Contraction for Sparse Neural Networks in Besov Spaces with Intrinsic DimensionalityKyeongwon Lee, Lizhen Lin, Jaewoo Park, Seonghyun JeongNeurIPS 2025 · 4 次引用
它引用的 Paper20
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- What Can Transformers Learn In-Context? A Case Study of Simple Function ClassesShivam Garg, Dimitris Tsipras, Percy Liang, Gregory ValiantNeurIPS 2022 · 883 次引用
- Transformers Learn In-Context by Gradient DescentJohannes von Oswald, Eyvind Niklasson, Ettore Randazzo, João Sacramento 等ICML 2023 · 729 次引用
- Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm SelectionYu Bai, Fan Chen, Huan Wang, Caiming Xiong 等NeurIPS 2023 · 356 次引用
- Transformers learn to implement preconditioned gradient descent for in-context learningKwangjun Ahn, Xiang Cheng, Hadi Daneshmand, Suvrit SraNeurIPS 2023 · 324 次引用
相关 Paper
- In-Context Learning through the Bayesian PrismMadhur Panwar, Kabir Ahuja, Navin GoyalICLR 2024 · 79 次引用
- How Many Pretraining Tasks Are Needed for In-Context Learning of Linear Regression?Jingfeng Wu, Difan Zou, Zixiang Chen, Vladimir Braverman 等ICLR 2024 · 94 次引用
- When can in-context learning generalize out of task distribution?Page C. Goddard, Lindsay M. Smith, Vudtiwat Ngampruetikorn, David J. SchwabICML 2025
- In-Context Learning with Representations: Contextual Generalization of Trained TransformersTong Yang, Yu Huang, Yingbin Liang, Yuejie ChiNeurIPS 2024 · 45 次引用
- Transformers as Algorithms: Generalization and Stability in In-context LearningYingcong Li, Muhammed Emrullah Ildiz, Dimitris Papailiopoulos, Samet OymakICML 2023 · 242 次引用
