TL;DR
This paper provides a comprehensive empirical study of common evaluation metrics for Generative Adversarial Networks (GANs). The authors find that Kernel MMD and the 1-Nearest Neighbor (1-NN) test, when applied in a suitable feature space (like convolutional features from a pre-trained ResNet), are the most promising metrics for assessing GAN performance, offering good discriminability, robustness, and efficiency.
What Problem Does This Paper Address?
Evaluating the performance of Generative Adversarial Networks (GANs) is notoriously difficult. While GANs have shown impressive capabilities in generating realistic images, there's a lack of standardized and reliable quantitative metrics to assess their progress. Current evaluation methods are often qualitative (relying on human judgment, which can be subjective and biased towards visual appeal) or use metrics that can be easily fooled or don't accurately reflect the underlying distribution matching. This paper aims to systematically evaluate existing sample-based metrics, understand their strengths and weaknesses, and provide guidance on how to choose and interpret them for effective GAN development.
Methods
The authors conduct a series of carefully designed experiments to evaluate six popular sample-based GAN evaluation metrics: Inception Score (IS), Mode Score (MS), Kernel Maximum Mean Discrepancy (MMD), Wasserstein Distance, Fréchet Inception Distance (FID), and 1-Nearest Neighbor (1-NN) two-sample test.
Key methodological aspects include:
- Feature Space Analysis: A central theme is the importance of the feature space used for distance calculations. They compare metrics in pixel space versus convolutional feature spaces extracted from pre-trained networks like ResNet and VGG, finding that convolutional spaces are crucial for meaningful results.
- Simulated Experiments: They create controlled experiments to test specific properties of metrics:
- Discriminability: Mixing real and generated images to see if metrics can distinguish them.
- Mode Collapsing/Dropping: Simulating these common GAN failure modes to assess metric sensitivity.
- Robustness to Transformations: Testing invariance to small image shifts and rotations.
- Sample Efficiency: Determining how many samples are needed for a metric to reliably distinguish real from generated data.
- Computational Efficiency: Measuring the time taken to compute scores.
- Overfitting Detection: Simulating overfitting to training data and checking if metrics can detect it using a validation set.
- Comparison of GAN Models: Finally, they use the most promising metrics (MMD and 1-NN accuracy) to compare several popular GAN architectures.
Datasets
The experiments were primarily conducted on two commonly used datasets for generative models:
- CelebA: A large-scale high-resolution face dataset.
- LSUN bedrooms: A subset of the LSUN dataset focusing on bedroom scenes.
For feature extraction, they utilized models pre-trained on ImageNet. In one specific experiment (Section 3.4), they also used the CIFAR-10 dataset to train a classifier for feature extraction, demonstrating the impact of dataset-specific feature spaces.
Key Insights and Ideas
- Feature Space is King: The choice of feature space is paramount. Metrics operating in pixel space are highly sensitive to minor image variations and fail to capture semantic similarity, while convolutional feature spaces (from pre-trained networks like ResNet) provide much more meaningful and robust evaluations.
- MMD and 1-NN are Strong Contenders: Kernel MMD and the 1-NN two-sample test, when used with appropriate convolutional features, emerge as the most promising metrics. They demonstrate good discriminability, robustness to transformations, and reasonable sample efficiency.
- Inception Score's Limitations: The Inception Score, despite its popularity, is shown to be ill-posed. It primarily evaluates image quality and diversity without directly comparing to the real data distribution and can be easily fooled by adversarial noise or out-of-distribution samples. It also fails to detect overfitting.
- Mode Collapse is Prevalent: The 1-NN accuracy analysis reveals that typical GAN models often exhibit mode collapse, where generated samples are clustered, leading to a high 1-NN accuracy for fake samples and a lower one for real samples. This is a subtle issue that human evaluation or simpler metrics might miss.
- Overfitting is Less Common Than Believed: Contrary to popular belief, the study suggests that GANs do not easily overfit to training data unless the training set is extremely small. This implies a better generalization capability than often assumed.
Key Results
- Discriminability: MMD, FID, and 1-NN accuracy in convolutional space effectively distinguish real from generated images even with few samples. RIS and RMS (relative Inception/Mode Scores) and 1-NN accuracy in pixel space showed poor discriminability.
- Robustness: Metrics in convolutional space were robust to small image transformations (shifts, rotations), while pixel-space metrics were not.
- Sample Efficiency: MMD and 1-NN accuracy require significantly fewer samples than Wasserstein distance to achieve reliable discrimination. RIS was found to be completely unreliable on LSUN.
- Computational Efficiency: Most metrics are computationally efficient for typical sample sizes (2000), with Wasserstein distance being the slowest for large sample sizes.
- Overfitting: Metrics like MMD and 1-NN accuracy could detect simulated overfitting, while RIS and RMS failed.
- GAN Model Comparison (Table 1): WGAN-GP generally performed best among the evaluated models (DCGAN, WGAN, WGAN-GP, LSGAN) on the LSUN dataset, though DCGAN showed slightly better mode capture (higher 1-NN accuracy on fake samples). All models were found to be far from learning the true distribution.
Limitations and Future Work
- Feature Space Dependence: While convolutional features are recommended, the specific choice of network (e.g., ResNet vs. VGG) and its training data can still influence results, though the trends are generally consistent.
- Bias in MMD: The paper acknowledges that MMD is biased, but argues its practical advantages outweigh this limitation, especially when used in a well-chosen feature space.
- Future Work: The authors suggest that future research could further explore the generalization capabilities of GANs, especially in comparison to supervised learning models, and investigate the phenomenon of overfitting in more detail. They also plan to release their code to provide the community with tools for evaluating GANs.
Summary updated