atlas

Research map / Large language models / Language, safety and interpretability

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

ICML 2024 · Large language models › Language, safety and interpretability · approach: Statistical frameworks for LLM evaluation · 2 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Tests whether LLM in-context learning on exchangeable synthetic data satisfies the martingale property and Bayesian uncertainty scaling, finding violations for Llama-2-7B, Mistral-7B, GPT-3, GPT-3.5 and GPT-4.

Problem

Whether in-context learning in LLMs on exchangeable data is (approximately) Bayesian, tested via the martingale property and Bayesian scaling of epistemic uncertainty.

Approach

Uses the martingale property of predictive distributions, a necessary condition for Bayesian exchangeable learning, as a falsifiable test: checks invariance of predictions to imputed missing samples via sample paths, compared against bootstrap CIs from a reference Bayesian model, plus a scaling test of the martingale posterior's spread (IQR of MLE).

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Increase the Bernoulli sampling horizon from m=n/2 to m=2nLLMs on Bernoulli data · Bernoulli, θ∈{0.3, 0.5, 0.7}martingale property adherenceHurt
Use short sampling paths (m=n/2)Most tested LLMs on Bernoulli data · Bernoulli, θ∈{0.3, 0.5, 0.7}martingale property adherenceHelped
Use GPT-4 instead of the other tested LLMsLLMs on Bernoulli data with short paths · Bernoulli, θ∈{0.3, 0.5}, m=n/2martingale property adherenceHurt
Use GPT-3.5 instead of GPT-4GPT models on Bernoulli data · Bernoullimartingale property adherenceHelped
Use GPT-3.5 instead of GPT-3.5's short-horizon settingGPT-3.5 on Gaussian data · Gaussian, θ=-1, n=100, m=50martingale property adherenceHurt
Use GPT-3.5 on the synthetic natural-language taskGPT-3.5 · Synthetic natural language, n=80, m=40martingale property adherenceHurt
Use Llama-2-7B rather than the reference Bayesian modelLlama-2-7B · Bernoulli, θ=0.5epistemic uncertainty scalingHurt
Use GPT-3.5 rather than the reference Bayesian modelGPT-3.5 · Bernoulli, θ=0.5epistemic uncertainty scalingMixed
Use GPT-3-170B or Mistral-7B rather than Llama-2-7B or GPT-3.5LLMs on Bernoulli data · Bernoulli, θ=0.5epistemic uncertainty scalingHelped
Fine-tune GPT-3-2.7B on Bernoulli or synthetic NLP dataGPT-3-2.7B · Bernoulli and synthetic natural languagemartingale property adherenceMixed
Add instruction tuningGPT-3-170B compared with GPT-3.5, and GPT-4 · Bernoulli and Gaussian experimentsmartingale property adherenceHurt
Use GPT-3.5 on Gaussian dataGPT-3.5 · Gaussian, θ=-1sample variance: 0.711<1 (95% CI: [0.680, 0.742])Hurt

Surprising findings

Limitations

Experimental setup

Datasets: synthetic Bernoulli sequences synthetic Gaussian sequences synthetic clinical natural-language data

Benchmarks: synthetic Bernoulli experiment synthetic Gaussian experiment synthetic natural language experiment

Metrics: test statistics T_{1,g} and T_{2,k} vs bootstrap CIs IQR of MLE on sample paths (T_3) scaling

Baselines: Bayesian reference model (Beta(1,1) / Gaussian prior) fractional Bayesian posterior

Builds on: martingale posterior de Finetti's theorem Bernstein-von Mises theorem fractional Bayesian posterior

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy