The evidence lower bound (ELBO) is the variational objective used to train a variational autoencoder (VAE). It replaces direct posterior optimization, whose normalization requires an intractable sum over latent values and repeated recomputation. Let q be the learned approximate posterior and p the target distribution. Because KL(q, p) + ELBO = ln p(x) and KL divergence is non-negative, the ELBO is a lower bound on the evidence log-likelihood. Maximizing it is equivalent to minimizing the KL divergence between q and p. section 14.7.5 section 14.7.6
Interpret the ELBO through its two complementary pressures:
- The entropy term Hq rewards a diffuse approximate posterior, encouraging smoothness in the latent space rather than concentrated peaks. section 14.7.6
- The expected log-joint term rewards latent assignments that explain the observed data under the generative model. section 14.7.6
- For a VAE, maximizing the ELBO becomes minimizing reconstruction loss plus KL divergence from the prior distribution. section 14.7.8
PyTorch VAE loss
A practical loss minimizes binary cross-entropy reconstruction error and the KL divergence from a standard normal prior: recon_loss = binary_cross_entropy(Xr, X); kld_loss = -0.5 * sum(1 + log_var - mu² - exp(log_var)); total_loss = recon_loss + beta * kld_loss. The encoder produces mu and log_var, the reparameterization trick samples z, and the decoder reconstructs Xr. section 14.7.8
| ELBO = Hq + Eq(ln(p( |
Use the compact decomposition ELBO = Hq + Eq(ln p(x, z)) to connect the mathematical objective with entropy and data explanation. section 14.7.6



