Skip to content
BIASED

Black-box variational inference and the VAE

Block 1 of 7~2 min

When conjugacy is gone

The topic Stochastic variational inference made variational inference fast on large data, but it kept one requirement from the start: every complete conditional must lie in the exponential family, so that each update and each natural gradient has a closed form. Many models we care about break that.

Take Bayesian logistic regression with one weight, as in the topic The Laplace approximation and Bayesian classification. The prior is w∼N(0,1)w \sim \mathcal N(0, 1), the labels are yi∈{−1,+1}y_i \in \{-1, +1\}, and p(yi∣w)=σ(yiwxi)p(y_i \mid w) = \sigma(y_i w x_i) with the sigmoid σ\sigma. Choose q(w)=N(μ,σq2)q(w) = \mathcal N(\mu, \sigma_q^2). The ELBO contains

Eq[log⁡σ(yiwxi)],\mathbb E_{q}\big[\log \sigma(y_i w x_i)\big],

the expectation of a log-sigmoid under a Gaussian. It has no closed form. Coordinate ascent has no formula to iterate, and SVI has no natural gradient to step along. The classic way out is a model-specific trick: the Laplace approximation, or a hand-made bound on the sigmoid.

This topic asks for something more general. Can we get the gradient of the ELBO for any model, using only the ability to evaluate log⁡p(x,z)\log p(x, z) at a point? This is black-box variational inference (BBVI; Ranganath, Gerrish and Blei, 2014). The idea fits in one line: the ELBO is an expectation under qq, so its gradient can be written as an expectation too, and expectations can be estimated by Monte Carlo (the topic Monte Carlo and Markov chains).

Answers are saved on the server and tied to this browser until you sign in.