1. Home
  2. Explore
  3. Computer Science
  4. Diffusion Models Overview

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Diffusion Models Overview

  • 21Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Historical Background

Which research paper brought diffusion models into widespread use for image generation?

21 questions

  1. 1

    Which research paper brought diffusion models into widespread use for image generation?

    1. A

      "Generative Adversarial Nets" (2014)

    2. B

      "Variational Auto-Encoders" (2013)

    3. C

      "Denoising Diffusion Probabilistic Models" (2020)

    4. D

      "Deep Unsupervised Learning using Nonequilibrium Thermodynamics" (2015)

    Correct answer
    C

    "Denoising Diffusion Probabilistic Models" (2020)

    Explanation

    The 2020 DDPM paper by Ho et al. made diffusion models practical for image generation and is the most cited work in the field. The 2015 paper introduced diffusion models but did not achieve state-of-the-art results.

  2. 2

    What was the state of the art in image generation before the 2020 DDPM paper?

    1. A

      Autoregressive models

    2. B

      Variational autoencoders

    3. C

      Generative adversarial networks (GANs)

    4. D

      Normalizing flows

    Correct answer
    C

    Generative adversarial networks (GANs)

    Explanation

    In 2015, GANs were considered state-of-the-art for image generation, while diffusion models received little attention until the 2020 DDPM paper.

  3. 3

    What is the main contribution of the DDPM paper over the 2015 diffusion model work?

    1. A

      Introducing a much simpler training objective and achieving state-of-the-art image generation

    2. B

      Introducing the concept of diffusion models for data generation

    3. C

      Proving that diffusion models are theoretically equivalent to GANs

    4. D

      Showing that diffusion models could be applied to toy datasets only

    Correct answer
    A

    Introducing a much simpler training objective and achieving state-of-the-art image generation

    Explanation

    The DDPM paper simplified the training objective, making diffusion models accessible and effective for high-quality image generation on complex datasets.

  4. 4

    In a variance-exploding diffusion process, what happens to the distribution as t increases?

    1. A

      The mean grows linearly and variance remains constant

    2. B

      The mean converges to zero and variance to one

    3. C

      The mean remains constant and variance grows without bound

    4. D

      Both mean and variance converge to zero

    Correct answer
    C

    The mean remains constant and variance grows without bound

    Explanation

    In variance-exploding diffusion, the mean stays fixed at the original data point, and the variance increases indefinitely, so it does not converge to a standard normal distribution.

  5. 5

    How does the DDPM paper ensure the forward diffusion process converges to a standard normal distribution?

    1. A

      By adding a scaling factor of 1−βt\sqrt{1-\beta_t}1−βt​​ to the mean at each step

    2. B

      By applying a non-linear transformation after each noise addition

    3. C

      By using a fixed mean and a decreasing variance schedule

    4. D

      By using a different noise distribution at each step

    Correct answer
    A

    By adding a scaling factor of 1−βt\sqrt{1-\beta_t}1−βt​​ to the mean at each step

    Explanation

    The DDPM uses a variance-preserving formulation where the mean is scaled by 1−βt\sqrt{1-\beta_t}1−βt​​, causing the mean to decay to zero and the variance to approach one.

  6. 6

    In the DDPM forward process, what is the expression for αt\alpha_tαt​?

    1. A

      αt=1−βt\alpha_t = 1 - \beta_tαt​=1−βt​

    2. B

      αt=βt\alpha_t = \beta_tαt​=βt​

    3. C

      αt=1−βt\alpha_t = \sqrt{1-\beta_t}αt​=1−βt​​

    4. D

      αt=∏i=1t(1−βi)\alpha_t = \prod_{i=1}^t (1-\beta_i)αt​=∏i=1t​(1−βi​)

    Correct answer
    D

    αt=∏i=1t(1−βi)\alpha_t = \prod_{i=1}^t (1-\beta_i)αt​=∏i=1t​(1−βi​)

    Explanation

    The cumulative product αˉt\bar{\alpha}_tαˉt​ is defined as ∏i=1t(1−βi)\prod_{i=1}^t (1-\beta_i)∏i=1t​(1−βi​). The notation αt\alpha_tαt​ typically refers to 1−βt1-\beta_t1−βt​, but the question asks for the expression used to directly compute xtx_txt​ from x0x_0x0​.

  7. 7

    What is the closed-form expression for the conditional distribution q(xt∣x0)q(x_t|x_0)q(xt​∣x0​) in the variance-preserving diffusion process?

    1. A

      N(xt;0,I)\mathcal{N}(x_t; 0, I)N(xt​;0,I)

    2. B

      N(xt;1−αˉtx0,αˉtI)\mathcal{N}(x_t; \sqrt{1-\bar{\alpha}_t} x_0, \bar{\alpha}_t I)N(xt​;1−αˉt​​x0​,αˉt​I)

    3. C

      N(xt;αˉtx0,(1−αˉt)I)\mathcal{N}(x_t; \sqrt{\bar{\alpha}_t} x_0, (1-\bar{\alpha}_t) I)N(xt​;αˉt​​x0​,(1−αˉt​)I)

    4. D

      N(xt;x0,tβI)\mathcal{N}(x_t; x_0, t\beta I)N(xt​;x0​,tβI)

    Correct answer
    C

    N(xt;αˉtx0,(1−αˉt)I)\mathcal{N}(x_t; \sqrt{\bar{\alpha}_t} x_0, (1-\bar{\alpha}_t) I)N(xt​;αˉt​​x0​,(1−αˉt​)I)

    Explanation

    The variance-preserving formulation gives q(xt∣x0)=N(xt;αˉtx0,(1−αˉt)I)q(x_t|x_0) = \mathcal{N}(x_t; \sqrt{\bar{\alpha}_t} x_0, (1-\bar{\alpha}_t)I)q(xt​∣x0​)=N(xt​;αˉt​​x0​,(1−αˉt​)I), where αˉt=∏i=1t(1−βi)\bar{\alpha}_t = \prod_{i=1}^t (1-\beta_i)αˉt​=∏i=1t​(1−βi​).

  8. 8

    Why is the negative log-likelihood log⁡pθ(x0)\log p_\theta(x_0)logpθ​(x0​) intractable for diffusion models?

    1. A

      Because the forward process is not invertible

    2. B

      Because the neural network is too large

    3. C

      Because it requires summing over all possible sequences of latent variables

    4. D

      Because the reverse process is not Markovian

    Correct answer
    C

    Because it requires summing over all possible sequences of latent variables

    Explanation

    Computing pθ(x0)p_\theta(x_0)pθ​(x0​) involves integrating over all possible paths from noise to data, which is exponentially many, making it intractable.

  9. 9

    What is the role of the evidence lower bound (ELBO) in training diffusion models?

    1. A

      It provides a tractable upper bound on the negative log-likelihood

    2. B

      It is used to sample from the posterior

    3. C

      It directly computes the exact log-likelihood

    4. D

      It lower bounds the forward process

    Correct answer
    A

    It provides a tractable upper bound on the negative log-likelihood

    Explanation

    The ELBO is a lower bound on the log-likelihood (or an upper bound on the negative log-likelihood) that can be optimized tractably.

  10. 10

    What is the "true posterior" in the context of diffusion models?

    1. A

      q(xt−1∣xt)q(x_{t-1}|x_t)q(xt−1​∣xt​)

    2. B

      q(xt∣xt−1)q(x_t|x_{t-1})q(xt​∣xt−1​)

    3. C

      q(xt−1∣xt,x0)q(x_{t-1}|x_t, x_0)q(xt−1​∣xt​,x0​)

    4. D

      pθ(xt−1∣xt)p_\theta(x_{t-1}|x_t)pθ​(xt−1​∣xt​)

    Correct answer
    C

    q(xt−1∣xt,x0)q(x_{t-1}|x_t, x_0)q(xt−1​∣xt​,x0​)

    Explanation

    The true posterior is the reverse conditional distribution given both xtx_txt​ and the original image x0x_0x0​, which has a closed-form Gaussian expression.

  11. 11

    Why can't the true posterior be used directly for generating new samples?

    1. A

      Because it is intractable to compute

    2. B

      Because it is not Gaussian

    3. C

      Because it requires the forward process to be deterministic

    4. D

      Because it requires knowing the noise-free image x0x_0x0​, which is unavailable during generation

    Correct answer
    D

    Because it requires knowing the noise-free image x0x_0x0​, which is unavailable during generation

    Explanation

    The true posterior q(xt−1∣xt,x0)q(x_{t-1}|x_t, x_0)q(xt−1​∣xt​,x0​) conditions on x0x_0x0​, which is unknown when generating from pure noise. It is only used during training when x0x_0x0​ is available.

  12. 12

    How is the approximate posterior pθ(xt−1∣xt)p_\theta(x_{t-1}|x_t)pθ​(xt−1​∣xt​) parameterized in DDPM?

    1. A

      As a Gaussian with both mean and variance learned by the network

    2. B

      As a Gaussian with learned mean and fixed variance, where the mean is predicted by a neural network

    3. C

      As a Laplace distribution with learned parameters

    4. D

      As a discrete distribution over pixel values

    Correct answer
    B

    As a Gaussian with learned mean and fixed variance, where the mean is predicted by a neural network

    Explanation

    In DDPM, the variance σt\sigma_tσt​ is fixed to a constant (not learned), and only the mean μθ(xt,t)\mu_\theta(x_t, t)μθ​(xt​,t) is predicted by the network.

  13. 13

    When the true posterior and approximate posterior are both Gaussian with the same fixed variance, what does the KL divergence simplify to?

    1. A

      The absolute difference in their means

    2. B

      The difference in their variances

    3. C

      The cross-entropy between the distributions

    4. D

      The squared Euclidean distance between their means

    Correct answer
    D

    The squared Euclidean distance between their means

    Explanation

    For two Gaussians with identical covariance matrices, the KL divergence simplifies to 12∣∣μ1−μ2∣∣2\frac{1}{2}||\mu_1 - \mu_2||^221​∣∣μ1​−μ2​∣∣2 up to a constant factor.

  14. 14

    Using the reparameterization trick, the final training objective in DDPM is equivalent to:

    1. A

      Predicting the added noise ϵ\epsilonϵ from xtx_txt​

    2. B

      Predicting the timestep ttt from xtx_txt​

    3. C

      Predicting the original image x0x_0x0​ from xtx_txt​

    4. D

      Predicting the mean of the true posterior directly

    Correct answer
    A

    Predicting the added noise ϵ\epsilonϵ from xtx_txt​

    Explanation

    By reparameterizing the loss, the objective becomes a simple mean squared error between the actual noise ϵ\epsilonϵ and the network's prediction ϵθ\epsilon_\thetaϵθ​.

  15. 15

    In the training loop of DDPM, how are timesteps sampled?

    1. A

      According to a learned distribution

    2. B

      Uniformly from a fixed set of steps

    3. C

      Sequentially from 1 to T for each mini-batch

    4. D

      Randomly for each sample in the batch

    Correct answer
    D

    Randomly for each sample in the batch

    Explanation

    To reduce computational cost, a random timestep ttt is sampled for each sample, and the loss is computed only at that timestep.

  16. 16

    What loss function is typically used for training the noise prediction network in DDPM?

    1. A

      Mean squared error (MSE) between predicted and actual noise

    2. B

      Binary cross-entropy

    3. C

      KL divergence between true and predicted posteriors

    4. D

      Cross-entropy loss

    Correct answer
    A

    Mean squared error (MSE) between predicted and actual noise

    Explanation

    The final simplified objective is L=Et,x0,ϵ[∣∣ϵ−ϵθ(αˉtx0+1−αˉtϵ,t)∣∣2]L = \mathbb{E}_{t,x_0,\epsilon}[||\epsilon - \epsilon_\theta(\sqrt{\bar{\alpha}_t}x_0 + \sqrt{1-\bar{\alpha}_t}\epsilon, t)||^2]L=Et,x0​,ϵ​[∣∣ϵ−ϵθ​(αˉt​​x0​+1−αˉt​​ϵ,t)∣∣2].

  17. 17

    What neural network architecture is commonly used as the denoising function in DDPM?

    1. A

      ResNet

    2. B

      U-Net

    3. C

      Transformer

    4. D

      VAE encoder

    Correct answer
    B

    U-Net

    Explanation

    The DDPM paper and subsequent works use a U-Net architecture for the noise prediction network, which is well-suited for image-to-image tasks.

  18. 18

    During inference, how is an image sampled from pure noise?

    1. A

      By running the forward process backwards in one step

    2. B

      By iteratively applying the learned denoising step from xTx_TxT​ to x0x_0x0​

    3. C

      By directly predicting x0x_0x0​ from xTx_TxT​ using the network

    4. D

      By sampling from the true posterior without conditioning

    Correct answer
    B

    By iteratively applying the learned denoising step from xTx_TxT​ to x0x_0x0​

    Explanation

    Inference starts from pure Gaussian noise xTx_TxT​ and repeatedly applies the reverse step xt−1∼pθ(xt−1∣xt)x_{t-1} \sim p_\theta(x_{t-1}|x_t)xt−1​∼pθ​(xt−1​∣xt​) for t=T,T−1,...,1t = T, T-1, ..., 1t=T,T−1,...,1.

  19. 19

    What is the typical number of inference steps in DDPM?

    1. A

      10000

    2. B

      1000

    3. C

      100

    4. D

      10

    Correct answer
    B

    1000

    Explanation

    The original DDPM uses 1000 steps for generating high-quality samples, though later works have reduced this number.

  20. 20

    Compared to VAEs, what is the main advantage and disadvantage of diffusion models?

    1. A

      Lower sample quality and slower generation

    2. B

      Higher sample quality but slower generation

    3. C

      Higher sample quality and faster generation

    4. D

      Lower sample quality but faster generation

    Correct answer
    B

    Higher sample quality but slower generation

    Explanation

    Diffusion models produce higher quality images than VAEs but require many more network evaluations (typically 1000), making generation slower.

  21. 21

    What extension of diffusion models replaces discrete Markov chains with continuous-time stochastic differential equations?

    1. A

      Latent diffusion models

    2. B

      Score-based diffusion models

    3. C

      Denoising diffusion implicit models

    4. D

      Variational diffusion models

    Correct answer
    B

    Score-based diffusion models

    Explanation

    Score-based diffusion models formulate the process in continuous time using SDEs, providing a more general framework.

Question 1 of 21
Question 1 of 21

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent