Can pretrained Transformers deliver semiparametrically efficient inference?
Han Yan, Jin Zhu, Chengchun Shi, Tengyao Wang
Abstract
Semiparametric models provide a broad framework for statistical inference, yet efficient estimation typically relies on influence function correction tailored to each estimand and on nuisance estimation repeated for every sample. We show that a single pretrained Transformer can deliver efficient estimation and valid inference for a family of estimands in one forward pass, without deriving efficient influence functions or estimating nuisance functions. Pretrained on simulated data with the true parameter as the only label, the Transformer learns the posterior mean and covariance of the queried estimand and hence returns an estimate and a Wald-type confidence region. Theoretically, we prove that, for locally flat pretraining priors of slowly growing complexity, the posterior mean is efficient for every queried estimand. The Transformer inherits this efficiency with asymptotically exact coverage, in probability over evaluation populations and queries, even under distribution shift. We also reveal that the guarantee places much higher demands on pretraining when the data-generating distribution is fixed, as in classical frequentist inference. Experiments on causal inference, partial linear regression, and survival analysis show that the pretrained model generally achieves the lowest estimation error among competing methods, with nearly nominal coverage, at a computational cost of only about 0.02 seconds per dataset.
Create a lesson
Related papers
Semiparametric Efficiency for Entropic Optimal Transport under Structured Distribution Shift
Yiming Ma, Weiwei Zhuang, Hang Liu
Spectral Estimation with Deformed Decompression
Siavash Ameli, Chris van der Heide, Liam Hodgkinson et al.
Bayesian optimization on amortized search space
Tristan Fauvel, Federico Pavone, Titouan Guillou et al.
Exact Bayesian layers via characteristic functions
William H. W. Thompson, Guillaume St-Onge, Laurent Hébert-Dufresne et al.
Flow Matching from Non-Gaussian Sources: A Theory of Efficient Sampling
Yuchen Zhou, Lili Zheng, Yuxin Chen et al.
Conformal Selection for Hierarchical Streaming Data
Zhenyuan Sun, Chengyao Yu, Ruixing Ming et al.