liveBook · Manning

Evidence lower bound

As explained in Causal AI

The evidence lower bound is a variational objective that lower-bounds the expected log-likelihood of observed data.

The evidence lower bound (ELBO) is a variational objective for training a variational autoencoder. Minimizing negative ELBO loss indirectly reduces reconstruction error and the KL divergence between the guide distribution Q(Z|…) and the target posterior P(Z|…). section 5.2.3

Training uses stochastic variational inference, optimizing the encoder’s variational distribution with randomly selected data batches to reduce memory use and scale training. section 5.2.3

Pyro training setup

Configure Pyro’s SVI with an Adam optimizer, a VAE model and guide, and Trace_ELBO as the loss; evaluate loss over test batches during training. section 5.2.3

Listing 5.13 Set up the training procedure
from pyro.infer import SVI, Trace_ELBO
from pyro.optim import Adam

pyro.clear_param_store()     #1
vae = VAE()    #2
train_loader, test_loader = setup_dataloaders(batch_size=256)    #3
svi_adam = Adam({"lr": 1.0e-3})     #4
model = vae.training_model    #5
guide = vae.training_guide    #5
svi = SVI(model, guide, svi_adam, loss=Trace_ELBO())     #5

Inspect the compact Pyro configuration that connects SVI, Adam, the model, the guide, and Trace_ELBO. section 5.2.3

How Causal AI covers it

How deep it goes
Explains indirect optimization of reconstruction error and KL divergence, then connects the objective to batch-based training and implementation.
Examples
Uses Pyro SVI configuration with Adam and Trace_ELBO, plus batch training and test-loss evaluation.
What you can do after
Builds VAE training with Pyro’s SVI and Trace_ELBO while monitoring training and test loss.
How it connects
Connects variational inference, KL divergence, variational autoencoders, stochastic variational inference, encoders, and guides.

Also explained in

Compare how 4 books explain evidence lower bound →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Causal AI. The section links point to the parts of the book it draws on.