Stable Training of Normalizing Flows for High-dimensional Variational Inference

Daniel Andrade
2/26/2024
stat.MLcs.LG

No official code found. Best implementation: andrade-stats/normalizing-flows (6 stars, last commit 2025-03-19).

Abstract

Variational inference with normalizing flows (NFs) is an increasingly popular alternative to MCMC methods. In particular, NFs based on coupling layers (Real NVPs) are frequently used due to their good empirical performance. In theory, increasing the depth of normalizing flows should lead to more accurate posterior approximations. However, in practice, training deep normalizing flows for approximating high-dimensional posterior distributions is often infeasible due to the high variance of the stochastic gradients. In this work, we show that previous methods for stabilizing the variance of stochastic gradient descent can be insufficient to achieve stable training of Real NVPs. As the source of the problem, we identify that, during training, samples often exhibit unusual high values. As a remedy, we propose a combination of two methods: (1) soft-thresholding of the scale in Real NVPs, and (2) a bijective soft log transformation of the samples. We evaluate these and other previously proposed modification on several challenging target distributions, including a high-dimensional horseshoe logistic regression model. Our experiments show that with our modifications, stable training of Real NVPs for posteriors with several thousand dimensions is possible, allowing for more accurate marginal likelihood estimation via importance sampling. Moreover, we evaluate several common training techniques and architecture choices and provide practical advise for training NFs for high-dimensional variational inference.

View on arXivView PDF

Code Implementations(1)

61PythonFeb 24, 20241 years agoNOASSERTION

Similar Papers

Cite this paper

@article{andrade2024stable,
  title  = {Stable Training of Normalizing Flows for High-dimensional Variational Inference},
  author = {Daniel Andrade},
  year   = {2024},
  eprint = {2402.16408},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.16408v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.16408.svg)](https://codeofpaper.com/paper/2402.16408)

Discussion