Skip to content

2.1.0 Series - Sky is the Limit

Latest

Choose a tag to compare

@stefanradev93 stefanradev93 released this 23 Oct 13:08
d4421e7

Summary

This is the first release in the 2.1.x series. It introduces differentiable adapters that use only keras ops, mean flow inference networks for few-step sampling and density estimation, a revamped estimator API, refactored and easy masking support, and a redesigned multilevel estimation stack. It also adds multiple consistency and diagnostics improvements, alongside several bugfixes.

Compatibility notice

Important

Serialized networks created with BayesFlow 2.0.x are not compatible with 2.1.0.

Compatibility will be preserved throughout the 2.1.x series.

Approximators have been renamed to estimators for reduced clunkiness. Existing approximator imports and class names will be available as deprecated aliases and emit a deprecation warning (#809). The ContinuousApproximator class is now called a BasicEstimator, communicating its role better and harmonizing with the BasisWorkflow.

Highlights

  • Differentiable adapters and self-consistency. The entire transformation pipeline after simulation can now preserve backend tensors and gradients through Adapter(differentiable=True), enabling self-consistency objectives and other differentiable transforms. New simplex, covariance, and correlation transforms are also included (#747, #790). Check out the PyTorch tutorial notebook on how to use self-consistency with and without likelihoods.

  • Mean Flow. The new experimental MeanFlow inference network provides an alternative to consistency models for few-step sampling; it is the only free-form network capable of single-step density evaluation. Its inference-time steps argument controls the speed-accuracy trade-off (#802). This network will move out of the experimental module in the following releases. Read more in our paper: https://arxiv.org/abs/2610.21657

  • Improved inference network defaults. Diffusion, consistency, and flow-matching implementations now have more coherent defaults and shared behavior; we've also corrected cosine-schedule weighting and flow-matching defaults (#804, #807). Splines have also been stabilized.

  • Unified masking. A centralized masking design (a MaskHandler) now handles semantic and structural masks consistently across inference networks using a request-response pattern. Coupling flows can hold selected target dimensions fixed, leave them unchanged during sampling, and exclude them from density computation while retaining them as conditions (#799, #795).

  • Redesigned multilevel inference. The experimental multilevel simulator and estimator now use long-format data, support flexible nested and crossed designs, and provide improved offline training and sequential sampling. Graph inversion now evaluates alternative factorizations and automatically selects a lower-cost inverse (#755, #770, #810). These feature will move out of the experimental module in the following releases.

  • More reliable consistency models. A critical double-scaling bug in StableConsistencyModel was fixed, restoring correct posterior behavior (#806).

  • Clearer diagnostics. Loss plots now use separate panels, a shared legend, and optional component curves. A new pairs-recovery plot has also been added (#765, #780, #781).

Additional fixes

  • Numerical and density correctness was improved for inverse-softplus, Hutchinson trace estimation, and ODE log probabilities (#764, #777, #785, #800).

  • Further edge cases were closed in one-dimensional coupling flows, simulator argument routing, NanToNum inversion, FiLM serialization, and non-exchangeable PyMC wrappers (#768, #778, #779, #792, #812).

New contributors

A warm welcome to Alex Kipnis (@adkipnis), who contributed target marginalization support to coupling flows, initiated the masking cleanup, and fixed FiLM serialization, and Yifan Chen (@emecii) who helped iron out some diagnostics and softplus edge cases.

As always, happy amortizing!