Investigating Under and Overfitting in Wasserstein Generative Adversarial Networks

Ben Adlam, Charles Weill, Amol KapoorarXiv 2019

TL;DR

This paper investigates how the complexity of the discriminator affects the training and generalization of Wasserstein Generative Adversarial Networks (WGANs). They found that a more capable discriminator generally leads to better generator performance, and surprisingly, large generator capacities didn't lead to overfitting on standard image datasets.

What Problem Does This Paper Address?

Generative Adversarial Networks (GANs) are powerful tools for generating realistic data, but they are notoriously difficult to train. Common issues include training failures, a lack of reliable metrics for evaluating model quality, and the need for extensive hyperparameter tuning. A key challenge is understanding and diagnosing "underfitting" and "overfitting" in GANs, especially for the generator. While overfitting in discriminators is somewhat understood, how it impacts the generator and how to measure the generator's generalization remains an open question. This paper aims to shed light on these issues by systematically studying the effect of discriminator capacity on GAN performance and generalization.

Methods

The authors introduce two novel mechanisms to better assess GAN generalization: an auxiliary discriminator and an independent discriminator.

  • Auxiliary Discriminator: This discriminator is trained with the same data and objective as the main discriminator but does not provide gradients back to the generator. This allows researchers to gauge the generator's performance using a discriminator that is learning similarly but isn't directly influenced by the generator's updates.
  • Independent Discriminator: This discriminator is trained separately and used to compute the divergence between the generated data distribution and the true data distribution. Crucially, it can be trained on both the training data (D_train) and a separate, held-out test set (D_test) to directly measure the generator's generalization gap.

By comparing the divergences computed by these different discriminators, the authors can infer underfitting and overfitting in both the generator and discriminator. They also use the standard Fréchet Inception Distance (FID) as a complementary evaluation metric.

Datasets

The experiments were conducted on the following image datasets:

  • CIFAR10: 32x32x3 resolution.
  • CIFAR100: 32x32x3 resolution.
  • CelebA: 64x64x3 resolution.

The training data for CIFAR10 and CIFAR100 was split into two halves (D_train and D_train'), each containing 25K samples. For CelebA, D_train and D_train' each contained 45K samples. A separate test set (D_test) of 10K samples was used for evaluation.

Key Insights and Ideas

  • Discriminator Capacity Matters: The model capacity of the discriminator (measured by the number of channels in its convolutional layers) has a significant impact on the generator's ability to produce high-quality samples.
  • Underfitting is Key to Poor Generator Performance: The paper strongly suggests that when the generator performs poorly, it often coincides with the discriminator underfitting. This means the discriminator isn't complex enough to fully capture the nuances of the data distribution, hindering the generator's learning process.
  • Generator Overfitting is Elusive (in this setup): Counter-intuitively, even when the generator's model capacity was high relative to the discriminator, the authors did not observe evidence of overfitting on the tested datasets. This suggests that the typical concerns about generators memorizing training data might be less of an issue in WGANs with sufficient discriminator capacity, or that their chosen metrics are not sensitive to it.
  • Auxiliary/Independent Discriminators as Reliable Metrics: The divergences computed by the auxiliary and independent discriminators showed a stronger correlation with generator quality (and FID) than the original discriminator's divergence, especially when the original discriminator was underfitting. This highlights their utility as more robust evaluation tools.

Key Results

  • Discriminator Generalization: Discriminators generally showed little to no overfitting. The original discriminator's generalization gap was often large and fluctuated, while auxiliary and independent discriminators exhibited smaller and more consistent gaps.
  • Generator Quality Improvement: As the number of discriminator channels increased, the generator's performance generally improved, as indicated by decreasing divergences from the auxiliary and independent discriminators.
  • No Generator Overfitting Observed: Across CIFAR10, CIFAR100, and CelebA, generators with large capacities did not show signs of overfitting when evaluated by the independent discriminator or FID.
  • FID Correlation: FID scores correlated well with the divergences computed by the independent discriminators, suggesting these divergences could serve as a proxy for FID in scenarios where a canonical embedding (like Inception) isn't available.

Limitations and Future Work

  • Dataset Specificity: The findings regarding generator overfitting are specific to the datasets (CIFAR10, CIFAR100, CelebA) and WGAN architecture used. It's unclear if these results generalize to other datasets or GAN variants.
  • Underfitting Definition: While the paper defines underfitting for discriminators, a precise definition for generator underfitting remains somewhat elusive, though they link it to poor performance when the discriminator is also underfitting.
  • Future Work: The authors plan to extend their analysis to investigate the impact of dataset size and batch size on GANs. They also aim to explore other types of GANs beyond Wasserstein GANs. They also propose exploring the utility of their proposed divergences as evaluation metrics for data modalities lacking standard embeddings.

Summary updated

Abstract

We investigate under and overfitting in Generative Adversarial Networks (GANs), using discriminators unseen by the generator to measure generalization. We find that the model capacity of the discriminator has a significant effect on the generator's model quality, and that the generator's poor performance coincides with the discriminator underfitting. Contrary to our expectations, we find that generators with large model capacities relative to the discriminator do not show evidence of overfitting on CIFAR10, CIFAR100, and CelebA.
BibTeX
@misc{adlam2019investigating,
  author = {Ben Adlam and Charles Weill and Amol Kapoor},
  title = {{Investigating Under and Overfitting in Wasserstein Generative Adversarial Networks}},
  year = {2019},
  eprint = {1910.14137},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1910.14137},
}
Figure