Optimal In-context Adaptivity and Distributional Robustness of Transformers
Not on the map. Why?
Abstract (arXiv)
We study in-context learning problems where a Transformer is pretrained on tasks drawn from a mixture distribution π=sumα∈A λα πα, called the pretraining prior, in which each mixture component πα is a distribution on tasks of a specific difficulty level indexed by α. Our goal is to understand the performance of the pretrained Transformer when evaluated on a different test distribution μ, consisting of tasks of fixed difficulty β∈A, and with potential distribution shift relative to πβ, subject to the chi-squared divergence chi2(μ,πβ) being at most kappa. In particular, we consider nonparametric regression problems with random smoothness, and multi-index models with both random smoothness and random effective dimension. We prove that a large Transformer pretrained on sufficient data achieves the optimal rate of convergence corresponding to the difficulty level β, uniformly over test distributions μ in the chi-squared divergence ball. Thus, the pretrained Transformer is able to achieve faster rates of convergence on easier tasks and is robust to distribution shift at test time. Finally, we prove that even if an estimator had access to the test distribution μ, the convergence rate of its expected risk over μ could not be faster than that of our pretrained Transformers, thereby providing a more appropriate optimality guarantee than minimax lower bounds.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 30 of its 63 references that are in the map. First posted on arXiv 27 Oct 2025.
Builds on
30 of 63 references.
References · 30
- 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
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
- 2020On Layer Normalization in the Transformer Architecturecited by 906
- 2022Transformers learn in-context by gradient descentcited by 714
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
- 2023Trained Transformers Learn Linear Models In-Contextcited by 331
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
18 more
- 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 274
- 2023Large Language Models Are Latent Variable Models: Explaining and Finding Good Demonstrations for In-Context Learningcited by 149
- 2023What and How does In-Context Learning Learn? Bayesian Model Averaging, Parameterization, and Generalizationcited by 112
- 2022General-Purpose In-Context Learning by Meta-Learning Transformerscited by 102
- 2023Transformers as Decision Makers: Provable In-Context Reinforcement Learning via Supervised Pretrainingcited by 82
- 2023In-Context Learning through the Bayesian Prismcited by 78
- 2023Transformers Implement Functional Gradient Descent to Learn Non-Linear Functions In Contextcited by 63
- 2023Statistical Foundations of Prior-Data Fitted Networkscited by 59
- 2024An Information-Theoretic Analysis of In-Context Learningcited by 39
- 2024Transformers are Minimax Optimal Nonparametric In-Context Learnerscited by 36
- 2024Pretrained transformer efficiently learns low-dimensional target functions in-contextcited by 29
- 2025In-Context Learning Is Provably Bayesian Inference: A Generalization Theory for Meta-Learningcited by 17
- 2024Posterior and variational inference for deep neural networks with heavy-tailed weightscited by 9
- 2024Automatic Domain Adaptation by Transformers in In-Context Learningcited by 7
- 2025In-Context Occam's Razor: How Transformers Prefer Simpler Hypotheses on the Flycited by 4
- 2025Deep learning with missing datacited by 3
- 2025Test time training enhances in-context learning of nonlinear functionscited by 3
- 2025Adversarially Pretrained Transformers May Be Universally Robust In-Context Learnerscited by 2
Built on by
Citing papers per year: 2026: 1.
1 paper.