Generative AI, in Its Simplest Form
W02 · Part 2 — conditional generation, and sampling as a deterministic map
Uma Satyaranjan · Soma S Dhavala
Invalid Date
Two views of one output distribution
- So far: a generative model = a fitted distribution you can sample
- Now two deeper views of the same output distribution, each one line long:
- View 1 — hierarchy: sample step by step, conditionally (a hierarchical latent-variable model)
- View 2 — a map: a deterministic function of all the base randomness
Every generative sampler — diffusion included — is View 2, once all of its random inputs are exposed.
View 1: conditional generation
- Draw the hidden label (the latent variable), then draw from the chosen Gaussian
- This is ancestral sampling: follow the arrows of the hierarchy
- The marginal you observe is the two-component mixture:
Generation runs . Inference runs : the posterior . For and , the posterior mean of was W01’s tanh denoiser — you have already met conditional inference.
Live: coin first, Gaussian second
View 2: marginalize the coin away
The inverse-CDF construction: for any CDF , with the generalized inverse ,
- Proof (continuous, strictly increasing case) is one line:
- All the randomness lives in one uniform number; everything after it is deterministic
- Careful: selects the lowest -fraction of the mixture — when the components overlap, that is not the original label (the packed map in the notes is the version that does encode the coin)
The two-point limit
Slide in the demo. The CDF becomes a staircase: jump at , plateau at height , jump at . The map becomes
- W01’s two-point dataset, generated by thresholding a uniform — and in this separated limit, does coincide with the label
- Pure sampling has become a formula (Part 3 proves this limit)
- The plateau of is the empty region between the clusters: no ever lands there
Why this reframing matters
| This demo |
|
quantile (numerical here) |
the CDF is known |
| GAN |
|
, a network |
adversarial objective |
| VAE |
, plus decoder noise |
sample , i.e. |
ELBO / variational learning |
| Normalizing flow |
|
invertible |
exact likelihood (change of variables) |
| Diffusion |
; step noise if stochastic |
probability-flow ODE (deterministic) or reverse SDE |
score/denoising objectives, ELBO |
Same outer skeleton: simple randomness → sampling mechanism → data. The learned object, the constraints, and the sampler differ.
You have already seen the diffusion map
- W01, Act III: particles from a moment-matched Gaussian flowed numerically to within of (Euler steps, finite cloud — W01 lists the approximations)
- With the exact terminal law, exact score, and exact integration, the probability-flow ODE is a deterministic transport — an inverse-CDF-like map from noise to data
- Diffusion learns the scores of the noised distributions; integrating the resulting velocity field constructs the endpoint map
When no formula for the map exists, we learn an ingredient of it. Learning that ingredient — carefully, with all the mathematics — is the rest of this course.
Once every random draw is exposed, generation is a deterministic map from base randomness to a sample.
Analytic today. Learned, from tomorrow onward — starting with how to measure a model’s error: KL divergence.