mlsanityData to 7 Oct 2026

Is In-Context Learning in Large Language Models Bayesian? A Martingale Perspective

arXiv 2406.00793 ↗First posted 2 Jun 2024stat.ML cs.LGcited by 51

Not on the map. Why?

Abstract (arXiv)

In-context learning (ICL) has emerged as a particularly remarkable characteristic of Large Language Models (LLM): given a pretrained LLM and an observed dataset, LLMs can make predictions for new data points from the same distribution without fine-tuning. Numerous works have postulated ICL as approximately Bayesian inference, rendering this a natural hypothesis. In this work, we analyse this hypothesis from a new angle through the martingale property, a fundamental requirement of a Bayesian learning system for exchangeable data. We show that the martingale property is a necessary condition for unambiguous predictions in such scenarios, and enables a principled, decomposed notion of uncertainty vital in trustworthy, safety-critical systems. We derive actionable checks with corresponding theory and test statistics which must hold if the martingale property is satisfied. We also examine if uncertainty in LLMs decreases as expected in Bayesian learning when more data is observed. In three experiments, we provide evidence for violations of the martingale property, and deviations from a Bayesian scaling behaviour of uncertainty, falsifying the hypothesis that ICL is Bayesian.

Key facts. Cited by 51 papers in the map (data through 7 Oct 2026). Builds on 32 of its 55 references that are in the map. First posted on arXiv 2 Jun 2024.

Builds on

32 of 55 references.

References · 32

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
  3. 2022Training language models to follow instructions with human feedbackcited by 15,712
  4. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  5. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  6. 2023Mistral 7Bcited by 3,065
  7. 2023A Survey of Large Language Modelscited by 2,537
  8. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
  9. 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
  10. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
  11. 2023Time-LLM: Time Series Forecasting by Reprogramming Large Language Modelscited by 680
  12. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
20 more
  1. 2023Large Language Models Are Zero-Shot Time Series Forecasterscited by 491
  2. 2021MetaICL: Learning to Learn In Contextcited by 450
  3. 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
  4. 2022Language Models are Realistic Tabular Data Generatorscited by 290
  5. 2023Does Synthetic Data Generation of LLMs Help Clinical Text Mining?cited by 151
  6. 2023Large Language Models Are Latent Variable Models: Explaining and Finding Good Demonstrations for In-Context Learningcited by 149
  7. 2023Pretraining task diversity and the emergence of non-Bayesian in-context learning for regressioncited by 138
  8. 2023Calibrated Language Models Must Hallucinatecited by 114
  9. 2023What and How does In-Context Learning Learn? Bayesian Model Averaging, Parameterization, and Generalizationcited by 112
  10. 2022Uncertainty Quantification with Pre-trained Language Models: A Large-Scale Empirical Analysiscited by 104
  11. 2023Synthetic Data Generation with Large Language Models for Text Classification: Potential and Limitationscited by 96
  12. 2023A Theory of Emergent In-Context Learning as Implicit Structure Inductioncited by 86
  13. 2023In-Context Learning through the Bayesian Prismcited by 78
  14. 2023The Transient Nature of Emergent In-Context Learning in Transformerscited by 72
  15. 2024Making Pre-trained Language Models Great on Tabular Predictioncited by 56
  16. 2021Martingale posterior distributionscited by 43
  17. 2023A Latent Space Theory for Emergent Abilities in Large Language Modelscited by 42
  18. 2023Generating Faithful Synthetic Data with Large Language Models: A Case Study in Computational Social Sciencecited by 37
  19. 2023Language models are weak learnerscited by 21
  20. 2023Deep de Finetti: Recovering Topic Distributions from Large Language Modelscited by 7

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 8; 2025: 21; 2026: 22.

51 papers.

Sort:

By area:

  1. 2025Plan and Budget: Effective and Efficient Test-Time Scaling on Reasoning Large Language Modelscited by 30
  2. 2025BED-LLM: Intelligent Information Gathering with LLMs and Bayesian Experimental Designcited by 21
  3. 2024Estimating the Hallucination Rate of Generative AIcited by 20
  4. 2025Enough Coin Flips Can Make LLMs Act Bayesiancited by 19
  5. 2025Position: The Future of Bayesian Prediction Is Prior-Fittedcited by 19
  6. 2024Bayesian scaling laws for in-context learningcited by 18
  7. 2024Bayesian Concept Bottleneck Models with LLM Priorscited by 16
  8. 2024AutoElicit: Using Large Language Models for Expert Prior Elicitation in Predictive Modellingcited by 15
  9. 2024Everything Everywhere All at Once: LLMs can In-Context Learn Multiple Tasks in Superpositioncited by 13
  10. 2025Are Large Language Models Reliable AI Scientists? Assessing Reverse-Engineering of Black-Box Systemscited by 13
  11. 2025Probabilistic operator learning: generative modeling and uncertainty quantification for foundation models of differential equationscited by 9
  12. 2026Agentic Forecasting using Sequential Bayesian Updating of Linguistic Beliefscited by 9
38 more
  1. 2024Transformers Handle Endogeneity in In-Context Linear Regressioncited by 8
  2. 2026From Zero to Hero: Advancing Zero-Shot Foundation Models for Tabular Outlier Detectioncited by 8
  3. 2025TabMGP: Martingale Posterior with TabPFNcited by 6
  4. 2025Martingale Score: An Unsupervised Metric for Bayesian Rationality in LLM Reasoningcited by 5
  5. 2025In-Context Parametric Inference: Point or Distribution Estimators?cited by 4
  6. 2025Uncertainty Quantification for Prior-Data Fitted Networks using Martingale Posteriorscited by 4
  7. 2025Counterfactual reasoning: an analysis of in-context emergencecited by 4
  8. 2025Provable In-Context Learning of Nonlinear Regression with Transformerscited by 4
  9. 2026Verbalizing LLM's Higher-order Uncertainty via Imprecise Probabilitiescited by 4
  10. 2024DeFine: Decision-Making with Analogical Reasoning over Factor Profilescited by 3
  11. 2025The Initialization Determines Whether In-Context Learning Is Gradient Descentcited by 3
  12. 2026Rethinking Zero-Shot Time Series Classification: From Task-specific Classifiers to In-Context Inferencecited by 3
  13. 2026Position: agentic AI orchestration should be Bayes-consistentcited by 3
  14. 2026VIP-COP: Context Optimization for Tabular Foundation Modelscited by 3
  15. 2024Can Generative AI Solve Your In-Context Learning Problem? A Martingale Perspectivecited by 2
  16. 2025Architectural and Inferential Inductive Biases For Exchangeable Sequence Modelingcited by 2
  17. 2025From predictions to confidence intervals: an empirical study of conformal prediction methods for in-context learningcited by 2
  18. 2025Predictable Compression Failures: Order Sensitivity and Information Budgeting for Evidence-Grounded Binary Adjudicationcited by 2
  19. 2025Evaluating the Use of Large Language Models as Synthetic Social Agents in Social Science Researchcited by 2
  20. 2026From Drift to Coherence: Stabilizing Beliefs in LLMscited by 2
  21. 2026Partition, Prompt, Aggregate: Statistical Self-Consistency in Language Modelscited by 2
  22. 2025Semantic Anchors in In-Context Learning: Why Small LLMs Cannot Flip Their Labelscited by 1
  23. 2026Hallucination-Resistant Security Planning with a Large Language Modelcited by 1
  24. 2026Learning to Remember, Learn, and Forget in Attention-Based Modelscited by 1
  25. 2026Reasonably reasoning AI agents can avoid game-theoretic failures in zero-shot, provablycited by 1
  26. 2026Can AI Scientist Agents Learn from Lab-in-the-Loop Feedback? Evidence from Iterative Perturbation Discoverycited by 1
  27. 2026What does a Bayes-filtered transformer believe? A predictive Monte Carlo approachcited by 1
  28. 2025Exploring Imbalanced Annotations for Effective In-Context Learningcited by 0
  29. 2025LLMs are Bayesian, In Expectation, Not in Realizationcited by 0
  30. 2025Aligning Probabilistic Beliefs under Informative Missingness: LLM Steerability in Clinical Reasoningcited by 0
  31. 2026In-Context Function Learning in Large Language Modelscited by 0
  32. 2026Toward Privileged Foundation Models:LUPI for Accelerated and Improved Learningcited by 0
  33. 2026Variational predictive resamplingcited by 0
  34. 2026Quantifying Aleatoric Uncertainty of In-Context Learning for Robust Measure of LLM Prediction Confidencecited by 0
  35. 2026Can In-Context Learning Support Intrinsic Curiosity?cited by 0
  36. 2026Bayesian Intelligence from the Outsidecited by 0
  37. 2026Small transformers track Bayesian evidence for latent common causes via a context-invariant mechanismcited by 0
  38. 2026Diagnosing and Improving Probabilistic Reasoning in Large Language Modelscited by 0

50 most cited of 51 All 51 (JSON)