Skip to content

🚀 BayesFlow v2.0 (Neo) Has Officially Arrived!

Compare
Choose a tag to compare
@stefanradev93 stefanradev93 released this 22 Apr 00:41
· 163 commits to main since this release

🎉 BayesFlow 2.0 is here! 🎉

We're thrilled to officially release BayesFlow 2.0 - a major leap forward in amortized Bayesian inference using modern neural networks. Whether you're a researcher, practitioner, or just getting started with Bayesian modeling, BayesFlow 2 is built to help you go from idea to inference faster than ever.

🔥 What's New in v2.0?

  • Multi-backend support with Keras 3: Choose your favorite ML framework - JAX, PyTorch, or TensorFlow - and switch seamlessly.

  • Cleaner, faster API: New workflows and interfaces make it easier than ever to build, train, and evaluate your models.

  • More neural network architectures: A rich set of ready-to-use building blocks tailored for simulation-based inference.

  • Smarter, more flexible design: Refined from the ground up to align with the latest advances in generative AI and Bayesian modeling.

🧠 What is BayesFlow?

BayesFlow lets you harness generative neural networks for fast and flexible Bayesian inference with any simulator. Whether you're estimating parameters, comparing models, or designing experiments, BayesFlow helps you turn simulations into statistical insight.

Check out the 3-step conceptual overview:

  • Choose your backend – thanks to Keras 3, you're free to use JAX, PyTorch, or TensorFlow.

  • Define your simulator – write your model in pure Python and generate data effortlessly.

  • Select your inference algorithm – train flexible neural networks to estimate what matters most.

🚀 Getting Started Is Easy

import bayesflow as bf

workflow = bf.BasicWorkflow(
    inference_network=bf.networks.CouplingFlow(),
    summary_network=bf.networks.TimeSeriesNetwork(),
    inference_variables=["parameters"],
    summary_variables=["observables"],
    simulator=bf.simulators.SIR()
)

history = workflow.fit_online(epochs=15, batch_size=32, num_batches_per_epoch=200)
diagnostics = workflow.plot_default_diagnostics(test_data=300)

🧪 Check out our growing library of tutorials and notebooks, from basic regression to Bayesian experimental design. Even better - contribute your own!

📦 Installation

You can install the latest version directly from PyPI or GitHub.

And don’t forget to install a supported backend - recommend JAX for top performance 🚀

BayesFlow 2.0 is fast, flexible, and freaking awesome. We can’t wait to see what you build with it.

Let us know what you think, and if you create something cool - open a PR or share it with the community! 💙

The BayesFlow Team