One Question, Three Answers: What a Generative Model Learns
A generative model estimates a density over images, $p_{\text{model}}(x)$, meant to approximate the distribution the training photographs came from. Every family here answers one question, how to put a normalized density over all possible images, and the answers differ only in how honestly each one faces that density: compute it exactly, approximate it, or give up and only sample. That choice, not ambition, fixes each family's price in sampling speed, measurability and sharpness.
A classifier must label the monkey; a density model can also say the photo is unlikely
A classifier answers which label fits. A density model must also answer whether the image itself is plausible, and that second sentence is the whole subject.
Start with a photograph that carries no annotation of any kind.

Caption: A grey-and-white kitten walking on grass, one front paw raised, with nothing in the frame saying what it is. A classifier handed this image cannot answer anything except which label fits it, and it will answer that whether or not the picture is a coherent scene.
The point is structural rather than a limitation of one network. A discriminative classifier parameterizes $p(y \mid x)$ and carries no object that scores the input itself, so its output is always a distribution over labels.
The monkey is the same point in its hardest form. Even when the right answer is easy, the model still has to have an opinion about the pixels.

Caption: A close-up of a brown-gold primate with a pale pink face against blurred rock. The label is available, but the label alone says nothing about whether this particular arrangement of fur, shadow and rock is a plausible photograph.
The abstract pattern is the extreme case. It must be labelled, and a density model can call it implausible.

Caption: A saturated, rotationally symmetric pattern built from interwoven colour arcs and blocks, with one solid black rectangle in the upper left. The deck uses it only as the kind of input a classifier must still hand a label to; nothing in the frame says what it is.
The photograph of a sitting dog in the same part of the deck makes the same point with a friendlier subject: four legs, a harness, autumn leaves. Nothing in a label distribution can say that a three-legged dog is less likely than a four-legged one, because legs are not labels.
The formal contrast fits in one sentence. A generative classifier learns a model of the joint $p(x,y)$ and reaches the posterior through Bayes' rule, while a discriminative classifier models $p(y \mid x)$ directly. The obvious objection is that if the posterior is all you need, nothing else deserves modelling. Ng and Jordan answered it in 2001 with a two-sided result. The discriminative side has the lower asymptotic error, but the generative side can approach its own higher asymptote after $O(\log n)$ samples rather than $O(n)$, so which side wins depends on how much labelled data you haveNgJordan.
Two caveats keep that result honest. It is proved for low-dimensional binary classification with naive-Bayes style factorizations, and the speed advantage is bought by the very independence assumption that makes the generative model wrong about the data. Transferring it to images is our reasoning, not the paper's finding. The conclusion that survives the transfer is the one the rest of this article rests on: model $p(x)$ because it is an extra object a classifier never carries, not because it draws a better label boundary.
The total mass is fixed at one, so every image competes for it
A density value is a height, not a probability. What is fixed is the area under the curve, and over the space of all images that area is exactly one.
The lecture deck states the constraint on a slide of its own, and its emphasised word carries the consequence.

Caption: A white slide carrying the integral of the density over the space of images equal to one, and underneath it the sentence, different values of x compete for density, with compete in bold. It is a formula slide and not a density plot.
Read literally: a model that raises the density at one image must lower it elsewhere, because the integral cannot grow. Images are rivals for a fixed budget of mass, which is exactly the pressure a classifier never feels, since only labels compete inside its softmax.
The classic confusion is worth killing with a number. A density may exceed one. A Gaussian with standard deviation 0.1 reaches 3.99 at its peak, while no probability ever exceeds one, because a probability is an area over a region rather than a height at a point; the standard normal peaks at 0.399, and the interval from −1.96 to 1.96 carries 0.95 of its massPML.
Caption: Height against area. One region can have a peak above 1 and still hold little probability, the other can be flat and hold almost all of it, and the total across both is fixed at 1. That fixed total is why raising the density on one image lowers it on another.
The machine-learning version of the same statement is a fitted density. Density estimation returns a function you can evaluate at a particular $x$, not just a sampler.

Caption: A row of one-dimensional data points, and the same points with a smooth fitted Gaussian drawn over them. The estimate $p_{\text{model}}(x)$ can be read off at any chosen $x$, which is exactly what an explicit density buys.Goodfellow
Course notes state the two objectives together: learn $p_{\text{model}}(x)$ approximating the true $p_{\text{data}}(x)$, then sample new $x$ from itCS231n.
Put the pieces together and the change of subject is complete. A classifier's object is a distribution over labels. A generative model's object is a density over images, normalized, therefore competitive, therefore opinionated: to give a plausible photograph its mass, the model must take mass away from an implausible one, which means it has to represent what an image is like rather than what word goes with it.
p(y|x), p(x) and p(x|y) are one joint object read three ways
The three model types are not three subjects. They are three readings of one joint distribution, and conditioning only decides whose mass each image is competing for.
| Model type | What it estimates | What it can be asked for |
|---|---|---|
| Discriminative | $p(y \mid x)$ | the label distribution for an input |
| Generative | $p(x)$ | how plausible an input is, and a new sample |
| Conditional generative | $p(x \mid y)$ | how plausible an input is as an instance of $y$ |
Bayes' rule is the identity that ties them together, and its denominator is the object that does the tying:
$$p(y \mid x) = \frac{p(x \mid y),p(y)}{p(x)}, \qquad p(x) = \sum_{y} p(x \mid y),p(y)$$
The numerator is the class-conditional density times the prior. The denominator, the marginal likelihood, is the sum of that product over labels, and its only job here is to renormalize the result so the posterior sums to onePML.
A table with one row per image and one column per label makes the three readings concrete. The joint is the table itself. The marginal $p(x)$ is a row total, obtained by summing along the label axis. The conditional $p(x \mid y)$ is a single column renormalized to sum to one, and the posterior $p(y \mid x)$ is a single row renormalized the same way. Bayes' denominator is precisely that renormalization constant. Nothing new is created by conditioning; an axis is fixed and the same table is read along it.
Caption: One joint object, four accessors. The marginal sums a whole axis away, the two conditionals renormalize a single slice, and Bayes' rule is the route between the two conditional readings.
The mechanism is easiest to see in a network that implements the third type. A conditional adversarial net feeds the label $y$ into both halves of the system, so the generator's output becomes $G(z \mid y)$ and the discriminator's verdict becomes $D(x \mid y)$CGAN.

Caption: The label $y$ enters both blocks: $z$ and $y$ produce $G(z \mid y)$, while $x$ and $y$ produce $D(x \mid y)$. No layer widths, activations or losses are drawn, and the figure carries no quality claim.CGAN
Once the verdict is a function of the pair $(x,y)$, plausibility is judged per label, so the same image can be accepted as an instance of one class and rejected as an instance of another. That is what "one competition per label" means, and it is the whole of what conditioning does to the object. The paper that introduced this wiring calls its own results preliminary and reports them as a proof of concept, which is the right weight to give the mechanism and none to the quality.
Rejection, unlabelled features and sampling are consequences of having a density
None of the capabilities below is a feature bolted onto a generative model. Each is a sentence about the object already defined.
Caption: Four capabilities, each derived from the definition rather than added to it: a density can be small, a joint can be fitted without labels, a normalized distribution can be drawn from, and a conditional one can be drawn from on command.
Rejection follows from the first section. If the model returns a density, an unreasonable input gets a tiny value, and the same probability-level statement appears in the Bayesian framing of inverse problems, where a prior can be used to rule out or downweight implausible statesPML. Unlabelled feature learning follows from the joint: fitting $p(x)$ needs no labels, and training with missing data is itself one of the stated motivations for generative modellingGoodfellow. Sampling follows from normalization: the object integrates to one, so drawing from it produces new images rather than a score for old ones. Generation on command follows from the conditional version of the same argument.
The four-item grouping is a decomposition of the definition rather than a quotation. The 2016 tutorial's own motivation list has five different items, and the two lists overlap only loosely.
One application makes the "density supplies what the input lacks" point concrete. In super-resolution the model fills in the details of a low-resolution input, and in colorization it turns greyscale into colour; both are cases where a conditional density contributes information that is not in the conditioning imageCS231n.
Two yes or no questions sort every method
The map is not a diagram to memorise. It is two questions asked in sequence, plus a third that only appears if the second answer is no.
The first question is whether the model writes down $p(x)$ at all. A model with an explicit density constructs $p_{\text{model}}(x;\theta)$ and therefore an explicit likelihood that can be maximised. A model with an implicit density never represents a distribution over the space where the data lies, and instead provides some way of interacting with it, usually by drawing samplesGoodfellow.
The second question is whether that density can be computed and normalized. Tractable means you can evaluate and normalize the likelihood exactly; approximate means you cannot, and must substitute either a variational approximation or a Monte Carlo one. The third question applies only under approximate density: a variational method uses a deterministic approximation, a Markov chain method uses a stochastic one.

Caption: Maximum likelihood splits into explicit and implicit density. Under explicit density, tractable leaves are fully visible belief nets, NADE, MADE, PixelRNN and change-of-variables models such as nonlinear ICA, while approximate density splits into variational, where the autoencoder sits, and Markov chain, where the Boltzmann machine sits. Under implicit density, Markov chains lead to GSN and the direct route leads to GAN. The ellipsis above the root stands for other families, and the tree predates diffusion, score-based and flow-matching methods.Goodfellow
Each leaf below carries its construction and the price that construction imposes.
| Leaf | How it is built, in one line | What it costs |
|---|---|---|
| Fully visible belief nets, NADE, MADE, PixelRNN | the joint over pixels is written as a product of one-dimensional conditionals, so the likelihood is exact | generation visits one entry at a time, so the cost is proportional to the number of pixels and the steps cannot be parallelized |
| Change of variables, nonlinear ICA, real NVP | a continuous, differentiable, invertible map takes a simple latent variable to the data space | invertibility forces the latent to have the same dimensionality as $x$, and tractability depends on a Jacobian determinant |
| Variational autoencoder | a latent variable is integrated out, and a lower bound stands in for the likelihood | the gap between bound and true likelihood can make the model learn something other than the data distribution |
| Boltzmann machine | a Markov chain is used both to train the model and to draw from it | used only very rarely now, largely because the chain approximations did not scale to problems like ImageNet generation |
| Generative stochastic network | the primary example of an implicit model that samples through a Markov chain | chains often fail to scale to high dimensions and add computational cost |
| GAN | the rightmost leaf, an implicit model that generates a sample in a single step | no written density, and training requires finding a Nash equilibrium rather than optimising an objective |
The tractable branch is thin for a reason the tutorial states plainly: models that define an explicit, tractable density are highly effective because they permit an optimization algorithm directly on the log-likelihood, but the family that provides one is limited, with different families having different disadvantagesGoodfellow.
This is the classical map, fixed in 2016. NICE, Glow and FFJORD sit on the same change-of-variables branch but are not in the 2016 tree, which names only nonlinear ICA and whose text calls real NVP the latest member of that family, and nothing in the tree anticipates the iterative denoising and transport families that came afterwards.
A position on the map predicts what a method costs, not how good it is
A leaf tells you what you can measure, how fast you can sample, and where the failure will concentrate. It never tells you which distribution is better.
Start at the tractable leaf, where the likelihood is exactly computable. PixelRNN scans the image one row at a time and one pixel at a time within each row, and generation stays sequential for both the recurrent and the convolutional variant, since each sampled pixel has to be fed back in; only training and evaluation are parallelPixelRNN.
![]()
Caption: Each pixel may condition only on pixels already generated above and to its left, so generation walks the grid cell by cell; $x_1$, $x_n$ and $x_{n^2}$ mark the corners of that scan. The shaded region is the conditioning context for one pixel, not the receptive field of a layer.PixelRNN
The price is stated in the course notes as a count: a 32 by 32 image needs 1024 forward passes to generate a single imageCS231n. The mechanism behind that scan order is a subject of its own, developed in 《Autoregressive models: exact likelihood, one pixel at a time》.
The variational leaf pays in the opposite currency. With a latent variable, the marginal over the data is an integral that cannot be evaluated or differentiated, so the model optimises a lower bound on the marginal likelihood instead, fitting one recognition model jointly with the generative parametersAEVB.

Caption: The solid edge from $z$ to $x$ is the generative model, the dashed path from $x$ back to $z$ is the variational approximation to the intractable posterior, and $\theta$ and $\phi$ are two separate parameter sets. The encoder and decoder stacks are not drawn.AEVB
What that buys is a whole image in one decoder pass: draw one $z$, decode once, and every pixel appears together, with no likelihood value to report, only a bound whose tightness is unknown.
The implicit leaf drops the likelihood entirely. The generator implicitly defines $p_g$ as the distribution of the samples $G(z)$ obtained when $z$ is drawn from the prior, so there is no explicit representation of $p_g(x)$ and no inference network by default, while sampling needs only forward propagationGAN. The authors estimate the likelihood by fitting a Parzen window to generated samples and concede that the estimate has high variance and does not perform well in high dimensions.

Caption: In the adversarial column, sampling carries no difficulty while the undirected-graphical-model and generative-autoencoder columns require a Markov chain, and the row on evaluating $p(x)$ reads, not explicitly represented, may be approximated with Parzen density estimation. This is the 2014 paper's own cost list, not a ranking of model quality.GAN
Read together, the three leaves produce a price list rather than a leaderboard.
| Family | Likelihood you can compute | Sampling | What you can measure |
|---|---|---|---|
| Autoregressive | exact log-likelihood of a whole image | one pass per pixel, 1024 for a 32 by 32 image | a real likelihood, directly optimised |
| Variational | a lower bound on $\log p(x)$ | one decoder pass for all pixels | the bound, never the likelihood itself |
| Adversarial | none written down | one generator pass | a likelihood only approximated from samples |
The two axes also hide a further choice. Two models sitting at the same position can behave oppositely between modes, because the divergence being optimised decides what happens there.

Caption: Left, maximum likelihood fits a single wide bump that averages the two data modes. Right, reverse KL collapses onto one of them. Same data, same model family, opposite behaviour between modes, which the explicit and implicit axes alone cannot show.Goodfellow
The map's limits are stated by its own sources. The adversarial paper declines the quality claim in its own words, making no claim that its samples are better than samples generated by existing methodsGAN, and the 2016 tutorial adds that there is not a good method of quantitatively measuring sample quality, so its own preference among families is a subjective opinion rather than an empirical factGoodfellow. Both are dated remarks, and both point the same way: a sharper sample is not evidence of a better distribution, and separating the two requires a measurement protocol that the map cannot supply.
What the map does supply is prediction. Position on it tells you what you will be able to measure, how many passes a sample will cost, and where the failure will concentrate. The three families are taken in the order that makes each cost easiest to state, autoregressive first, then the variational latent-variable family, then the adversarial one, and that order is itself the map read aloud. One choice, how honestly a family faces the density, fixes everything that follows.
参考文献
- NIPS 2016 Tutorial: Generative Adversarial Networks — arXiv:1701.00160
- Generative Adversarial Nets — arXiv:1406.2661
- Auto-Encoding Variational Bayes — arXiv:1312.6114
- Pixel Recurrent Neural Networks — arXiv:1601.06759
- On Discriminative vs. Generative Classifiers: A comparison of logistic regression and naive Bayes — NIPS 2001
- CS231n course notes: Generative Modeling — https://cs231n.github.io/generative-models/
- Probabilistic Machine Learning: An Introduction, Chapter 2 — https://probml.github.io/pml-book/book1.html
- Conditional Generative Adversarial Nets — arXiv:1411.1784