Abstract
Generative Adversarial Networks (GANs) have shown remarkable success in image generation but often suffer from training instability and the vanishing gradient problem. This paper introduces Least Squares Generative Adversarial Networks (LSGANs), which replace the traditional sigmoid cross-entropy loss in the discriminator with a least squares objective function. This modification ensures that the generator receives a continuous gradient signal even for samples that are correctly classified but far from the real data manifold. Our results demonstrate that LSGANs achieve higher image quality and more stable training than standard GANs, effectively mitigating mode collapse on both toy and large-scale datasets.
The Vanishing Gradient Problem
In the original GAN framework, the discriminator acts as a binary classifier using a sigmoid cross-entropy loss function. The authors identify a critical flaw in this approach: when updating the generator, this loss function leads to "vanishing gradients" for fake samples that are on the "correct" side of the decision boundary but still far from the real data manifold.
Essentially, if the discriminator is already very confident that a fake sample is "real enough" (even if it looks nothing like actual data), the gradient becomes nearly zero. The generator receives no signal to improve those specific samples, leading to poor image quality and the notorious "mode collapse" problem, where the generator gets stuck producing a limited variety of outputs.
Methods: The Least Squares Objective
The core innovation is the Least Squares loss function. Instead of asking the discriminator to classify samples as 0 or 1, LSGAN asks it to solve a regression problem.
- The Objective: The authors propose using $a-b$ coding for the discriminator (where $a$ is the label for fake data and $b$ is the label for real data). The generator then tries to get the discriminator to output a value $c$ for fake samples.
- Mathematical Grounding: The paper proves that minimizing the LSGAN objective is equivalent to minimizing the Pearson $\chi^2$ divergence between the real data distribution and the generated distribution. This is a significant shift from the Jensen-Shannon divergence used in original GANs.
- The "Pulling" Effect: Unlike sigmoid loss, which is satisfied once a sample crosses the decision boundary, the least squares loss continues to penalize samples based on their distance from the boundary. This "pulls" generated samples toward the real data manifold, even if they are already "correctly" classified as real by the discriminator.
Architecture
The authors utilize a VGG-style network for their experiments. For the generator, they use a series of deconvolutional layers with Batch Normalization (BN) and ReLU activations. The discriminator uses convolutional layers with LeakyReLU. One of the most impressive findings is that LSGANs are robust enough to converge even when Batch Normalization is removed—a scenario where regular GANs almost always fail.
Experimental Results
The authors evaluated LSGANs across several diverse benchmarks, including LSUN (bedroom, church, etc.), CIFAR-10, and the HWDB1.0 handwritten Chinese character dataset.
- Visual Quality: On the LSUN-bedroom dataset, LSGANs produced sharper images with more exquisite texture details (like the folds in bedsheets) compared to DCGANs.
- Quantitative Superiority: On CIFAR-10, LSGANs achieved an Inception Score of 6.47, outperforming the standard DCGAN score of 6.22.
- Human Preference: In a study with 4,000 votes on Amazon Mechanical Turk, users preferred LSGAN-generated images 56.4% of the time over DCGAN images.
- Overcoming Mode Collapse: Using a 2D mixture of Gaussians, the authors demonstrated that while regular GANs collapsed to a single point by step 15k, LSGANs successfully learned the entire distribution of all 8 Gaussian points.
Conclusion
LSGANs provide a simple yet powerful modification to the GAN framework that effectively eliminates the vanishing gradient problem. While they are not a "silver bullet"—as they can still occasionally suffer from mode collapse in very late training stages—they offer significantly higher stability and image quality. Future work will explore scaling LSGANs to even more complex datasets like ImageNet.
Summary updated