Training Wasserstein GANs without gradient penalties

Dohyun Kwon, Yeoneung Kim, Guido Montúfar, Insoon YangarXiv 2021

Abstract

Generative Adversarial Networks (GANs) often suffer from training instabilities such as mode collapse. While Wasserstein GANs (WGANs) mitigate these issues by using the Wasserstein distance as a loss metric, they require the discriminator to satisfy a 1-Lipschitz constraint. Traditionally, this is enforced via gradient penalties (WGAN-GP), which are computationally expensive and hyperparameter-sensitive. We present CoWGAN (Comparison Wasserstein GAN), a novel training framework that enforces the Lipschitz constraint through a switching mechanism between multiple objective functions derived from Kantorovich duality. CoWGAN achieves a 6x speedup in training time, provides more accurate Wasserstein distance estimates, and maintains competitive image quality without the need for gradient penalties.

Introduction

The success of Wasserstein GANs hinges on the enforcement of the 1-Lipschitz constraint on the discriminator. Early methods like weight clipping were overly restrictive, while the current standard, WGAN-GP, relies on a gradient penalty term. However, WGAN-GP requires additional backward passes to compute second-order derivatives, making it computationally intensive. Furthermore, the penalty is only enforced locally at sample points, and its effectiveness is highly dependent on the penalty weight $\lambda$.

Methodology: The CoWGAN Framework

CoWGAN replaces explicit gradient penalties with a logic based on the $c$-transform and Kantorovich duality. The algorithm monitors four distinct objective functions ($J_1$ through $J_4$). In an ideal 1-Lipschitz scenario, these functions converge to the same value. Discrepancies between them indicate violations of the Lipschitz constraint.

Comparison of objective functions $J_1-J_4$ and Wasserstein distance $W$ across training methods.

The CoWGAN training loop dynamically switches the optimization target based on the relative values of these objectives:

  1. If $J_2 < J_1$, the discriminator is updated to maximize $J_2$.
  2. Else if $J_3 < J_1$, it updates to maximize $J_3$.
  3. Otherwise, it proceeds with the standard $J_1$ update.

This "back-and-forth" approach naturally pushes the discriminator toward the 1-Lipschitz boundary during the forward pass, avoiding the overhead of gradient-of-gradient calculations.

Key Insights

A critical theoretical contribution of this work is the Universal Admissible Condition. The authors demonstrate that the discriminator only needs to be 1-Lipschitz on the supports of the real and generated distributions, rather than the entire domain. By utilizing the $c$-transform on mini-batches, CoWGAN detects these local violations efficiently. Unlike WGAN-GP, CoWGAN is robust to hyperparameters and does not require tuning a penalty weight $\lambda$.

Visualization of the discriminator's level sets on a 2D Mixture of Gaussians dataset for a baseline WGAN-GP model.

Experimental Results

The researchers evaluated CoWGAN against WGAN-GP on synthetic 2D data, MNIST, Fashion-MNIST, and CIFAR-10.

Training Efficiency and Accuracy

CoWGAN demonstrated a 6x speedup in wall-clock time compared to WGAN-GP. This efficiency stems from avoiding second-order derivatives. Moreover, as shown in the comparison plots, CoWGAN's objective functions converge tightly to the true Wasserstein distance ($W$), providing a reliable metric for training progress. In contrast, WGAN-GP often fails to provide an accurate distance estimate, especially with lower $\lambda$ values.

Image Quality

Despite the significant speedup, CoWGAN maintains high generative performance. FID scores on MNIST, F-MNIST, and CIFAR-10 are competitive with or superior to WGAN-GP, proving that the computational savings do not compromise the quality or diversity of the generated samples.

Conclusion

CoWGAN offers a more efficient and theoretically grounded alternative to gradient penalties for training Wasserstein GANs. By leveraging duality and a dynamic switching mechanism, it simplifies the training process, removes sensitive hyperparameters, and significantly reduces computational costs. Future work will explore scaling CoWGAN to high-resolution image synthesis and applying its constrained optimization logic to broader machine learning tasks.

Summary updated

BibTeX
@misc{kwon2021training,
  author = {Dohyun Kwon and Yeoneung Kim and Guido Montúfar and Insoon Yang},
  title = {{Training Wasserstein GANs without gradient penalties}},
  year = {2021},
  eprint = {2110.14150},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2110.14150},
}
Figure