CS 7643 – Quiz 7 | Questions and Answers | spring 2026 | 100% Correct – GT.
🔵 SECTION 1: Generative vs Discriminative
Models
Q1. What is the difference between a discriminative and generative model?
Answer:
Discriminative Model
Learns:
P(y∣x)P(y|x)P(y∣x)
Labels compete for probability mass.
No modeling of input distribution.
Cannot reject unreasonable inputs.
Examples: Neural Networks, SVM.
Generative Model
Learns:
P(x)P(x)P(x)
All possible inputs compete for probability mass.
Can assign low probability to outliers.
Can generate new samples.
Often unsupervised.
Q2. What is a conditional generative model?
Answer:
Learns:
P(x∣y)P(x|y)P(x∣y)
,Unlike discriminative models, it models input distribution conditioned on label and can:
Reject outliers
Generate new data for specific labels
🔵 SECTION 2: Taxonomy of Generative
Models
Q3. What is explicit density modeling?
Answer:
Define and maximize likelihood:
θ∗=argmaxθ∑ilogpθ(xi)\theta^* = \arg\max_\theta \sum_i \log p_\theta(x_i)θ∗=argθmax
i∑logpθ(xi)
Requires tractable likelihood.
Examples:
PixelRNN
PixelCNN
VAE
Q4. What is implicit density modeling?
Answer:
Does NOT explicitly compute p(x)p(x)p(x).
Instead:
Learns to sample from distribution.
No likelihood available.
Example:
, GANs
🔵 SECTION 3: PixelRNN / PixelCNN
Q5. How does PixelRNN factorize image likelihood?
Using chain rule:
p(x)=∏i=1n2p(xi∣x1,...,xi−1)p(x) = \prod_{i=1}^{n^2} p(x_i | x_1, ..., x_{i-1})p(x)=i=1∏n2p(xi
∣x1,...,xi−1)
Like language modeling:
Predict next pixel given previous pixels.
Q6. How is PixelCNN different from PixelRNN?
PixelRNN
Sequential RNN recurrence.
Slow training.
PixelCNN
Masked convolutions.
Parallel training.
Still sequential generation.
Q7. What are advantages of PixelCNN?
Explicit likelihood
Good evaluation metric
Maximum likelihood training
, Q8. What are disadvantages of PixelCNN?
Sequential generation (slow)
Limited long-range context
Assumes fixed pixel ordering
🔵 SECTION 4: GANs
Q9. Write the full GAN objective.
minGmaxDV(D,G)\min_G \max_D V(D,G)GminDmaxV(D,G)
=Ex∼pdata[logD(x)]+Ez∼p(z)[log(1−D(G(z)))]= \mathbb{E}_{x\sim p_{data}}[\log D(x)]
+ \mathbb{E}_{z\sim p(z)}[\log(1 - D(G(z)))]=Ex∼pdata[logD(x)]+Ez∼p(z)[log(1−D(G(z)))]
Q10. What is the generator trying to do?
Push:
D(G(z))→1D(G(z)) \to 1D(G(z))→1
Fool discriminator into believing fake is real.
Q11. What is the discriminator trying to do?
Push:
D(x)→1D(x) \to 1D(x)→1
D(G(z))→0D(G(z)) \to 0D(G(z))→0
Classify correctly.
Q12. Why does the original GAN objective give poor gradients for the
generator?
Because when:
🔵 SECTION 1: Generative vs Discriminative
Models
Q1. What is the difference between a discriminative and generative model?
Answer:
Discriminative Model
Learns:
P(y∣x)P(y|x)P(y∣x)
Labels compete for probability mass.
No modeling of input distribution.
Cannot reject unreasonable inputs.
Examples: Neural Networks, SVM.
Generative Model
Learns:
P(x)P(x)P(x)
All possible inputs compete for probability mass.
Can assign low probability to outliers.
Can generate new samples.
Often unsupervised.
Q2. What is a conditional generative model?
Answer:
Learns:
P(x∣y)P(x|y)P(x∣y)
,Unlike discriminative models, it models input distribution conditioned on label and can:
Reject outliers
Generate new data for specific labels
🔵 SECTION 2: Taxonomy of Generative
Models
Q3. What is explicit density modeling?
Answer:
Define and maximize likelihood:
θ∗=argmaxθ∑ilogpθ(xi)\theta^* = \arg\max_\theta \sum_i \log p_\theta(x_i)θ∗=argθmax
i∑logpθ(xi)
Requires tractable likelihood.
Examples:
PixelRNN
PixelCNN
VAE
Q4. What is implicit density modeling?
Answer:
Does NOT explicitly compute p(x)p(x)p(x).
Instead:
Learns to sample from distribution.
No likelihood available.
Example:
, GANs
🔵 SECTION 3: PixelRNN / PixelCNN
Q5. How does PixelRNN factorize image likelihood?
Using chain rule:
p(x)=∏i=1n2p(xi∣x1,...,xi−1)p(x) = \prod_{i=1}^{n^2} p(x_i | x_1, ..., x_{i-1})p(x)=i=1∏n2p(xi
∣x1,...,xi−1)
Like language modeling:
Predict next pixel given previous pixels.
Q6. How is PixelCNN different from PixelRNN?
PixelRNN
Sequential RNN recurrence.
Slow training.
PixelCNN
Masked convolutions.
Parallel training.
Still sequential generation.
Q7. What are advantages of PixelCNN?
Explicit likelihood
Good evaluation metric
Maximum likelihood training
, Q8. What are disadvantages of PixelCNN?
Sequential generation (slow)
Limited long-range context
Assumes fixed pixel ordering
🔵 SECTION 4: GANs
Q9. Write the full GAN objective.
minGmaxDV(D,G)\min_G \max_D V(D,G)GminDmaxV(D,G)
=Ex∼pdata[logD(x)]+Ez∼p(z)[log(1−D(G(z)))]= \mathbb{E}_{x\sim p_{data}}[\log D(x)]
+ \mathbb{E}_{z\sim p(z)}[\log(1 - D(G(z)))]=Ex∼pdata[logD(x)]+Ez∼p(z)[log(1−D(G(z)))]
Q10. What is the generator trying to do?
Push:
D(G(z))→1D(G(z)) \to 1D(G(z))→1
Fool discriminator into believing fake is real.
Q11. What is the discriminator trying to do?
Push:
D(x)→1D(x) \to 1D(x)→1
D(G(z))→0D(G(z)) \to 0D(G(z))→0
Classify correctly.
Q12. Why does the original GAN objective give poor gradients for the
generator?
Because when: