arXiv:2610.16820stat.MLOct 2026

Manuscript Offprint

arXiv:2610.16820

Sample-Size Extrapolation in Simulation-Based Inference via Statistical Scaling

Shiyi Sun, Lei Fang, Geoff K Nicholls

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

In simulation-based inference (SBI), neural posterior estimators trained on a bounded range of sample sizes can become inaccurate on larger datasets because their parameterizations do not specify how posterior location, uncertainty and shape must change as observations accumulate. We propose center-estimated NPE (CE-NPE), which combines a statistical center with an explicit contraction rate and learns a local center correction and residual densities in posterior-scale coordinates. The center is a statistical estimate, such as a closed-form statistic or a simulator-based moment match, which does not require an evaluable likelihood. Our analysis explains how contraction amplifies center error and decomposes Gaussian posterior error into shape, mean and covariance contributions. On six regular benchmarks, CE-NPE gives the best reference-posterior agreement of all tested amortized estimators at every out-of-range size, up to five times the largest training size, without retraining; it also fits better within the training range on most of them. Matched controls and nonregular examples characterize the scope of these gains and identify the conditions on which they depend: an appropriate contraction rate, an accurate center, and a stable residual representation.

1 INTRODUCTION

Simulation-based inference (SBI) targets models whose likelihood cannot be evaluated but which can be simulated (Cranmer et al., 2020). Neural posterior estimation (NPE), its most direct form, amortizes Bayesian inference by learning a conditional density from simulations and reusing it on new datasets (Papamakarios & Murray, 2016; Greenberg et al., 2019; Lueckmann et al., 2021). In deployment, however, the estimator may be asked to condition on n observations when n exceeds every sample size seen during training. Permutation-invariant encoders such as Deep Sets accommodate this change in cardinality (Zaheer et al., 2017), but the posterior must also change its location, width and shape as evidence accumulates, and providing the network with n as an input (Radev et al., 2022; Habermann et al., 2025; Mittal et al., 2025) leaves these relationships to be learned over a bounded training range. Accepting arbitrary dataset sizes is therefore an architectural property, whereas extrapolating posterior uncertainty is a statistical one. We ask how posterior estimators trained on small datasets can extend to larger sample sizes without retraining.

Statistical asymptotics describe how a posterior should change with nn, and therefore supply structure for this problem. Under regularity conditions, the Bernstein–von Mises theorem describes an approximately Gaussian posterior with width of order n−1/2n^{-1/2} after appropriate centering (van der Vaart, 1998, Ch. 10). More generally, a justified contraction rate n−αn^{-\alpha}, which nonregular models can change (Bochkina & Green, 2014), suggests learning in local coordinates nα(θ−cn)n^{\alpha}(\theta - c_n). Working in these coordinates removes the need for the network to infer the leading contraction rate from the training range, but it makes center accuracy critical: a location error δn\delta_n becomes a shift nαδnn^{\alpha}\delta_n in those coordinates, so a small fixed bias can become large relative to posterior uncertainty. Moreover, even a center that contracts at the correct rate leaves errors in covariance and residual shape, so scaling alone does not ensure calibrated inference.

We propose center-estimated NPE (CE-NPE), which anchors the posterior at a statistical estimator cstat(x1:n)c_{\mathrm{stat}}(x_{1:n}) and learns only a correction, multiplied by n−αn^{-\alpha}. This design places the learned adjustment

1^{1}Department of Statistics, University of Oxford, Oxford, United Kingdom. 2^{2}Mathematical Institute, University of Oxford, Oxford, United Kingdom. Correspondence to: Shiyi Sun shiyi.sun@spc.ox.ac.uk.

Figure

Figure 1: Progressively removing what the network must extrapolate. All three constructions share a permutation-invariant encoder and differ in which ingredients of the local coordinates zn=nα(θ−cn)z_n = n^\alpha(\theta - c_n) are learned from the bounded training range and which are imposed: (i) free conditioning learns scale, center, and shape; (ii) structural scaling imposes the scale; (iii) CE-NPE additionally anchors the center at a statistical estimator.

on the posterior's contraction scale and thereby reduces what must be extrapolated in parameter space; because it supplies structure that would otherwise have to be learned from simulations, it can also improve fitting within the training range. The anchor can be a closed-form statistic or a simulator-based moment estimate, so it does not require an evaluable likelihood, and the network still learns uncertainty, dependence and residual shape. Figure 1 relates CE-NPE to free conditioning and to structural scaling with a learned center, which serves as an intermediate ablation.

Our experiments examine both the benefit of this parameterization and its source: six adapted regular benchmarks test reference-posterior agreement beyond the training range, matched-center controls assess what scaling adds beyond the statistical estimator, best-effort baselines assess sensitivity to training effort, and nonregular examples test the assumptions behind the local representation. Throughout, we report in-range performance alongside extrapolation results, separating errors already present within the training range from those that arise beyond it.

References (28)