GitHub - janosh/awesome-normalizing-flows: Awesome resources on normalizing flows.

A list of awesome resources for understanding and applying normalizing flows (NF): a relatively simple yet powerful new tool in statistics for constructing expressive probability distributions from simple base distributions using a chain (flow) of trainable smooth bijective transformations (diffeomorphisms).

  • 2024-06-20 - Transferable Boltzmann Generators by Klein, Noé
    Boltzmann Generators, a machine learning method, generate equilibrium samples of molecular systems by learning a transformation from a simple prior distribution to the target Boltzmann distribution via normalizing flows. Recently, flow matching has been used to train Boltzmann Generators for small systems in Cartesian coordinates. This work extends this approach by proposing a framework for transferable Boltzmann Generators that can predict Boltzmann distributions for unseen molecules without retraining. This allows for approximate sampling and efficient reweighting to the target distribution. The framework is tested on dipeptides, demonstrating efficient generalization to new systems and improved efficiency compared to single-system training. [Code]

  • 2023-01-03 - FInC Flow: Fast and Invertible k×k Convolutions for Normalizing Flows by Kallapa, Nagar et al.
    propose a k×k convolutional layer and Deep Normalizing Flow architecture which i) has a fast parallel inversion algorithm with running time O(nk^2) (n is height and width of the input image and k is kernel size), ii) masks the minimal amount of learnable parameters in a layer. iii) gives better forward pass and sampling times comparable to other k×k convolution-based models on real-world benchmarks. We provide an implementation of the proposed parallel algorithm for sampling using our invertible convolutions on GPUs. [Code]

  • 2022-10-15 - Invertible Monotone Operators for Normalizing Flows by Ahn, Kim et al.
    This work proposes the monotone formulation to overcome the issue of the Lipschitz constants in previous ResNet-based normalizing flows using monotone operators and provides an in-depth theoretical analysis. Furthermore, this work constructs an activation function called Concatenated Pila (CPila) to improve gradient flow. The resulting model, Monotone Flows, exhibits an excellent performance on multiple density estimation benchmarks (MNIST, CIFAR-10, ImageNet32, ImageNet64). [Code]

  • 2022-08-18 - ManiFlow: Implicitly Representing Manifolds with Normalizing Flows by Postels, Danelljan et al.
    The invertibility constraint of NFs imposes limitations on data distributions that reside on lower dimensional manifolds embedded in higher dimensional space. This is often bypassed by adding noise to the data which impacts generated sample quality. This work generates samples from the original data distribution given full knowledge of perturbed distribution and noise model. They establish NFs trained on perturbed data implicitly represent the manifold in regions of maximum likelihood, then propose an optimization objective that recovers the most likely point on the manifold given a sample from the perturbed distribution.

  • 2022-06-03 - Graphical Normalizing Flows by Wehenkel, Louppe
    This work revisits coupling and autoregressive transformations as probabilistic graphical models showing they reduce to Bayesian networks with a pre-defined topology. From this new perspective, the authors propose the graphical normalizing flow, a new invertible transformation with either a prescribed or a learnable graphical structure. This model provides a promising way to inject domain knowledge into normalizing flows while preserving both the interpretability of Bayesian networks and the representation capacity of normalizing flows. [Code]

  • 2022-05-16 - Multi-scale Attention Flow for Probabilistic Time Series Forecasting by Feng, Xu et al.
    Proposes a novel non-autoregressive deep learning model, called Multi-scale Attention Normalizing Flow(MANF), where one integrates multi-scale attention and relative position information and the multivariate data distribution is represented by the conditioned normalizing flow.

  • 2022-03-02 - Adaptive Monte Carlo augmented with normalizing flows by Gabrié, Rotskoff et al.
    Markov Chain Monte Carlo (MCMC) algorithms struggle with sampling from high-dimensional, multimodal distributions, requiring extensive computational effort or specialized importance sampling strategies. To address this, an adaptive MCMC approach is proposed, combining local updates with nonlocal transitions via normalizing flows. This method blends standard transition kernels with generative model moves, adapting the generative model using generated data to improve sampling efficiency. Theoretical analysis and numerical experiments demonstrate the algorithm's ability to equilibrate quickly between metastable modes, sampling effectively across large free energy barriers and achieving significant accelerations over traditional MCMC methods. [Code]

  • 2022-01-14 - E(n) Equivariant Normalizing Flows by Satorras, Hoogeboom et al.
    Introduces equivariant graph neural networks into the normalizing flow framework which combine to give invertible equivariant functions. Demonstrates their flow beats prior equivariant models and allows sampling of molecular configurations with positions, atom types and charges.

  • 2021-07-16 - Efficient Bayesian Sampling Using Normalizing Flows to Assist Markov Chain Monte Carlo Methods by Gabrié, Rotskoff et al.
    Normalizing flows have potential in Bayesian statistics as a complementary or alternative method to MCMC for sampling posteriors. However, their training via reverse KL divergence may be inadequate for complex posteriors. This research proposes a new training approach utilizing direct KL divergence, which involves augmenting a local MCMC algorithm with a normalizing flow to enhance mixing rate and utilizing the resulting samples to train the flow. This method requires minimal prior knowledge of the posterior and can be applied for model validation and evidence estimation, offering a promising strategy for efficient posterior sampling.

  • 2021-07-03 - CInC Flow: Characterizable Invertible 3x3 Convolution by Nagar, Dufraisse et al.
    Seeks to improve expensive convolutions. They investigate the conditions for when 3x3 convolutions are invertible under which conditions (e.g. padding) and saw successful speedups. Furthermore, they developed a more expressive, invertible Quad coupling layer. [Code]

  • 2021-04-14 - Orthogonalizing Convolutional Layers with the Cayley Transform by Trockman, Kolter
    Parametrizes the multichannel convolution to be orthogonal via the Cayley transform (skew-symmetric convolutions in the Fourier domain). This enables the inverse to be computed efficiently. [Code]

  • 2021-04-14 - Improving Normalizing Flows via Better Orthogonal Parameterizations by Goliński, Lezcano-Casado et al.
    Parametrizes the 1x1 convolution via the exponential map and the Cayley map. They demonstrate an improved optimization for the Sylvester normalizing flows.

  • 2020-09-28 - Multivariate Probabilistic Time Series Forecasting via Conditioned Normalizing Flows by Rasul, Sheikh et al.
    Models the multi-variate temporal dynamics of time series via an autoregressive deep learning model, where the data distribution is represented by a conditioned normalizing flow. [OpenReview.net] [Code]

  • 2020-09-21 - Haar Wavelet based Block Autoregressive Flows for Trajectories by Bhattacharyya, Straehle et al.
    Introduce a Haar wavelet-based block autoregressive model.

  • 2020-07-15 - AdvFlow: Inconspicuous Black-box Adversarial Attacks using Normalizing Flows by Dolatabadi, Erfani et al.
    An adversarial attack method on image classifiers that use normalizing flows. [Code]

  • 2020-07-06 - SurVAE Flows: Surjections to Bridge the Gap between VAEs and Flows by Nielsen, Jaini et al.
    They present a generalized framework that encompasses both Flows (deterministic maps) and VAEs (stochastic maps). By seeing deterministic maps x = f(z) as limiting cases of stochastic maps x ~ p(x|z), the ELBO is reinterpreted as a change of variables formula for the stochastic maps. Moreover, they present a few examples of surjective layers using stochastic maps, which can be composed together with flow layers. [Video] [Code]

  • 2020-06-15 - Why Normalizing Flows Fail to Detect Out-of-Distribution Data by Kirichenko, Izmailov et al.
    This study how traditional normalizing flow models can suffer from out-of-distribution data. They offer a solution to combat this issue by modifying the coupling layers. [Tweet] [Code]

  • 2020-06-03 - Equivariant Flows: exact likelihood generative learning for symmetric densities by Köhler, Klein et al.
    Shows that distributions generated by equivariant NFs faithfully reproduce symmetries in the underlying density. Proposes building blocks for flows which preserve typical symmetries in physical/chemical many-body systems. Shows that symmetry-preserving flows can provide better generalization and sampling efficiency.

  • 2020-06-02 - The Convolution Exponential and Generalized Sylvester Flows by Hoogeboom, Satorras et al.
    Introduces exponential convolution to add the spatial dependencies in linear layers as an improvement of the 1x1 convolutions. It uses matrix exponentials to create cheap and invertible layers. They also use this new architecture to create convolutional Sylvester flows and graph convolutional exponentials. [Code]

  • 2020-05-11 - iUNets: Fully invertible U-Nets with Learnable Upand Downsampling by Etmann, Ke et al.
    Extends the classical UNet to be fully invertible by enabling invertible, orthogonal upsampling and downsampling layers. It is rather efficient so it should be able to enable stable training of deeper and larger networks.

  • 2020-04-08 - Normalizing Flows with Multi-Scale Autoregressive Priors by Mahajan, Bhattacharyya et al.
    Improves the representational power of flow-based models by introducing channel-wise dependencies in their latent space through multi-scale autoregressive priors (mAR). [Code]

  • 2020-03-31 - Flows for simultaneous manifold learning and density estimation by Brehmer, Cranmer
    Normalizing flows that learn the data manifold and probability density function on that manifold. [Tweet] [Code]

  • 2020-03-04 - Gaussianization Flows by Meng, Song et al.
    Uses a repeated composition of trainable kernel layers and orthogonal transformations. Very competitive versus some of the SOTA like Real-NVP, Glow and FFJORD. [Code]

  • 2020-02-27 - Gradient Boosted Normalizing Flows by Giaquinto, Banerjee
    Augment traditional normalizing flows with gradient boosting. They show that training multiple models can achieve good results and it's not necessary to have more complex distributions. [Code]

  • 2020-02-24 - Modeling Continuous Stochastic Processes with Dynamic Normalizing Flows by Deng, Chang et al.
    They propose a normalizing flow using differential deformation of the Wiener process. Applied to time series. [Tweet]

  • 2020-02-21 - Stochastic Normalizing Flows by Hodgkinson, Heide et al.
    Name clash for a very different technique from the above SNF: an extension of continuous normalizing flows using stochastic differential equations (SDE). Treats Brownian motion in the SDE as a latent variable and approximates it by a flow. Aims to enable efficient training of neural SDEs which can be used for constructing efficient Markov chains.

  • 2020-02-16 - Stochastic Normalizing Flows (SNF) by Wu, Köhler et al.
    Introduces SNF, an arbitrary sequence of deterministic invertible functions (the flow) and stochastic processes such as MCMC or Langevin Dynamics. The aim is to increase expressiveness of the chosen deterministic invertible function, while the trainable flow improves sampling efficiency over pure MCMC [Tweet).]

  • 2020-01-17 - Training Normalizing Flows with the Information Bottleneck for Competitive Generative Classification by Ardizzone, Mackowiak et al.
    They introduce a class of conditional normalizing flows with an information bottleneck objective. [Code]

  • 2020-01-15 - Invertible Generative Modeling using Linear Rational Splines by Dolatabadi, Erfani et al.
    A successor to the Neural spline flows which features an easy-to-compute inverse.

  • 2019-12-05 - Normalizing Flows for Probabilistic Modeling and Inference by Papamakarios, Nalisnick et al.
    A thorough and very readable review article by some of the guys at DeepMind involved in the development of flows. Highly recommended.

  • 2019-09-14 - Unconstrained Monotonic Neural Networks by Wehenkel, Louppe
    UMNN relaxes the constraints on weights and activation functions of monotonic neural networks by setting the derivative of the transformation as the output of an unconstrained neural network. The transformation itself is computed by numerical integration (Clenshaw-Curtis quadrature) of the derivative. [Code]

  • 2019-08-25 - Normalizing Flows: An Introduction and Review of Current Methods by Kobyzev, Prince et al.
    Another very thorough and very readable review article going through the basics of NFs as well as some of the state-of-the-art. Also highly recommended.

  • 2019-07-21 - Noise Regularization for Conditional Density Estimation by Rothfuss, Ferreira et al.
    Normalizing flows for conditional density estimation. This paper proposes noise regularization to reduce overfitting. [Blog]

  • 2019-07-18 - MintNet: Building Invertible Neural Networks with Masked Convolutions by Song, Meng et al.
    Creates an autoregressive-like coupling layer via masked convolutions which is fast and efficient to evaluate. [Code]

  • 2019-07-18 - Densely connected normalizing flows by Grcić, Grubišić et al.
    Creates a nested coupling structure to add more expressivity to standard coupling layers. They also utilize slicing/factorization for dimensionality reduction and Nystromer for the coupling layer conditioning network. They achieved SOTA results for normalizing flow models. [Code]

  • 2019-06-15 - Invertible Convolutional Flow by Karami, Schuurmans et al.
    Introduces convolutional layers that are circular and symmetric. The layer is invertible and cheap to evaluate. They also showcase how one can design non-linear elementwise bijectors that induce special properties via constraining the loss function. [Code]

  • 2019-06-15 - Invertible Convolutional Networks by Finzi, Izmailov et al.
    Showcases how standard convolutional layers can be made invertible via Fourier transformations. They also introduce better activations which might be better suited to normalizing flows, e.g. SneakyRELU

  • 2019-06-10 - Neural Spline Flows by Durkan, Bekasov et al.
    Uses monotonic ration splines as a coupling layer. This is currently one of the state of the art.

  • 2019-05-30 - Graph Normalizing Flows by Liu, Kumar et al.
    A new, reversible graph network for prediction and generation. They perform similarly to message passing neural networks on supervised tasks, but at significantly reduced memory use, allowing them to scale to larger graphs. Combined with a novel graph auto-encoder for unsupervised learning, graph normalizing flows are a generative model for graph structures.

  • 2019-05-24 - Fast Flow Reconstruction via Robust Invertible n x n Convolution by Truong, Luu et al.
    Seeks to overcome the limitation of 1x1 convolutions and proposes invertible nxn convolutions via a clever convolutional affine function.

  • 2019-05-17 - Integer Discrete Flows and Lossless Compression by Hoogeboom, Peters et al.
    A normalizing flow to be used for ordinal discrete data. They introduce a flexible transformation layer called integer discrete coupling.

  • 2019-04-09 - Block Neural Autoregressive Flow) by Cao, Titov et al.
    Introduces (B-NAF), a more efficient probability density approximator. Claims to be competitive with other flows across datasets while using orders of magnitude fewer parameters.

  • 2019-04-09 - Block Neural Autoregressive Flow by Wehenkel, Louppe
    As an alternative to hand-crafted bijections, Huang et al. (2018) proposed NAF, a universal approximator for density functions. Their flow is a neural net whose parameters are predicted by another NN. The latter grows quadratically with the size of the former which is inefficient. We propose block neural autoregressive flow (B-NAF), a much more compact universal approximator of density functions, where we model a bijection directly using a single feed-forward network. Invertibility is ensured by carefully designing affine transformations with block matrices that make the flow autoregressive and monotone. We compare B-NAF to NAF and show our flow is competitive across datasets while using orders of magnitude fewer parameters. [Code]

  • 2019-02-19 - MaCow: Masked Convolutional Generative Flow by Ma, Kong et al.
    Introduces a masked convolutional generative flow (MaCow) layer using a small kernel to capture local connectivity. They showed some improvement over the GLOW model while being fast and stable.

  • 2019-01-30 - Emerging Convolutions for Generative Normalizing Flows by Hoogeboom, Berg et al.
    Introduces autoregressive-like convolutional layers that operate on the channel and spatial axes. This improved upon the performance of image datasets compared to the standard 1x1 Convolutions. The trade-off is that the inverse operator is quite expensive however the authors provide a fast C++ implementation. [Code]

  • 2018-11-06 - FloWaveNet : A Generative Flow for Raw Audio by Kim, Lee et al.
    A flow-based generative model for raw audio synthesis. [Code]

  • 2018-10-02 - FFJORD: Free-form Continuous Dynamics for Scalable Reversible Generative Models by Grathwohl, Chen et al.
    Uses Neural ODEs as a solver to produce continuous-time normalizing flows (CNF).

  • 2018-07-09 - Glow: Generative Flow with Invertible 1x1 Convolutions by Kingma, Dhariwal
    They show that flows using invertible 1x1 convolution achieve high likelihood on standard generative benchmarks and can efficiently synthesize realistic-looking, large images.

  • 2018-07-03 - Deep Density Destructors by Inouye, Ravikumar
    Normalizing flows but from an iterative perspective. Features a Tree-based density estimator.

  • 2018-04-03 - Neural Autoregressive Flows by Huang, Krueger et al.
    Unifies and generalize autoregressive and normalizing flow approaches, replacing the (conditionally) affine univariate transformations of MAF/IAF with a more general class of invertible univariate transformations expressed as monotonic neural networks. Also demonstrates that the proposed neural autoregressive flows (NAF) are universal approximators for continuous probability distributions. [Code]

  • 2018-03-15 - Sylvester Normalizing Flow for Variational Inference by Berg, Hasenclever et al.
    Introduces Sylvester normalizing flows which remove the single-unit bottleneck from planar flows for increased flexibility in the variational posterior.

  • 2017-11-17 - Convolutional Normalizing Flows by Zheng, Yang et al.
    Introduces normalizing flows that take advantage of convolutions (based on convolution over the dimensions of random input vector) to improve the posterior in the variational inference framework. This also reduced the number of parameters due to the convolutions.

  • 2017-05-19 - Masked Autoregressive Flow for Density Estimation by Papamakarios, Pavlakou et al.
    Introduces MAF, a stack of autoregressive models forming a normalizing flow suitable for fast density estimation but slow at sampling. Analogous to Inverse Autoregressive Flow (IAF) except the forward and inverse passes are exchanged. Generalization of RNVP.

    Diagram of the slow (sequential) forward pass of a Masked Autoregressive Flow (MAF) layer
  • 2017-03-06 - Multiplicative Normalizing Flows for Variational Bayesian Neural Networks by Louizos, Welling
    They introduce a new type of variational Bayesian neural network that uses flows to generate auxiliary random variables which boost the flexibility of the variational family by multiplying the means of a fully-factorized Gaussian posterior over network parameters. This turns the usual diagonal covariance Gaussian into something that allows for multimodality and non-linear dependencies between network parameters.

  • 2016-06-15 - Improving Variational Inference with Inverse Autoregressive Flow by Kingma, Salimans et al.
    Introduces inverse autoregressive flow (IAF), a new type of flow which scales well to high-dimensional latent spaces. [Code]

  • 2016-05-27 - Density estimation using Real NVP by Dinh, Sohl-Dickstein et al.
    They introduce the affine coupling layer (RNVP), a major improvement in terms of flexibility over the additive coupling layer (NICE) with unit Jacobian while keeping a single-pass forward and inverse transformation for fast sampling and density estimation, respectively.

    Diagram of real-valued non-volume preserving (RNVP) coupling layer
  • 2015-05-21 - Variational Inference with Normalizing Flows by Rezende, Mohamed
    They show how to go beyond mean-field variational inference by using flows to increase the flexibility of the variational family.

  • 2015-02-12 - Masked Autoencoder for Distribution Estimation by Germain, Gregor et al.
    Introduces MADE, a feed-forward network that uses carefully constructed binary masks on its weights to control the precise flow of information through the network. The masks ensure that each output unit receives signals only from input units that come before it in some arbitrary order. Yet all outputs can be computed in a single pass.

    A popular and efficient way to make flows autoregressive is to construct them from MADE nets.

    Masked Autoencoder for Distribution Estimation
  • 2014-10-30 - Non-linear Independent Components Estimation by Dinh, Krueger et al.
    Introduces the additive coupling layer (NICE) and shows how to use it for image generation and inpainting.

  • 2011-04-01 - Iterative Gaussianization: from ICA to Random Rotations by Laparra, Camps-Valls et al.
    Normalizing flows in the form of Gaussianization in an iterative format. Also shows connections to information theory.

  • Zuko is used in LAMPE to enable Likelihood-free AMortized Posterior Estimation with PyTorch.

    Table 1 in the paper has a good comparison with traditional NFs.

    See something that's missing from this list? PRs welcome! A good place to find new items for the Repos section is the Normalizing Flows topic on GitHub.

    Note: Don't edit the readme directly (it's auto-generated). Add your submission to the appropriate data/*.yml file.

    Papers should be peer-reviewed and published in a journal. If you're unsure if a paper or resource belongs in this list, feel free to open an issue or start a discussion. This repo is meant to be a community effort. Don't hesitate to voice an opinion.