EuroSciPy 2024

Simulated data is all you need: Bayesian parameter inference for scientific simulators with SBI
2024-08-29 , Room 6

Simulators play a crucial role in scientific research, but accurately determining their parameters to reproduce observed data remains a significant challenge. Classical parameter inference methods often struggle due to the stochastic or black-box nature of these simulators. Simulation-based inference (SBI) offers a solution by enabling Bayesian parameter inference for simulation-based models: It only requires simulated data as input and returns a posterior distribution over suitable model parameters, including uncertainty estimates and parameter interactions. In this talk, we introduce SBI and present sbi, an open source library that serves as a central resource for SBI practitioners and researchers, offering state-of-the-art SBI algorithms, comprehensive documentation and tutorials.


A central challenge with using simulators is identifying parameters that accurately reproduce observed data. When working with complex, possibly stochastic and black-box simulators, parameter inference often amounts to hand tuning, grid-searches or optimization for single best-fitting parameters. These approaches can be inefficient and brittle when working with high-dimensional and noisy simulators.

The Bayesian parameter inference approach overcomes these challenges. It infers a conditional distribution over the simulator parameters given the observed data and a specified parameter prior encoding domain knowledge. The inferred posterior distribution identifies all suitable parameters while quantifying uncertainties and potential parameter correlations. However, classical approximate inference algorithms like e.g. Markov Chain Monte Carlo (MCMC) or variational inference usually cannot be applied to scientific simulators because they require access to the likelihood of the simulator.

The core idea of simulation-based inference (SBI) is to enable Bayesian parameters inference for scientific simulators by requiring only simulated data. To that end, modern SBI methods use neural network-based conditional density estimation (e.g., normalizing flows, diffusion models) to learn to approximate the posterior solely from data. After training, the estimator can be applied to observed data to obtain an approximation to the desired posterior distribution.

Many new SBI methods have been developed in the last years, enabling its applications to a wide range of simulators. However, bringing SBI into application can be challenging for practitioners because of a lack of reliable and approachable software tools. The sbi library aims to close this applicability gap: It implements state-of-the-art SBI algorithms, provides methods for the entire SBI workflow including accuracy checks and plotting, and comes with a comprehensive documentation and detailed tutorials.

sbi is a community project with more than 50 contributors from across Europe. It originated as a research code base at the University of Tübingen and is now maintained by researchers from Tübingen and the appliedAI TransferLab. Contributions are very welcome and hackathons and workshops are organized regularly.


Abstract as a tweet:

Simulated data is all you need! We present SBI, a user-friendly python package that enables Bayesian parameter inference for scientific simulators

Category [Scientific Applications]:

Simulations (e.g., Physics, CFD, ESMs)

Expected audience expertise: Domain:

some

Expected audience expertise: Python:

some

Project Homepage / Git:

https://sbi-dev.github.io/sbi/

Background in Computational Neuroscience
PhD in Machine Learning at University of Tübingen
AI Researcher at appliedAI TransferLab
Maintainer of the SBI package