sbi reloaded
sbi reloaded: a toolkit for simulation-based inference workflows - Published in JOSS (2025)
Science Score: 100.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 12 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: arxiv.org, joss.theoj.org, zenodo.org -
✓Committers with academic emails
7 of 79 committers (8.9%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Keywords from Contributors
Repository
sbi is a Python package for simulation-based inference, designed to meet the needs of both researchers and practitioners. Whether you need fine-grained control or an easy-to-use interface, sbi has you covered.
Basic Info
- Host: GitHub
- Owner: sbi-dev
- License: apache-2.0
- Language: Python
- Default Branch: main
- Homepage: https://sbi.readthedocs.io/en/latest/
- Size: 113 MB
Statistics
- Stars: 721
- Watchers: 21
- Forks: 196
- Open Issues: 86
- Releases: 35
Topics
Metadata Files
README.md
sbi: Simulation-Based Inference
Getting Started | Documentation | Discord Server
sbi is a Python package for simulation-based inference, designed to meet the needs of
both researchers and practitioners. Whether you need fine-grained control or an
easy-to-use interface, sbi has you covered.
With sbi, you can perform parameter inference using Bayesian inference: Given a
simulator that models a real-world process, SBI estimates the full posterior
distribution over the simulator’s parameters based on observed data. This distribution
indicates the most likely parameter values while additionally quantifying uncertainty
and revealing potential interactions between parameters.
Key Features of sbi
sbi offers a blend of flexibility and ease of use:
- Low-Level Interfaces: For those who require maximum control over the inference
process,
sbiprovides low-level interfaces that allow you to fine-tune many aspects of your workflow. - High-Level Interfaces: If you prefer simplicity and efficiency,
sbialso offers high-level interfaces that enable quick and easy implementation of complex inference tasks.
In addition, sbi supports a wide range of state-of-the-art inference algorithms (see
below for a list of implemented methods):
- Amortized Methods: These methods enable the reuse of posterior estimators across multiple observations without the need to retrain.
- Sequential Methods: These methods focus on individual observations, optimizing the number of simulations required.
Beyond inference, sbi also provides:
- Validation Tools: Built-in methods to validate and verify the accuracy of your inferred posteriors.
- Plotting and Analysis Tools: Comprehensive functions for visualizing and analyzing results, helping you interpret the posterior distributions with ease.
Getting started with sbi is straightforward, requiring only a few lines of code:
```python from sbi.inference import NPE
Given: parameters theta and corresponding simulations x
inference = NPE(prior=prior) inference.appendsimulations(theta, x).train() posterior = inference.buildposterior() ```
Installation
sbi requires Python 3.10 or higher. While a GPU isn't necessary, it can improve
performance in some cases. We recommend using a virtual environment with
conda for an easy setup.
If conda is installed on the system, an environment for installing sbi can be created as follows:
bash
conda create -n sbi_env python=3.10 && conda activate sbi_env
From PyPI
To install sbi from PyPI run
bash
python -m pip install sbi
From conda-forge
To install and add sbi to a project with pixi, from the project directory run
bash
pixi add sbi
and to install into a particular conda environment with conda, in the activated environment run
bash
conda install --channel conda-forge sbi
If uv is installed on the system, an environment for installing sbi can be created as follows:
bash
uv venv -p 3.10
Then activate the virtual enviroment by running:
For
macOSorLinuxusersbash source .venv/bin/activateFor
Windowsusersbash .venv\Scripts\activate
To install sbi run
bash
uv add sbi
Testing the installation
Open a Python prompt and run
python
from sbi.examples.minimal import simple
posterior = simple()
print(posterior)
Tutorials
If you're new to sbi, we recommend starting with our Getting
Started tutorial.
You can also access and run these tutorials directly in your browser by opening
Codespace. To do so, click the green
“Code” button on the GitHub repository and select “Open with Codespaces.” This provides
a fully functional environment where you can explore sbi through Jupyter notebooks.
Inference Algorithms
The following inference algorithms are currently available. You can find instructions on how to run each of these methods here.
Neural Posterior Estimation: amortized (NPE) and sequential (SNPE)
(S)NPE_A(including amortized single-roundNPE) from Papamakarios G and Murray I Fast ε-free Inference of Simulation Models with Bayesian Conditional Density Estimation (NeurIPS 2016).(S)NPE_Bfrom Lueckmann JM, Goncalves P, Bassetto G, Öcal K, Nonnenmacher M, and Macke J Flexible statistical inference for mechanistic models of neural dynamics (NeurIPS 2017).(S)NPE_CorAPTfrom Greenberg D, Nonnenmacher M, and Macke J Automatic Posterior Transformation for likelihood-free inference (ICML 2019).TSNPEfrom Deistler M, Goncalves P, and Macke J Truncated proposals for scalable and hassle-free simulation-based inference (NeurIPS 2022).FMPEfrom Wildberger, J., Dax, M., Buchholz, S., Green, S., Macke, J. H., & Schölkopf, B. Flow matching for scalable simulation-based inference. (NeurIPS 2023).NPSEfrom Geffner, T., Papamakarios, G., & Mnih, A. Compositional score modeling for simulation-based inference. (ICML 2023)
Neural Likelihood Estimation: amortized (NLE) and sequential (SNLE)
(S)NLEor justSNLfrom Papamakarios G, Sterrat DC and Murray I Sequential Neural Likelihood (AISTATS 2019).
Neural Ratio Estimation: amortized (NRE) and sequential (SNRE)
(S)NRE_AorAALRfrom Hermans J, Begy V, and Louppe G. Likelihood-free Inference with Amortized Approximate Likelihood Ratios (ICML 2020).(S)NRE_BorSREfrom Durkan C, Murray I, and Papamakarios G. On Contrastive Learning for Likelihood-free Inference (ICML 2020).(S)NRE_CorNRE-Cfrom Miller BK, Weniger C, Forré P. Contrastive Neural Ratio Estimation (NeurIPS 2022).BNREfrom Delaunoy A, Hermans J, Rozet F, Wehenkel A, and Louppe G. Towards Reliable Simulation-Based Inference with Balanced Neural Ratio Estimation (NeurIPS 2022).
Neural Variational Inference, amortized (NVI) and sequential (SNVI)
SNVIfrom Glöckler M, Deistler M, Macke J, Variational methods for simulation-based inference (ICLR 2022).
Mixed Neural Likelihood Estimation (MNLE)
MNLEfrom Boelts J, Lueckmann JM, Gao R, Macke J, Flexible and efficient simulation-based inference for models of decision-making (eLife 2022).
Feedback and Contributions
We welcome any feedback on how sbi is working for your inference problems (see
Discussions) and are happy to receive bug
reports, pull requests, and other feedback (see
contribute). We wish to maintain a
positive and respectful community; please read our Code of
Conduct.
Acknowledgments
sbi is the successor (using PyTorch) of the
delfi package. It started as a fork of Conor M.
Durkan's lfi. sbi runs as a community project. See also
credits.
Support
sbi has been supported by the German Federal Ministry of Education and Research (BMBF)
through project ADIMEM (FKZ 01IS18052 A-D), project SiMaLeSAM (FKZ 01IS21055A) and the
Tübingen AI Center (FKZ 01IS18039A). Since 2024, sbi is supported by the appliedAI
Institute for Europe, and by NumFOCUS.
License
Apache License Version 2.0 (Apache-2.0)
Citation
The sbi package has grown and improved significantly since its initial release, with
contributions from a large and diverse community. To reflect these developments and the
expanded functionality, we published an updated JOSS
paper. We encourage you to cite this
newer version as the primary reference:
latex
@article{BoeltsDeistler_sbi_2025,
doi = {10.21105/joss.07754},
url = {https://doi.org/10.21105/joss.07754},
year = {2025},
publisher = {The Open Journal},
volume = {10},
number = {108},
pages = {7754},
author = {Jan Boelts and Michael Deistler and Manuel Gloeckler and Álvaro Tejero-Cantero and Jan-Matthis Lueckmann and Guy Moss and Peter Steinbach and Thomas Moreau and Fabio Muratore and Julia Linhart and Conor Durkan and Julius Vetter and Benjamin Kurt Miller and Maternus Herold and Abolfazl Ziaeemehr and Matthijs Pals and Theo Gruner and Sebastian Bischoff and Nastya Krouglova and Richard Gao and Janne K. Lappalainen and Bálint Mucsányi and Felix Pei and Auguste Schulz and Zinovia Stefanidi and Pedro Rodrigues and Cornelius Schröder and Faried Abu Zaid and Jonas Beck and Jaivardhan Kapoor and David S. Greenberg and Pedro J. Gonçalves and Jakob H. Macke},
title = {sbi reloaded: a toolkit for simulation-based inference workflows},
journal = {Journal of Open Source Software}
}
This updated paper, with its expanded author list, reflects the broader community contributions and the package's enhanced capabilities in releases 0.23.0 and later.
If you are using a version of sbi prior to 0.23.0, please cite the original sbi
software paper:
latex
@article{tejero-cantero2020sbi,
doi = {10.21105/joss.02505},
url = {https://doi.org/10.21105/joss.02505},
year = {2020},
publisher = {The Open Journal},
volume = {5},
number = {52},
pages = {2505},
author = {Alvaro Tejero-Cantero and Jan Boelts and Michael Deistler and Jan-Matthis Lueckmann and Conor Durkan and Pedro J. Gonçalves and David S. Greenberg and Jakob H. Macke},
title = {sbi: A toolkit for simulation-based inference},
journal = {Journal of Open Source Software}
}
Regardless of which software paper you cite, please also remember to cite the original research articles describing the specific sbi-algorithm(s) you are using.
Specific releases of sbi are also citable via
Zenodo, where we generate a new software DOI for
each release.
Owner
- Name: sbi-dev
- Login: sbi-dev
- Kind: organization
- Repositories: 1
- Profile: https://github.com/sbi-dev
JOSS Publication
sbi reloaded: a toolkit for simulation-based inference workflows
Authors
Machine Learning in Science, University of Tübingen, Tübingen AI Center, TransferLab, appliedAI Institute for Europe
Machine Learning in Science, University of Tübingen, Tübingen AI Center
Machine Learning in Science, University of Tübingen, Tübingen AI Center
TransferLab, appliedAI Institute for Europe, ML Colab, Cluster ML in Science, University of Tübingen
Google Research
Machine Learning in Science, University of Tübingen, Tübingen AI Center
Helmholtz-Zentrum Dresden-Rossendorf
Université Paris-Saclay, INRIA, CEA, Palaiseau, France
Robert Bosch GmbH
Université Paris-Saclay, INRIA, CEA, Palaiseau, France
School of Informatics, University of Edinburgh
Machine Learning in Science, University of Tübingen, Tübingen AI Center
University of Amsterdam
TransferLab, appliedAI Institute for Europe, Research and Innovation Center, BMW Group, Institute for Applied Mathematics and Scientific Computing, University of the Bundeswehr Munich, Germany
Aix Marseille, INSERM, INS, France
Machine Learning in Science, University of Tübingen, Tübingen AI Center
TU Darmstadt, hessian.AI, Germany
Machine Learning in Science, University of Tübingen, Tübingen AI Center, University Hospital Tübingen and M3 Research Center
Faculty of Science, B-3000, KU Leuven, Belgium, VIB-Neuroelectronics Research Flanders (NERF) and imec, Belgium
Machine Learning in Science, University of Tübingen, Tübingen AI Center
Machine Learning in Science, University of Tübingen, Tübingen AI Center
Machine Learning in Science, University of Tübingen, Tübingen AI Center, Methods of Machine Learning, University of Tübingen
Neuroscience Institute, Carnegie Mellon University
Machine Learning in Science, University of Tübingen, Tübingen AI Center
Machine Learning in Science, University of Tübingen, Tübingen AI Center
Université Grenoble Alpes, INRIA, CNRS, Grenoble INP, LJK, France
Machine Learning in Science, University of Tübingen, Tübingen AI Center
TransferLab, appliedAI Institute for Europe
Tübingen AI Center, Hertie Institute for AI in Brain Health, University of Tübingen
Machine Learning in Science, University of Tübingen, Tübingen AI Center
Institute of Coastal Systems - Analysis and Modeling, Helmholtz AI
VIB-Neuroelectronics Research Flanders (NERF) and imec, Belgium, Departments of Computer Science Electrical Engineering, KU Leuven, Belgium
Machine Learning in Science, University of Tübingen, Tübingen AI Center, Department Empirical Inference, Max Planck Institute for Intelligent Systems, Tübingen
Tags
PyTorch Bayesian Inference Simulation-Based Inference Scientific Discovery Conditional Density EstimationCitation (CITATION.cff)
cff-version: "1.2.0"
authors:
- family-names: Boelts
given-names: Jan
- family-names: Deistler
given-names: Michael
- family-names: Gloeckler
given-names: Manuel
- family-names: Tejero-Cantero
given-names: Álvaro
- family-names: Lueckmann
given-names: Jan-Matthis
- family-names: Moss
given-names: Guy
- family-names: Steinbach
given-names: Peter
- family-names: Moreau
given-names: Thomas
- family-names: Muratore
given-names: Fabio
- family-names: Linhart
given-names: Julia
- family-names: Durkan
given-names: Conor
- family-names: Vetter
given-names: Julius
- family-names: Miller
given-names: Benjamin Kurt
- family-names: Herold
given-names: Maternus
- family-names: Ziaeemehr
given-names: Abolfazl
- family-names: Pals
given-names: Matthijs
- family-names: Gruner
given-names: Theo
- family-names: Bischoff
given-names: Sebastian
- family-names: Krouglova
given-names: Nastya
- family-names: Gao
given-names: Richard
- family-names: Lappalainen
given-names: Janne K
- family-names: Mucsányi
given-names: Bálint
- family-names: Pei
given-names: Felix
- family-names: Schulz
given-names: Auguste
- family-names: Stefanidi
given-names: Zinovia
- family-names: Rodrigues
given-names: Pedro
- family-names: Schröder
given-names: Cornelius
- family-names: Zaid
given-names: Faried Abu
- family-names: Beck
given-names: Jonas
- family-names: Kapoor
given-names: Jaivardhan
- family-names: Greenberg
given-names: David S.
- family-names: Gonçalves
given-names: Pedro J.
- family-names: Macke
given-names: Jakob H.
contact:
- family-names: Boelts
given-names: Jan
- family-names: Deistler
given-names: Michael
- family-names: Macke
given-names: Jakob H.
doi: 10.5281/zenodo.15034786
message: If you use this software, please cite our article in the
Journal of Open Source Software.
preferred-citation:
authors:
- family-names: Boelts
given-names: Jan
- family-names: Deistler
given-names: Michael
- family-names: Gloeckler
given-names: Manuel
- family-names: Tejero-Cantero
given-names: Álvaro
- family-names: Lueckmann
given-names: Jan-Matthis
- family-names: Moss
given-names: Guy
- family-names: Steinbach
given-names: Peter
- family-names: Moreau
given-names: Thomas
- family-names: Muratore
given-names: Fabio
- family-names: Linhart
given-names: Julia
- family-names: Durkan
given-names: Conor
- family-names: Vetter
given-names: Julius
- family-names: Miller
given-names: Benjamin Kurt
- family-names: Herold
given-names: Maternus
- family-names: Ziaeemehr
given-names: Abolfazl
- family-names: Pals
given-names: Matthijs
- family-names: Gruner
given-names: Theo
- family-names: Bischoff
given-names: Sebastian
- family-names: Krouglova
given-names: Nastya
- family-names: Gao
given-names: Richard
- family-names: Lappalainen
given-names: Janne K
- family-names: Mucsányi
given-names: Bálint
- family-names: Pei
given-names: Felix
- family-names: Schulz
given-names: Auguste
- family-names: Stefanidi
given-names: Zinovia
- family-names: Rodrigues
given-names: Pedro
- family-names: Schröder
given-names: Cornelius
- family-names: Zaid
given-names: Faried Abu
- family-names: Beck
given-names: Jonas
- family-names: Kapoor
given-names: Jaivardhan
- family-names: Greenberg
given-names: David S.
- family-names: Gonçalves
given-names: Pedro J.
- family-names: Macke
given-names: Jakob H.
date-published: 2025-04-08
doi: 10.21105/joss.07754
issn: 2475-9066
issue: 108
journal: Journal of Open Source Software
publisher:
name: Open Journals
start: 7754
title: "sbi reloaded: a toolkit for simulation-based inference
workflows"
type: article
url: "https://joss.theoj.org/papers/10.21105/joss.07754"
volume: 10
title: "sbi reloaded: a toolkit for simulation-based inference
workflows"
GitHub Events
Total
- Fork event: 61
- Create event: 86
- Release event: 1
- Issues event: 188
- Watch event: 128
- Delete event: 75
- Member event: 31
- Issue comment event: 529
- Push event: 575
- Gollum event: 6
- Pull request review event: 739
- Pull request review comment event: 858
- Pull request event: 292
Last Year
- Fork event: 61
- Create event: 88
- Release event: 1
- Issues event: 188
- Watch event: 128
- Delete event: 78
- Member event: 31
- Issue comment event: 535
- Push event: 580
- Gollum event: 6
- Pull request review event: 745
- Pull request review comment event: 865
- Pull request event: 293
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| janfb | j****s@t****e | 492 |
| Michael Deistler | M****r@t****e | 389 |
| Alvaro Tejero-Cantero | a****o@t****e | 145 |
| jan-matthis | m****l@j****e | 93 |
| manuelgloeckler | 3****r | 27 |
| Fabio Muratore | f****e@f****t | 20 |
| Guy Moss | 9****3 | 19 |
| Peter Steinbach | p****h@h****e | 15 |
| Abel Abate | 6****a | 14 |
| tomMoral | t****0@g****m | 11 |
| pedro goncalves | p****s@g****m | 9 |
| coschroeder | c****r@g****m | 8 |
| jnsbck | j****k@h****e | 7 |
| Sebastian Bischoff | s****n@s****e | 6 |
| Julia Linhart | 4****t | 5 |
| LouisRouillard | l****d@g****m | 5 |
| zinaStef | 4****f | 5 |
| Benjamin Kurt Miller | 1****i | 5 |
| Pedro L. C. Rodrigues | p****s@m****g | 5 |
| dgreenberg | d****g | 4 |
| jsvetter | j****r@g****m | 4 |
| Matthijs Pals | 3****s | 4 |
| Maternus | 1****h | 4 |
| Jose Robledo | 4****o | 4 |
| Emmanuel Ferdman | e****n@g****m | 4 |
| rdgao | r****o@g****m | 3 |
| Abdul Samad | a****1@g****m | 3 |
| danielmk | d****c@g****m | 3 |
| augustes | s****e@g****m | 3 |
| Yves Bernaerts | 3****s | 3 |
| and 49 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 346
- Total pull requests: 671
- Average time to close issues: 5 months
- Average time to close pull requests: 10 days
- Total issue authors: 89
- Total pull request authors: 63
- Average comments per issue: 1.63
- Average comments per pull request: 2.3
- Merged pull requests: 501
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 137
- Pull requests: 327
- Average time to close issues: 18 days
- Average time to close pull requests: 7 days
- Issue authors: 44
- Pull request authors: 48
- Average comments per issue: 0.71
- Average comments per pull request: 1.71
- Merged pull requests: 235
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- janfb (88)
- michaeldeistler (50)
- manuelgloeckler (29)
- gmoss13 (13)
- psteinb (9)
- Baschdl (8)
- zinaStef (7)
- paarth-dudani (7)
- Ziaeemehr (6)
- JuliaLinhart (5)
- Dingel321 (5)
- augustes (5)
- MolinAlexei (4)
- bkmi (3)
- ali-akhavan89 (3)
Pull Request Authors
- janfb (210)
- michaeldeistler (99)
- manuelgloeckler (52)
- abelaba (33)
- psteinb (21)
- gmoss13 (19)
- famura (17)
- Baschdl (12)
- zinaStef (12)
- tomMoral (11)
- anastasiakrouglova (10)
- emmanuel-ferdman (8)
- JuliaLinhart (8)
- turnmanh (8)
- Matthijspals (8)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 7,517 last-month
- Total dependent packages: 4
- Total dependent repositories: 14
- Total versions: 35
- Total maintainers: 4
pypi.org: sbi
Simulation-based inference.
- Documentation: https://sbi.readthedocs.io/
- License: Apache Software License
-
Latest release: 0.24.0
published 9 months ago
