Amortized Variational Inference: When and Why?

Charles C. Margossian, David M. Blei
7/20/2023
34 citations
stat.MLcs.LG
bayesian

Official code: charlesm93/AVI-when-and-why (7 stars, Jupyter Notebook, last commit 2024-05-08). 1 more implementation below.

Abstract

In a probabilistic latent variable model, factorized (or mean-field) variational inference (F-VI) fits a separate parametric distribution for each latent variable. Amortized variational inference (A-VI) instead learns a common inference function, which maps each observation to its corresponding latent variable's approximate posterior.

Show full abstract

Typically, A-VI is used as a step in the training of variational autoencoders, however it stands to reason that A-VI could also be used as a general alternative to F-VI. In this paper we study when and why A-VI can be used for approximate Bayesian inference. We derive conditions on a latent variable model which are necessary, sufficient, and verifiable under which A-VI can attain F-VI's optimal solution, thereby closing the amortization gap. We prove these conditions are uniquely verified by simple hierarchical models, a broad class that encompasses many models in machine learning. We then show, on a broader class of models, how to expand the domain of AVI's inference function to improve its solution, and we provide examples, e.g. hidden Markov models, where the amortization gap cannot be closed.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
charlesm93/AVI-when-and-whyOfficial7Jupyter Notebook–2024-05-08
charlesm93/amortized_viOfficial3Jupyter Notebook–2024-02-13

Code to reproduce experiments in paper: "Amortized Variational Inference: When and Why?"

70Jupyter NotebookFeb 13, 20242 years ago

experiments on amortized VI

31Jupyter Notebook, RApr 3, 20232 years ago

Similar Papers

Cite this paper

@article{margossian2023amortized,
  title  = {Amortized Variational Inference: When and Why?},
  author = {Charles C. Margossian and David M. Blei},
  year   = {2023},
  eprint = {2307.11018},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2307.11018v4}
}

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

Discussion