# Training normalizing flows with computationally intensive target probability distributions

arXiv: https://arxiv.org/abs/2308.13294 · HTML: https://mlsanity.com/paper/2308.13294/

## Key facts

- Cited by 2 papers in the map (data through 14 Oct 2026).
- Builds on 20 of its 31 references that are in the map.
- First posted on arXiv 25 Aug 2023.

## Builds on (most cited first, 20 of 20)

- [PyTorch: An Imperative Style, High-Performance Deep Learning Library](https://mlsanity.com/paper/1912.01703/) (2019)
- [Auto-Encoding Variational Bayes](https://mlsanity.com/paper/1312.6114/) (2013)
- [Density estimation using Real NVP](https://mlsanity.com/paper/1605.08803/) (2016)
- [Automatic differentiation in machine learning: a survey](https://mlsanity.com/paper/1502.05767/) (2015)
- [Neural Spline Flows](https://mlsanity.com/paper/1906.04032/) (2019)
- [Flow-based generative models for Markov chain Monte Carlo in lattice field theory](https://mlsanity.com/paper/1904.12072/) (2019)
- [Normalizing Flows on Tori and Spheres](https://mlsanity.com/paper/2002.02428/) (2020)
- [Equivariant flow-based sampling for lattice gauge theory](https://mlsanity.com/paper/2003.06413/) (2020)
- [Solving Statistical Mechanics Using Variational Autoregressive Networks](https://mlsanity.com/paper/1809.10606/) (2018)
- [Variational inference for Monte Carlo objectives](https://mlsanity.com/paper/1602.06725/) (2016)
- [Introduction to Normalizing Flows for Lattice Field Theory](https://mlsanity.com/paper/2101.08176/) (2021)
- [Gauge-equivariant flow models for sampling in lattice field theories with pseudofermions](https://mlsanity.com/paper/2207.08945/) (2022)
- [Flow-based sampling for fermionic lattice field theories](https://mlsanity.com/paper/2106.05934/) (2021)
- [Gradients should stay on Path: Better Estimators of the Reverse- and Forward KL Divergence for Normalizing Flows](https://mlsanity.com/paper/2207.08219/) (2022)
- [Flow-based sampling in the lattice Schwinger model at criticality](https://mlsanity.com/paper/2202.11712/) (2022)
- [Hierarchical autoregressive neural networks for statistical systems](https://mlsanity.com/paper/2203.10989/) (2022)
- [Analysis of autocorrelation times in Neural Markov Chain Monte Carlo simulations](https://mlsanity.com/paper/2111.10189/) (2021)
- [Simulating first-order phase transition with hierarchical autoregressive networks](https://mlsanity.com/paper/2212.04955/) (2022)
- [Mutual information of spin systems from autoregressive neural networks](https://mlsanity.com/paper/2304.13412/) (2023)
- [Gradient estimators for normalising flows](https://mlsanity.com/paper/2202.01314/) (2022)

## Built on by (most cited first, 2 of 2)

- [Applications of flow models to the generation of correlated lattice QCD ensembles](https://mlsanity.com/paper/2401.10874/) (2024)
- [NeuMC -- a package for neural sampling for lattice field theories](https://mlsanity.com/paper/2503.11482/) (2025)

## Abstract (arXiv)

Machine learning techniques, in particular the so-called normalizing flows, are becoming increasingly popular in the context of Monte Carlo simulations as they can effectively approximate target probability distributions. In the case of lattice field theories (LFT) the target distribution is given by the exponential of the action. The common loss function's gradient estimator based on the "reparametrization trick" requires the calculation of the derivative of the action with respect to the fields. This can present a significant computational cost for complicated, non-local actions like e.g. fermionic action in QCD. In this contribution, we propose an estimator for normalizing flows based on the REINFORCE algorithm that avoids this issue. We apply it to two dimensional Schwinger model with Wilson fermions at criticality and show that it is up to ten times faster in terms of the wall-clock time as well as requiring up to 30% less memory than the reparameterization trick estimator. It is also more numerically stable allowing for single precision calculations and the use of half-float tensor cores. We present an in-depth analysis of the origins of those improvements. We believe that these benefits will appear also outside the realm of the LFT, in each case where the target probability distribution is computationally intensive.
