← Back to Deep Learning Mind Map
🧠 Deep LearningID: gan

GAN Adversarial Training

GAN 对抗训练
🎯Core Definition
GANs pit a generator GG against a discriminator DD in a zero-sum min-max game: min⁡Gmax⁡DV(D,G)=Ex∼pdata[log⁡D(x)]+Ez∼pz[log⁡(1−D(G(z)))]\min_G\max_D V(D,G) = \mathbb{E}_{x \sim p_{data}}[\log D(x)] + \mathbb{E}_{z \sim p_z}[\log(1 - D(G(z)))]. For fixed GG, differentiating w.r.t. DD yields the optimal discriminator as a likelihood ratio D∗(x)=pdata(x)pdata(x)+pg(x)D^*(x) = \frac{p_{data}(x)}{p_{data}(x) + p_g(x)}; plugging it back gives V(D∗,G)=−log⁡4+2⋅JSD(pdata∥pg)V(D^*, G) = -\log 4 + 2 \cdot JSD(p_{data} \Vert p_g), i.e. GAN minimizes the Jensen-Shannon divergence between the data and generated distributions, reaching the global optimum −log⁡4-\log 4 iff pdata=pgp_{data} = p_g.
💡Use Cases
image generation (DCGAN/ProGAN/StyleGAN), super-resolution, image-to-image translation; interviews drill the min-max objective, the D∗D^* derivation, and instability/mode-collapse mechanisms.
⚡Key Problems Solved
unlike VAEs with explicit density approximation and pixel-wise reconstruction losses, GANs make no distributional assumption and produce sharper samples; the cost is that alternating D/G training approximates a Nash equilibrium rather than minimizing a loss — with a too-strong DD the JSD saturates and generator gradients vanish, with a too-weak DD the signal is noisy, leading to mode collapse and oscillation.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of GAN Adversarial Training.
Use Cases
In production engineering, what are the primary use cases for GAN Adversarial Training and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Write GAN's min-max objective and derive the optimal discriminator D∗(x)D^*(x)?
2
Why does substituting D∗D^* reduce GAN to minimizing JSD(pdata∥pg)JSD(p_{data} \Vert p_g)?
3
Why is GAN training unstable? Mechanisms behind vanishing gradients and mode collapse?
4
Why do GANs suffer mode collapse while VAEs do not? How do their sample qualities differ?
5
Common techniques to stabilize GAN training (label smoothing / TTUR / spectral norm)?
Updated 2026-08-12
🎯
Verify Mastery: Practice Exam Questions for "GAN Adversarial Training"
Take pitfall multiple-choice questions with derivation options; mistakes are automatically logged.
🚀 Start Card Practice ➔
← Previous CardGraph Attention NetworkNext Card →WGAN & Wasserstein

🔗 More Deep Learning Knowledge Cards

引用出处: TalentMe 450+ 工业级 AI 架构考点知识库 (Tech Vault) · 遵循 CC-BY-4.0 知识共享协议
URL: https://talentme.airsota.com/resources/tech/roadmap/mindmap/DL/card/gan
中文速览与面试要点

GAN 对抗训练 (GAN Adversarial Training)

定义: GAN 由生成器 G 与判别器 D 组成, 玩零和 min-max 博弈: _G _D V(D,G) = E_x p_data[ D(x)] + E_z p_z[ (1 - D(G(z)))]。固定 G 时对 D 求导得最优判别器是似然比 D^*(x) = p_data(x)p_data(x) + p_g(x); 代入目标得 V(D^*, G) = - 4 + 2 JSD(p_data p_g), 即 GAN 等价于最小化真实分布与生成分布的 Jensen-Shannon 散度, 当且仅当 p_data = p_g 时取全局最优 - 4。 使用场景: 图像生成 (DCGAN/ProGAN/StyleGAN)、超分辨率、图像域迁移; 面试必考 min-max 目标与 D^* 推导、训练不稳定与模式坍缩的机理。 解决的问题: 相比 VAE 显式逼近密度、用逐像素重构损失, GAN 不假设分布形式、生成样本更锐利; 代价是 D/G 交替训练逼近的是纳什均衡而非极小化损失, 收敛困难: D 过强时 JSD 饱和、生成器梯度消失, D 过弱时信号噪声大, 典型失败模式为模式坍缩与训练震荡。

核心要点

  • 写出 GAN 的 min-max 目标函数, 并推导最优判别器 D^*(x)?
  • 把 D^* 代入后为什么 GAN 等价于最小化 JSD(p_data p_g)?
  • GAN 训练为什么不稳定? 梯度消失与模式坍缩的机理?
  • 为什么 GAN 容易模式坍缩而 VAE 不会? 两者生成质量有何差异?
  • 缓解 GAN 训练不稳定的常用技巧 (label smoothing / TTUR / spectral norm)?