ELBO gives a lower bound on the log-likehood for VAE training:
where
Specifically, ELBO is a function that is always less than or equal to the log-likelihood for a given value of , and will also depend on some other parameters .
Jensen’s Inequality
To define this lower bound, we need Jensen’s Inequality for concave functions :
In this case, the concave function is the logarithm, so we have:

Writing out the expectation in full, we have:

In fact, a slightly more general statement is true:
where is a function of . This follows because is another random variable with a new distribution. Since we never specified , the relation remains true.
Derivation of the bound
We now use Jensen’s inequality to derive the lower bound for the log-likelihood. We start by introducing an arbitrary distribution over the latent variables. Multiplying and dividing the log-likelihood by lets us re-write the marginal likelihood as an expectation and apply Jensen’s inequality.
First:
We then use Jensen’s inequality for the logarithm to find a lower bound:
where the right-hand side is termed the evidence lower bound or ELBO. It gets this name because is called the evidence in the context of Bayes’ rule.
In practice, the distribution has parameters , so the ELBO can be written as:
To learn the nonlinear latent variable model, we maximize this quantity as a function of both and . The neural architecture that computes this quantity is the VAE.
Properties
Let’s build some intuition about ELBO.
Consider that the original log-likelihood of the data is a function of the parameters and that we want to find its maximum. For any fixed , the ELBO is still a function of the parameters, but one that must lie below the original likelihood function.
- When we change , we modify this function, and depending on our choice, the lower bound may move closer or further from the log-likelihood.
- When we change , we move along the lower bound function.

Tightness of the bound
The ELBO is tight when, for a fixed value of , the ELBO and the log-likelihood function coincide.
To find the distribution that makes the bound tight, we factor the numerator of the log term in the ELBO using the definition of conditional probability:
- The first integral disappears between lines 3 and 4 since does not depend on , and the integral of the probability distribution is one.
- In the last line, we used the definition of KL divergence.
This shows that the ELBO is the original log-likelihood minus the KL divergence . The KL divergence measures the “distance” between distributions and is always non-negative. Thus, it’s clear that the ELBO is a lower bound on .
When , the KL distance will be zero, and the bound is tight. is the posterior distribution over the latent variables given observed data ; it indicates which values of the latent variable could have been responsible for the data point.

ELBO as reconstruction minus KL distance to prior
We have seen two ways to describe ELBO. A third way is to consider the bound as reconstruction error minus the distance to the prior:
- The joint distribution has been factored into conditional probability between the first and second lines
- The definition of KL divergence is used in the last line.
In this formulation:
- The first term measures the average agreement of the latent variable and the data. This measures the reconstruction accuracy.
- The term identifies latents that might explain . measures how much probability is assigned to the observed given . The integral then averages this score over all possible ‘s.
- The second term measures the degree to which the auxiliary distribution matches the prior.
This formulation is the one that is used in the variational autoencoder.
While we initially introduced as a mathematical tool, we now see that has an important role in the tightness of ELBO, where the bound is tight when . We therefore choose a tractable parameterized distribution (usually a multivariate normal distribution) and optimize it as an approximation to the generally intractable . This approximation is called the variational posterior.