Lune

ACL2025Top-tier venue

Enough Coin Flips Can Make LLMs Act Bayesian

Ritwik Gupta, Rodolfo Corona, Jiaxin Ge, Eric Wang, Dan Klein, Trevor Darrell, David M. Chan

Abstract

Large language models (LLMs) exhibit the ability to generalize given few-shot examples in their input prompt, an emergent capability known as in-context learning (ICL). We investigate whether LLMs use ICL to perform structured reasoning in ways that are consistent with a Bayesian framework or rely on pattern matching. Using a controlled setting of biased coin flips, we find that: (1) LLMs often possess biased priors, causing initial divergence in zero-shot settings, (2) in-context evidence outweighs explicit bias instructions, (3) LLMs broadly follow Bayesian posterior updates, with deviations primarily due to miscalibrated priors rather than flawed updates, and (4) attention magnitude has negligible effect on Bayesian inference. With sufficient demonstrations of biased coin flips via ICL, LLMs update their priors in a Bayesian manner. Code and visualizations are available on the project page.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

8 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling cites Language Models are Few-Shot Learners
  • Pre-trained Large Language Models Learn to Predict Hidden Markov Models In-context cites Language Models are Few-Shot Learners
  • Generative Agents: Interactive Simulacra of Human Behavior cites Language Models are Few-Shot Learners
  • Generative Agents: Interactive Simulacra of Human Behavior cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity cites Language Models are Few-Shot Learners
  • String Seed of Thought: Prompting LLMs for Distribution-Faithful and Diverse Generation cites Generative Agents: Interactive Simulacra of Human Behavior
  • String Seed of Thought: Prompting LLMs for Distribution-Faithful and Diverse Generation cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Martingale Score: An Unsupervised Metric for Bayesian Rationality in LLM Reasoning cites Language Models are Few-Shot Learners
  • Martingale Score: An Unsupervised Metric for Bayesian Rationality in LLM Reasoning cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers8

  1. Verbalized Sampling: How to Mitigate Mode Collapse and Unlock LLM DiversityJiayi Zhang, Simon Yu, Derek Chong, Anthony Sicilia et al.ICML 2026 · 102 citations
  2. String Seed of Thought: Prompting LLMs for Distribution-Faithful and Diverse GenerationKou Misaki, Takuya AkibaICLR 2026 · 13 citations
  3. Martingale Score: An Unsupervised Metric for Bayesian Rationality in LLM ReasoningZhonghao He, Tianyi Alex Qiu, Hirokazu Shirado, Maarten SapNeurIPS 2025 · 6 citations
  4. Pre-trained Large Language Models Learn to Predict Hidden Markov Models In-contextYijia Dai, Zhaolin Gao, Yahya Sattar, Sarah Dean et al.NeurIPS 2025 · 2 citations
  5. D-Models and E-Models: Diversity-Stability Trade-offs in the Sampling Behavior of Large Language ModelsJia Gu, Liang Pang, Huawei Shen, Xueqi ChengWWW 2026

Builds on14

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  3. Generative Agents: Interactive Simulacra of Human BehaviorJoon Sung Park, Joseph C. O'Brien, Carrie Jun Cai, Meredith Ringel Morris et al.UIST 2023 · 1,882 citations
  4. Pythia: A Suite for Analyzing Large Language Models Across Training and ScalingStella Biderman, Hailey Schoelkopf, Quentin Gregory Anthony, Herbie Bradley et al.ICML 2023 · 1,822 citations
  5. Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order SensitivityYao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel et al.ACL 2022 · 1,494 citations

Related papers

  1. Many-Shot In-Context LearningRishabh Agarwal, Avi Singh, Lei Zhang, Bernd Bohnet et al.NeurIPS 2024 · 271 citations
  2. Belief Dynamics Reveal the Dual Nature of In-Context Learning and Activation SteeringEric Bigelow, Daniel Wurgaft, YingQiao Wang, Noah Goodman et al.ICML 2026
  3. Skills-in-Context: Unlocking Compositionality in Large Language ModelsJiaao Chen, Xiaoman Pan, Dian Yu, Kaiqiang Song et al.EMNLP Findings 2024 · 4 citations
  4. Universal Self-Adaptive PromptingXingchen Wan, Ruoxi Sun, Hootan Nakhost, Hanjun Dai et al.EMNLP 2023 · 4 citations
  5. What Do Language Models Learn in Context? The Structured Task HypothesisJiaoda Li, Yifan Hou, Mrinmaya Sachan, Ryan CotterellACL 2024 · 5 citations
Dusk over the sea between two cliffs drawn in fine vertical lines