SECTION 01 / 7

What are deep generative models?

3 min read
On this page 5 headings
Figure 01. Generative model families.
Figure 01. Generative model families.
Open image ↗
Illustration: What are deep generative models?

A generative model learns how to produce plausible new examples resembling data. The chapter introduces GANs, VAEs, denoising diffusion / score-based models, autoregressive language models, state-space models, and RL-based alignment for language models. The last is an alignment approach rather than a standalone generative architecture.

Examples: a text model produces a response conditioned on a prompt; an image model produces an image conditioned on a description; a speech generator can turn text into audio. These are examples of tasks, not a claim that one model can perform all of them.

Figure 02. Generating text, images, and speech.
Figure 02. Generating text, images, and speech.
Open image ↗
Illustration: What are deep generative models?

Data, random variables and dimensions

Figure 03. Retrieval versus generation.
Figure 03. Retrieval versus generation.
Open image ↗
Illustration: What are deep generative models?

A dataset is D={x1,…,xn}D=\{x_1,\ldots,x_n\}. Each xix_{i} is one observed example. A sample can be represented as a vector in Rd\mathbb{R}^{d}; n counts examples, while d counts components per example. A 100×100100\times 100 RGB image, flattened without compression, has 100×100×3=30,000100\times 100\times 3 = 30,000 numerical components.

Figure 04. Dataset and feature vectors.
Figure 04. Dataset and feature vectors.
Open image ↗
Illustration: What are deep generative models?

A random vector X is a rule for producing a random data example. PXP_{X} denotes its probability distribution. The dataset contains observed draws; it does not give us the complete underlying distribution.

Figure 05. Dimensions and data representations.
Figure 05. Dimensions and data representations.
Open image ↗
Illustration: What are deep generative models?

Sample count versus feature dimension

  1. Suppose there are 1,000 RGB images, each 20×2020\times 20 pixels. Then n=1,000n = 1,000.

  2. Each flattened image has d=20×20×3=1,200d = 20\times 20\times 3 = 1,200 entries.

  3. The data matrix, if samples are rows, has shape 1,000×1,2001,000\times 1,200.

What does i.i.d. mean?

The notation xi∼i.i.d.PXx_i\overset{\mathrm{i.i.d.}}{\sim}P_X means each observation is modeled as an independent draw from the same distribution PXP_{X}. “Identically distributed” does NOT mean all observed values are equal. Independence is an assumption about the sampling mechanism.

Figure 07. Independent and identically distributed samples.
Figure 07. Independent and identically distributed samples.
Open image ↗
Illustration: What are deep generative models?

Understanding the data notation

A dataset contains 600 grayscale images, each 28×2828 \times 28 pixels. Find n and d.

Show solution

n=600n = 600 observed examples; d=28×28=784d = 28 \times 28 = 784 numbers per flattened image. The data matrix has 600 rows and 784 columns if each image is stored as one row. Do not confuse the number of images with the dimension of an image.

Why samples do not tell us the exact density

Figure 06. Unknown distribution and observed samples.
Figure 06. Unknown distribution and observed samples.
Open image ↗
Illustration: What are deep generative models?

Imagine seeing 10 photographs of cats. You have seen 10 draws from a much larger range of possible cat photographs, not a complete table of their probabilities. Likewise, the data D={x1,…,xn}D=\{x_1,\ldots,x_n\} gives observations from PXP_{X}; it does not reveal a formula for pXp_{X}(x). This distinction is central to the example’s question: how can we compare distributions when the real density is unknown?

YOUR STUDY PROGRESS

Finished this section? Save your progress.

Back to top ↑