Can pretrained Transformers deliver semiparametrically efficient inference?
Han YanJin ZhuChengchun ShiTengyao Wang
Han Yan
Jin Zhu
Chengchun Shi
Tengyao Wang
+4
The paper shows that a single pretrained Transformer can deliver efficient semiparametric estimation and valid inference in one forward pass for a family of estimands, avoiding both influence-function derivations and repeated nuisance estimation. Trained on simulated data with the true parameter as the only label, the model learns the posterior mean and covariance of the queried estimand and returns an estimate with a Wald-type confidence region. The authors prove that for locally flat pretraining priors of slowly growing complexity this posterior mean is efficient for every queried estimand, and that the Transformer attains asymptotically exact coverage in probability over evaluation populations and queries, even under distribution shift. They note, however, that the guarantee demands much more of pretraining when the data-generating distribution is fixed; experiments on causal inference, partial linear regression, and survival analysis show generally the lowest estimation error among competing methods, with nearly nominal coverage, at about 0.02 seconds per dataset.

arXiv ·
· November 20, 2026