BayesFlow 2: Multi-Backend Amortized Bayesian Inference in Python

arXiv stat.ML / 2026/3/24

💬 オピニオンIdeas & Deep AnalysisTools & Practical UsageModels & Research

要点

  • The paper introduces BayesFlow 2.0, a Python library aimed at general-purpose amortized Bayesian inference by training neural networks on model simulations for fast posterior/likelihood/ratio estimation.
  • It emphasizes performance bottlenecks in traditional Bayesian workflows and positions amortized Bayesian inference as a way to make complex, large-data probabilistic modeling more tractable.
  • BayesFlow 2.0 adds multi-backend deep learning support, a library of generative network options for sampling and density estimation, and both high-level and fully customizable interfaces.
  • The release also includes new workflow capabilities such as hyperparameter optimization, design optimization, and hierarchical modeling, highlighted through a dynamical system parameter estimation case study and comparisons to similar tools.

Abstract

Modern Bayesian inference involves a mixture of computational methods for estimating, validating, and drawing conclusions from probabilistic models as part of principled workflows. An overarching motif of many Bayesian methods is that they are relatively slow, which often becomes prohibitive when fitting complex models to large data sets. Amortized Bayesian inference (ABI) offers a path to solving the computational challenges of Bayes. ABI trains neural networks on model simulations, rewarding users with rapid inference of any model-implied quantity, such as point estimates, likelihoods, or full posterior distributions. In this work, we present the Python library BayesFlow, Version 2.0, for general-purpose ABI. Along with direct posterior, likelihood, and ratio estimation, the software includes support for multiple popular deep learning backends, a rich collection of generative networks for sampling and density estimation, complete customization and high-level interfaces, as well as new capabilities for hyperparameter optimization, design optimization, and hierarchical modeling. Using a case study on dynamical system parameter estimation, combined with comparisons to similar software, we show that our streamlined, user-friendly workflow has strong potential to support broad adoption.