Foundations — ELBO objective and KL term
Before you can read a single line of the ELBO derivation, you need the alphabet it is written in. This page builds every symbol from nothing. Read it top to bottom: each idea is a brick for the next.
0. The cast of characters (what all the letters mean)
The parent note throws a lot of letters at you — , , , , , , , . None of them are scary once you meet them one at a time.

Look at the figure. The hidden cause sits on the left. An arrow labelled "generate" pushes it to the visible data on the right. This one arrow is the whole idea of a generative model: nature (or our model) picks a hidden , then produces the we observe. Our job is to run that arrow backwards — see , guess .
1. Probability — the "how likely" machine
Why the topic needs it: everything in generative modelling is a question of "how likely." We measure success by how much probability the model assigns to real data.
Three flavours of appear, and mixing them up is the #1 source of confusion:
| Notation | Read it as | Picture |
|---|---|---|
| "how likely is this hidden cause, before seeing anything" | the prior — a fixed bell curve | |
| "if the hidden cause is , how likely is this data" | the decoder — the generate arrow | |
| "given I saw this data, how likely was each hidden cause" | the posterior — the reverse arrow |
The little bar means "given" — everything after the bar is assumed known.
2. The integral — "add up over all possibilities"

In the figure, the shaded area under the curve is the integral. Each thin vertical strip is one possible value of ; its height is how much that value contributes; adding every strip gives the whole area.
Why the topic needs it: to find how likely the data is overall, we must consider every hidden cause that could have produced it and add up their contributions:
Read this in words: "the total likelihood of = for every hidden cause , (how likely that cause is) (how likely it makes ), summed over all ."
3. The logarithm — turning products into sums
Why the topic needs it: probabilities of many things multiply together and become vanishingly tiny (like ). Taking turns that fragile product into a stable sum, and because is increasing, maximizing is the same as maximizing . So we always work with , never raw .
Also, has a shape that matters enormously later:

The curve bulges upward (it is concave — it holds water). Notice in the figure: the straight chord between two points on the curve always sits below the curve. That single geometric fact is what makes Jensen's inequality (Step 3 of the derivation) point the right way. Hold this picture.
4. Expectation — the average you'd expect
Why the topic needs it: we can't do the full integral, but we can draw a handful of samples and average. Expectation is the bridge between the impossible integral and a doable computation (this is Monte Carlo — estimating an average by sampling).
5. The approximate posterior — our stand-in for the impossible reverse arrow
The true reverse arrow needs the villain integral. So we build a replacement we can compute, and call it .
The letters (theta) and (phi) are just names for two sets of adjustable numbers:
- = knobs of the decoder (, the generate arrow).
- = knobs of the encoder (, the guess arrow).
6. KL divergence — the distance between two clouds of belief

Read the figure: when the two bells sit on top of each other (left), , its is , and KL . When they drift apart (right), the ratio swings away from 1 wherever has mass, the grows, and KL climbs. KL is small when the clouds overlap, large when they separate.
Two facts you must trust (proven on KL Divergence):
- always — you can never be "negatively different."
- in general — the order matters. It is not an ordinary symmetric distance.
Why the topic needs it: the ELBO has a KL term that glues the encoder's guesses to the simple prior, and the gap between ELBO and the true log-likelihood is itself a KL. KL is the mortar of the whole building.
How it all feeds the topic
Every arrow entering ELBO is a symbol you now own. The impossible evidence at the top is exactly what the ELBO climbs toward from below.
Sanity check with one tiny number
Recall
Cloze yourself before moving on:
The letter that means hidden, unobserved cause
The letter that means the data you can see
is called the
is called the
is called the
Why is impossible in practice
Why do we take of probabilities
The shape of that makes Jensen work
means
The subscript on denotes
exactly when
Is symmetric
Equipment checklist
Say each answer out loud; if any stalls, re-read that section before the derivation page.
I can explain the difference between and in one sentence
I can name all three: , ,
I can say why is intractable
I know the two properties of we use
I can read aloud and say what the subscript does
I know what and are
I can state what measures and its two key facts
I can compute a 1-D Gaussian KL from the closed form
Prerequisite deep-dives if any box failed: KL Divergence, Variational Inference, VAE Architecture. Related once you're solid: Expectation Maximization, Information Bottleneck, Posterior Collapse, Normalizing Flows, Importance Weighted Autoencoders. Then return to the parent: ELBO objective and KL term.