Generative Adversarial Networks

Gilad Cohen, Raja GiryesarXiv 2022 · DOI

Introduction

Generative Adversarial Networks (GANs) have revolutionized computer vision by framing data generation as a competitive game between two neural networks. This paper serves as a comprehensive primer on the field's progression from the original unstable min-max formulation to modern, high-fidelity architectures like StyleGAN and BigGAN that overcome classic hurdles like mode collapse and vanishing gradients.

The Adversarial Framework

While GANs are incredibly powerful at generating realistic data, they are notoriously difficult to train. The fundamental "instability" of the GAN framework stems from its adversarial nature. In the classic "police vs. counterfeiter" analogy, if the police (the Discriminator) become too good too quickly, the counterfeiter (the Generator) receives no useful feedback and stops learning—a phenomenon known as vanishing gradients.

The basic GAN architecture: a competitive game between a Generator and a Discriminator.

Furthermore, Generators often find a "shortcut" by producing only a single type of realistic output (e.g., only the number '6' when trained on digits) rather than learning the full variety of the dataset. This is known as mode collapse. Researchers have redesigned architectures and loss functions to make this competitive learning process more stable and diverse.

Methodological Innovations

The paper categorizes improvements into two main buckets: architectural innovations and objective function improvements.

Architectural Innovations

  • DCGAN: Introduced convolutional layers and removed pooling, setting the standard for image-based GANs.
  • PROGAN: Trains by starting at very low resolutions (4x4) and progressively adding layers to reach high resolutions (1024x1024), which stabilizes the early stages of training.
  • StyleGAN: Separates "style" (high-level attributes like pose) from "noise" (fine details) using a mapping network and Adaptive Instance Normalization (AdaIN).
  • BigGAN: Scales up model size and batch size significantly while using a "truncation trick" to trade off variety for higher individual sample quality.

Objective Function Improvements

  • Wasserstein GAN (WGAN): Replaces the standard probability-based loss with the "Earth Mover" distance. This provides a smooth gradient even when the real and fake data distributions have no overlap.
  • Spectral Normalization (SNGAN): Constrains the weights of the Discriminator to satisfy a Lipschitz condition, preventing it from becoming "too powerful" and killing the Generator's gradient.
  • Self-Supervised GAN (SSGAN): Adds an auxiliary task (like predicting the rotation of an image) to help the Discriminator learn better internal representations.

Theoretical Insights: The Divergence Dilemma

A critical insight highlighted in the paper is the mathematical relationship between the original GAN loss and Jensen-Shannon (JS) divergence. When the Generator's output is far from the real data distribution, the JS divergence remains constant (flat), leading to the vanishing gradient problem.

The vanishing gradient problem: JS divergence becomes flat when distributions do not overlap, providing no learning signal to the Generator.

Switching to Wasserstein distance or non-saturating losses was the pivotal moment that fixed training stability. Beyond stability, the paper emphasizes that disentanglement is key; StyleGAN’s ability to separate factors of variation allows for precise image editing by manipulating specific latent vectors.

Results and Benchmarks

Advancements have been benchmarked across several datasets, showing significant progress in both quality and feature learning:

  • MNIST & SVHN: Used for demonstrating mode collapse and feature extraction. DCGAN achieved a classification error of 22.48% on SVHN as a feature extractor, outperforming purely supervised CNNs (28.87%).
  • CelebA, FFHQ, & ImageNet: The standards for high-resolution face and multi-class generation. Models like StyleGAN2 now achieve near-photorealistic results at 1024x1024 resolutions.

Unlike the oscillating losses of early models, WGAN and SNGAN provide measurable loss curves that correlate with image quality.

Limitations and Future Outlook

Despite significant progress, challenges remain. Mathematically predicting "good" image quality remains difficult, and manual visualization is still common. Furthermore, large-scale models like BigGAN require massive hardware resources inaccessible to many researchers. While GANs currently lead, newer methods like Normalizing Flows and Score-based Generative Models (Diffusion) are showing highly competitive performance and may represent the next frontier in generative AI.

Summary updated

BibTeX
@misc{cohen2022generative,
  author = {Gilad Cohen and Raja Giryes},
  title = {{Generative Adversarial Networks}},
  year = {2022},
  eprint = {2203.00667},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.00667},
}
Figure