In variational Bayesian methods, the evidence lower bound (often abbreviated ELBO, also sometimes called the variational lower bound or negative variational free energy) is a useful lower bound on the log-likelihood of some observed data. The ELBO is useful because it provides a guarantee on the worst-case for the log-likelihood of some distribution (e.g. p(X)) which models a set of data. The actual log-likelihood may be higher (indicating an even better fit to the distribution) because the ELBO includes a Kullback-Leibler divergence (KL divergence) term which decreases the ELBO due to an internal part of the model being inaccurate despite good fit of the model overall. Thus improving the ELBO score indicates either improving the likelihood of the model p(X) or the fit of a component internal to the model, or both, and the ELBO score makes a good loss function, e.g., for training a deep neural network to improve both the model overall and the internal component. (The internal component is qϕ(⋅|x), defined in detail later in this article.)
Definition Let X and Z be random variables, jointly distributed with distribution pθ. For example, pθ(X) is the marginal distribution of X, and pθ(Z∣X) is the conditional distribution of Z given X. Then, for a sample x∼pdata, and any distribution qϕ, the ELBO is defined asL(ϕ,θ;x):=𝔼z∼qϕ(⋅|x)[lnpθ(x,z)qϕ(z|x)].The ELBO can equivalently be written as L(ϕ,θ;x)=𝔼z∼qϕ(⋅|x)[lnpθ(x,z)]+H[qϕ(z|x)]=lnpθ(x)−DKL(qϕ(z|x)||pθ(z|x)). In the first line, H[qϕ(z|x)] is the entropy of qϕ, which relates the ELBO to the Helmholtz free energy. In the second line, lnpθ(x) is called the evidence for x, and DKL(qϕ(z|x)||pθ(z|x)) is the Kullback-Leibler divergence between qϕ and pθ. Since the Kullback-Leibler divergence is non-negative, L(ϕ,θ;x) forms a lower bound on the evidence (ELBO inequality)lnpθ(x)≥𝔼z∼qϕ(⋅|x)[lnpθ(x,z)qϕ(z|x)].
Motivation
Variational Bayesian inference
Suppose we have an observable random variable X, and we want to find its true distribution p∗. This would allow us to generate data by sampling, and estimate probabilities of future events. In general, it is impossible to find p∗ exactly, forcing us to search for a good approximation. That is, we define a sufficiently large parametric family {pθ}θ∈Θ of distributions, then solve for minθL(pθ,p∗) for some loss function L. One possible way to solve this is by considering small variation from pθ to pθ+δθ, and solve for L(pθ,p∗)−L(pθ+δθ,p∗)=0. This is a problem in the calculus of variations, thus it is called the variational method. Since there are not many explicitly parametrized distribution families (all the classical distribution families, such as the normal distribution, the Gumbel distribution, etc, are far too simplistic to model the true distribution), we consider implicitly parametrized probability distributions:
First, define a simple distribution p(z) over a latent random variable Z. Usually a normal distribution or a uniform distribution suffices. Next, define a family of complicated functions fθ (such as a deep neural network) parametrized by θ. Finally, define a way to convert any fθ(z) into a distribution (in general simple too, but unrelated to p(z)) over the observable random variable X. For example, let fθ(z)=(f1(z),f2(z)) have two outputs, then we can define the corresponding distribution over X to be the normal distribution 𝒩(f1(z),ef2(z)). This defines a family of joint distributions pθ over (X,Z). It is very easy to sample (x,z)∼pθ: simply sample z∼p, then compute fθ(z), and finally sample x∼pθ(⋅|z) using fθ(z). In other words, we have a generative model for both the observable and the latent. Now, we consider a distribution pθ good, if it is a close approximation of p∗:pθ(X)≈p∗(X)since the distribution on the right side is over X only, the distribution on the left side must marginalize the latent variable Z away. In general, it's impossible to perform the integral pθ(x)=∫pθ(x|z)p(z)dz, forcing us to perform another approximation. Since pθ(x)=pθ(x|z)p(z)pθ(z|x) (Bayes' rule), it suffices to find a good approximation of pθ(z|x). So define another distribution family qϕ(z|x) and use it to approximate pθ(z|x). This is a discriminative model for the latent. The entire situation is summarized in the following table:
In Bayesian language, X is the observed evidence, and Z is the latent/unobserved. The distribution p over Z is the prior distribution over Z, pθ(x|z) is the likelihood function, and pθ(z|x) is the posterior distribution over Z. Given an observation x, we can infer what z likely gave rise to x by computing pθ(z|x). The usual Bayesian method is to estimate the integral pθ(x)=∫pθ(x|z)p(z)dz, then compute by Bayes' rule pθ(z|x)=pθ(x|z)p(z)pθ(x). This is expensive to perform in general, but if we can simply find a good approximation qϕ(z|x)≈pθ(z|x) for most x,z, then we can infer z from x cheaply. Thus, the search for a good qϕ is also called amortized inference. All in all, we have found a problem of variational Bayesian inference.
… excerpt ends here. Continue reading the full article.
