arXiv Science⌕ Search

arXiv · 2611.27666

Can pretrained Transformers deliver semiparametrically efficient inference?

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.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Han Yan, Jin Zhu, Chengchun Shi, Tengyao Wang. 2026-11-20. Can pretrained Transformers deliver semiparametrically efficient inference?. https://arxiv.science/abs/2611.27666

Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite arXiv Science by Indiciae: BibTeX · RIS.

KEEP EXPLORING

Related papers

A unifying Bayesian framework for adversarial robustness

The vulnerability of machine learning models to adversarial attacks remains a critical societal security challenge. Yet the defense of Bayesian predictive models has received little attention, even though their attack surface is wider: an adversary may corrupt not only their predictions but also the uncertainty they quantify. Moreover, traditional defenses, such as adversarial training, typically robustify models by minimizing a worst-case loss. These deterministic approaches do not account for uncertainty in the adversary's attack. While stochastic defenses placing a probability distribution on the adversary exist, they often lack statistical rigor and fail to make explicit their underlying assumptions. Our aim is thus twofold: to protect Bayesian predictive models, and to do it in a Bayesian way, explicitly modeling uncertainty about the attacker. To this end, we introduce a formal Bayesian framework for adversarial robustness that captures adversarial uncertainty through a stochastic channel and makes every probabilistic assumption explicit. This yields two robustification strategies that protect the entire posterior predictive distribution: a proactive defense enacted during training, aligned with adversarial training, and a reactive defense enacted during operations, aligned with adversarial purification. Several state-of-the-art defenses can be recovered as limiting cases of the proposed framework. Consistent with this wider attack surface, our experiments assess both accuracy and the quality of predictive uncertainty under attack, and showcase the benefits of explicitly modeling adversarial uncertainty.

stat.ML↗

Learning with the Nash-Sutcliffe loss

Relative measures are often used to evaluate forecasts accross multiple time series because they are interpretable. Among them, the relative mean squared error ($\mathrm{MSE}$), known in positive orientation as the Nash-Sutcliffe efficiency ($\mathrm{NSE}$), is perhaps the most widely applied. We refer to the negatively oriented relative $\mathrm{MSE}$ as the Nash-Sutcliffe loss $L_\mathrm{NS} = 1 - \mathrm{NSE}$ and formulate a statistical decision-theoretic characterization of this loss. Under almost surely nonconstant observations and finite weighted-moment conditions, $L_\mathrm{NS}$ is strictly consistent for a multi-dimensional realization-weighted component-wise expectation, referred to as the Nash-Sutcliffe functional. Because the weight depends inversely on within-series spread, this functional generally differs from the component-wise expectation elicited by multi-dimensional squared error loss. As time series length (dimension) increases, we show under weighted inverse-spread concentration that $L_\mathrm{NS}$ converges in expectation to a constant multiple of average squared error on forecasts of bounded average squared norm, while coordinate-covariance or mean-norm conditions make fixed-coordinate differences or the average squared difference vanish, respectively. Supporting results include the construction of a strict identification function for the Nash-Sutcliffe functional, strongly consistent location \emph{M}-estimation under $L_\mathrm{NS}$, equality conditions (including central symmetry about a constant vector), and truncated distribution families satisfying the domain and moment assumptions of $L_\mathrm{NS}$.

stat.ML↗

Beyond Augmented-Action Surrogates for Multi-Expert Learning-to-Defer

A learning-to-defer (L2D) system decides, for each input, whether to predict on its own or defer to one of several experts. A widely used recipe trains the classifier and the router jointly by treating the $K$ classes and $J$ experts as competing actions in one shared $(K{+}J)$-action geometry. We analyze the population targets and optimization geometry of five representative surrogates and identify target distortion, gradient amplification, winner-take-all starvation, set-mass collapse, and class--expert coupling, which can persist alongside statistical consistency; shared competition and local overlap amplification also persist beyond log-softmax. We depart from the augmented-action formulation with a \emph{decoupled surrogate}, which pairs a softmax classifier head with an independent sigmoid head for each expert. Its population minimizer recovers the class posterior and expert utilities exactly, its coordinatewise expert updates avoid overlap amplification and starvation, and its mixed head Hessian block is zero even with a shared representation. We prove an excess-risk bound with calibration constant $\max\{\sqrt{2},\sqrt{2J/λ}\}$, which does not depend on the number of experts at fixed per-expert weight. In synthetic studies the decoupled surrogate preserves rare specialists, on CIFAR-10, CIFAR-10H, Covertype, and Fashion-MNIST it preserves classifier quality, and Fashion-MNIST ablations favor it over additive cross-entropy in all $36$ matched comparisons across head layouts and trunk choices. With disjoint networks, the same objective also supports two-stage training.

stat.ML↗