mlsanityData to 7 Oct 2026

In-Context Learning Is Provably Bayesian Inference: A Generalization Theory for Meta-Learning

arXiv 2510.10981 ↗First posted 13 Oct 2025stat.ML cs.LG math.STcited by 17

Not on the map. Why?

Abstract (arXiv)

This paper develops a finite-sample statistical theory for in-context learning (ICL), analyzed within a meta-learning framework that accommodates mixtures of diverse task types. We introduce a principled risk decomposition that separates the total ICL risk into two orthogonal components: Bayes Gap and Posterior Variance. The Bayes Gap quantifies how well the trained model approximates the Bayes-optimal in-context predictor. For a uniform-attention Transformer, we derive a non-asymptotic upper bound on this gap, which explicitly clarifies the dependence on the number of pretraining prompts and their context length. The Posterior Variance is a model-independent risk representing the intrinsic task uncertainty. Our key finding is that this term is determined solely by the difficulty of the true underlying task, while the uncertainty arising from the task mixture vanishes exponentially fast with only a few in-context examples. Together, these results provide a unified view of ICL: the Transformer selects the optimal meta-algorithm during pretraining and rapidly converges to the optimal algorithm for the true task at test time.

Key facts. Cited by 17 papers in the map (data through 7 Oct 2026). Builds on 36 of its 73 references that are in the map. First posted on arXiv 13 Oct 2025.

Builds on

36 of 73 references.

References · 36

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
  4. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
  5. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
  6. 2023RT-2: Vision-Language-Action Models Transfer Web Knowledge to Robotic Controlcited by 2,993
  7. 2024OpenVLA: An Open-Source Vision-Language-Action Modelcited by 2,777
  8. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
  9. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
  10. 2023Large Language Modelscited by 774
  11. 2022Transformers learn in-context by gradient descentcited by 714
  12. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
24 more
  1. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
  2. 2023A Comprehensive Overview of Large Language Modelscited by 639
  3. 2016Error bounds for approximations with deep ReLU networkscited by 567
  4. 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 378
  5. 2023Trained Transformers Learn Linear Models In-Contextcited by 331
  6. 2017Nearly-tight VC-dimension and pseudodimension bounds for piecewise linear neural networkscited by 304
  7. 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
  8. 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 220
  9. 2023One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attentioncited by 168
  10. 2023Large Language Models Are Latent Variable Models: Explaining and Finding Good Demonstrations for In-Context Learningcited by 149
  11. 2023What and How does In-Context Learning Learn? Bayesian Model Averaging, Parameterization, and Generalizationcited by 112
  12. 2022General-Purpose In-Context Learning by Meta-Learning Transformerscited by 102
  13. 2023How Many Pretraining Tasks Are Needed for In-Context Learning of Linear Regression?cited by 93
  14. 2023In-Context Learning through the Bayesian Prismcited by 78
  15. 2024A Survey on Employing Large Language Models for Text-to-SQL Taskscited by 67
  16. 2023Meta-in-context learning in large language modelscited by 59
  17. 2024Dual Operating Modes of In-Context Learningcited by 42
  18. 2024An Information-Theoretic Analysis of In-Context Learningcited by 39
  19. 2024Transformers are Minimax Optimal Nonparametric In-Context Learnerscited by 36
  20. 2025Can Transformers Learn Full Bayesian Inference in Context?cited by 30
  21. 2024Pretrained transformer efficiently learns low-dimensional target functions in-contextcited by 29
  22. 2024Bayesian scaling laws for in-context learningcited by 18
  23. 2021Majorizing Measures, Sequential Complexities, and Online Learningcited by 17
  24. 2022Understanding the bias-variance tradeoff of Bregman divergencescited by 10

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 3; 2026: 14.

17 papers.

Sort:

By area:

  1. 2026Efficient and Minimax Optimal In-context Nonparametric Regression with Transformerscited by 7
  2. 2026Verbalizing LLM's Higher-order Uncertainty via Imprecise Probabilitiescited by 4
  3. 2026Bifrost: Steering Strategic Trajectories to Bridge Contextual Gaps for Self-Improving Agentscited by 2
  4. 2026Propagation of Chaos in Contextual Flow Mapscited by 2
  5. 2025Optimal In-context Adaptivity and Distributional Robustness of Transformerscited by 1
  6. 2025Scaling Laws and In-Context Learning: A Unified Theoretical Frameworkcited by 1
  7. 2026Bayesian Optimality of In-Context Learning with Selective State Spacescited by 1
  8. 2026Reasonably reasoning AI agents can avoid game-theoretic failures in zero-shot, provablycited by 1
  9. 2025Aligning Probabilistic Beliefs under Informative Missingness: LLM Steerability in Clinical Reasoningcited by 0
  10. 2026Universal priors: solving empirical Bayes via Bayesian inference and pretrainingcited by 0
  11. 2026Bigger Is Safer: Provable Robustness in In-Context Learning Scales with Capacitycited by 0
  12. 2026A Decision-Theoretic View of Test-Time Training: When, How Far, and Which Directions to Adaptcited by 0
5 more
  1. 2026A Unified Framework for In-Context Learning with Causal and Masked Language Modelscited by 0
  2. 2026The Illusion of Replacement: Rethinking Specialized Machine Learning Models in the Foundation Model Eracited by 0
  3. 2026Unifying ICL, SFT, KL-Regularized RL Through a Bayesian Lenscited by 0
  4. 2026Recursive Reasoning or Statistical Extrapolation? In-Context Learning in Multi-Agent Interdependent Decision-Makingcited by 0
  5. 2026Understanding Generalization Requires Universal Inductioncited by 0