Dissecting adaptive methods in GANs

Samy Jelassi, David Dobre, Arthur Mensch, Yuanzhi Li, Gauthier Gidel

Dissecting Adaptive Methods in GANs: Why Adam Works (and How SGD Can Too!)

TL;DR

This paper investigates why adaptive optimization methods like Adam are crucial for training Generative Adversarial Networks (GANs), a question that has remained largely unanswered. By disentangling Adam's update components, the authors demonstrate that Adam's adaptive magnitude is key, and that a normalized version of Stochastic Gradient Descent Ascent (nSGDA) can effectively recover Adam's performance. Theoretically, they show nSGDA prevents mode collapse, a common GAN failure mode, by ensuring balanced updates between the generator and discriminator.

What Problem Does This Paper Address?

Training Generative Adversarial Networks (GANs) is notoriously difficult. While adaptive optimizers like Adam have become the de facto standard for achieving good performance, the precise reasons for their effectiveness in the challenging min-max optimization landscape of GANs remain unclear. Unlike standard minimization problems where adaptive methods are often explained by faster convergence or escaping saddle points, GANs present a unique challenge. This paper aims to demystify why Adam excels in GAN training and to identify the core mechanism responsible for its success, potentially leading to simpler yet equally effective optimization strategies.

Methods

The authors employ a clever "grafting" technique, inspired by prior work, to dissect Adam's update rule. They separate Adam's update into its adaptive magnitude and its direction components. By combining Adam's adaptive magnitude with the normalized direction of SGD (termed Ada-nSGDA), they empirically show that the adaptive magnitude is the critical factor for GAN performance.

To gain theoretical insight, they focus on a simplified setting using normalized SGD Ascent (nSGDA). They develop a synthetic theoretical framework to compare nSGDA with standard SGDA. Their analysis hinges on the observation that normalizing gradients in nSGDA forces the generator and discriminator to update at a similar pace, preventing the common issue of mode collapse where the GAN only learns a subset of the data distribution.

Datasets

The paper uses standard datasets for empirical evaluation, including:

  • CIFAR-10: A common benchmark for image classification and generation.
  • STL-10: Another dataset for image generation tasks.
  • FFHQ: A high-quality dataset of human faces.
  • LSUN Churches: A dataset of architectural images.

The theoretical analysis is performed on a synthetic bimodal dataset designed to specifically highlight the mode collapse phenomenon.

Key Insights and Ideas

  • Adaptive Magnitude is King: The adaptive magnitude component of Adam, rather than its direction, is identified as the primary driver of its superior performance in GAN training.
  • nSGDA as a Powerful Proxy: Normalized SGD Ascent (nSGDA) emerges as a surprisingly effective optimizer for GANs, capable of matching Adam's performance in many scenarios. This suggests that a simpler optimization scheme can achieve similar results.
  • Balanced Updates Prevent Mode Collapse: The core theoretical insight is that normalizing gradients in nSGDA ensures that the generator and discriminator update at a similar pace. This synchronized learning is crucial for preventing mode collapse and enabling the GAN to learn the full data distribution.
  • Convergence vs. Performance: The paper reinforces the idea that in GANs, convergence to a stationary point is not necessarily indicative of good performance. In fact, some of the best-performing GANs do not converge in the traditional sense.

Key Results

  • Empirical Recovery: Ada-nSGDA (Adam's magnitude + SGD's normalized direction) successfully recovers Adam's performance on various GAN architectures and datasets (WGAN-GP, DCGAN).
  • nSGDA Matches Adam: For WGAN-GP, nSGDA not only matches Adam's performance but even achieves slightly better FID scores.
  • Theoretical Proof of Mode Recovery: For a synthetic bimodal dataset, the authors theoretically prove that nSGDA-trained GANs recover both modes of the distribution, while SGDA-trained GANs suffer from mode collapse, producing only a weighted average of the modes.
  • StyleGAN2 Nuances: While nSGDA performs well on WGAN-GP and DCGAN, its performance on StyleGAN2 is not as strong. The authors hypothesize this is due to the complex architecture and adaptive regularization techniques in StyleGAN2, which deviate from the assumptions of their theoretical model.

Limitations and Future Work

  • StyleGAN2 Complexity: The theoretical framework, while insightful, does not fully capture the intricacies of modern GAN architectures like StyleGAN2, which employ more complex regularization and architectural choices.
  • Future Directions: The authors suggest finding an optimization model that can recover Adam's performance on these more advanced GAN architectures. Further research into understanding the interplay of adaptive methods with specific architectural components and regularization techniques in GANs is also warranted.

Summary updated

BibTeX
@inproceedings{jelassi2023dissecting,
  author = {Samy Jelassi and David Dobre and Arthur Mensch and Yuanzhi Li and Gauthier Gidel},
  title = {{Dissecting adaptive methods in GANs}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=hfaNXjEQB47},
}
Figure