Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

Antoine Wehenkel, Juan L. Gamella, Ozan Sener, Jens Behrmann, Guillermo Sapiro, Jörn-Henrik Jacobsen, Marco Cuturi

TL;DR

Simulation-based inference (SBI) is a powerful tool for parameter estimation, but it fails spectacularly when the simulator doesn't perfectly match reality—a issue known as model misspecification. This paper introduces RoPE (Robust Posterior Estimation), a framework that salvages misspecified simulators by using a small set of real-world calibration data and optimal transport to map out the "reality gap," delivering reliable and well-calibrated uncertainty estimates.

What Problem Does This Paper Address?

In fields ranging from epidemiology to aerospace, scientists use complex stochastic simulators to model real-world systems. When we want to infer the hidden parameters ($\theta$) that caused a specific observation ($x$), we turn to Simulation-Based Inference (SBI). Since these simulators lack a tractable likelihood function, standard SBI methods like Neural Posterior Estimation (NPE) train neural networks on simulated data to learn the mapping from observations to parameters.

However, there is a catch: all models are wrong. Simulators are simplified approximations of reality. When a simulator is misspecified (e.g., omitting friction in a physics engine or ignoring structural variations in human anatomy), standard SBI methods become dangerously overconfident, yielding highly inaccurate and uncalibrated posterior distributions.

The authors address a common practical scenario: you have a high-fidelity but imperfect simulator, plenty of simulated data, and a very small calibration dataset consisting of real-world observations paired with their true, ground-truth parameters. How can we use this tiny sliver of real-world data to correct the systematic errors of a massive simulator?

Methods

The authors propose Robust Posterior Estimation (RoPE), which treats the discrepancy between simulation and reality as an Optimal Transport (OT) problem.

[Simulated Data] ---> Train NPE ---> Neural Statistic Estimator (NSE)
                                              |
                                     (Fine-tune on Calibration Set)
                                              v
[Real Test Data]  -----------------> [Optimal Transport Coupling] ---> Final Calibrated Posterior

The RoPE pipeline operates in four main steps:

  1. Base Training: Train a standard NPE model on purely simulated data. This yields a Normalizing Flow posterior and a Neural Statistic Estimator (NSE), which compresses raw observations into low-dimensional sufficient statistics.
  2. Representation Alignment: Fine-tune the NSE using the small real-world calibration set. This step forces the network to map both real-world and simulated observations into a shared feature space where identical physical parameters sit close together.
  3. Optimal Transport Coupling: At inference time, RoPE solves a discrete, semi-balanced, entropy-regularized optimal transport problem to map real-world test observations to simulated observations in the shared feature space.
  4. Posterior Mixture: The final real-world posterior is computed as a mixture of the simulated posteriors, weighted by the probabilities derived from the OT coupling matrix.

By utilizing unbalanced optimal transport ($\text{RoPE}^*$), the model can flexibly discard simulated data that has no real-world counterpart, providing robust protection against poorly specified prior distributions.

Datasets

The authors evaluated RoPE across four synthetic benchmarks and two challenging real-world physical datasets:

  • Task A (Synthetic - CS): Cancer and Stromal cell development model, misspecified by selectively removing simulated cells.
  • Task B (Synthetic - SIR): A stochastic epidemic model where misspecification introduces weekend reporting delays.
  • Task C (Synthetic - Pendulum): Inferring the frequency and amplitude of a pendulum where the simulator is frictionless but the "real" data includes damping.
  • Task D (Synthetic - Hemodynamics): Inferring cardiovascular properties (stroke volume and ejection time) from blood pressure waveforms, where the simulator incorrectly assumes all blood vessels are of equal length.
  • Task E & F (Real-world - Light Tunnel & Wind Tunnel): Sourced from the Causal Chambers project, these datasets feature real physical systems (images of a light tunnel with polarizers and pressure curves from a wind tunnel) paired with an intentional, simplified baseline physical simulator.

Key Insights and Ideas

  • The Power of the Information Bottleneck: RoPE relies on a conditional independence assumption: given a simulated observation, the real observation provides no additional information about the true parameters ($x_o \perp \theta \mid x_s$). While this acts as an information bottleneck, it serves as a powerful regularizer, preventing the model from overfitting to the tiny calibration set and ensuring predictions remain anchored to the simulator's core physics.
  • Self-Calibration by Design: The authors mathematically prove that under balanced optimal transport, the marginal posterior naturally converges back to the prior distribution as the number of simulations approaches infinity. This prevents the model from generating arbitrary, overconfident guesses.
  • Hyperparameter Knobs for Uncertainty: The entropic regularization parameter ($\gamma$) acts as a direct control mechanism. High values of $\gamma$ push the transport matrix toward a uniform distribution (reverting safely to the prior), while lower values allow for sharper, more informative posteriors.

Key Results

The framework was evaluated using Log-Posterior Probability (LPP, where higher is better) and Average Coverage AUC (ACAUC, where closer to zero indicates perfect calibration).

  • Outperformance on Small Budgets: With as few as 10 to 50 real-world calibration samples, RoPE consistently delivered well-calibrated posteriors, whereas standard supervised baselines (like MLPs) or joint training approaches (J-NPE) suffered from extreme overconfidence.
  • Robustness to Waveform and Physical Mismatch: As shown in the Hemodynamics task, RoPE maintained a stable, near-zero ACAUC across all calibration sizes, successfully adjusting for the structural simulator errors that caused standard NPE to fail.
Quantitative results for Task D (Hemodynamics), demonstrating RoPE's superior calibration (ACAUC near 0) and high log-posterior probability compared to baselines across various calibration set sizes.
Quantitative results for Task C (Pendulum), showing how RoPE maintains stable performance even when fully supervised methods (MLP) collapse under low data regimes.

Limitations and Future Work

  • The Curse of Dimensionality: As the parameter space ($\theta$) grows, learning the complex dependencies within the NSE becomes significantly harder, meaning a small calibration set may no longer suffice.
  • Non-i.i.d. Calibration Data: RoPE assumes your calibration samples match the test distribution. If the calibration data is heavily biased or has disjoint support from the real test data, the optimal transport mapping will degrade, causing the model to revert safely but uninformatively back to the prior.
  • Noisy Labels: The current framework requires clean ground-truth parameter pairings in the calibration set, which can be expensive or difficult to obtain in certain industrial settings.

Summary updated

Abstract

Driven by steady progress in deep generative modeling, simulation-based inference (SBI) has emerged as the workhorse for inferring the parameters of stochastic simulators. However, recent work has demonstrated that model misspecification can compromise the reliability of SBI, preventing its adoption in important applications where only misspecified simulators are available. This work introduces robust posterior estimation~(RoPE), a framework that overcomes model misspecification with a small real-world calibration set of ground-truth parameter measurements. We formalize the misspecification gap as the solution of an optimal transport~(OT) problem between learned representations of real-world and simulated observations, allowing RoPE to learn a model of the misspecification without placing additional assumptions on its nature. RoPE demonstrates how OT and a calibration set provide a controllable balance between calibrated uncertainty and informative inference, even under severely misspecified simulators. Results on four synthetic tasks and two real-world problems with ground-truth labels demonstrate that RoPE outperforms baselines and consistently returns informative and calibrated credible intervals.
BibTeX
@inproceedings{wehenkel2025addressing,
  author = {Antoine Wehenkel and Juan L. Gamella and Ozan Sener and Jens Behrmann and Guillermo Sapiro and Jörn-Henrik Jacobsen and Marco Cuturi},
  title = {{Addressing Misspecification in Simulation-based Inference through Data-driven Calibration}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=y3d4Bs2r7r},
}
Figure