Minimum Distance Summaries for Robust Neural Posterior Estimation
Abstract
Simulation-based inference (SBI) enables amortized Bayesian inference by first training a neural posterior estimator (NPE) on prior-simulator pairs, typically through low-dimensional summary statistics, which can then be cheaply reused for fast inference by querying it on new test observations. Because NPE is estimated under the training data distribution, it is susceptible to misspecification when observations deviate from the training distribution. Many robust SBI approaches address this by modifying NPE training or introducing error models, coupling robustness to the inference network and compromising amortization and modularity. We introduce minimum-distance summaries, a post-hoc robust NPE method that adapts queried test-time summaries independently of the pretrained NPE. Leveraging the maximum mean discrepancy (MMD) as a distance between observed data and a summary-conditional predictive distribution, the adapted summary displays strong robustness properties due to the robustness of the MMD. We demonstrate that the algorithm can be implemented efficiently with random Fourier feature approximations, yielding a lightweight, model-free test-time adaptation procedure. We provide theoretical guarantees for the robustness of our algorithm and empirically evaluate it on a range of synthetic and real-world tasks, demonstrating substantial robustness gains compared with existing robust SBI methods with minimal additional overhead.
Lay Summary
In many scientific settings, simulation models are used to analyze systems where the goal is to use observed data to recover underlying parameters, such as transmission rates of a disease. Simulation-based inference trains neural networks on simulated data, which can then be used on real observations to quickly estimate parameters for these observations. However, these methods can be unreliable when real observations differ from the simulated data, for example because of outliers or limitations in the simulation model. Existing robust approaches often address this issue by retraining or modifying the neural network, making them expensive and inflexible. We propose minimum-distance summaries, a post-hoc method that improves robustness after the neural network has already been trained. Instead of modifying the neural network, our method adjusts its inputs, which are compact summaries of the full observations. These summaries are chosen by matching simulated predictions to real observations using a robust distance. This provides a lightweight way to make simulation-based inference more reliable on real data, while preserving its speed and flexibility.