10. Generative Adversarial & Diffusion Learning

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/36

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:35 PM on 6/2/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

37 Terms

1
New cards

Explain what Adversarial Inputs are, and provide a concrete example of how they affect image classifiers.

Adversarial inputs are real data vectors that have been modified with slight, intentionally engineered pixel-level noise (e.g., ϵ=0.007\epsilon = 0.007). These changes are imperceptible to humans but completely disrupt a machine learning model's internal feature boundaries.

  • Example: Adding structured noise to a picture of a "panda" can cause a model that previously classified it correctly with 57.7% confidence to misclassify the identical-looking image as a "gibbon" with 99.3% confidence.

2
New cards

Write out the standard GAN Min-Max Objective Function and break down the explicit goal of each network ($G$ and $D$).

minθmaxϕV(Dϕ,Gθ)=12Exp(x)[logDϕ(x)]+12Ezq(z)[log(1Dϕ(Gθ(z)))]\min_{\theta} \max_{\phi} V(D_\phi, G_\theta) = \frac{1}{2}\mathbb{E}_{x \sim p^*(x)}[\log D_{\phi}(x)] + \frac{1}{2}\mathbb{E}_{z \sim q(z)}[\log(1 - D_{\phi}(G_{\theta}(z)))]

  • Discriminator (DϕD_\phi) Goal: Maximize the objective. It aims to output a high score (D(x)1D(x) \to 1) for real data points $x$ and a low score (D(G(z))0D(G(z)) \to 0) for generated fake samples.

  • Generator (GθG_\theta) Goal: Minimize the objective. It aims to produce samples realistic enough to force the discriminator to misclassify them as real (D(G(z))1D(G(z)) \to 1), driving log(1D(G(z)))\log(1 - D(G(z))) toward negative infinity.

3
New cards

Outline the precise algorithmic training sequence step-by-step for a standard GAN during a single optimization loop.

  1. Train the Discriminator:

  • Sample a minibatch of random latent noise from the prior: zq(z)z \sim q(z).

  • Sample a minibatch of real data instances from the target dataset: xp(x)x \sim p^*(x).

  • Pass both batches through DϕD_\phi, compute the adversarial loss, and update the discriminator parameters $\phi$ via Stochastic Gradient Descent (SGD) to maximize V(D,G)V(D, G).

  1. Train the Generator (for kk steps):

  • Sample a fresh minibatch of random latent noise: zq(z)z \sim q(z).

  • Pass the noise through GθG_\theta and then through the frozen DϕD_\phi.

  • Update the generator parameters θ\theta via SGD to minimize V(D,G)V(D,G) (by maximizing the discriminator's detection error rate).

4
New cards

Differentiate between Conditional GANs (cGAN), CycleGANs, and StyleGANs regarding their structural operations.

  • Conditional GAN (cGAN): Feeds auxiliary information (like class labels or domain maps) directly into both GG and DD to steer generation toward specific targets (e.g., rendering an image from a line drawing).

  • CycleGAN: Translates features across separate, unpaired image collections by setting up two distinct adversarial networks that map back-and-forth, enforcing a cycle-consistency loss (G(F(x))xG(F(x)) \approx x.

  • StyleGAN: Disentangles latent space representations by mapping standard noise vectors ZZ into a specialized intermediate space WW. This intermediate space acts as a style modifier at different layer resolutions, allowing for independent control over attributes like pose, age, or gender.

5
New cards

Define Vanishing Gradients and Mode Collapse as they apply to GAN training failures.

  • Vanishing Gradients: Occurs when the Discriminator becomes too skilled too quickly. If DD achieves near-perfect classification accuracy, the generator's loss flattens out, and its learning gradients drop to near-zero. This leaves GG with no actionable feedback for parameter tuning.

  • Mode Collapse: A failure mode where the Generator stops exploring the full diversity of the target data distribution. Instead, it discovers a narrow subset of variations that consistently fools the discriminator, leading it to repeatedly output the same limited set of samples.

6
New cards

Contrast VAEs and GANs on Latent Mapping style and the Perceptual Quality of their outputs.

  • Variational Autoencoders (VAEs): Optimize an explicit analytical lower bound over data likelihood, mapping inputs to localized continuous distributions. Because they maximize pixel-level probability averages, their generated outputs frequently appear blurry.

  • Generative Adversarial Networks (GANs): Learn an implicit data distribution through competition rather than an explicit density function. Because the latent space optimizes purely against a discriminator's critiques rather than pixel-level averages, they generate sharp, high-fidelity images.

7
New cards

What is the fundamental operational mechanism of a Flow-Based Model, and how does it differ from a GAN?

Unlike GANs, which generate samples implicitly without computing densities, Flow-Based Models explicitly approximate the data's true probability density function.

They achieve this by taking a simple base distribution (such as a standard 2D Gaussian) and passing it through a progressive sequence of invertible, bi-differentiable (bijective) transformation functions. This allows the model to compute exact log-likelihoods while retaining fast data synthesis capabilities.

8
New cards

Describe the Forward and Reverse pathways of a Variational Diffusion Model (VDM) under its Markov Process framework.

  • Forward Diffusion Process: A fixed, tractable Markov chain that systematically injects small increments of Gaussian noise to clear data (x0x_0) over a series of sequential timesteps (x1,x2,x_1, x_2, \dots). No model training occurs here; it terminates when the input becomes completely unstructured noise (xTx_T).

  • Reverse Diffusion Process: An approximate, learned Markov chain. A trained neural network (typically a U-Net architecture) takes the noisy vector xtx_t and predicts the exact noise contribution at that timestep, subtracting it to iteratively reconstruct clean data (x0x_0).

9
New cards

What is the hh-space in a Variational Diffusion Model, and how can it be used for image editing?

The hh-space is the semantic latent space spanned by the bottleneck activations within the diffusion model's core U-Net architecture. By extracting these activations and performing Principal Component Analysis (PCA) on them, developers can isolate independent direction vectors that correspond to specific physical features. This allows for smooth, semantically isolated editing (e.g., altering age or facial pose) without affecting other image details.

10
New cards

Contrast the implementation strategies of Imagen, DALL-E 2, and Stable Diffusion for text-to-image synthesis.

  • Imagen: Passes text prompts through a massive pre-trained language model, then routes the resulting embeddings through a diffusion process directly in the pixel space, using cascaded super-resolution models to upscale the output.

  • DALL-E 2: Uses a prior network to transform text descriptions into transformer-based CLIP embeddings, which then condition a diffusion decoder to synthesize styled imagery.

  • Stable Diffusion (Latent Diffusion): Maximizes efficiency by running its progressive forward-reverse diffusion pipeline entirely inside a compact pre-trained VAE latent space rather than on raw pixel grids. It integrates CLIP and Vision Transformers (ViT) to inject cross-attention textual conditioning.

11
New cards

Why can traditional semi-supervised approximate inference techniques (like those in VAEs) not be directly applied to standard GANs? How do Semi-Supervised GANs (SS-GANs) bypass this?

Standard GANs suffer from two structural limitations:

  1. They do not learn an inference network/encoder mapping data back to latent space (xzx \to z).

  2. They do not model an explicit probability density function p(x)p(x) over the data space.

Because of this, SS-GANs bypass the need for an explicit encoder by directly modifying the architecture of the critic (discriminator) to handle classification and adversarial tasks simultaneously.

12
New cards

Describe the output layer architecture of the Critic in a Semi-Supervised GAN. How many outputs does it feature, and what do they represent?

The modified critic features C+1C + 1 outputs:

  • The first CC outputs correspond to the actual semantic class labels of the dataset (e.g., Cat, Dog, Car, etc.).

  • The (C+1)(C + 1)-th output corresponds to a dedicated "fake" class label used for standard adversarial discrimination.

13
New cards

Explain the expected classification behavior of the SS-GAN critic when processing:

  • Labeled Real Data

  • Unlabeled Real Data

  • Generated (Fake) Data

Labeled Real Data (x,yx, y): The critic is optimized to output the exact, true semantic class label y{1,,C}y \in \{1, \dots, C\}.

  • Unlabeled Real Data (xx): The critic is trained to raise the aggregate probability mass across any of the valid CC real classes, while suppressing the probability of the (C+1)(C + 1)-th "fake" class.

  • Generated Data (G(z)G(z)): The critic is trained to classify these outputs explicitly into the (C+1)(C + 1)-th "fake" class.

14
New cards

Write out the complete Critic Loss Function ($\mathcal{L}_{\text{critic}}$) for a Semi-Supervised GAN.

Lcritic=Ex,yp(x,y)[logpθ(yx)]Exp(x)[log(1pθ(y=C+1x))]Ezp(z)[logpθ(y=C+1G(z))]\mathcal{L}_{\text{critic}} = -\mathbb{E}_{x,y \sim p(x,y)} [\log p_\theta(y \mid x)] - \mathbb{E}_{x \sim p(x)} [\log(1 - p_\theta(y = C + 1 \mid x))] - \mathbb{E}_{z \sim p(z)} [\log p_\theta(y = C + 1 \mid G(z))]

Where θ\theta represents the parameterized weights of the modified multi-class critic network.

15
New cards

Break down the structural optimization roles of Term 1, Term 2, and Term 3 within the SS-GAN Critic Loss Function.

Lcritic=Ex,y[logpθ(yx)]Term 1: Supervised LearningEx[log(1pθ(y=C+1x))]Term 2: Unsupervised Real LearningEz[logpθ(y=C+1G(z))]Term 3: Adversarial Fake Learning\mathcal{L}_{\text{critic}} = \underbrace{-\mathbb{E}_{x,y} [\log p_\theta(y \mid x)]}_{\text{Term 1: Supervised Learning}} \underbrace{- \mathbb{E}_{x} [\log(1 - p_\theta(y = C + 1 \mid x))]}_{\text{Term 2: Unsupervised Real Learning}} \underbrace{- \mathbb{E}_{z} [\log p_\theta(y = C + 1 \mid G(z))]}_{\text{Term 3: Adversarial Fake Learning}}

  • Term 1 (Supervised): Maximizes classification accuracy on available labeled real examples.

  • Term 2 (Unsupervised Real): Minimizes the probability that unlabeled real data is flagged as fake, forcing the model to distribute probability mass across the CC real semantic categories.

  • Term 3 (Adversarial Fake): Maximizes the probability that fakes synthesized by the generator are correctly routed to the (C+1)(C+1)-th "fake" slot.

16
New cards

Write out the Generator Loss Function (Lgenerator\mathcal{L}_{\text{generator}}) for a Semi-Supervised GAN and explain its ultimate training goal.

Lgenerator=Ezp(z)[logpθ(y=C+1G(z))]\mathcal{L}_{\text{generator}} = \mathbb{E}_{z \sim p(z)} [\log p_\theta(y = C + 1 \mid G(z))]

  • Goal: This function acts directly as a min-max counterpart to the third term of the critic loss. It minimizes the probability that the critic detects its generated samples as fake, mathematically forcing the critic to accidentally assign the synthetic outputs into one of the CC valid real-world semantic categories.

17
New cards

Explain the fundamental architectural asymmetry that motivates the design of a standard Diffusion Model.

It is highly computationally challenging to transform unstructured Gaussian noise into a highly structured data manifold directly in a single step. However, it is analytically simple to destroy data structure by gradually adding noise.

Diffusion models exploit this by setting up two symmetric processes: a fixed, multi-step Forward Process that perturbs data into noise, and a learned, deep Reverse Process trained to invert each perturbation step sequentially.

18
New cards

Compare DDPMs with Variational Autoencoders (VAEs) and Normalizing Flows regarding internal dimensionality and transformation properties.

  • vs. VAEs: Unlike typical VAE bottlenecks, every single intermediate latent state xtx_t (t=1Tt = 1 \dots T) in a DDPM maintains the exact same spatial and numerical dimensionality as the initial data input x0x_0. This completely bypasses low-dimensional posterior collapse.

  • vs. Normalizing Flows: Unlike flows, the intermediate step transitions in a DDPM are stochastic rather than deterministic, and they do not require mathematically invertible layers or Jacobian determinant calculations.

19
New cards

Write out the conditional transition equation for a single step of the Forward (Diffusion) Process, and define its variables.

q(xtxt1)=N(xt    1βtxt1,βtI)q(x_t \mid x_{t-1}) = \mathcal{N}\left(x_t \;{\Big |}\; \sqrt{1 - \beta_t}x_{t-1}, \,\beta_t \mathbf{I}\right)

  • xtx_t: The perturbed latent state at timestep $t$.

  • βt(0,1)\beta_t \in (0, 1): The variance coordinate dictated by a predefined noise schedule at timestep tt.

  • I\mathbf{I}: The identity matrix confirming independent isotropic Gaussian noise injection.

20
New cards

State the Closed-Form Marginalization equation (the Diffusion Kernel) that allows a DDPM to sample xtx_t directly from x0x_0, and define its components.

q(xtx0)=N(xt    αˉtx0,(1αˉt)I)q(x_t \mid x_0) = \mathcal{N}\left(x_t \;{\Big |}\; \sqrt{\bar{\alpha}_t}x_0, \,(1 - \bar{\alpha}_t)\mathbf{I}\right)

Where αt1βt\alpha_t \triangleq 1 - \beta_t, and αˉts=1tαs\bar{\alpha}_t \triangleq \prod_{s=1}^t \alpha_s. This allows the system to bypass step-by-step sequential simulation during training by scaling x0x_0 deterministically and adding a scaled noise vector.

21
New cards

How do the perceptual effects of the forward process shift across visual media from early timesteps (t1t \to 1) to later timesteps (tTt \to T)?

The unconditional marginal step acts as a progressive Gaussian convolution over the image manifold:

  • Early Steps (t1t \to 1): Wipe out high-frequency spatial details first (e.g., fine clothing textures, sharp object edges, pixel grain).

  • Later Steps (tTt \to T): Progressively destroy low-frequency structural information (e.g., global semantic shapes, object orientations, color layouts).

22
New cards

Write out the comprehensive joint distribution function of the Reverse Generative Model decoder.

pθ(x0:T)=p(xT)t=1Tpθ(xt1xt)where p(xT)=N(0,I)p_\theta(x_{0:T}) = p(x_T)\prod_{t=1}^T p_\theta(x_{t-1} \mid x_t) \quad \text{where } p(x_T) = \mathcal{N}(0, \mathbf{I})

And each individual reverse transition is parameterized as a shared Gaussian neural network:

pθ(xt1xt)=N(xt1    μθ(xt,t),Σθ(xt,t))p_\theta(x_{t-1} \mid x_t) = \mathcal{N}\left(x_{t-1} \;{\Big |}\; \mu_\theta(x_t, t), \,\mathbf{\Sigma}_\theta(x_t, t)\right)

23
New cards
  • Provide the structural breakdown of the negative ELBO (LVLB\mathcal{L}_{\text{VLB}}) used to fit a DDPM, detailing the operational roles of its three components: LT\mathcal{L}_T, Lt1\mathcal{L}_{t-1}, and L0\mathcal{L}_0.

LVLB(x0)=DKL(q(xTx0)p(xT))LT+t=2TEq(xtx0)[DKL(q(xt1xt,x0)pθ(xt1xt))]Lt1Eq(x1x0)[logpθ(x0x1)]L0\mathcal{L}_{\text{VLB}}(\mathbf{x}_0) = \underbrace{D_{\text{KL}}(q(x_T \mid x_0) \parallel p(x_T))}_{\mathcal{L}_T} + \sum_{t=2}^T \underbrace{\mathbb{E}_{q(x_t \mid x_0)} \left[ D_{\text{KL}}(q(x_{t-1} \mid x_t, x_0) \parallel p_\theta(x_{t-1} \mid x_t)) \right]}_{\mathcal{L}_{t-1}} - \underbrace{\mathbb{E}_{q(x_1 \mid x_0)}[\log p_\theta(x_0 \mid x_1)]}_{\mathcal{L}_0}

  • LT\mathcal{L}_T (Prior Loss): Confirms the final forward step matches the standard unlearned Gaussian noise prior. (Evaluates to near-zero given a proper schedule).

  • Lt1\mathcal{L}_{t-1} (Denoising Transitions): Minimizes the statistical distance between the learned reverse step and the true tractable tract posterior distribution.

  • L0\mathcal{L}_0 (Reconstruction Term): Measures the log-likelihood of producing the clean final image from the first latent step.

24
New cards

Explain why re-parameterizing a DDPM to predict the Injected Noise Vector (ϵ\epsilon) rather than the denoised mean (μθ\mu_\theta) is mathematically sound.

Because any intermediate state can be expressed as xt=αˉtx0+1αˉtϵx_t = \sqrt{\bar{\alpha}_t}x_0 + \sqrt{1 - \bar{\alpha}_t}\epsilon, we can solve for x0x_0 and substitute it directly into the true posterior mean equation. This yields:

μ~t(xt,x0)=1αt(xtβt1αˉtϵ)\tilde{\mu}_t(x_t, x_0) = \frac{1}{\sqrt{\alpha_t}}\left( x_t - \frac{\beta_t}{\sqrt{1 - \bar{\alpha}_t}}\epsilon \right)

This proves that the only unknown variable at timestep $t$ is the random noise vector ϵ\epsilon. Consequently, parameterizing the network as ϵθ(xt,t)\epsilon_\theta(x_t, t) to predict this noise automatically resolves the calculation of the denoised mean vector.

25
New cards

Write out the formal Simplified Loss Objective Function (Lsimple\mathcal{L}_{\text{simple}}) used to train modern DDPMs. What is its core structural adjustment compared to $$\mathcal{L}_{\text{VLB}}$$ ?

Lsimple(θ)=Ex0,ϵN(0,I),tUnif(1,T)[ϵϵθ(αˉtx0+1αˉtϵ,t)2]\mathcal{L}_{\text{simple}}(\theta) = \mathbb{E}_{x_0, \,\epsilon \sim \mathcal{N}(0, \mathbf{I}), \,t \sim \text{Unif}(1, T)}\left[ \left\| \epsilon - \epsilon_\theta\left(\sqrt{\bar{\alpha}_t}x_0 + \sqrt{1 - \bar{\alpha}_t}\epsilon, \,t\right) \right\|^2 \right]

  • Adjustment: It drops the complex maximum-likelihood weighting coefficients from the analytical KL calculation, setting them to a constant value (λt=1\lambda_t = 1). This down-weights difficult denoising steps, significantly enhancing perceptual fidelity and training stability.

26
New cards

How does a Variational Diffusion Model (VDM) fundamentally differ from a standard DDPM regarding its noise schedule formulation?

nstead of utilizing a hard-coded, static schedule (βt\beta_t), a VDM treats the noise progression parameters as learnable components optimized directly via the ELBO. The model parameterizes the Signal-to-Noise Ratio (SNR) as a monotonically decreasing function of continuous time:

R(t)=αt2σt2=exp(γϕ(t))R(t) = \frac{\alpha_t^2}{\sigma_t^2} = \exp(-\gamma_\phi(t))

Where γϕ(t)\gamma_\phi(t) is parameterized by a monotonic neural network architecture.

27
New cards

Explain the continuous-time boundary invariance property proved by converting the diffusion loss integral to a function of the signal-to-noise ratio (v=R(t)v = R(t)).

Changing the integration variables converts the continuous-time loss into:

LD(x0)=12EϵN(0,I)[RminRmaxx0x~θ(zv,v)22dv]\mathcal{L}_D(x_0) = \frac{1}{2}\mathbb{E}_{\epsilon \sim \mathcal{N}(0,\mathbf{I})}\left[ \int_{R_{\text{min}}}^{R_{\text{max}}} \|x_0 - \tilde{x}_\theta(z_v, v)\|_2^2 \,dv \right]

This conversion mathematically proves that the exact functional trajectory of the intermediate noise schedule does not impact model fitting, provided the boundary conditions (RminR_{\text{min}} and RmaxR_{\text{max}}) remain identical.

28
New cards

Detail the mechanics of Low-Discrepancy Variance Reduction when sampling timesteps for a training minibatch of size kk in a continuous-time VDM.

Standard random Monte Carlo time sampling introduces high statistical variance across minibatches. To minimize estimation error, a deterministic low-discrepancy sampler splits the time domain evenly. A single anchor value u0Unif(0,1)u_0 \sim \text{Unif}(0, 1) is sampled, and distributed timesteps are assigned across each element ii in the minibatch via:

ti=mod(u0+ik,1)t^i = \text{mod}\left(u_0 + \frac{i}{k}, \,1\right)

This guarantees an even, stratified sampling across the entire noise timeline.

29
New cards

Contrast Prescribed (Explicit) Probabilistic Models with Implicit Probabilistic Models on density evaluation and generative execution.

  • Prescribed Models: Provide a direct, parametric formulation of the log-likelihood function (logpθ(x)\log p_\theta(x)), allowing explicit pointwise density evaluation (e.g., ARMs, VAEs).

  • Implicit Models: Do not define an evaluable likelihood function (p(x)p(x) cannot be directly computed). Instead, they instantiate a stochastic simulator or function (Gθ(z)G_\theta(z)) to transform a latent distribution directly into synthesized observations (e.g., GANs).

30
New cards

Write out the optimization framework that defines the "Learning by Comparison" methodology for implicit models.

Because implicit models lack an explicit likelihood expression, they are optimized using a two-sample approach that passes expectations through a parameterized critic network (DϕD_\phi):

D(p,q)=maxϕF(Dϕ,p,q)whereF(Dϕ,p,qθ)=Exp(x)[f(x,ϕ)]+Ezq(z)[g(Gθ(z),ϕ)]D(p^*, q) = \max_\phi \mathcal{F}(D_\phi, p^*, q) \quad \text{where} \quad \mathcal{F}(D_\phi, p^*, q_\theta) = \mathbb{E}_{x \sim p^*(x)}[f(x, \phi)] + \mathbb{E}_{z \sim q(z)}[g(G_\theta(z), \phi)]

This allows distances between distributions to be computed entirely via sample-driven Monte Carlo estimation.

31
New cards

Front: Show how a binary classifier D(x)D(x) can be algebraically converted to yield the Density Ratio r(x)=p(x)qθ(x)r(x) = \frac{p^*(x)}{q_\theta(x)} between two distributions.

Assuming a classifier is trained with a Bernoulli log-loss to separate real samples ($y=1$) from generated fakes (y=0y=0), the probability matching simplifies to:

D(x)=p(y=1x)=p(x)p(x)+qθ(x)D(x) = p(y=1 \mid x) = \frac{p^*(x)}{p^*(x) + q_\theta(x)}

Dividing D(x)D(x) by its complement 1D(x)1 - D(x) yields:

D(x)1D(x)=p(x)p(x)+qθ(x)qθ(x)p(x)+qθ(x)=p(x)qθ(x)=r(x)\frac{D(x)}{1 - D(x)} = \frac{\frac{p^*(x)}{p^*(x) + q_\theta(x)}}{\frac{q_\theta(x)}{p^*(x) + q_\theta(x)}} = \frac{p^*(x)}{q_\theta(x)} = r(x)

The density ratio is exactly 1 everywhere if and only if the distributions are identical.

32
New cards

Prove that maximizing the standard binary cross-entropy discriminator objective yields a value mathematically equivalent to the Jensen-Shannon Divergence (JSD).

The analytical optimum for a discriminator maximizing the standard GAN loss is:

D(x)=p(x)p(x)+qθ(x)D^*(x) = \frac{p^*(x)}{p^*(x) + q_\theta(x)}

2. Substitute D(x)D^*(x) back into the objective function:

V(G,D)=Exp[logp(x)p(x)+qθ(x)]+Exqθ[logqθ(x)p(x)+qθ(x)]V(G, D^*) = \mathbb{E}_{x \sim p^*} \left[\log \frac{p^*(x)}{p^*(x)+q_\theta(x)}\right] + \mathbb{E}_{x \sim q_\theta} \left[\log \frac{q_\theta(x)}{p^*(x)+q_\theta(x)}\right]

3. Multiply the denominators by 2 to align with average distributions, pulling out the constants:

=Exp[logp(x)p(x)+qθ(x)2]log2+Exqθ[logqθ(x)p(x)+qθ(x)2]log2= \mathbb{E}_{x \sim p^*} \left[\log \frac{p^*(x)}{\frac{p^*(x)+q_\theta(x)}{2}}\right] - \log 2 + \mathbb{E}_{x \sim q_\theta} \left[\log \frac{q_\theta(x)}{\frac{p^*(x)+q_\theta(x)}{2}}\right] - \log 2

4. Convert the expectations into KL divergence integrals:

V(G,D)=DKL(p    p+qθ2)+DKL(qθ    p+qθ2)2log2=2JSD(p,qθ)log4V(G, D^*) = D_{\text{KL}}\left(p^* \;\parallel\; \frac{p^* + q_\theta}{2}\right) + D_{\text{KL}}\left(q_\theta \;\parallel\; \frac{p^* + q_\theta}{2}\right) - 2\log 2 = 2 \cdot \text{JSD}(p^*, q_\theta) - \log 4

33
New cards

Map the Brier Score and Hinge Loss rules to the specific alternative divergence constraints they minimize.

  • Brier Score: Maps directly to minimizing the Pearson χ2\chi^2 Divergence (the structural foundation of Least Squares GANs / LS-GAN).

  • Hinge Loss: Maps directly to minimizing the Total Variation Distance.

34
New cards

Define an Integral Probability Metric (IPM) expression, and explain how the Wasserstein GAN (WGAN) is derived from it.

IPMs quantify statistical distance via a bounded class of real-valued test/witness functions F\mathcal{F}:

IF(p,qθ)=supfFExp(x)[f(x)]Exqθ(x)[f(x)]\mathcal{I}_{\mathcal{F}}(p^*, q_\theta) = \sup_{f \in \mathcal{F}} \left| \mathbb{E}_{x \sim p^*(x)}[f(x)] - \mathbb{E}_{x \sim q_\theta(x)}[f(x)] \right|

  • WGAN Derivation: Constraining the function class F\mathcal{F} to the set of all 1-Lipschitz functions (fLip1\|f\|_{\text{Lip}} \le 1) yields the Earth Mover's (Wasserstein-1) distance. Because calculating the exact supremum is intractable, it is approximated using a regularized neural critic DϕD_\phi under a Lipschitz constraint (e.g., via gradient penalties or spectral normalization).

35
New cards

Write out the kernel-trick expression for squared Maximum Mean Discrepancy (MMD) that allows optimization without computing a variational lower bound.

By constraining the witness function class to a norm of one within a Reproducing Kernel Hilbert Space (fRKHS=1\|f\|_{\text{RKHS}} = 1), the metric can be computed directly using sample kernels:

MMD2(p,qθ)=Ex,xp[K(x,x)]2Exp,zq[K(x,Gθ(z))]+Ez,zq[K(Gθ(z),Gθ(z))]\text{MMD}^2(p^*, q_\theta) = \mathbb{E}_{x, x' \sim p^*}[K(x, x')] - 2\mathbb{E}_{x \sim p^*, z \sim q}[K(x, G_\theta(z))] + \mathbb{E}_{z, z' \sim q}[K(G_\theta(z), G_\theta(z'))]

36
New cards

Contrast Density Ratio Models (e.g., standard JSD GANs) and Density Difference Models (e.g., Wasserstein IPMs) regarding the Non-Overlapping Support Problem.

  • Density Ratio Models (JSD / KL): Suffer from severe theoretical failures if the real and fake distributions share no overlapping support. In this regime, DKLD_{\text{KL}} \to \infty and JSDlog2\text{JSD} \to \log 2, causing the gradients to drop to zero almost everywhere, halting all generator learning.

  • Density Difference Models (Wasserstein / MMD): Successfully track distances across disjoint spaces. By enforcing continuous smoothness criteria (Lipschitz or RKHS bounds), they provide clean, stable, and predictable gradients even across non-overlapping data manifolds.

37
New cards

State the optimization caveat regarding the interpretation of the training loss curve in practical GAN implementations.

Because the generator minimizes a lower-bound approximation of an $f$-divergence or the Wasserstein metric during training, a decreasing empirical loss curve provides no mathematical guarantee that the true underlying divergence between the distributions is actually decreasing. This stands in sharp contrast to Variational Autoencoders, which maximize a strict, mathematically rigorous lower bound on data log-likelihood.