All models

freia_bayes_flow

A conditional invertible network that infers a model's parameters from summarized observations.

Diffusion and generative · 289 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (25 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
1M
Operations
289
Framework
PyTorch
Recurrent
No
Published
IEEE Transactions on Neural Networks and Learning Systems (arXiv 2020)
Cited by
226 (as of 23 October 2026)
Authors
Stefan T. Radev, Ulf K. Mertens, Andreas Voss and others
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m5080
Graph hash
40e1cf79d33b0493c3636f5c7c197c15ad66067ca9ba142867f39bfff2e9524e
Skeleton hash
b6f18ab0bcbe5956088d293f51659cbc7e3f261efce5930a0602838e7343c94c
Architecture hash
f7b43d04e6106082d4031144b9b9b9f09266ad79c6448343e9232f920be3c120
Diagram SHA-256
12dbe38b11dbcb508d93a33c18d12b7c0f9639b731a75d32564be234e421a360
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

BayesFlow is a method for estimating the parameters of a mathematical model from data when no explicit likelihood function is available. It learns from simulations, and the trained network can then infer full posteriors on arbitrarily many real datasets from the same model family without additional training or optimization.

Two networks are trained jointly on simulated data: a summary network and an inference network. The summary network reduces a set of observations of variable size to a fixed-size vector of learned summary statistics. The inference network is a conditional invertible neural network (cINN), a normalizing flow between the model parameters and a Gaussian latent variable. Its building block is the affine coupling block, which splits the input vector into two parts and transforms each with fully connected networks applied to the other. This keeps the Jacobian triangular, so its determinant is very cheap to compute. The summary vector is fed into all internal networks of each block, and the inverse pass maps points from the latent space back to parameters using the same conditional information.

This model follows the paper's Lévy-Flight example, where a permutation invariant network summarizes i.i.d. reaction time data. It is built with FrEIA, a framework for constructing invertible neural networks from simple invertible building blocks. The paper uses a default BayesFlow with 5 to 10 coupling blocks and a summary vector of size 128 for all of its examples.

Key idea. BayesFlow trains a summary network and a conditional invertible network jointly on simulations, so one pre-trained model infers full posteriors for many datasets without further training.

  • bayesflow
  • conditional invertible neural network
  • cinn
  • amortized bayesian inference
  • simulation-based inference
  • likelihood-free inference
  • normalizing flow
  • parameter estimation
  • summary network
  • freia

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{radev2020bayesflowlearningcomplexstochastic,
      title={BayesFlow: Learning complex stochastic models with invertible neural networks}, 
      author={Stefan T. Radev and Ulf K. Mertens and Andreas Voss and Lynton Ardizzone and Ullrich Köthe},
      year={2020},
      eprint={2003.06281},
      archivePrefix={arXiv},
      primaryClass={stat.ML},
      url={https://arxiv.org/abs/2003.06281}, 
}