Back to Deep Learning Mind Map
中文·English
🧠 Deep LearningID: wgan

WGAN & Wasserstein

WGAN 与 Wasserstein
🎯Core Definition
WGAN replaces the JS divergence with the Wasserstein distance (earth-mover, via the Kantorovich-Rubinstein duality): W(Pr,Pg)=supfL1ExPr[f(x)]Ezpz[f(G(z))]W(P_r, P_g) = \sup_{\Vert f \Vert_L \le 1} \mathbb{E}_{x \sim P_r}[f(x)] - \mathbb{E}_{z \sim p_z}[f(G(z))], requiring the critic ff to be 1-Lipschitz. The original WGAN enforces this via weight clipping, which distorts the distribution; WGAN-GP instead penalizes the gradient norm on linear interpolations x^\hat{x} between real and fake samples: λEx^Px^[(x^D(x^)21)2]\lambda \mathbb{E}_{\hat{x} \sim P_{\hat{x}}}\left[(\Vert \nabla_{\hat{x}} D(\hat{x}) \Vert_2 - 1)^2\right] (default λ=10\lambda = 10).
💡Use Cases
replacing standard GANs for stable image generation (e.g. DCGAN backbone + WGAN-GP loss); interviews compare Wasserstein vs JSD/KL and ask how the 1-Lipschitz constraint is implemented.
Key Problems Solved
JSD saturates at log2\log 2 and its gradient vanishes almost everywhere when the supports of real and generated distributions do not overlap (common early in training), starving the generator; the Wasserstein distance is continuous and differentiable everywhere and gives meaningful gradients even for disjoint supports, stabilizing training and yielding an unsaturated loss usable as a convergence signal. Cost: the 1-Lipschitz constraint must be maintained — weight clipping causes exploding/vanishing gradients, so gradient penalty is the robust fix.
🎯5 High-Frequency Exam Points
1
State the definition of Wasserstein distance and its Kantorovich-Rubinstein dual form?
2
Why do JSD/KL gradients vanish for non-overlapping supports while Wasserstein does not?
3
How is the 1-Lipschitz constraint enforced? Trade-offs of weight clipping vs gradient penalty?
4
Why is the WGAN-GP penalty minimized when x^D(x^)2=1\Vert \nabla_{\hat{x}} D(\hat{x}) \Vert_2 = 1?
5
Why does WGAN's critic omit sigmoid, and what does its loss value mean?
Updated 2026-08-12
🎯
Test Your Knowledge: Practice Questions for "WGAN & Wasserstein"
Single choice pitfall questions with instant feedback and mistake tracking.
🚀 Start Card Practice
Previous CardGAN Adversarial TrainingNext CardVAE & Reparameterization

🔗 More Deep Learning Knowledge Cards

Activation FunctionsAdam & AdamWAutograd Compute GraphBatch Normalization