A New Perspective on Stabilizing GANs Training: Direct Adversarial Training

Ziqiang Li, Pengfei Xia, Rentuo Tao, Hongjing Niu, Bin Li

TL;DR

This paper introduces Direct Adversarial Training (DAT), a novel method to stabilize Generative Adversarial Network (GAN) training by addressing the issue of the generator producing adversarial examples for the discriminator. DAT adaptively minimizes the discriminator's Lipschitz constant, leading to improved generation quality and stability across various GAN architectures and datasets.

What Problem Does This Paper Address?

Generative Adversarial Networks (GANs) are powerful tools for image generation, but their training is notoriously unstable. This instability often manifests as mode collapse (where the generator produces limited variations of images) or failure to converge. While many existing methods tackle this by modifying loss functions, regularization techniques, or training algorithms, this paper proposes a new perspective: the generator's outputs can inadvertently act as adversarial examples for the discriminator during training. This means the discriminator might be easily fooled by these "adversarial" generated images, leading to incorrect gradients for the generator and thus unstable training. The paper aims to stabilize GAN training by directly addressing this adversarial interaction.

Methods

The core contribution is the Direct Adversarial Training (DAT) method. Unlike traditional adversarial training for classifiers, DAT applies adversarial perturbations to both real and generated images during the discriminator's training phase. The key idea is to make the discriminator more robust to these adversarial examples.

Specifically, DAT involves:

  • Adversarial Perturbation: For both real images ($x_r$) and generated images ($x_f$), small perturbations ($\delta(x_r)$ and $\delta(x_f)$) are added. These perturbations are crafted to maximally challenge the discriminator's current output.
  • Discriminator Update: The discriminator is updated to correctly classify these perturbed real and generated images. This process is designed to adaptively minimize the discriminator's Lipschitz constant.
  • Generator Update: The generator is updated as usual, but it benefits from a more stable and robust discriminator.

The paper also shows that DAT can be viewed as an adaptive form of gradient penalty, offering a more flexible approach than fixed gradient penalties.

Datasets

The authors evaluated their method on several standard datasets:

  • 2D Synthetic Dataset: Used for initial qualitative experiments to demonstrate DAT's ability to accelerate training and avoid mode collapse.
  • CIFAR-10: A widely used dataset for image classification and generation tasks.
  • CIFAR-100: Similar to CIFAR-10 but with more classes.
  • STL-10: A dataset with higher resolution images.
  • Tiny ImageNet: A dataset with a larger number of classes and higher resolution images.
  • LSUN-Bedroom: A large-scale dataset of bedroom images.

Key Insights and Ideas

  • Generator as Adversarial Example Creator: The paper's central insight is that the generator's outputs can act as adversarial examples for the discriminator, contributing to training instability. This is a novel perspective on GAN training dynamics.
  • Adaptive Lipschitz Minimization: DAT doesn't enforce a fixed Lipschitz constant (like WGAN-GP or spectral normalization) but adaptively minimizes it. This allows the discriminator to be more flexible when it's performing poorly, preventing it from getting stuck in error states.
  • Robustness for Stability: By making the discriminator more robust to adversarial perturbations, DAT indirectly stabilizes the generator's training, leading to better overall performance.
  • Versatility: DAT is presented as a plug-and-play method that can be applied to various GAN architectures (DCGAN, SNGAN, SSGAN, InfoMAXGAN) and loss functions.

Key Results

  • Significant FID Improvements: DAT consistently improved FID scores across various models and datasets. For example, it achieved improvements of 11.5% FID on CIFAR-100 (SSGAN), 10.5% FID on STL-10 (SSGAN), and 13.2% FID on LSUN-Bedroom (SSGAN).
  • Improved Image Quality: Qualitative results showed that DAT-trained GANs produced more realistic and diverse images, with less mode collapse, especially on imbalanced datasets.
  • Hyperparameter Robustness: DAT demonstrated reduced sensitivity to hyperparameter choices, making GAN training more manageable.
  • Adversarial Robustness: DAT significantly increased the number of iterations required to successfully attack the discriminator, indicating improved robustness.

Limitations and Future Work

  • Computational Cost: While DAT is presented as not excessively costly, adversarial training inherently adds computational overhead compared to standard GAN training.
  • Perturbation Strategy: The paper uses a one-step PGD attack for generating adversarial examples. The authors suggest that more complex adversarial manipulation methods could further improve DAT's performance.
  • Generator Perturbation: The current DAT primarily focuses on perturbing inputs to the discriminator. The paper notes that applying DAT to the generator's training ("Generator only" or "All" methods) can be detrimental, suggesting further research is needed to effectively integrate adversarial training into the generator's update.

Summary updated

BibTeX
@article{li2023new,
  author = {Ziqiang Li and Pengfei Xia and Rentuo Tao and Hongjing Niu and Bin Li},
  title = {{A New Perspective on Stabilizing GANs Training: Direct Adversarial Training}},
  journal = {IEEE Trans. Emerg. Top. Comput. Intell.},
  year = {2023},
  doi = {10.1109/tetci.2022.3193373},
}
Figure