Generative Models — Taxonomy & History
A generative model learns to sample from the distribution its training data came from, and the field sorts into five buckets by how each model gets there. Pick the wrong bucket and you will fight the math for weeks. Pick the right one and the last twelve years of progress stack cleanly in your head.
Learning Objectives
- Sort the five families of generative models by what each one models and how much of the density it exposes.
- Explain the difference between explicit-density and implicit-density models, and which questions each can answer.
- Place the major models from the 2013 VAE to 2026 one-step sampling in the right family and on the timeline.
- Apply the five-question triage to a new paper and map a task to a family and its inference cost shape.
The Problem
A generative model learns to produce new samples from the same distribution as its training data: given samples drawn from some unknown p_data(x), it outputs new ones that look like they came from there. Faces, sentences, MIDI files, and protein structures look like the same problem if you squint.
The rub is that p_data lives in a space with millions of dimensions (a 512x512 RGB image is ~786k dimensions), the samples sit on a thin manifold inside that space, and you have maybe 10M examples. Brute-forcing the density is hopeless, so generative models trade one hard problem for a slightly less hard one.
Five families have survived the last twelve years. Each makes a different compromise, and knowing which one tells you why it wins on some tasks and collapses on others.
The Concept
The five families differ in what they model and how much of the density they expose: the density itself, a bound on it, a sampler alone, the score, or a sequence of discrete tokens.
1. Explicit density, tractable. These models write log p(x) as a sum you can evaluate. Autoregressive models (PixelCNN, WaveNet, GPT) factorize p(x) = ∏ p(x_i | x_<i). Normalizing flows (RealNVP, Glow) build p(x) as an invertible transform of a simple base. The upside is exact likelihood and a clean training loss. The cost is that autoregressive inference is sequential (slow for long sequences) and flows need invertible architectures, which restricts the design.
2. Explicit density, approximate. These models bound log p(x) from below (the ELBO) and optimize the bound. VAEs (Kingma 2013) use an encoder-decoder with a variational posterior. Diffusion models (DDPM, Ho 2020) train a denoiser that implicitly optimizes a weighted ELBO. Diffusion is the dominant image, video, and 3D backbone in 2026.
3. Implicit density. These models skip density entirely. A generator G(z) produces samples and a discriminator D(x) tells real from fake. GANs (Goodfellow 2014) are fast at inference (one forward pass) but notoriously unstable during training. StyleGAN 1/2/3 remain state of the art for fixed-domain photorealism (faces, bedrooms) even in 2026.
4. Score-based / continuous-time. These models learn the gradient of the log-density, ∇_x log p(x), called the score, directly. Song & Ermon (2019) showed score matching generalizes diffusion to an SDE. Flow matching (Lipman 2023) is the 2024-2026 favorite: simulate-free training, straighter paths, 4-10x faster sampling than DDPM. Stable Diffusion 3, Flux, and AudioCraft 2 all use flow matching.
5. Token-based autoregressive over discrete codes. A VQ-VAE or residual quantizer compresses high-dim data into a short sequence of discrete tokens, then a Transformer models the token sequence. Parti, MuseNet, AudioLM, VALL-E, and Sora's patch tokenizer all use this. It is bucket 1 plus a learned tokenizer.
A brief history
The table runs from the 2013 VAE to one-step sampling in 2026.
| Year | Model | Why it mattered |
|---|---|---|
| 2013 | VAE (Kingma) | First deep generative model with a usable training loss. |
| 2014 | GAN (Goodfellow) | Implicit density, no likelihood, and shockingly sharp samples. |
| 2015 | DRAW, PixelCNN | Sequential image generation. |
| 2017 | Glow, RealNVP | Invertible flows; exact likelihood with depth. |
| 2017 | Progressive GAN | First megapixel faces. |
| 2019 | StyleGAN / StyleGAN2 | Photorealistic faces still hard to beat for that one domain. |
| 2020 | DDPM (Ho) | Diffusion becomes practical. |
| 2021 | CLIP, DALL-E 1, VQGAN | Text-to-image goes mainstream. |
| 2022 | Imagen, Stable Diffusion 1, DALL-E 2 | Latent diffusion + text conditioning = commodity. |
| 2022 | ControlNet, LoRA | Fine control over pretrained diffusion. |
| 2023 | SDXL, Midjourney v5, Flow matching | Scale + better training dynamics. |
| 2024 | Sora, Stable Diffusion 3, Flux.1 | Video diffusion; flow matching wins. |
| 2025 | Veo 2, Kling 1.5, Runway Gen-3, Nano Banana | Production-grade video. |
| 2026 | Consistency + Rectified Flow | One-step sampling from diffusion backbones. |
The five-question triage
When a new generative model paper drops, answer these five questions before you read the method section.
- What is being modeled? Pixels, latents, discrete tokens, 3D Gaussians, meshes, waveforms?
- Is the density explicit or implicit? Do they write down
log p(x)? - Sampling: one-shot or iterative? Iterative means slower inference; one-shot usually means adversarial or distilled.
- Conditioning: unconditional, class, text, image, pose? This determines the loss and architecture scaffolding.
- Evaluation: FID, CLIP score, IS, human preference, task accuracy? Each has known failure modes (see Lesson 14).
You will answer these five again in every lesson of this phase. By the end they will be reflex.
Build It
The code here is a small visualization. It draws 2000 samples from a known two-mode Gaussian mixture (modes at -2 with sigma 0.6 and +2 with sigma 0.9, weight 0.4 on the first) and runs three toy approaches on them, so you can see explicit vs implicit density on a problem that prints on one screen. A histogram and a Gaussian kernel density estimate (KDE) both estimate p(x) straight from the samples. Nothing is fitted as a mixture model. The third approach is an implicit generator that picks a random training point and adds Gaussian noise (sigma 0.1). It does no nearest-neighbour lookup.
Run main.py. It prints an ASCII histogram of the samples, evaluates p(x=0.0) three ways, integrates p(x in [-0.5, 0.5]) under the histogram and the KDE, and draws 10 new samples from the generator. The real output with seed 42:
=== 2000 samples from a two-mode Gaussian mixture ===
#
####
## ####
## #####
### ######
###### ########
###### ########
###### ##########
######## ###########
######## ############
######### #############
########## # ###############
----------------------------------------
-5.0 5.0
evaluate p(x=0.0) three ways:
histogram density: 0.0180
kernel density: 0.0258
implicit generator: N/A (only samples, no density)
integrate p(x in [-0.5, 0.5]):
histogram: 0.025
kde: 0.033
10 new samples from the implicit (GAN-ish) generator:
-1.32, -2.43, -2.75, +1.48, +2.31, +2.07, +1.22, -2.74, -2.48, +3.57
takeaway: explicit density (buckets 1-2 in the doc) lets you answer
'how likely is this point?'. implicit (bucket 3) does not.
The histogram and KDE are non-parametric estimators, not the bucket 1 or 2 models themselves. The script's takeaway line says "buckets 1-2 in the doc" because both estimators expose a density the way those buckets do. Notice that the histogram and the KDE let you ask "how likely is this point?" and the generator cannot. That is the explicit vs implicit distinction, and it will keep coming up in the lessons ahead.
Use It
Which family fits which task in 2026?
| Task | Best family | Why |
|---|---|---|
| Photoreal faces, narrow domain | StyleGAN 2/3 | Still sharpest, fastest inference. |
| General text-to-image | Latent diffusion + flow matching | SD3, Flux.1, DALL-E 3. |
| Fast text-to-image | Rectified flow + distillation | SDXL-Turbo, SD3-Turbo, LCM. |
| Text-to-video | Diffusion Transformer + flow matching | Sora, Veo 2, Kling. |
| Speech + music | Token-based AR (AudioLM, VALL-E, MusicGen) or flow matching (AudioCraft 2) | Discrete tokens scale cheaply. |
| 3D scenes | Gaussian Splatting fit, diffusion prior | 3D-GS for reconstruction, diffusion for novel-view. |
| Density estimation (no sampling) | Flows | Exact log p(x) with one-pass sampling (autoregressive models are exact too, but sample sequentially). |
| Simulation / physics | Flow matching, score SDE | Straight-line paths, smooth vector fields. |
Ship It
Save as outputs/skill-model-chooser.md.
The skill takes a task description and outputs four things: which family to use, a ranked list of three open and three hosted options, the likely failure mode to watch for, and a compute/time budget.
I'd run the density question from the triage first on any new paper: does it expose p(x) or give you a sampler alone? main.py makes that concrete. The histogram and the KDE both return a number for p(x) at a query point and integrate it over [-0.5, 0.5], while the implicit generator prints samples and a line saying there is no density.
My bet is that the resampling generator deserves some suspicion. In main.py it picks a training point at random and adds noise with a standard deviation of 0.1, so each output is a training point plus a small jitter. There is no discriminator and no training loop. I'd read "GAN-ish" as a label for "no p(x)" and not as a picture of how a GAN learns.
I'd also check the production note's "fewer steps × same step cost" versus "same steps × cheaper step cost" split against numbers in the paper, because nothing in main.py runs a multi-step sampler and the script can't show you that cost curve.
Exercises
- Easy. For each of these five products, identify the family and backbone: ChatGPT image, Midjourney v7, Sora, Runway Gen-3, ElevenLabs. Back each answer with a public technical report.
- Medium. The paper you are about to read tomorrow claims 100x faster sampling than diffusion. Write down three questions to check whether the speedup survives conditioning and high resolution.
- Hard. Take one domain you care about (e.g. protein structure, CAD, molecules, trajectories). Answer the five-question triage for the current SOTA model in that domain and sketch what a better model would change.
Key Terms
| Term | What people say | What it actually means |
|---|---|---|
| Generative model | "It makes new stuff" | Learns a sampler for p_data(x), optionally exposes log p(x). |
| Explicit density | "You can evaluate it" | Model provides a closed-form or tractable log p(x). |
| Implicit density | "GAN-style" | A sampler, with no way to evaluate p(x) of a given point. |
| ELBO | "Evidence lower bound" | A tractable lower bound on log p(x); VAEs and diffusion optimize it. |
| Score | "Gradient of log-density" | ∇_x log p(x); diffusion and SDE models learn this field. |
| Manifold hypothesis | "Data lives on a surface" | High-dim data concentrates on a low-dim manifold; why dimensionality reduction works. |
| Autoregressive | "Predict the next piece" | Factorize joint as product of conditionals. |
| Latent | "Compressed code" | Low-dim representation from which a decoder can reconstruct the input. |
Production note: five families, five inference shapes
Each family maps to a different inference-server cost curve. Production-inference writing frames LLM inference as prefill plus decode, and the same decomposition applies here:
- Autoregressive (bucket 1 and 5). Sequential decode dominates latency, and KV-cache, continuous batching, and speculative decoding all apply directly.
- VAE / diffusion / flow-matching (buckets 2 and 4). There is no decode in the LLM sense. Cost =
num_steps × step_cost, andstep_costis a transformer or U-Net forward at the full latent resolution. The production knobs are step count (DDIM / DPM-Solver / distillation), batch size, and precision (bf16 / fp8 / int4). - GAN (bucket 3). One forward pass, with no schedule and no KV-cache. TTFT ≈ total latency, which is why StyleGAN still wins on narrow-domain UX.
When you see "faster than diffusion" in a paper abstract, translate it to "fewer steps × same step cost" or "same steps × cheaper step cost". Anything beyond those two readings deserves a second look.
Further Reading
- Goodfellow et al. (2014). Generative Adversarial Nets: the GAN paper.
- Kingma & Welling (2013). Auto-Encoding Variational Bayes: the VAE paper.
- Ho, Jain, Abbeel (2020). Denoising Diffusion Probabilistic Models: the DDPM paper.
- Song et al. (2021). Score-Based Generative Modeling through SDEs: diffusion as an SDE.
- Lipman et al. (2023). Flow Matching for Generative Modeling: the flow matching paper.
- Esser et al. (2024). Scaling Rectified Flow Transformers for High-Resolution Image Synthesis: Stable Diffusion 3.
Code
- main.py (python, 104 lines)