Title: Out-of-Sample Testing for GANs
Abstract
Generative Adversarial Networks (GANs) are traditionally evaluated using heuristic metrics like Inception Score (IS) or Fréchet Inception Distance (FID), which often fail to capture a model's true generalization capabilities or its internal probability distribution. We introduce EvalGAN, a framework designed to evaluate GANs using a held-out test set. EvalGAN measures two critical properties: the accuracy of out-of-sample image reconstruction and the marginal likelihood of those reconstructions. By enforcing constraints that keep latent vectors within the "typical set," EvalGAN provides a more realistic assessment of a GAN's practical utility and reveals significant biases toward simple data patterns.
Introduction
Evaluating GANs remains a significant challenge in machine learning. Unlike supervised models, GANs are rarely judged on their performance on unseen data. Current standard metrics suffer from three primary flaws: a dependency on auxiliary "black-box" networks (like Inception) pre-trained on specific datasets, a lack of out-of-sample validation, and a failure to distinguish between a model's theoretical representation capacity and its actual sampling probability. EvalGAN addresses these issues by directly testing how well a GAN represents and generates data from a test set.
Methodology
EvalGAN decomposes the evaluation process into two steps: reconstruction quality and marginal likelihood estimation.
To assess reconstruction, the framework identifies the latent vector $z$ that minimizes the distance between a test image $x_{test}$ and the generated image $G(z)$. A key innovation in EvalGAN is the use of constrained optimization. In high-dimensional latent spaces, the Gaussian prior concentrates on a "thin shell" known as the typical set. Unconstrained optimization often finds "ghost" solutions—points far outside this shell that the GAN would never naturally sample. EvalGAN forces $z$ to remain within the typical set to ensure the reconstruction reflects the model's actual generative behavior.
Following reconstruction, EvalGAN estimates the marginal likelihood of the optimal reconstruction $x^*_c$. This is achieved by sampling the latent space around $z^*_c$ and calculating the proportion of nearby points that produce images within a defined error threshold. This metric quantifies whether a GAN is over-representing simple features or under-representing complex ones.
Results and Analysis
The authors validated EvalGAN on CIFAR-10 and CelebA datasets using WGAN, WGAN-GP, and SN-DCGAN architectures.
A significant finding is that GANs demonstrate genuine generalization; reconstruction quality for test images was comparable to training images, indicating the models learn a manifold that extends beyond memorization. However, the analysis also revealed a profound "simplicity bias." GANs are significantly more likely to generate images with uniform backgrounds and simple textures. For instance, in CelebA, plain faces were highly probable, while individuals with accessories like glasses or hats were extremely unlikely. The probability gap between the most and least likely images reached up to $10^{150}$, providing quantitative evidence of mode dropping.
As shown in the figure above, reconstruction quality (PSNR) improves as the dimensionality of the latent space increases. Crucially, the gap between constrained and unconstrained optimization becomes more pronounced in higher dimensions, highlighting the necessity of the "typical set" constraint to avoid overestimating a model's performance. In comparative tests, SN-DCGAN consistently outperformed WGAN and WGAN-GP in both reconstruction quality and marginal likelihood.
Conclusion
EvalGAN provides a rigorous, dataset-agnostic framework for GAN evaluation. While computationally more intensive than heuristic metrics due to the need for backpropagation through the generator, it offers deep insights into model capacity and probability distribution. Future work may explore more perceptually accurate distance metrics and the application of EvalGAN to other generative architectures like Variational Autoencoders (VAEs).
Summary updated