Sample-Size Extrapolation in Simulation-Based Inference via Statistical Scaling
Organizations: Department of Statistics, University of Oxford, Oxford, United Kingdom. · Mathematical Institute, University of Oxford, Oxford, United Kingdom.
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.
Figures & tables
Appendix figures & tables23 assets
Supplementary material from the paper’s appendix.
Appendix
| Prior | |
| Simulator | |
| Dimensions | , |
| Center | sample mean |
| Reference posterior | conjugate Gaussian posterior |
| References | Lueckmann et al. (2021) |
| Prior | |
| Simulator | |
| Dimensions | , |
| Center | sample mean |
| Reference posterior | product of truncated normals |
| References | Lueckmann et al. (2021) |
| Prior | |
| Simulator | |
| Dimensions | , |
| Center | ten EM steps from the coordinate-wise median |
| Reference posterior | grid integration, points around the MAP |
| References | Sisson et al. (2007) ; Beaumont et al. (2009) |
| Prior | : , , with , , , otherwise, |
| Simulator | , , , , , frozen input between time bins and : , |
| Dimensions | , |
| Fixed parameters | duration time bins |
| Center | simulator method of moments: damped Gauss–Newton steps matching to the replicate mean |
| Reference posterior | adaptive importance sampling from the Newton MAP |
| References | Lueckmann et al. (2017) ; Gonçalves et al. (2020) |
| Prior | |
| Simulator | , , where , , , , |
| Dimensions | , |
| Center | moment estimator on the branch |
| Reference posterior | importance sampling on a fundamental domain |
| References | Papamakarios et al. (2019) ; Greenberg et al. (2019) ; Hermans et al. (2020) ; Durkan et al. (2020) |
| Prior | |
| Simulator | , where , |
| Dimensions | , |
| Center | moment estimator on the branch |
| Reference posterior | grid integration on a fundamental domain, expanded by the symmetry group |
| References | Greenberg et al. (2019) |
| Prior | , , truncated to (about of prior mass removed; below no epidemic occurs within the horizon, above the peak precedes the first observation and is weakly identified). Inference is in . |
| Simulator | , stored as fractions, where is simulated from |
| Dimensions | , |
| Fixed parameters | population , duration , initial conditions |
| Center | simulator method of moments: coarse grid, then three damped Gauss–Newton steps matching the simulator’s mean output to the replicate mean |
| Reference posterior | grid integration in whitened Laplace coordinates; Gaussian to high accuracy, fitted contraction exponent |
| References | Kermack and McKendrick (1927) |
| Prior | , , , , truncated to parameters for which neither species falls below individuals at any observation time (about of prior mass removed; an effectively extinct species carries no information about its rates). Inference is in log-rate coordinates. |
| Simulator | , stored as log-counts, where are simulated from |
| Dimensions | , |
| Fixed parameters | duration time units, initial conditions |
| Center | simulator method of moments: grid, then four damped Gauss–Newton steps with multi-start |
| Reference posterior | adaptive importance sampling with a Student- proposal at the Gauss–Newton MAP; Gaussian to high accuracy, fitted contraction exponent |
| References | Lotka (1920) |
| C2ST | SD ratio | joint coverage | ||||||||||
| estimator | ||||||||||||
| Gaussian linear | ||||||||||||
| Free-G | 0.57 | 0.61 | 0.75 | 0.89 | 1.02 | 1.09 | 1.24 | 1.41 | 0.96 | 0.97 | 0.97 | 0.86 |
| Scale-G | 0.55 | 0.57 | 0.65 | 0.71 | 1.01 | 1.00 | 1.00 | 1.00 | 0.96 | 0.95 | 0.91 | 0.87 |
| CE-G | 0.51 | 0.51 | 0.55 | 0.57 | 1.00 | 1.00 | 1.03 | 1.06 | 0.96 | 0.96 | 0.96 | 0.97 |
| Free-NSF | 0.55 | 0.58 | 0.72 | 0.87 | 1.01 | 1.06 | 1.26 | 1.53 | 0.96 | 0.98 | 0.99 | 1.00 |
| T1: parameter-dependent support | T2: boundary parameter | |||||||
| method | KL | SD ratio | center err. | C2ST | KL | SD ratio | center err. | C2ST |
| Free-G | 12.27 | 1.09 | 4.72 | 0.92 | 0.12 | 1.00 | 0.59 | 0.61 |
| Scale-G | 1.31 | 2.69 | 2.02 | 0.82 | 0.24 | 0.83 | 0.39 | 0.61 |
| CE-G | 1.11 | 2.71 | 0.54 | 0.78 | 0.10 | 0.81 | 0.18 | 0.58 |
| Free-NSF | 0.65 | 2.02 | 0.87 | 0.70 | 0.17 | 1.02 | 0.52 | 0.61 |
| CE-NSF | 0.49 | 2.82 | 1.81 | 0.68 | 0.18 | 0.84 | 0.24 | 0.59 |
| CE-G | CE-NSF | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| imposed | SD ratio | center err. | cov. 90% | C2ST | KL | SD ratio | center err. | cov. 90% | C2ST | KL |
| (default) | 2.71 | 0.54 | 0.97 | 0.78 | 1.10 | 2.82 | 1.81 | 0.97 | 0.68 | 0.49 |
| (estimated) | 1.40 | 0.25 | 0.91 | 0.72 | 0.67 | 1.42 | 0.59 | 0.92 | 0.59 | 0.14 |
| (oracle ablation) | 0.92 | 0.15 | 0.86 | 0.69 | 0.48 | 0.92 | 0.23 | 0.85 | 0.56 | 0.03 |
| T2, stratum | T3 | T4 | ||||
|---|---|---|---|---|---|---|
| estimator | SD ratio | center err. | cov. 90% | KL | ridge dist. | mode dist. |
| Exact posterior | 1.00 1.00 | 0.00 0.00 | 0.96 0.94 | 0.00 0.00 | – | – |
| Free-G | 0.85 0.74 | 0.19 0.29 | 0.70 0.93 | 0.11 0.11 | 3.4 7.9 | 9.5 21.2 |
| Scale-G | 0.83 0.86 | 0.19 0.61 | 0.53 0.03 | 0.13 0.43 | 3.4 7.9 | 9.5 21.2 |
| CE-G | 0.83 0.79 | 0.19 0.22 | 0.60 0.58 | 0.11 0.16 | 3.4 6.3 | 9.2 12.7 |
| Free-NSF | 1.01 1.14 | 0.03 0.58 | 0.77 0.26 | 0.01 0.23 | 3.4 7.8 | 9.5 21.0 |
| C2ST | MMD | joint coverage | ||||||||||
| estimator | ||||||||||||
| SLCP | ||||||||||||
| Free-G | 0.98 | 0.98 | 0.99 | 0.99 | 0.064 | 0.073 | 0.084 | 0.093 | 0.96 | 0.99 | 0.94 | 0.87 |
| Scale-G | 0.98 | 0.98 | 1.00 | 1.00 | 0.058 | 0.142 | 0.363 | 0.532 | 0.97 | 0.92 | 0.20 | 0.00 |
| CE-G | 0.98 | 0.98 | 0.98 | 0.99 | 0.040 | 0.072 | 0.144 | 0.208 | 0.95 | 0.94 | 0.87 | 0.69 |
| Free-NSF | 0.75 | 0.79 | 0.83 | 0.91 | 0.004 | 0.004 | 0.007 | 0.013 | 0.92 | 0.98 | 0.96 | 0.82 |
| (training boundary) | ( ) | |||||||
| estimator | SD ratio | center err. | cov. | C2ST | SD ratio | center err. | cov. | C2ST |
| Gaussian linear | ||||||||
| Free-G | 1.09 | 0.11 | 0.97 | 0.61 | 1.41 | 0.59 | 0.86 | 0.89 |
| Free-G (best effort) | 1.01 | 0.07 | 0.96 | 0.54 | 0.98 | 0.81 | 0.39 | 0.93 |
| Free-NSF | 1.06 | 0.11 | 0.98 | 0.58 | 1.53 | 0.53 | 1.00 | 0.87 |
| Free-NSF (best effort) | 1.03 | 0.08 | 0.96 | 0.54 | 1.42 | 0.44 | 1.00 | 0.83 |
| C2ST | SD ratio | joint coverage | |||||||||||
| estimator | |||||||||||||
| 20 | Free-G | 0.88 | 0.92 | 0.97 | 0.99 | 2.27 | 3.07 | 4.37 | 7.43 | 0.94 | 0.96 | 0.61 | 0.36 |
| 20 | Scale-G | 0.88 | 0.90 | 0.96 | 0.99 | 2.30 | 2.60 | 3.09 | 4.46 | 0.95 | 0.92 | 0.46 | 0.15 |
| 20 | CE-G | 0.57 | 0.55 | 0.64 | 0.76 | 1.02 | 1.00 | 1.14 | 1.83 | 0.94 | 0.92 | 0.95 | 0.96 |
| 20 | Free-NSF | 0.74 | 0.79 | 0.92 | 0.96 | 1.46 | 1.80 | 2.44 | 3.78 | 0.95 | 0.97 | 0.63 | 0.38 |
| 20 | CE-NSF | 0.55 | 0.53 | 0.61 | 0.75 | 1.47 | 1.26 | 1.77 | 2.40 | 0.94 | 0.93 | 0.93 | 0.70 |
| method | C2ST at | KL at | C2ST at | KL at | cov. at |
|---|---|---|---|---|---|
| Free-G (standardized, tuned) | 0.898 | 2.317 | 0.942 | 2.980 | 0.966 |
| CE-G ( residual) | 0.552 | 0.121 | 0.537 | 0.096 | 0.870 |
| Fixed EM center, free scale | 0.574 | 0.174 | 0.623 | 0.328 | 0.974 |
| Fixed EM center, imposed scale | 0.558 | 0.137 | 0.513 | 0.033 | 0.909 |
| SIR | Lotka–Volterra | |||||||
|---|---|---|---|---|---|---|---|---|
| estimator | ||||||||
| Fixed center, free scale | 0.653 | 0.642 | 0.789 | 0.897 | 0.768 | 0.806 | 0.886 | 0.940 |
| Fixed center, imposed scale | 0.634 | 0.572 | 0.647 | 0.750 | 0.729 | 0.704 | 0.656 | 0.704 |
| CE-G | 0.640 | 0.579 | 0.663 | 0.772 | 0.738 | 0.713 | 0.671 | 0.737 |
| CE-NSF | 0.602 | 0.559 | 0.614 | 0.740 | 0.707 | 0.665 | 0.655 | 0.757 |
| benchmark | imposed rate | true asymptotic rate | estimated |
|---|---|---|---|
| Gaussian linear | |||
| Gaussian linear (uniform) | |||
| Gaussian mixture | |||
| Bernoulli GLM | |||
| SIR | |||
| Lotka–Volterra |
| residual context | KL | SD ratio | 90% cov. | center error | SBC KS | exponent |
|---|---|---|---|---|---|---|
| none |
| C2ST | SD ratio | |||||||
| estimator | ||||||||
| Gaussian linear | ||||||||
| Free-NSF | 0.55 | 0.58 | 0.72 | 0.87 | 1.01 | 1.06 | 1.26 | 1.53 |
| PF-NPSE (Langevin) | 0.56 | 0.57 | 0.57 | 0.62 | 1.11 | 1.12 | 1.03 | 0.98 |
| PF-NPSE (GAUSS) | 0.51 | 0.52 | 0.55 | 0.59 | 0.99 | 0.99 | 1.00 | 0.98 |
| CE-NSF | 0.51 | 0.51 | 0.54 | 0.56 | 1.02 | 1.01 | 0.99 | 0.98 |
| Prior | per kb; growth parameter (raw rate ) |
| Simulator | coalescent tree of under exponential growth (time-changed merging); mutations Poisson on branches, class counts , then , , |
| Dimensions | , |
| Center | simulator method of moments in the Watterson tradition ( Watterson, 1975 ) : the growth rate from the two observed ratios against moment curves precomputed once by simulation, then from the scale ; a grid lookup with quadratic refinement at query time, likelihood-free and contracting at |
| Reference posterior | none: the likelihood is intractable |
| References | Kingman (1982) ; Watterson (1975) |
| rad. | cov. | KS | rad. | cov. | KS | rad. | cov. | KS | rad. | cov. | KS | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Free-G | 1.04 | 0.94 | 0.052 | 0.87 | 0.98 | 0.063 | 0.82 | 1.00 | 0.087 | 0.82 | 0.98 | 0.131 |
| Free-NSF | 0.98 | 0.95 | 0.033 | 0.92 | 0.98 | 0.062 | 0.92 | 0.97 | 0.110 | 1.01 | 0.92 | 0.224 |
| Scale-G | 1.00 | 0.95 | 0.042 | 1.06 | 0.96 | 0.077 | 1.34 | 0.87 | 0.167 | 1.64 | 0.75 | 0.181 |
| CE-G | 0.97 | 0.95 | 0.046 | 0.98 | 0.96 | 0.053 | 1.14 | 0.94 | 0.091 | 1.24 | 0.87 | 0.075 |
| CE-NSF | 1.00 | 0.95 | 0.046 | 0.95 | 0.95 | 0.048 | 1.04 | 0.91 | 0.039 | 1.10 | 0.86 | 0.068 |
| cons. | rad. | energy | cons. | rad. | energy | cons. | rad. | energy | cons. | rad. | energy | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Free-G | 0.79 | 1.32 | 0.162 | 0.81 | 1.32 | 0.132 | 0.77 | 1.32 | 0.094 | 0.66 | 1.59 | 0.085 |
| Free-NSF | 0.80 | 1.28 | 0.158 | 0.79 | 1.52 | 0.123 | 0.72 | 1.63 | 0.090 | 0.58 | 1.92 | 0.077 |
| Scale-G | 0.83 | 1.21 | 0.158 | 0.77 | 1.44 | 0.129 | 0.58 | 1.87 | 0.095 | 0.28 | 2.79 | 0.085 |
| CE-G | 0.83 | 1.23 | 0.153 | 0.81 | 1.32 | 0.122 | 0.85 | 1.22 | 0.087 | 0.83 | 1.23 | 0.079 |
| CE-NSF | 0.83 | 1.18 | 0.160 | 0.83 | 1.28 | 0.121 | 0.86 | 1.22 | 0.088 | 0.85 | 1.28 | 0.082 |
Explore similar work
Mixed neural posterior estimation for simulators with discrete and continuous parameters
sbi Python package.