Skip to content

Releases: bayesflow-org/bayesflow

v2.0.3 - fixes to serialization and new features

05 May 22:38
afc1af1
Compare
Choose a tag to compare

🚀 BayesFlow v2.0.3 Release Notes

⚠️ Important Notice: Breaking Changes

This release introduces significant changes to the serialization pipeline and is not backward-compatible with v2.0.2 or earlier. Models saved with older versions of BayesFlow will likely be incompatible with this release, but models trained in the future will be backward compatible with this release.

We strongly recommend updating your workflows and referring to the updated documentation to ensure a smooth transition.

📚 Documentation Updates

Enhanced the README.md with:

  • A detailed guide for migrating from BayesFlow v1.x to v2.
  • Clear warnings about breaking changes and missing features (e.g., hierarchical models, MCMC).
  • Pointers for users seeking parity with legacy functionality.
    See changes →

🔧 Backend Enhancements

  • Simplified version management: __version__ is now dynamically set using importlib.metadata.
  • Removed redundant exception handling for unsupported package imports.

🌀 Transform Enhancements

New Feature: Added support for log_det_jac (log-determinant Jacobian) in multiple transform classes:

  • Constrain
  • Concatenate
  • Drop

The Adapter class now optionally returns the log_det_jac alongside transformed data in both forward and inverse methods.
These improvements enhance support for probabilistic modeling workflows involving change-of-variable techniques.

🧬 Serialization Improvements

  • Applied the @serializable decorator with explicit namespace="bayesflow.adapters" to key transform classes: AsSet, Broadcast, Constrain, and others. This improves the consistency and reliability of object serialization across the library, especially for save/load operations in custom pipelines.

✅ Summary

This release improves usability, extensibility, and transform robustness, especially for users of advanced transformations. While it introduces breaking changes, it also lays a more stable foundation for future developments. Stay tuned!

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.