bayesflow-org/bayesflow
A Python library for simulation-based inference with deep learning
What it solves
BayesFlow simplifies the process of simulation-based inference (SBI). It allows researchers to perform complex Bayesian analysis—such as estimating parameters from data or comparing different models—without needing to manually derive likelihood functions, which are often unavailable in complex scientific simulations.
How it works
It uses deep learning to "amortize" the inference process. Instead of running a new, slow inference process for every new dataset, you train a neural network to learn the relationship between your simulation parameters and the resulting data. Once trained, this network can provide near-instantaneous estimates. It leverages Keras 3 to support multiple backends, meaning you can run your models using JAX, PyTorch, or TensorFlow.
Who it’s for
It is designed for researchers and data scientists working with complex simulators or parametric models who need to perform Bayesian inference, model comparison, or experimental design. It is particularly useful for those who want to integrate modern generative AI techniques into their scientific workflows.
Highlights
- Multi-backend support via Keras 3 (JAX, PyTorch, or TensorFlow).
- Supports advanced generative models, including diffusion and consistency models.
- Includes built-in diagnostic tools to validate and understand inference results.
- Provides a high-level API for defining workflows with minimal code.
- Integrates with the PyMC ecosystem for flexible downstream analysis.
Related
- Project
- Project
- Project
- Project
- Project