Reproduce “LLMs are Bayesian, In Expectation, Not in Realization” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Leon Chlon, Fatima Sheaib, Zein Khamis, Maggie Chlon, Mahdi El Zein, MarcAntonio M. Awada

This research from Hassana Labs and Harvard University quantitatively reconciles the observed order sensitivity in transformers with their capacity for Bayes-competitive prequential prediction. It demonstrates that while large language models (LLMs) may violate strict Bayesian structural invariances like exchangeability, the operational cost of these violations, measured as excess predictive Kullback-Leibler (KL) divergence, is often small and quantifiable.

Key insights

  • LLMs can be Bayes-competitive prequential predictors, even while violating exact structural exchangeability, with the operational cost of order sensitivity being small and quantifiable by predictive KL divergence.
  • LLM conditional distributions align more closely with Bayesian posterior predictives than frequentist plug-in estimates, especially in data-scarce regimes where these methods diverge.
  • Positional encoding mechanisms are a primary source of task-preserving order sensitivity, and techniques like order averaging can reduce the associated log-loss penalty and improve predictive calibration in downstream tasks.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.