Skip to content

2.0.4 -Diffusion models, bugfixes, new standardization utility, and more

Compare
Choose a tag to compare
@stefanradev93 stefanradev93 released this 18 Jun 07:44
· 5 commits to main since this release

🚀 BayesFlow v2.0.4 – Flexibility and Stability

We’re excited to announce BayesFlow v2.0.4 – a major release packed with stability upgrades, smarter networks, diffusion models, and tools for multimodal inference.


✨ Highlights

🔁 Diffusion Models for Inference

  • Integrated a flexible DiffusionModel implementation following Kingma et al. (2023)
  • Added SDE solvers and flexible sampling support. You can try out different diffusion model flavors!
  • Unified behavior across inference networks and removed deprecations of subnet_kwargs

🧠 Smarter Networks and Fusion

  • Introduced FusionNetwork for multimodal learning via late fusion
  • New Group / Ungroup transforms for flexible input structuring
  • Redesigned how summary/inference networks are discovered and dispatched

🧪 Simulation & Data Handling

  • Added subsample() and take() transforms with percent-based slicing
  • Included *NaN replacement transform for taking care of missing values
  • Enabled batch simulation utilities and new dataset augmentation strategies
  • Improved consistency for disk/offline datasets, including shuffle control
  • Enabled arbitrary data augmentations to datasets for transformations applied only during training

📏 Stability and Standardization

  • Created new Standardization layers that are now managed by approximators - no need for stateful adapters
  • Introduced moving mean/variance tracking with stable zero-variance handling
  • Replaced unstable PositiveDefinite link with robust CholeskyFactor estimation for MVN approximate distributions
  • Fixed validation loss aggregation

🧮 Model Comparison & Approximators

  • Better handling of heterogeneous simulator outputs in model comparison
  • Overhauled metrics tracking with train/val split and custom metric support
  • Streamlined all approximators with unified .prepare_data() logic and log_prob fixes
  • Serialization is now safer and more consistent across backends and training stages

🧪 Diagnostics, Docs, and Dev Tools

  • New tutorials: likelihood estimation, multimodal simulations, and a book on Cognitive Modeling with BayesFlow
  • Improved pair plots, better spacing, and legend layering
  • Added new notebooks and polished documentation for approximators, diagnostics, and data handling
  • BayesFlow now officially supports Python 3.12

🧰 Under-the-Hood Improvements

  • Custom Sequential module to resolve Keras build/serialization issues
  • More robust test suite with extended coverage for transforms, metrics, networks, and approximators
  • Smarter dispatching of networks and dynamic simulator configurations

🔧 Breaking & Deprecated

  • standardize adapter transforms should be used only with precomputed loc and scale. → rely on the new built-in standardization utility of approximators!
  • Deprecated approx.summaries → use approx.summarize instead
  • Moved toward FutureWarning for deprecated features
  • Use probs instead of logits for ModelComparisonApproximator

👥 Special Thanks to Contributors

Big kudos to @LarsKue, @valentinpratz, @han-ol, @arrjon, @elseml, @jerrymhuang, @daniel-habermann for pushing this release forward!


👉 Ready to try it?

Install or upgrade via:

pip install "bayesflow>=2.0.4"