Direct Adversarial Training for GANs

Ziqiang Li, Pengfei Xia, Yue Ming-dao, Bin Li

Introduction

Generative Adversarial Networks (GANs) are powerful tools for image generation but are notoriously difficult to train due to the unstable minimax game between the generator and the discriminator. To stabilize this process, researchers typically enforce Lipschitz continuity through fixed constraints like gradient penalties or spectral normalization.

This paper introduces a novel perspective: adversarial robustness. The authors argue that because the generator is optimized to fool the discriminator, it naturally discovers adversarial perturbations—tiny, imperceptible noises that cause the discriminator to misclassify fake images as real. These "accidental" adversarial examples provide poor gradient feedback, leading to training instability and mode collapse.

Direct Adversarial Training (DAT)

To address this, the authors propose Direct Adversarial Training (DAT), which adapts adversarial training techniques from image classification to the GAN discriminator.

The Direct Adversarial Training (DAT) framework.

During the discriminator's update step, DAT applies a one-step Projected Gradient Descent (PGD) attack to both real ($P_r$) and generated ($P_g$) images. The discriminator is then trained on these perturbed examples. Mathematically, DAT acts as an adaptive gradient penalty:

  • Correct Classification: It functions as a zero-centered gradient penalty (0-GP), enforcing Lipschitz continuity.
  • Incorrect Classification: It acts as a "gradient reward," helping the discriminator escape local minima or saddle points.

Importantly, DAT is only applied during the discriminator's update; applying it to the generator's update was found to be detrimental to the training process.

Experimental Results

The authors evaluated DAT across synthetic datasets and standard vision benchmarks including CIFAR-10/100, STL-10, Tiny-ImageNet, and LSUN-Bedroom.

Preventing Mode Collapse

One of the most significant findings was DAT's ability to prevent mode collapse. On a 2D synthetic dataset featuring nine Gaussian distributions, standard GANs often failed to capture low-probability modes.

Visual comparison of mode capture on 2D synthetic datasets.

As shown in the scatter plots, models equipped with DAT (GAN-DAT) consistently captured all nine modes even in imbalanced settings, whereas standard GANs (GAN) dropped modes as training progressed.

Quantitative Performance

DAT is a "plug-and-play" module compatible with various architectures. When integrated into the Self-Supervised GAN (SSGAN), it yielded substantial improvements in Fréchet Inception Distance (FID):

  • CIFAR-100: 11.5% improvement.
  • STL-10: 10.5% improvement.
  • LSUN-Bedroom: 13.2% improvement.

Furthermore, DAT significantly increased the discriminator's robustness. While a standard discriminator could be fooled in roughly 3 iterations of an attack, a DAT-trained discriminator required over 37 iterations on average.

Conclusion and Future Work

Direct Adversarial Training provides a robust, adaptive method for stabilizing GAN training by explicitly defending the discriminator against adversarial examples generated by the generator. While highly effective, the method requires careful tuning of the perturbation level ($\epsilon$) to avoid degrading image quality. Future research may explore more sophisticated adversarial manipulation techniques to further optimize the balance between discriminator robustness and generator learning efficiency.

Summary updated

BibTeX
@article{li2023direct,
  author = {Ziqiang Li and Pengfei Xia and Yue Ming-dao and Bin Li},
  title = {{Direct Adversarial Training for GANs}},
  journal = {IEEE Trans. Emerg. Top. Comput. Intell.},
  year = {2023},
  doi = {10.1109/tetci.2022.3193373},
}
Figure