Ask what should change when the equation is manipulated, then let the visualization test that expectation.
Foundation Lab
Variational Autoencoders & Variational Inference
Stable Diffusion is a latent diffusion model: an autoencoder maps images ↔ compressed latent space where diffusion operates
\log p_\theta(x) \ge \mathbb E_{q_\phi}[\log p_\theta(x\mid z)] - \mathrm{KL}(q_\phi\,\|\,p(z))Selected Foundation Object
Keep the equation fixed; move through the evidence.
Intuitive grasp of why ELBO works as both reconstruction + regularization
\log p_\theta(x) \ge \mathbb E_{q_\phi}[\log p_\theta(x\mid z)] - \mathrm{KL}(q_\phi\,\|\,p(z))Use the runnable panel, the key equation, and canonical papers as separate forms of evidence for the same object.
The useful learning product is the reusable mechanism you can carry into another model, paper, or engineering tradeoff.
This atlas page keeps the working demo; the domain notebook carries the fuller Intuition -> Math -> Code -> Demo sequence.
Why It Matters for Modern Models
- Stable Diffusion is a latent diffusion model: an autoencoder maps images ↔ compressed latent space where diffusion operates
- VAEs underpin many multimodal encoders (audio, video latents) used as building blocks
What Tutorials Skip
What is still poorly explained in textbooks and papers:
- Intuitive grasp of why ELBO works as both reconstruction + regularization
- Visualizations of how the prior p(z) and posterior families affect sample quality/diversity
Interactive Visualization
Core Math (Optional Deep Dive)
If you want intuition first, start with the key equation and the visualization. Come back here for the full walkthrough.
Latent variable model with intractable posterior. Introduce variational encoder and maximize ELBO:
Reparameterization trick for Gaussian encoder: