VarGrad: A Low-Variance Gradient Estimator for Variational Inference

Lorenz Richter, Ayman Boustati, Nikolas Nüsken, Francisco J. R. Ruiz, Ömer Deniz Akyildiz
10/20/2020
stat.MLcs.LGmath.ST
bayesian

Official code: aboustati/vargrad (12 stars, Jupyter Notebook, Apache-2.0, last commit 2020-10-12).

Abstract

We analyse the properties of an unbiased gradient estimator of the ELBO for variational inference, based on the score function method with leave-one-out control variates. We show that this gradient estimator can be obtained using a new loss, defined as the variance of the log-ratio between the exact posterior and the variational approximation, which we call the $\textit{log-variance loss}$.

Show full abstract

Under certain conditions, the gradient of the log-variance loss equals the gradient of the (negative) ELBO. We show theoretically that this gradient estimator, which we call $\textit{VarGrad}$ due to its connection to the log-variance loss, exhibits lower variance than the score function method in certain settings, and that the leave-one-out control variate coefficients are close to the optimal ones. We empirically demonstrate that VarGrad offers a favourable variance versus computation trade-off compared to other state-of-the-art estimators on a discrete VAE.

View on arXivView PDF

Code Implementations(1)

aboustati/vargradOfficial100%
Apache-2.0

Code accompanying VarGrad: A Low-Variance Gradient Estimator for Variational Inference

120Jupyter Notebook, PythonOct 12, 20206 years agoApache-2.0

Similar Papers

Cite this paper

@article{richter2020vargrad,
  title  = {VarGrad: A Low-Variance Gradient Estimator for Variational Inference},
  author = {Lorenz Richter and Ayman Boustati and Nikolas Nüsken and Francisco J. R. Ruiz and Ömer Deniz Akyildiz},
  year   = {2020},
  eprint = {2010.10436},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2010.10436}
}

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/2010.10436.svg)](https://codeofpaper.com/paper/2010.10436)

Discussion