Assume GAN training has converged to the global optimum, i.e.,
. Which of the following
statements is correct? Select all that apply.
6406537043533.
The generator's loss is exactly zero.
6406537043534.
The discriminator outputs
everywhere, but the generator's loss is not zero.
6406537043535.
At convergence the discriminator outputs
on real samples and
on
generated samples.
6406537043536.
At optima,
.
Published solution
**1. Analyze the GAN minimax game at the global optimum \( p_g = p_{\text{data}} \):**
- For a fixed generator \( G \), the optimal discriminator is:
\[
D^*(x) = \frac{p_{\text{data}}(x)}{p_{\text{data}}(x) + p_g(x)}
\]
- When \( p_g = p_{\text{data}} \), the discriminator cannot distinguish real samples from generated samples, so:
\[
D^*(x) = \frac{p_{\text{data}}(x)}{2 p_{\text{data}}(x)} = \frac{1}{2} \quad \text{everywhere}
\]
- Substituting \( D^*(x) = 1/2 \) into the minimax value function gives \( V(D^*, G^*) = \log(1/2) + \log(1 - 1/2) = -2\log 2 = -\log 4 \neq 0 \) (and for the non-saturating loss \( -\mathbb{E}[\log D(G(z))] = \log 2 \neq 0 \)). Thus, the generator's loss is **not zero**.
**Answer: B — The discriminator outputs \( 1/2 \) everywhere, but the generator's loss is not zero.**
A: **Incorrect:** At \( D^*(x) = 1/2 \), the minimax value is \( -\log 4 \) (and non-saturating generator loss is \( \log 2 \)), not zero.
B: **Correct:** When \( p_g = p_{\text{data}} \), \( D^*(x) = 1/2 \) everywhere and the equilibrium loss is non-zero (\( -\log 4 \)).
C: **Incorrect:** Outputting 1 on real and 0 on fake happens when \( p_g \) and \( p_{\text{data}} \) have disjoint supports, not at \( p_g = p_{\text{data}} \).
D: **Incorrect:** At the global optimum, \( V(D^*, G^*) = -\log 4 \) (since \( \text{JSD}(p_{\text{data}} \| p_g) = 0 \)).
Which of the following statements about the generator and discriminator in a Generative
Adversarial Network (GAN) are correct?
6406537043521.
The discriminator is a binary classifier trained on a mix of real samples and
generated samples.
6406537043522.
If the discriminator becomes too strong too quickly at telling real data apart
from the generator's fakes, the generator's gradients vanish and it stops learning.
6406537043523.
The generator's goal is to maximize the discriminator's classification accuracy.
6406537043524.
The discriminator minimizes the difference between real and generated data
distributions.
Published solution
**1. Evaluate each statement about GAN training:**
- **Option A:** The discriminator \( D \) is trained as a binary classifier to distinguish real training samples (label 1) from generator samples \( G(z) \) (label 0). **True.**
- **Option B:** Under the minimax loss \( \mathbb{E}_z[\log(1 - D(G(z)))] \), if \( D \) becomes too accurate early in training so that \( D(G(z)) \approx 0 \) on fake samples, the gradient of \( \log(1 - D) \) near \( D = 0 \) flattens out (vanishes), halting generator learning. **True.**
- **Option C:** The generator tries to *fool* the discriminator (minimizing \( D \)'s accuracy on fakes), not maximize it. **False.**
- **Option D:** The *generator* minimizes the divergence between \( p_{\text{data}} \) and \( p_g \), whereas the *discriminator* maximizes the objective to separate them. **False.**
**Answer: A and B.**
A: **Correct:** The discriminator is trained via binary cross-entropy on real data and generated data.
B: **Correct:** When \( D(G(z)) \to 0 \), \( \log(1 - D(G(z))) \approx -D(G(z)) \) saturates, causing vanishing gradients for \( G \).
C: **Incorrect:** The generator aims to fool the discriminator, opposing its classification accuracy.
D: **Incorrect:** The generator minimizes the divergence between distributions, while the discriminator maximizes it.
as additional input. Which of the following are correct statements about
cGANs?
6406537043525.
At inference time, sampling
for a fixed
and varying
produces diverse samples all belonging to class
.
6406537043526.
The cGAN objective is identical to the unconditional GAN objective when
is
taken to be a constant for all samples.
6406537043527.
A cGAN can only be trained if
is a discrete (categorical) label; continuous
conditioning variables are not possible within this framework.
6406537043528.
If the discriminator ignores
entirely, the generator may learn to ignore
too, producing samples that are realistic but not class-consistent.
Published solution
**1. Evaluate each statement about Conditional GANs (cGANs):**
- **Option A:** Fixing the class condition \( y \) and sampling different latent vectors \( z \sim p_z(z) \) generates diverse samples (varying pose, style, background) belonging to the specified class \( y \). **True.**
- **Option B:** If \( y = c \) is constant for all samples, conditioning provides no additional information and the cGAN objective reduces to the standard unconditional GAN objective. **True.**
- **Option C:** False! In a cGAN, the conditioning variable \( y \) can be discrete (class labels) OR continuous/high-dimensional (e.g., text embeddings, bounding boxes, or images in Pix2Pix).
- **Option D:** If the discriminator \( D(x, y) \) ignores \( y \) and only judges unconditional realism \( p_{\text{data}}(x) \), the generator receives no gradient signal to match \( y \) and may produce realistic but class-inconsistent samples. **True.**
**Answer: A, B, and D.**
A: **Correct:** Holding \( y \) fixed while varying \( z \) samples from the conditional distribution \( p_g(x \mid y) \).
B: **Correct:** Conditioning on a constant variable carries zero mutual information and reduces to an unconditional GAN.
C: **Incorrect:** Conditional GANs support continuous conditioning variables, text embeddings, and image-to-image translation.
D: **Correct:** The generator relies on the discriminator's joint feedback on \( (x, y) \) to enforce conditional consistency.
**1. Set up the Fenchel conjugate of \( f(u) = \frac{1}{2}|u - 1| \):**
By definition:
\[
f^*(t) = \sup_{u \in \mathbb{R}} \left\{ u t - \frac{1}{2}|u - 1| \right\}
\]
Let \( v = u - 1 \), so \( u = v + 1 \):
\[
f^*(t) = t + \sup_{v \in \mathbb{R}} \left\{ v t - \frac{1}{2}|v| \right\}
\]
**2. Evaluate the supremum over \( v \):**
- If \( |t| \le \frac{1}{2} \), then \( v t - \frac{1}{2}|v| \le |v|\left(|t| - \frac{1}{2}\right) \le 0 \), with supremum \( 0 \) achieved at \( v = 0 \). Thus \( f^*(t) = t \) for \( |t| \le \frac{1}{2} \).
- If \( |t| > \frac{1}{2} \), sending \( v \to +\infty \) (when \( t > 1/2 \)) or \( v \to -\infty \) (when \( t < -1/2 \)) makes \( vt - \frac{1}{2}|v| \to +\infty \), so \( f^*(t) = +\infty \).
Therefore:
\[
f^*(t) = \begin{cases} t, & \text{if } |t| \le \frac{1}{2} \\ +\infty, & \text{otherwise} \end{cases}
\]
**Answer: C.**
A: **Incorrect:** For \( |t| > 1/2 \), the linear term \( ut \) grows faster than \( \frac{1}{2}|u - 1| \), so the supremum diverges to \( +\infty \).
B: **Incorrect:** Does not enforce the domain constraint \( |t| \le 1/2 \).
C: **Correct:** The Fenchel conjugate of \( \frac{1}{2}|u - 1| \) equals \( t \) on \( [-1/2, 1/2] \) and \( +\infty \) outside \( [-1/2, 1/2] \).
D: **Incorrect:** \( t^2 / 4 \) is the conjugate of a quadratic function, not an absolute value function.
Consider the standard GAN objective from the classifier-guided perspective:
Suppose the generator is fixed and the discriminator is trained to perfect accuracy. The
discriminator acheive the optimum at
for the fixed generator. What is the gradient of
with respect to
in the region where
?
6406537043537.
A large positive gradient, pushing
toward
.
6406537043538.
A well-defined gradient that decreases monotonically toward zero.
6406537043539.
A zero or undefined gradient, providing no useful learning signal for the
generator.
6406537043540.
.
Published solution
**1. Analyze \( D^*(x) = \frac{p_{\text{data}}(x)}{p_{\text{data}}(x) + p_g(x)} \) when \( p_{\text{data}}(x) = 0 \) and \( p_g(x) > 0 \):**
In regions where the generator produces samples (\( p_g(x) > 0 \)) outside the support of the real data (\( p_{\text{data}}(x) = 0 \)), the optimal discriminator perfectly rejects fake samples:
\[
D^*(x) = \frac{0}{0 + p_g(x)} = 0
\]
**2. Examine the gradient with respect to \( G \):**
Because \( D^*(x) = 0 \) is locally constant (flat) across the region where \( p_{\text{data}}(x) = 0 \) and \( p_g(x) > 0 \) (and \( \log(1 - D^*(x)) = \log 1 = 0 \)), its spatial gradient \( \nabla_x D^*(x) = 0 \) (or undefined at the boundary), giving the generator **zero gradient / no useful learning signal**.
**Answer: C — A zero or undefined gradient, providing no useful learning signal for the generator.**
A: **Incorrect:** Because \( D^*(x) \equiv 0 \) across the fake support when disjoint from \( p_{\text{data}} \), there is no positive gradient pointing toward \( p_{\text{data}} \).
B: **Incorrect:** A perfect discriminator saturates at \( D^*(x) = 0 \), killing the gradient rather than providing a smooth monotonic signal.
C: **Correct:** When \( p_{\text{data}}(x) = 0 \) and \( p_g(x) > 0 \), \( D^*(x) = 0 \) is flat, causing vanishing (zero) gradients for the generator.
D: **Incorrect:** \( D^*(x) = 1/2 \) only when \( p_g(x) = p_{\text{data}}(x) \), not when \( p_{\text{data}}(x) = 0 \).
. As a controlled test, a single fixed noise vector
is decoded twice - once with
and once with
changing only the label. The two generated faces are nearly
identical in pose, identity, and background; only the hair colour differs. What does this best
demonstrate about a well-trained CGAN?
6406537043541.
The label input
has no real effect on the output; the result is purely due to
random chance.
6406537043542.
The CGAN has decoupled the label attribute (hair colour) from the rest:
governs identity/pose/background, while
independently governs the conditioned attribute.
6406537043543.
The generator ignores
once a label is provided, relying only on
to generate
the entire image.
6406537043544.
One-hot label vectors must always have length exactly 2 for a CGAN to work
correctly.
Published solution
**1. Interpret the controlled latent-and-label experiment:**
- Holding the noise vector \( z \) fixed while toggling the class label \( y \) from `[1, 0]` (Blond) to `[0, 1]` (Not Blond) keeps all unconditioned factors (identity, pose, lighting, background) constant while changing **only** the conditioned attribute (hair color).
- This demonstrates **disentanglement (decoupling)** between the latent noise \( z \) (which controls style, pose, identity, and background) and the conditioning vector \( y \) (which controls hair color).
**Answer: B — The CGAN has decoupled the label attribute (hair colour) from the rest: \( z \) governs identity/pose/background, while \( y \) independently governs the conditioned attribute.**
A: **Incorrect:** Toggling \( y \) systematically changed the hair color as intended.
B: **Correct:** Shows clean disentanglement where \( z \) captures unconditioned variations (pose, identity, background) and \( y \) controls the target attribute (hair color).
C: **Incorrect:** If \( G \) ignored \( z \), varying \( z \) would collapse to a single image per class; here fixing \( z \) preserved the specific identity and pose.
D: **Incorrect:** One-hot conditioning vectors can have any length \( K \ge 2 \) matching the number of classes.
A student proposes modifying a standard GAN so that, instead of feeding random noise
into the
generator, they occasionally feed in real images and ask the generator to reproduce them. Which
of the following best describes the likely consequence of this modification?
6406537043549.
It would have no effect, since the generator treats all inputs identically.
6406537043550.
It shifts the generator's task toward reconstructing inputs, so it no longer
learns to sample novel images from the noise
.
6406537043551.
It guarantees the generator will perfectly memorize the training set.
6406537043552.
It removes the need for a discriminator entirely.
Published solution
**1. Analyze the effect of feeding real images directly into \( G \) for reconstruction:**
- A standard GAN generator \( G: \mathcal{Z} \to \mathcal{X} \) maps low-dimensional random noise \( z \sim p_z \) to the data manifold.
- Feeding real images \( x \) as input and training \( G \) to reproduce them changes \( G \) into an autoencoder/identity mapping \( G(x) \approx x \), shifting its objective toward **input reconstruction** rather than learning to map random noise \( z \) to novel samples.
**Answer: B — It shifts the generator's task toward reconstructing inputs, so it no longer learns to sample novel images from the noise \( z \).**
A: **Incorrect:** Changing the input domain and training objective fundamentally alters what the network learns.
B: **Correct:** Training \( G \) to reproduce input images turns it into an autoencoder/reconstruction network rather than a noise-to-image sampler.
C: **Incorrect:** Reconstructing inputs via an identity-like mapping does not mean memorizing the dataset from noise.
D: **Incorrect:** Feeding occasional real images does not replace the adversarial loss.
Based on the above data, answer the given subquestions.
A different valid plan between the same
is given as
6406537043558.
is the optimal plan and
is suboptimal.
6406537043559.
achieves the minimum work (
) and is therefore optimal, while
is
valid but suboptimal.
6406537043560.
Both plans are optimal.
6406537043561.
Neither plan is valid.
Published solution
**1. Compare the two transport plans \( \gamma \) and \( \tilde{\gamma} \):**
- Both \( \gamma \) and \( \tilde{\gamma} \) have non-negative entries whose row sums equal \( P \) and column sums equal \( Q \), so both are valid couplings.
- However, \( \tilde{\gamma} \) keeps maximum mass on the diagonal and moves excess mass only to adjacent locations, achieving a strictly smaller total work \( W(\tilde{\gamma}) = 0.2 < W(\gamma) = 0.3 \) (matching the 1D Wasserstein-1 distance \( W_1(P, Q) = \sum_k |F_P(k) - F_Q(k)| = 0.2 \)).
- Therefore, \( \tilde{\gamma} \) is the optimal transport plan and \( \gamma \) is valid but suboptimal.
**Answer: B — \( \tilde{\gamma} \) achieves the minimum work (\( 0.2 \)) and is therefore optimal, while \( \gamma \) is valid but suboptimal.**
A: **Incorrect:** \( \gamma \) has cost \( 0.3 \), which is higher than \( W(\tilde{\gamma}) = 0.2 \).
B: **Correct:** \( \tilde{\gamma} \) achieves the minimum possible transport cost \( 0.2 \), whereas \( \gamma \) costs \( 0.3 \).
C: **Incorrect:** Since \( 0.2 < 0.3 \), \( \gamma \) is strictly suboptimal.
D: **Incorrect:** Both matrices satisfy the marginal constraints \( \gamma \mathbf{1} = P \) and \( \gamma^T \mathbf{1} = Q \).
Inception features (assumed Gaussian) for real and generated image sets are 2-dimensional with
diagonal covariance matrices:
Based on the above data, answer the given subquestions.
What does a lower FID indicate?
6406537043563.
Worse generative quality (generated features further from real features).
6406537043564.
Better generative quality (generated features closer to real features).
Published solution
**1. Interpret the Fréchet Inception Distance (FID):**
FID is the squared Wasserstein-2 (Fréchet) distance between the Gaussian-approximated Inception feature distributions of real and generated images. Because it is a distance metric between distributions (with \( \text{FID} = 0 \) iff the two feature means and covariances match), a **lower FID** means the generated image distribution is closer to the real image distribution, indicating **better generative quality and diversity**.
**Answer: B — Better generative quality (generated features closer to real features).**
A: **Incorrect:** Higher FID indicates worse generative quality (greater distance from real features).
B: **Correct:** Lower FID means smaller Wasserstein-2 distance between generated and real feature distributions, indicating better generative quality.