A Bayesian Perspective on the Role of Epistemic Uncertainty for Delayed Generalization in In-Context Learning
Not on the map. Why?
Abstract (arXiv)
In-context learning enables transformers to adapt to new tasks from a few examples at inference time, while grokking highlights that this generalization can emerge abruptly only after prolonged training. We study task generalization and grokking in in-context learning using a Bayesian perspective, asking what enables the delayed transition from memorization to generalization. Concretely, we consider modular arithmetic tasks in which a transformer must infer a latent linear function solely from in-context examples and analyze how predictive uncertainty evolves during training. We combine approximate Bayesian techniques to estimate the posterior distribution and we study how uncertainty behaves across training and under changes in task diversity, context length, and context noise. We find that epistemic uncertainty collapses sharply when the model groks, making uncertainty a practical label-free diagnostic of generalization in transformers. Additionally, we provide theoretical support with a simplified Bayesian linear model, showing that asymptotically both delayed generalization and uncertainty peaks arise from the same underlying spectral mechanism, which links grokking time to uncertainty dynamics.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 32 of its 34 references that are in the map. First posted on arXiv 14 Apr 2026.
Builds on
32 of 34 references.
References · 32
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2015Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learningcited by 4,416
- 2016Simple and Scalable Predictive Uncertainty Estimation using Deep Ensemblescited by 3,888
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
- 2019Aleatoric and Epistemic Uncertainty in Machine Learning: An Introduction to Concepts and Methodscited by 903
- 2022Transformers learn in-context by gradient descentcited by 714
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
- 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 599
- 2019A Simple Baseline for Bayesian Uncertainty in Deep Learningcited by 555
- 2015Weight Uncertainty in Neural Networkscited by 554
- 2021Laplace Redux -- Effortless Bayesian Deep Learningcited by 359
20 more
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
- 2022Towards Understanding Grokking: An Effective Theory of Representation Learningcited by 229
- 2018Fast and Scalable Bayesian Deep Learning by Weight-Perturbation in Adamcited by 131
- 2022Quantifying Aleatoric and Epistemic Uncertainty in Machine Learning: Are Conditional Entropy and Mutual Information Appropriate Measures?cited by 124
- 2023What and How does In-Context Learning Learn? Bayesian Model Averaging, Parameterization, and Generalizationcited by 112
- 2022Variational inference via Wasserstein gradient flowscited by 84
- 2024Benchmarking Uncertainty Disentanglement: Specialized Uncertainties for Specialized Taskscited by 78
- 2024Variational Learning is Effective for Large Deep Networkscited by 62
- 2024Position: Bayesian Deep Learning is Needed in the Age of Large-Scale AIcited by 60
- 2024Uncertainty Quantification for In-Context Learning of Large Language Modelscited by 45
- 2024Learning to grok: Emergence of in-context learning and skill composition in modular arithmetic taskscited by 40
- 2024Why Do You Grok? A Theoretical Analysis of Grokking Modular Additioncited by 34
- 2025Position: Uncertainty Quantification Needs Reassessment for Large-language Model Agentscited by 27
- 2023Grokking in Linear Estimators -- A Solvable Model that Groks without Understandingcited by 25
- 2023A Study on the Calibration of In-context Learningcited by 21
- 2024Information-Theoretic Progress Measures reveal Grokking is an Emergent Phase Transitioncited by 16
- 2024Progress Measures for Grokking on Real-world Taskscited by 7
- 2025Uncertainty Unveiled: Can Exposure to More In-context Examples Mitigate Uncertainty for Large Language Models?cited by 5
- 2025The Initialization Determines Whether In-Context Learning Is Gradient Descentcited by 3
- 2025Scaling Laws for Uncertainty in Deep Learningcited by 1
Built on by
Not cited yet.