Universal priors: solving empirical Bayes via Bayesian inference and pretraining

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Cannella, Nick, Teh, Anzo, Han, Yanjun, Polyanskiy, Yury
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917277660610560
author Cannella, Nick
Teh, Anzo
Han, Yanjun
Polyanskiy, Yury
author_facet Cannella, Nick
Teh, Anzo
Han, Yanjun
Polyanskiy, Yury
contents We theoretically justify the recent empirical finding of [Teh et al., 2025] that a transformer pretrained on synthetically generated data achieves strong performance on empirical Bayes (EB) problems. We take an indirect approach to this question: rather than analyzing the model architecture or training dynamics, we ask why a pretrained Bayes estimator, trained under a prespecified training distribution, can adapt to arbitrary test distributions. Focusing on Poisson EB problems, we identify the existence of universal priors such that training under these priors yields a near-optimal regret bound of $\widetilde{O}(\frac{1}{n})$ uniformly over all test distributions. Our analysis leverages the classical phenomenon of posterior contraction in Bayesian statistics, showing that the pretrained transformer adapts to unknown test distributions precisely through posterior contraction. This perspective also explains the phenomenon of length generalization, in which the test sequence length exceeds the training length, as the model performs Bayesian inference using a generalized posterior.
format Preprint
id arxiv_https___arxiv_org_abs_2602_15136
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Universal priors: solving empirical Bayes via Bayesian inference and pretraining
Cannella, Nick
Teh, Anzo
Han, Yanjun
Polyanskiy, Yury
Machine Learning
We theoretically justify the recent empirical finding of [Teh et al., 2025] that a transformer pretrained on synthetically generated data achieves strong performance on empirical Bayes (EB) problems. We take an indirect approach to this question: rather than analyzing the model architecture or training dynamics, we ask why a pretrained Bayes estimator, trained under a prespecified training distribution, can adapt to arbitrary test distributions. Focusing on Poisson EB problems, we identify the existence of universal priors such that training under these priors yields a near-optimal regret bound of $\widetilde{O}(\frac{1}{n})$ uniformly over all test distributions. Our analysis leverages the classical phenomenon of posterior contraction in Bayesian statistics, showing that the pretrained transformer adapts to unknown test distributions precisely through posterior contraction. This perspective also explains the phenomenon of length generalization, in which the test sequence length exceeds the training length, as the model performs Bayesian inference using a generalized posterior.
title Universal priors: solving empirical Bayes via Bayesian inference and pretraining
topic Machine Learning
url https://arxiv.org/abs/2602.15136