Introduction
Generative Adversarial Networks (GANs) have achieved remarkable success in data generation but are notoriously difficult to train. This paper explores the mathematical foundations of GAN instability, identifying the limitations of traditional distance metrics like Jensen-Shannon (JS) divergence. We discuss how the Wasserstein GAN (WGAN) introduces the Earth Mover’s distance to provide smoother gradients, effectively eliminating vanishing gradients and reducing mode collapse.
The GAN Framework
The standard GAN architecture involves a generator ($G$) and a discriminator ($D$) engaged in a minimax game. The generator learns to map latent noise to the data distribution, while the discriminator learns to distinguish real samples from synthetic ones.
The Challenge: Vanishing Gradients
A primary cause of GAN training failure is the "manifold problem." Real-world data often sits on low-dimensional manifolds within a high-dimensional space. Because these manifolds are "thin," the probability that the generated and real distributions overlap is nearly zero. In these cases, the JS divergence used in traditional GANs becomes discontinuous, providing no useful gradient for the generator.
As the discriminator improves, the gradient norms for the generator decay rapidly. This "vanishing gradient trap" stalls learning, as the generator receives no signal on how to improve. This phenomenon is a direct consequence of using distance metrics that do not account for the geometry of the underlying manifolds.
The Wasserstein GAN Solution
WGAN addresses these issues by replacing the discriminator with a "critic" that estimates the Wasserstein distance (Earth Mover’s distance). Unlike JS divergence, the Wasserstein distance is continuous and provides a smooth gradient even when distributions are disjoint. This ensures the generator always has a signal to follow, regardless of how well the distributions overlap.
To ensure the Wasserstein distance is computable, the critic must satisfy the K-Lipschitz continuity constraint. In the original WGAN implementation, this is enforced via weight clipping, where weights are restricted to a fixed range (e.g., $[-0.01, 0.01]$). This shift provides the generator with a consistent signal, significantly reducing the risk of mode collapse and enabling more reliable convergence.
Conclusion
By adopting the Wasserstein distance, WGANs offer a more robust training process with a loss metric that correlates directly with image quality. While weight clipping was a foundational step, it paved the way for more sophisticated constraints like Gradient Penalty (WGAN-GP), further advancing the field of generative modeling and making adversarial training more accessible for complex datasets.
Summary updated