BNAF
A normalizing flow built as a single feed-forward network with block weight matrices, used for density estimation.
Diffusion and generative · 67 operations Checked
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
- 28
- Operations
- 67
- Framework
- PyTorch
- Recurrent
- No
- Published
- UAI 2019
- Cited by
- 57 (as of 29 October 2026)
- Authors
- Nicola De Cao, Ivan Titov, Wilker Aziz
- Source
- GitHub: nicola-decao/BNAF
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m188
- Graph hash
- 83cf4ba3e1f3a99fc0c6fe1e9ec4766e70b3cc022f387bc5d39d075ab9c1a6ee
- Skeleton hash
- 34a58be31925919d184dca717ac6937355e17e29c4ddce5f0327a29853937f5f
- Architecture hash
- 8d5102154d04f5d73279e42e959c9e7b12c02b51e5d25128e9749ab6a0e37369
- Diagram SHA-256
- 07b6c12d2e3150b42ad8744602b87672a86e88f509d4a0d58b462f1777262884
- 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
Block neural autoregressive flow (B-NAF) is a normalizing flow: a differentiable bijection between two density functions whose Jacobian determinant can be computed efficiently. It responds to the earlier neural autoregressive flow (NAF), in which the flow is a neural network whose parameters are predicted by a second network that grows quadratically with the size of the first. B-NAF instead models the bijection directly using a single feed-forward network.
Invertibility comes from the design of each affine transformation: the weight matrix is a lower triangular block matrix in which the blocks below the diagonal are freely parametrized and the diagonal blocks are constrained to be strictly positive. The activation functions must be invertible as well, such as tanh or LeakyReLU, so that the whole network is bijective. Because the resulting Jacobian is lower triangular, computing its determinant needs only the product of its diagonal elements.
When B-NAF flows are stacked, the elements of each output vector are permuted so that a different set of elements is considered at each flow. The paper reports that the flow is competitive across datasets on density estimation and approximate inference while using orders of magnitude fewer parameters. The authors also note that B-NAFs are invertible in principle but their inverses are not available in closed form.
Key idea. B-NAF models a normalizing-flow bijection directly with a single feed-forward network whose block weight matrices make it autoregressive and strictly monotone, giving a compact universal approximator of density functions.
- BNAF
- B-NAF
- Block Neural Autoregressive Flow
- block-NAF
- normalizing flow
- autoregressive flow
- density estimation
- variational inference
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{decao2019blockneuralautoregressiveflow,
title={Block Neural Autoregressive Flow},
author={Nicola De Cao and Ivan Titov and Wilker Aziz},
year={2019},
eprint={1904.04676},
archivePrefix={arXiv},
primaryClass={stat.ML},
url={https://arxiv.org/abs/1904.04676},
}