TL;DR
This paper introduces Least Squares Generative Adversarial Networks (LSGANs) as a solution to the vanishing gradient problem in standard GANs. By replacing the sigmoid cross-entropy loss with a least squares loss for both the generator and discriminator, LSGANs achieve more stable training and generate higher quality images, while also being less prone to mode collapse.
What Problem Does This Paper Address?
Generative Adversarial Networks (GANs) have revolutionized unsupervised learning, particularly in image generation. However, standard GANs, which use a sigmoid cross-entropy loss function for the discriminator, often suffer from vanishing gradients during training. This occurs because the loss function saturates when the discriminator is either too confident (classifying real images as real, or fake images as fake) or not confident enough. This saturation leads to very small gradients, hindering the generator's ability to learn and improve, and can result in unstable training and poor image quality. The paper aims to address this instability and improve image generation quality by proposing a new loss function.
Methods
The core innovation of this paper is the introduction of Least Squares Generative Adversarial Networks (LSGANs). Instead of the traditional sigmoid cross-entropy loss, LSGANs employ a least squares loss for both the discriminator and the generator.
- Discriminator Loss: The discriminator is trained to minimize the squared error between its output and the target labels (e.g., 1 for real images, 0 for fake images). Specifically, it minimizes $E_{x \sim p_{data}(x)}[(D(x) - b)^2] + E_{z \sim p_z(z)}[(D(G(z)) - a)^2]$.
- Generator Loss: The generator is trained to minimize the squared error between the discriminator's output for fake images and a target value that encourages the discriminator to classify them as real. The proposed loss is $E_{z \sim p_z(z)}[(D(G(z)) - c)^2]$.
The authors show theoretically that minimizing the LSGAN objective function leads to minimizing the Pearson $\chi^2$ divergence between the real and generated data distributions. They also demonstrate that this approach provides stronger gradients, especially for samples that are far from the decision boundary, thus alleviating the vanishing gradient problem and improving training stability. The paper also explores different parameter settings for $a, b, c$ in the loss functions, finding that specific choices lead to minimizing the Pearson $\chi^2$ divergence.
Datasets
The paper uses several datasets for training and evaluation:
- LSUN-bedroom: Used for scene generation and evaluating image quality and training stability.
- Cat dataset: Used for evaluating image quality.
- Gaussian mixture distribution: A synthetic dataset used to evaluate training stability and mode collapse.
- Difficult architectures: Standard benchmarks for evaluating GAN stability, often involving modifications like removing batch normalization.
- Synthetic digit datasets: Two newly created synthetic datasets with small variability (rendered digits with slight variations in shift, rotation) to specifically test GAN stability.
- MNIST: Used as a baseline for comparison on digit generation.
- ImageNet: Used for quantitative evaluation (FID).
- CIFAR-10: Used for quantitative evaluation (FID).
- SVHN: Used for comparing different parameter schemes of LSGANs.
Key Insights and Ideas
- Least Squares Loss for Stability: The core insight is that a least squares loss function, by penalizing samples based on their distance to the decision boundary (even if they are on the "correct" side), provides more informative gradients than the saturating sigmoid cross-entropy loss. This directly combats the vanishing gradient problem.
- Pearson $\chi^2$ Divergence: LSGANs are shown to minimize the Pearson $\chi^2$ divergence, which is argued to be less prone to mode collapse than the Jensen-Shannon divergence minimized by standard GANs.
- Improved Image Quality: The more stable training and better gradients lead to the generation of sharper and more exquisite images, as demonstrated qualitatively on scene and cat datasets.
- Novel Stability Evaluation: The paper introduces a new method for evaluating GAN stability by using datasets with small variability, arguing that this is a more practical challenge than just using difficult architectures.
- Gradient Penalty Synergy: LSGANs can effectively leverage gradient penalty (LSGANs-GP) for even greater stability, successfully training on complex architectures like 101-layer ResNets, matching the performance of state-of-the-art WGANs-GP.
Key Results
- Image Quality: LSGANs generate higher quality images than standard NS-GANs, with more exquisite textures and sharper details, as observed qualitatively on LSUN-bedroom and cat datasets.
- Quantitative Evaluation (FID): LSGANs (specifically the LSGANs(−110) variant) consistently outperform NS-GANs across four datasets (LSUN, Cat, ImageNet, CIFAR-10) in terms of Fréchet Inception Distance (FID). They also outperform WGANS-GP on three of these datasets.
- Training Stability:
- Without gradient penalty, LSGANs are significantly more stable than NS-GANs, especially on Gaussian mixture distributions (5/100 vs. 99/100 instances of mode collapse) and on synthetic datasets with small variability, where NS-GANs often fail.
- With gradient penalty (LSGANs-GP), they successfully train on all six difficult architectures tested, including a 101-layer ResNet, matching the performance of WGANS-GP.
- Speed: LSGANs can achieve comparable FID scores to WGANS-GP significantly faster (e.g., 1,100 minutes vs. 4,600 minutes on LSUN).
- Human Subjective Study: On LSUN-bedroom, LSGANs received 56.4% of votes compared to 43.6% for NS-GANs, indicating a preference for LSGAN-generated images.
Limitations and Future Work
- Mode Collapse: While LSGANs are less prone to mode collapse than standard GANs, the paper acknowledges that the problem of mode collapse still exists to some degree, especially in certain configurations.
- Parameter Tuning: The paper suggests that while LSGANs(−110) often perform better, the quality of generated images can fluctuate during training, necessitating careful selection of checkpoints.
- Future Work: The authors suggest exploring methods to directly pull generated samples toward real data, rather than just toward the decision boundary, as a potential avenue for further improvement. They also propose further investigation into the optimal parameter settings for LSGANs.
Summary updated