← all repositories
sbi-dev/sbi

Bayesian inference for simulators that refuse to write down their math

sbi unifies neural likelihood-free methods so you can extract Bayesian posteriors from black-box simulators without deriving a single equation.

850 stars Python ML FrameworksDomain Apps
sbi
Not currently ranked — collecting fresh signals.
star history

What it does

sbi is a Python toolkit for simulation-based inference. You hand it a simulator—some code that stochastically generates data from parameters—and observed data, and it trains neural networks to approximate the full Bayesian posterior over those parameters. It is built for the common scientific scenario where the simulator’s likelihood is known to exist but is impossible or annoying to write down.

The interesting bit

Rather than locking you into one algorithm, sbi bundles amortized methods that reuse a trained estimator across many observations and sequential methods that adaptively optimize the simulation budget for a single observation. It also straddles the line between accessibility and control, offering both high-level APIs for quick experiments and low-level hooks for custom training loops.

Key highlights

  • Implements a broad zoo of neural methods: Neural Posterior Estimation (NPE), Neural Likelihood Estimation (NLE), Neural Ratio Estimation (NRE), Neural Variational Inference (NVI), and mixed approaches like MNLE.
  • Amortized inference lets you train once and evaluate on new observations without re-running costly simulations; sequential methods focus the simulation effort on a specific dataset.
  • Ships with built-in validation and visualization utilities to sanity-check that your inferred posteriors are not just pretty, but accurate.
  • Optional integration with Pyro and PyMC MCMC samplers for hybrid workflows.
  • Backed by NumFOCUS and an active community; the package is a PyTorch-based successor to delfi.

Verdict

If you are a scientist or engineer wrestling with a black-box simulator and need rigorous uncertainty quantification, sbi is likely your fastest route to a publishable posterior. If you can already derive your likelihood in closed form, this toolkit is overkill.

Frequently asked

What is sbi-dev/sbi?
sbi unifies neural likelihood-free methods so you can extract Bayesian posteriors from black-box simulators without deriving a single equation.
Is sbi open source?
Yes — sbi-dev/sbi is open source, released under the Apache-2.0 license.
What language is sbi written in?
sbi-dev/sbi is primarily written in Python.
How popular is sbi?
sbi-dev/sbi has 850 stars on GitHub.
Where can I find sbi?
sbi-dev/sbi is on GitHub at https://github.com/sbi-dev/sbi.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.