Wasserstein distance, also called Earth Mover’s or Wasserstein-1 distance, measures dissimilarity between two distributions. In Wasserstein GANs (WGANs), it replaces binary cross-entropy as the loss signal, producing smoother gradients and more stable training than standard GAN objectives. section 5.2 section 5.2.1
WGAN training changes the usual GAN setup in several connected ways:
- Replaces the discriminator’s binary real-or-fake classification objective with critic scores: high for real data and low for generated data. section 5.2.1 section 13.2.2
- Requires the critic to be 1-Lipschitz continuous, meaning its gradient norms must remain at most 1 everywhere. section 5.2.1 section 5.6
- Uses gradient penalty rather than relying only on weight clipping to enforce the Lipschitz constraint more effectively. section 5.2.1 section 5.6
- Helps mitigate mode collapse, vanishing gradients, and slow convergence, especially in difficult GAN training settings. section 5.2
Gradient-penalty training
For image generation, sample points along the straight line between real and generated images. Evaluate each interpolated image with the critic, compute the critic-output gradients with respect to those points, and add a penalty proportional to how far their gradient norms deviate from 1. The same pattern applies to conditional images, where interpolated samples also carry interpolated labels. section 5.2.1
Beyond images
A MuseGAN alternates critic and generator updates while applying Wasserstein distance with gradient penalty to real and generated music pieces. The generator minimizes the negative critic rating, encouraging music that receives higher scores. section 13.2.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 how real, fake, and interpolated inputs reach the critic and how the gradient penalty enters the total loss. section 5.2.1



