The evidence lower bound (ELBO), also called the variational lower bound, is a quantity that is always less than or equal to the log marginal likelihood log p(x) of observed data under a model with latent variables. In probabilistic models, it is the objective function of variational inference: instead of computing an intractable posterior exactly, one chooses an approximate distribution q(z) and adjusts it to make the ELBO as large as possible.
Maximizing the ELBO does two things at once. It pulls the approximation toward the true posterior, and it raises a bound on the evidence, which makes it usable for learning model parameters. This dual role explains why the ELBO appears everywhere from classic mean-field methods to variational autoencoders and Bayesian neural networks in artificial intelligence.
How the ELBO is derived
The ELBO follows from a single identity that splits the log evidence into a bound and a gap. For any distribution q(z) over latent variables, log p(x) = ELBO(q) + KL(q(z) || p(z|x)), where the second term is the Kullback-Leibler divergence between the approximation and the exact posterior.
Because a KL divergence is never negative, the ELBO can never exceed log p(x). The gap between the two equals the KL divergence exactly, so maximizing the ELBO over q is equivalent to minimizing KL(q || p(z|x)) while the evidence stays fixed. An alternative derivation applies Jensen’s inequality to the logarithm of an expectation and reaches the same bound.
The ELBO can be written in several equivalent forms, and each one highlights a different interpretation, as the table shows.
| Form | Expression | Interpretation |
|---|---|---|
| Joint minus entropy | E_q[log p(x, z)] + H[q] | Fit the joint density while keeping q spread out |
| Reconstruction minus KL | E_q[log p(x|z)] - KL(q(z) || p(z)) | Explain the data while staying close to the prior |
| Evidence minus gap | log p(x) - KL(q(z) || p(z|x)) | Bound tightness equals posterior approximation error |
What each term of the ELBO controls
In the reconstruction minus KL form, the ELBO expresses a trade-off between data fit and regularization. The expected log-likelihood rewards latent values that explain the observations, and the KL term to the prior penalizes approximations that drift far from prior beliefs.
The entropy view adds a second insight: the term H[q] prevents q from collapsing onto a single point. Without it, the optimum would be a point mass at the most probable latent value, which is essentially maximum a posteriori estimation rather than Bayesian inference.
| Component | Increases when | Practical effect |
|---|---|---|
| Expected log-likelihood | Latent samples reconstruct data well | Sharper, data-driven posterior |
| KL to the prior | q stays close to p(z) | Regularization and smoother latent space |
| Entropy of q | q spreads probability mass | Avoids overconfident point estimates |
Optimizing the ELBO in practice
Optimization strategies depend on whether the ELBO’s expectations can be computed in closed form. In conjugate exponential-family models, coordinate ascent variational inference updates each factor of a mean-field approximation analytically, and each step is guaranteed not to decrease the bound.
For non-conjugate or neural models, the expectations are estimated with Monte Carlo samples and optimized by stochastic gradient methods. The reparameterization trick writes a sample as a differentiable function of noise, giving low-variance gradients, while score-function estimators work for discrete latents at the cost of higher variance.
| Approach | Gradient source | Best suited for |
|---|---|---|
| Coordinate ascent | Analytic updates | Conjugate models such as mixture models |
| Stochastic variational inference | Minibatch natural gradients | Large datasets with global parameters |
| Reparameterization gradients | Differentiable sampling | Continuous latents in deep models |
| Score-function gradients | Log-derivative identity | Discrete or non-differentiable latents |
| Amortized inference | Encoder network outputs q | Many data points sharing one inference model |
Because the bound is estimated stochastically, a reported ELBO is a noisy quantity. Practitioners average it over many samples before comparing models and track it on held-out data to detect overfitting.
Tighter bounds and related objectives
The standard ELBO is only as tight as the chosen variational family allows, which motivated several tighter or more flexible objectives. Each trades extra computation for a smaller gap to the true evidence.
| Objective | Relation to the ELBO | Typical cost |
|---|---|---|
| IWAE bound | Uses K importance samples, tighter as K grows | About K times more likelihood evaluations |
| Beta-weighted ELBO | Scales the KL term by a factor beta | Same cost, changes the fit-regularization balance |
| Expectation propagation | Minimizes the reverse KL locally | Moment matching, no global bound guarantee |
| Exact marginal likelihood | Upper limit the ELBO approaches | Usually intractable in latent variable models |
Richer families such as normalizing flows or mixtures also shrink the gap without changing the objective itself, because they let q represent correlated or multimodal posteriors.
Limitations and common misconceptions
The ELBO is a powerful tool, but several limitations follow directly from its definition, and misreading the bound is a frequent source of errors in model comparison.
- A higher ELBO is not always a better model: it can improve because q got better, not because the model explains data better.
- Reverse KL is mode-seeking: maximizing the ELBO tends to underestimate posterior variance and may ignore secondary modes.
- Posterior collapse occurs in deep generative models when a powerful decoder ignores the latent code and the KL term drops to near zero.
- Comparing ELBOs across variational families is valid only as a comparison of bounds, not of true evidence values.
The short version
Some probability calculations are too hard to do exactly. The evidence lower bound gives a number that is easier to compute. It is always a little lower than the true answer. So it is a safe floor.
You pick a simple guess for the hidden causes behind your data. Then you adjust the guess to push the floor up. The higher the floor rises, the closer your guess gets to the real answer. It is like measuring the height of a ceiling by stacking boxes. You cannot reach above the ceiling, but each box brings you closer.
Where it makes a difference
A team building a variational autoencoder for anomaly detection in factory sensor data trains the model by maximizing the ELBO on about 200,000 windows of normal vibration readings. The encoder outputs a Gaussian q over a 16-dimensional latent space, and gradients come from the reparameterization trick with one sample per window.
Early training shows the KL term falling almost to zero, a sign of posterior collapse. The engineers apply a warm-up schedule that raises the KL weight from 0 to 1 over the first 20 epochs, after which the latent code carries useful information. At deployment, windows whose per-sample ELBO falls far below the training distribution are flagged. The approach detects bearing faults earlier than a fixed vibration threshold while keeping false alarms within the plant’s tolerance.