Benchmarking Simulation-Based Inference

Jan-Matthis Lueckmann, Jan Boelts, David S. Greenberg, Pedro J. Gonçalves, Jakob H. Macke

Abstract

Recent advances in probabilistic modelling have led to a large number of simulation-based inference algorithms which do not require numerical evaluation of likelihoods. However, a public benchmark with appropriate performance metrics for such ’likelihood-free’ algorithms has been lacking. This has made it difficult to compare algorithms and identify their strengths and weaknesses. We set out to fill this gap: We provide a benchmark with inference tasks and suitable performance metrics, with an initial selection of algorithms including recent approaches employing neural networks and classical Approximate Bayesian Computation methods. We found that the choice of performance metric is critical, that even state-of-the-art algorithms have substantial room for improvement, and that sequential estimation improves sample efficiency. Neural network-based approaches generally exhibit better performance, but there is no uniformly best algorithm. We provide practical advice and highlight the potential of the benchmark to diagnose problems and improve algorithms. The results can be explored interactively on a companion website. All code is open source, making it possible to contribute further benchmark tasks and inference algorithms.

Introduction

In many scientific fields—from epidemiology to cosmology—researchers use complex computer simulations to model stochastic processes. Often, these simulators are "black-box," meaning we can run them to see outcomes but cannot easily calculate the mathematical probability (the likelihood) of a specific observation given a set of parameters. Simulation-Based Inference (SBI), also known as "likelihood-free inference," aims to solve this by identifying model parameters consistent with observed data using only simulation outputs. While many new SBI algorithms have emerged, the field has lacked a common yardstick for comparison. This paper fills that gap with a standardized benchmarking suite.

Methods and Framework

The authors established a framework consisting of three pillars: algorithms, metrics, and tasks.

Algorithmic Families

They implemented and compared four major families of SBI, including both classical and modern neural-network versions:

  • Approximate Bayesian Computation (ABC): The traditional rejection-sampling approach (REJ-ABC and SMC-ABC).
  • Neural Likelihood Estimation (NLE/SNLE): Learning an emulator of the simulator's likelihood.
  • Neural Posterior Estimation (NPE/SNPE): Directly learning the mapping from data to the parameter distribution.
  • Neural Ratio Estimation (NRE/SNRE): Using classifiers to estimate the ratio between joint and marginal distributions.
Comparison of the four main algorithmic families in simulation-based inference: Monte Carlo ABC, Likelihood Estimation, Posterior Estimation, and Ratio Estimation.

Performance Metrics

The study evaluates several ways to measure "closeness" to ground truth. Crucially, they advocate for the Classifier 2-Sample Test (C2ST). In C2ST, a neural network tries to distinguish between samples from the "true" posterior and the "estimated" posterior. If the classifier cannot tell them apart (accuracy near 0.5), the inference is considered successful.

Benchmark Tasks

The authors curated 10 inference tasks where "ground-truth" posteriors could be calculated (e.g., via expensive MCMC). These include statistical toy problems like "Two Moons," applied science models like the SIR epidemiological model, and "distractor" tasks with high-dimensional noisy variables.

Key Results

Metric Choice and Sample Efficiency

Common metrics like Median Distance (MEDDIST) or Maximum Mean Discrepancy (MMD) can be misleading or sensitive to hyperparameters. C2ST emerged as the most robust and interpretable metric. Furthermore, sequential algorithms (like SNPE or SNLE), which adaptively choose simulations based on previous results, significantly improve sample efficiency when simulation budgets are tight.

Performance comparison on the 'Two Moons' task across three metrics (C2ST, MMD², MEDDIST) for various simulation budgets.

Neural vs. Classical Performance

Neural-network-based methods consistently outperformed classical ABC methods for small-to-moderate simulation budgets. On the "Two Moons" task, sequential neural methods achieved near-perfect C2ST scores (0.5) with $10^5$ simulations, while classical REJ-ABC remained significantly less accurate. However, there is no "silver bullet"; the best algorithm often depends on the specific geometry of the task's posterior.

Conclusion

The benchmark reveals that while modern neural methods are powerful, even state-of-the-art algorithms have room for improvement. Several complex tasks remained "unsolved" by all tested algorithms. The project is hosted as an open-source framework (sbibm), encouraging the community to contribute new tasks and algorithms to keep the benchmark evolving.

Summary updated

BibTeX
@inproceedings{lueckmann2021benchmarking,
  author = {Jan-Matthis Lueckmann and Jan Boelts and David S. Greenberg and Pedro J. Gonçalves and Jakob H. Macke},
  title = {{Benchmarking Simulation-Based Inference}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2021},
  url = {https://openreview.net/forum?id=CI1dnr_g4zW},
}
Figure