Skip to content

Releases: bayesflow-org/bayesflow

v2.0.2 Fixes to usability, tests, and flow matching

26 Apr 12:54
822ad89
Compare
Choose a tag to compare
  • More tests, including notebooks
  • Fixed optimal transport for JAX
  • Improved dispatch for inference and summary networks (used in workflows)
  • Mixture distributions as latent spaces
  • Improved README
  • Fixed a warning about missing compile_from_config when loading approximators
  • Add NumFOCUS affiliation
  • Add issue templates
  • Removes the need to explicitly drop unused variables in custom Adapters

v2.0.1 - fixes and performance improvement

22 Apr 22:13
d31a761
Compare
Choose a tag to compare
  • Fixes bug with optimal transport for flow matching
  • Improved speed of import by 1200%
  • Improved tests for consistency models

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

22 Apr 00:41
Compare
Choose a tag to compare

🎉 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

v1.1.6

19 Mar 10:44
543c45e
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.1.5...v1.1.6

v1.1.5

14 Mar 14:06
b38f23e
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.1.4...v1.1.5

JOSS

12 Sep 16:16
2bd8744
Compare
Choose a tag to compare

State of software at JOSS publication.

New feature and minor bugfixes

13 Aug 15:21
98d895c
Compare
Choose a tag to compare
  1. Bugfix in SimulationMemory affecting the use of empty folders for initializing a Trainer;
  2. Bugfix in Trainer.train_from_presimulation() for model comparison tasks;
  3. Added a classifier two-sample test (C2ST) function c2st in computational_utilities.

Bugfixes and improved documentation

16 Jul 10:18
Compare
Choose a tag to compare
  1. Bugfix related to training SetTransformer with induced points
  2. Bugfix for offline training of transformers with variable sizes
  3. Complete revamp of documentation, README, and tutorials

PyPI Publish

22 Jun 16:55
Compare
Choose a tag to compare

Enable PyPI integration through GitHub workflows.

Beyond Beta!

22 Jun 13:54
29f0b95
Compare
Choose a tag to compare

Following multiple improvements and being actively used in multiple projects, the BayesFlow library is ready to move beyond the beta phase!

Features:

  1. Added option for permutation='learnable' when creating an InvertibleNetwork
  2. Added option for coupling_design in ["affine", "spline", "interleaved"] when creating an InvertibleNetwork
  3. Simplified passing additional settings to the internal networks. For instance, you
    can now simply do
    inference_network = InvertibleNetwork(num_params=20, coupling_net_settings={'mc_dropout': True})
    to get a Bayesian neural network.
  4. PMPNetwork has been added for model comparison according to findings in https://arxiv.org/abs/2301.11873
  5. Publication-ready calibration diagnostic for expected calibration error (ECE) in a model comparison setting has been
    added to diagnostics.py and is accessible as plot_calibration_curves()
  6. A new module experimental has been added currently containing rectifiers.py.
  7. Default settings for transformer-based architectures.
  8. Numerical calibration error using posterior_calibration_error()

General Improvements:

  1. Improved docstrings and consistent use of keyword arguments vs. configuration dictionaries
  2. Increased focus on transformer-based architectures as summary networks
  3. Figures resulting diagnostics.py have been improved and prettified
  4. Added a module sensitivity.py for testing the sensitivity of neural approximators to model misspecification
  5. Multiple bugfixes, including a major bug affecting the saving and loading of learnable permutations

The project now also features automatic PyPI publishing. :)