Wasserstein GAN (WGAN) replaces a regular GAN’s binary cross-entropy objective with the Wasserstein-1, or Earth Mover’s, distance. The change provides smoother gradient flow and more stable training, helping mitigate mode collapse, vanishing gradients, and slow convergence. section 5.2 section 5.6
Unlike a traditional discriminator that classifies inputs as real or fake, a WGAN uses a critic that assigns scores. The critic must be 1-Lipschitz continuous; gradient penalty enforces this constraint more effectively than the original weight-clipping approach. section 5.2.1
A WGAN with gradient penalty follows this training pattern:
- Replace binary cross-entropy with Wasserstein loss for real and generated data. section 5.2.1
- Sample points along straight lines between real and generated data points. section 5.2.1
- Compute the critic’s output gradient with respect to those sampled points. section 5.2.1
- Add a penalty proportional to how far the gradient norms deviate from 1. section 5.2.1
Conditional face generation
A conditional WGAN can generate human faces with or without eyeglasses. Concatenate a 100-dimensional noise vector with a two-value one-hot label, producing a 102-dimensional generator input; the critic evaluates the resulting color image. section 5.3 section 5.3.2
Figure 5.3 WGAN with gradient penalty. The discriminator network in WGAN (which we call the critic) rates input images: it tries to assign a score of –∞ to a fake image (bottom left) and a score of ∞ to the real image (top middle). Further, an interpolated image of the real and fake images (top left) is presented to the critic, and the gradient penalty with respect to the critic’s rating on the interpolated image is added to the total loss in the training process.
Use the diagram to trace critic scores for real, fake, and interpolated images, and to see where the gradient penalty enters the total loss. section 5.2.1

