Releases: bayesflow-org/bayesflow
v2.0.3 - fixes to serialization and new features
🚀 BayesFlow v2.0.3 Release Notes
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
- 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
- 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!
🎉 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
What's Changed
- Hotfix pip installation error with Apple Silicon by @marvinschmitt in #155
Full Changelog: v1.1.5...v1.1.6
v1.1.5
What's Changed
- set label names in plot_recovery() by @levolz in #102
- Development by @stefanradev93 in #103
- add label_fontsize and value_fontsize by @LuSchumacher in #106
- Optimization: add setting for tqdm mininterval by @vpratz in #108
- add n_row and n_col argument where applicable by @LuSchumacher in #109
- fix some typos and out-of-sync docstrings by @daniel-habermann in #111
- add **kwargs to diagnostics.plot_recovery by @marvinschmitt in #112
- Merge with dev by @stefanradev93 in #115
- Minor improvements by @elseml in #117
- Update README.md with forum by @elseml in #116
- update tutorial notebook 1 by @rusty-electron in #120
- Minimal Fix for Broken Tests by @LarsKue in #130
- Drop Support for Python 3.9, Add Support for Python 3.11 by @LarsKue in #132
- fix tutorial notebook 1 toc links and update some text by @rusty-electron in #136
- Make diagnostic plots work with one-parameter models by @Kucharssim in #137
- Fix offline training for model comparison ignoring shared context by @elseml in #139
- README - update minimal example by @vpratz in #141
- update TOCs of example notebooks by @rusty-electron in #142
- Bump up to Series 1.1.5 update by @stefanradev93 in #143
- add notebook: amortized point estimation by @vpratz in #145
- Bayes Estimators: Loss functions with flexible signature by @han-ol in #147
- Development by @stefanradev93 in #150
New Contributors
- @daniel-habermann made their first contribution in #111
- @rusty-electron made their first contribution in #120
- @LarsKue made their first contribution in #130
- @Kucharssim made their first contribution in #137
- @han-ol made their first contribution in #147
Full Changelog: v1.1.4...v1.1.5
JOSS
State of software at JOSS publication.
New feature and minor bugfixes
- Bugfix in
SimulationMemory
affecting the use of empty folders for initializing aTrainer
; - Bugfix in
Trainer.train_from_presimulation()
for model comparison tasks; - Added a classifier two-sample test (C2ST) function
c2st
incomputational_utilities
.
Bugfixes and improved documentation
- Bugfix related to training
SetTransformer
with induced points - Bugfix for offline training of transformers with variable sizes
- Complete revamp of documentation, README, and tutorials
PyPI Publish
Enable PyPI integration through GitHub workflows.