Evaluation Metrics for Conditional Image Generation

Yaniv Benny, Tomer Galanti, Sagie Benaim, Lior Wolf

Abstract

We present two new metrics for evaluating generative models in the class-conditional image generation setting. These metrics are obtained by generalizing the two most popular unconditional metrics: the Inception Score (IS) and the Fréchet Inception Distance (FID). A theoretical analysis shows the motivation behind each proposed metric and links the novel metrics to their unconditional counterparts. The link takes the form of a product in the case of IS or an upper bound in the FID case. We provide an extensive empirical evaluation, comparing the metrics to their unconditional variants and to other metrics, and utilize them to analyze existing generative models, thus providing additional insights about their performance, from unlearned classes to mode collapse.

Introduction

Generative Adversarial Networks (GANs) have reached a point where they can produce remarkably realistic images. However, in the context of conditional image generation—where a model is tasked with generating an image belonging to a specific category (e.g., "generate a dog")—standard evaluation metrics fall short.

Traditional gold-standard metrics like the Inception Score (IS) and Fréchet Inception Distance (FID) are inherently unconditional. They assess whether generated images look realistic and whether the overall set is diverse, but they fail to account for whether the model actually follows the provided class labels. A model could generate a high-quality cat when asked for a dog, and standard FID would not penalize it. This paper introduces two new metrics, Conditional Inception Score (CIS) and Conditional Fréchet Inception Distance (CFID), to bridge this gap by unifying quality, diversity, and conditional alignment into a single framework.

Methodology: Decomposing Generative Performance

The core contribution of this work is the decomposition of standard metrics into components that specifically measure class consistency and intra-class diversity.

Visual decomposition of generative distributions into unconditional (b), within-class (c), and between-class (d) components.

Conditional Inception Score (CIS)

The authors prove that the standard Inception Score can be mathematically decomposed into a product: $IS = BCIS \times WCIS$.

  • Between-class IS (BCIS): Measures how distinct and identifiable the generated classes are.
  • Within-class IS (WCIS): Measures the diversity of images produced within each individual category.

Conditional Fréchet Inception Distance (CFID)

Similarly, the FID is shown to be upper-bounded by the sum of two conditional parts: $FID \leq BCFID + WCFID$.

  • Between-class FID (BCFID): Measures the distance between the average features of real versus generated classes, capturing how well the model aligns with labels.
  • Within-class FID (WCFID): Measures the average FID calculated within each individual class, focusing on intra-class realism and variety.

Key Insights and Empirical Analysis

Through synthetic "stress tests" on datasets like MNIST and CIFAR10, the researchers identified several critical weaknesses in traditional metrics that the new conditional variants resolve.

The "Optimism" of FID

A major finding is that standard FID can be overly "optimistic." A model can achieve a low (good) FID score even if it fails at conditional generation.

Comparison of two distributions demonstrating how global metrics can overlook internal structural shifts in class-conditional data.

As illustrated in Figure 4, if a model shifts the variance of its classes but maintains the same global mean, the standard FID remains unchanged. In contrast, CFID successfully detects these discrepancies. Furthermore, WCFID proved significantly more sensitive to mode collapse—where a model repeatedly outputs the same image for a class—than standard FID.

Real-World Application: BigGAN on ImageNet

Applying these metrics to the state-of-the-art BigGAN model on ImageNet revealed performance inconsistencies that global scores obscured. While classes like "daisy" showed high quality and diversity, others like "iron" or "digital clock" suffered from significant mode collapse. Additionally, a user study confirmed that these conditional metrics align much more closely with human judgments of class-specific quality than traditional measures.

Conclusion and Future Work

While CIS and CFID provide a more nuanced view of conditional generation, challenges remain. Calculating these metrics on datasets with many classes but few samples (like ImageNet) can lead to unstable covariance estimates. Furthermore, extending this framework from discrete classes to continuous conditions or text-to-image generation is a promising direction for future research. By decomposing performance into class-specific components, these metrics offer researchers a more precise diagnostic tool for developing the next generation of conditional models.

Summary updated

BibTeX
@article{benny2021evaluation,
  author = {Yaniv Benny and Tomer Galanti and Sagie Benaim and Lior Wolf},
  title = {{Evaluation Metrics for Conditional Image Generation}},
  journal = {Int. J. Comput. Vis.},
  year = {2021},
  url = {https://openreview.net/forum?id=sXrxhpQr_l},
}
Figure