Towards Reliable Simulation-Based Inference with Balanced Neural Ratio Estimation

Arnaud Delaunoy, Joeri Hermans, François Rozet, Antoine Wehenkel, Gilles Louppe

Introduction

Simulation-Based Inference (SBI) is a powerful tool for scientific discovery, enabling researchers to estimate parameters for complex models where explicit mathematical likelihoods are unavailable. However, SBI often produces "overconfident" results, which can lead researchers to wrongly exclude true physical parameters. This paper introduces Balanced Neural Ratio Estimation (BNRE), a simple yet effective modification to standard algorithms that ensures posterior estimates remain "conservative" (safer) when simulation budgets are low, without adding any computational overhead.

The Problem: Overconfidence in SBI

In many scientific fields—from particle physics to epidemiology—researchers rely on complex computer simulators. SBI uses deep learning to bridge the gap between these simulators and observational data, allowing us to estimate the posterior distribution of parameters.

Despite its utility, there is a reliability crisis in SBI. Current methods, like Neural Ratio Estimation (NRE), often produce overconfident posteriors. In practice, this means the algorithm might tell a scientist that a certain parameter value is impossible, even when it is actually the ground truth. In the "hard" sciences, being slightly too uncertain (conservative) is far better than being precisely wrong (overconfident). The goal is to ensure that when an algorithm provides a 95% confidence interval, the true value actually falls within that interval at least 95% of the time.

Methods: Balanced Neural Ratio Estimation

The authors build upon standard Neural Ratio Estimation (NRE), which works by training a binary classifier to distinguish between "real" pairs (parameters and their simulated outcomes) and "random" pairs. The classifier's output is then mathematically transformed into a posterior distribution.

The core innovation of this work is Balanced Neural Ratio Estimation (BNRE). The authors identify a "balancing condition" that the mathematically optimal classifier should satisfy, and they turn this condition into a regularization penalty added to the standard cross-entropy loss function:

  1. The Balancing Condition: It enforces that the expected prediction of the classifier on "real" data plus its expected prediction on "random" data equals exactly one.
  2. Regularization: A hyperparameter $\lambda$ (defaulting to 100) is introduced to control how strictly this balance is enforced during training.
  3. Implementation: BNRE acts as a "drop-in" replacement for NRE. It requires no changes to the underlying neural network architecture and introduces zero additional computational cost during inference.

Experimental Setup

The authors evaluated BNRE across a diverse suite of six benchmarks representing real-world scientific challenges:

  • SLCP: A toy task with a complex, non-linear relationship between parameters and data.
  • Weinberg: A problem from particle physics (electroweak physics).
  • Spatial SIR: An epidemiological model for disease spread.
  • M/G/1: A stochastic queueing model.
  • Lotka Volterra: A classic population dynamics model (predator-prey).
  • Gravitational Waves: An astronomy task involving the detection of binary black hole mergers.

Key Insights and Results

The "Safe" Side of Uncertainty The authors prove theoretically that a "balanced" classifier tends to be less confident than the optimal one. When the model is uncertain (e.g., due to a small simulation budget), it defaults to a wider, more conservative posterior rather than a narrow, overconfident one. Crucially, the Bayes optimal solution is itself balanced. As the number of simulations increases, BNRE converges to the exact same correct posterior as standard NRE, but it approaches that truth from the "safe" side.

Consistent Coverage In "Expected Coverage" plots, a perfectly calibrated estimator follows the diagonal line. Curves dipping below the diagonal indicate overconfidence. As shown below, standard NRE frequently dips below the diagonal, particularly at lower simulation budgets. In contrast, BNRE consistently stays at or above the diagonal across all benchmarks, indicating a safer, conservative posterior.

Expected coverage across benchmarks for NRE and BNRE.

Coverage AUC To summarize this behavior, the authors introduce "Coverage AUC," which measures the area between the expected coverage curve and the diagonal. Positive values indicate conservative estimates, while negative values indicate overconfidence. While NRE's AUC fluctuates into negative territory, BNRE’s AUC remains strictly positive across all simulation budgets, proving its reliability.

Coverage AUC metric and its performance across simulation budgets.

Robustness to $\lambda$ While the choice of the hyperparameter $\lambda$ matters, the authors found that a value of 100 worked well across all tested domains, making it a robust default for practitioners.

Limitations and Future Work

There is a slight trade-off with BNRE: it produces lower "information gain" (wider distributions) at low simulation budgets compared to NRE. However, this trades off potentially false precision for guaranteed reliability.

Additionally, the theoretical guarantees for BNRE hold "in expectation" (on average over many possible observations) and do not strictly guarantee that every single individual inference will be conservative. Evaluating "coverage" currently requires calculating the posterior on a grid, which becomes computationally impossible in very high-dimensional parameter spaces. Future work may explore extending this balancing condition to other SBI branches, such as Neural Posterior Estimation (NPE), which targets the posterior directly.

Summary updated

BibTeX
@inproceedings{delaunoy2022towards,
  author = {Arnaud Delaunoy and Joeri Hermans and François Rozet and Antoine Wehenkel and Gilles Louppe},
  title = {{Towards Reliable Simulation-Based Inference with Balanced Neural Ratio Estimation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=yObHA2As_s},
}
Figure