Skip to content
BIASED

What generative modeling is

Block 1 of 8~2 min

Data as samples from an unknown distribution

One question drives this course: how can a model learn to produce new data that looks like its training data? A classifier answers a question about an image: is this a cat? A generative model produces the image itself, a new cat that was not in the training set.

To make the question precise, we treat a data set as independent draws from one distribution:

x1,…,xN∼P.x_1, \dots, x_N \sim P .

For images, x∈RDx \in \mathbb R^D is a vector of DD pixel values; for text it is a sequence of tokens, for audio a waveform. The distribution PP (also written pdatap_{\text{data}}) is unknown. Nobody can write down the density of "photographs of cats". All we have is the sample.

We look for a model QθQ_\theta with parameters θ\theta such that

Qθ≈P,Q_\theta \approx P ,

and from which we can draw new points x∼Qθx \sim Q_\theta. Generative modeling is learning to sample from a distribution we do not know, by approximating it from examples.

"New" matters. Replaying a random training example is also a way to sample: its distribution is the empirical distribution P^\hat P, with mass 1/N1/N on each xix_i. But the target is PP, the process that produced the photographs, not the finite list of photographs itself.

Answers are saved on the server and tied to this browser until you sign in.