Learning the distance for ABC and localized neural posterior estimation
Published 22 Jun 2026 in stat.CO | (2606.22981v1)
Abstract: Likelihood-free inference methods can perform Bayesian inference when evaluating the likelihood is impractical but simulating synthetic data from the model is feasible. Approximate Bayesian computation (ABC) is a well-established likelihood-free approach that constructs particle posterior approximations by evaluating the similarity between simulated and observed data using a distance function, which is used in rejection or weighting steps. Here we extend previous work on adaptive distance learning for ABC to misspecified time series, while also exploring applications in neural posterior estimation using prior-data fitted networks (NPE-PFN) with localization. The adaptation of the distance that we consider optimizes out-of-sample predictive performance using a scoring rule. We also establish a connection between linear pooling for forecast combination and our posterior estimation methods with randomized distances, showing that empirical estimation of pooling weights can be interpreted as another form of adaptive distance learning. For both ABC algorithms and NPE-PFN methods with localization, adaptive distance learning improves forecasting performance in simulated and real examples.
The paper introduces Bayesian optimization to learn weighted Mahalanobis distances from validation-set predictive scores, improving ABC and NPE-PFN forecasts under model misspecification.
Adaptive distance learning delivers the largest gains for naïve autocovariance summaries, while TabPFN generally outperforms ABC as summary dimensionality increases.
The paper shows that linear opinion pooling is equivalent to ABC with a randomized distance, with pooling performing especially well for auxiliary-model summaries in the simulated study.
Overview and motivation
This paper by Wang and Nott addresses the problem of choosing the distance function in likelihood-free inference (LFI) when the goal is probabilistic forecasting for misspecified time series models. In approximate Bayesian computation (ABC), the distance between simulated and observed summary statistics governs both rejection and weighting steps, yet its specification is typically ad hoc. The authors propose learning the weights of a parametrized ABC distance by directly optimizing out-of-sample predictive performance measured with a scoring rule, using Bayesian optimization to handle noisy, gradient-free objective evaluations. They extend this idea beyond classical ABC to neural posterior estimation with prior-data fitted networks (NPE-PFN) implemented via TabPFNv2, where an ABC-like localization step selects a context set of simulations. A further contribution is a conceptual identification: linear opinion pooling of ABC predictive densities is equivalent to ABC with a randomized choice of distance, so that estimating pooling weights on validation data constitutes another form of adaptive distance learning.
The setting throughout is approximate Bayesian forecasting (ABF) in misspecified state space models (SSMs), building on Frazier et al.'s merging-of-predictives results and Weerasinghe et al.'s focused-prediction framework, where auxiliary-model summaries are constructed from scoring-rule gradients evaluated at an optimal auxiliary parameter value.
where Σ is the prior predictive covariance of the summaries and Ω=diag(ω) holds learnable weights, with one weight fixed at one to remove scale indeterminacy relative to the tolerance h. Data are split into training (y≤T), validation (y≤T), and forecast periods; for candidate weights ω, an ABC posterior is estimated from the training data, one-step-ahead predictive distributions are formed via particle filtering, and the average score q(ω) on the validation set is maximized over ω with Bayesian optimization (BoTorch, expected improvement, 50-point Latin hypercube initialization plus 100 iterations). Because each evaluation requires particle filtering per posterior draw, small numbers of posterior samples (I=100) and particles (Σ0) are used during optimization; BO's tolerance of noisy objectives makes this feasible.
Under misspecification, this procedure deliberately discards information: weights near zero remove irrelevant summaries or those that cannot be matched because of model error. The resulting posteriors need not concentrate asymptotically, which the authors note aligns with predictively oriented (PrO) and predictive variational inference (PVI) posteriors, and avoids plug-in prediction from a point-mass posterior under misspecification.
Extension to NPE-PFN with localization
For NPE-PFN, TabPFNv2 performs amortized in-context Bayesian inference but is limited to context sets of roughly 10,000 points. The paper uses an ABC-type retrieval step: given prior draws Σ1, only the 1,000 simulations closest to the observed summary under Σ2 enter the context set, after which the autoregressive factorization of the joint posterior into univariate conditionals is approximated componentwise by TabPFN. The same BO loop tunes Σ3 against validation scores. This connects distance learning to localization/retrieval ideas in the PFN literature, and complements preconditioned robust NPE approaches for misspecified simulators, though here applied to time series forecasting rather than static inference.
Linear pooling as randomized-distance ABC
Given Σ4 summary statistic choices with fixed distances and tolerances, a linear opinion pool of the resulting predictive densities equals the predictive density obtained from the pooled posterior Σ5. Sampling from this pooled posterior can be implemented as rejection ABC in which the summary/distance pair is drawn randomly at each iteration according to Σ6. Consequently, fitting pooling weights on validation data is adaptive learning of a randomized distance — a connection the authors link to coarsened posteriors with randomized neighborhood sizes (Miller and Dunson) and to pooled LFI posteriors and simulation-based stacking. In practice, pool members are auxiliary-model summaries built under three scoring rules (LS, CLSΣ7, CLSΣ8), sampled via a batch variant of the pooled algorithm. The paper acknowledges known caveats: linear pools are overdispersed relative to their components (which may help if components are overconfident), equal weights are often competitive ("forecast combination puzzle"), and time-varying pooling weights are not considered.
Empirical results
Two stochastic volatility examples are studied, both previously analyzed by Weerasinghe et al., with scores LS, CRPS, interval score, and censored log scores at censoring levels 10–90%.
Simulated misspecified SV model. The true DGP applies a skew-normal probability integral transform (shape Σ9, the most misspecified case) to a Gaussian SV process; training/validation/forecast lengths are 5000/1000/1000. Four findings emerge:
Adaptive distance beats fixed distance across posterior samplers (ABC and TabPFN), lead times, and summary choices.
Gains are largest for naïve autocovariance summaries (e.g., ABC lag-1 log score improves from Ω=diag(ω)0 to Ω=diag(ω)1; negIS from Ω=diag(ω)2 to Ω=diag(ω)3), consistent with diminishing returns when summaries were already constructed for the target scoring rule.
TabPFN tends to outperform ABC for higher-dimensional autocovariance summaries, suggesting PFN-based inference is preferable as summary dimension grows.
Linear pooling is best overall for auxiliary summaries: e.g., with TabPFN at lag 1 it attains LS Ω=diag(ω)4 versus Ω=diag(ω)5 (adaptive) and Ω=diag(ω)6 (fixed); at lag 2 it wins all seven scores.
Real S&P 500 returns with Ω=diag(ω)7-stable SV transitions. Daily close-to-close returns (2516 observations, split 1016/1000/500) are forecast with an SV model whose state innovations follow a heavy-tailed Ω=diag(ω)8-stable law with intractable density. Here ABC and TabPFN perform comparably, adaptive distance again dominates fixed distance (most clearly for autocovariance summaries, e.g., ABC log score Ω=diag(ω)9 vs.\ h0), while linear pooling wins only on the log score and is generally inferior to distance-learning methods on censored scores.
Limitations and open questions
The paper concedes several constraints. Distance learning alone has limited expressiveness compared with more flexible generalized-Bayes constructions, and the authors position it as a component within broader predictively oriented frameworks rather than a complete solution. Combining distance learning with truncated sequential NPE-PFN (TS-NPE-PFN) is flagged as non-obvious and left unexplored. Time-varying pooling weights, more sophisticated forecast combination schemes than linear pools, and PVI-style posteriors extended to SBI following recent work are explicitly deferred. Empirically, results rest on two SV-type settings and modest simulation budgets during weight optimization (h1 posterior draws, h2 particles), so the behavior of the method under heavier computational constraints or other model classes remains open. No theoretical guarantees (e.g., consistency or concentration properties of the learned-distance posterior) are established.
Conclusion
The paper demonstrates that tuning ABC distance weights — and, by extension, NPE-PFN localization distances and linear pooling weights — against a validation-set scoring rule reliably improves probabilistic forecasts in misspecified state space models, with the strongest gains where summaries are not already scoring-rule-adapted. Its main conceptual contributions are the framing of forecast combination as randomized-distance ABC and the integration of tabular foundation models into misspecification-aware ABF pipelines.