Black-Box Diagnosis and Calibration on GAN Intra-Mode Collapse: A Pilot Study

Zhenyu Wu, Zhaowen Wang, Ye Yuan, Jianming Zhang, Zhangyang Wang, Hailin Jin

Introduction

Generative Adversarial Networks (GANs) have achieved remarkable success in synthesizing high-fidelity images. However, they often suffer from "mode collapse." While "inter-mode collapse"—where entire categories are missing—is well-documented, "intra-mode collapse" is a more subtle failure. In this scenario, a GAN generates all expected classes but lacks diversity within those classes, leading to repetitive outputs. This paper introduces a black-box framework to diagnose and calibrate intra-mode collapse without requiring access to training data or internal model weights.

The Challenge of Intra-Mode Collapse

Intra-mode collapse occurs when a generator produces a limited variety of samples for a specific identity or object. For instance, a face generator might produce many images of the same person instead of a diverse set of individuals. Traditional diagnostic tools often require "white-box" access, which is impractical for API-based models or proprietary systems. This study proposes the Monte Carlo-based Collapse Score (MCCS) to detect these issues using only generated samples.

Methodology: Diagnosis and Calibration

The proposed pipeline consists of two main stages:

1. Diagnosis via MCCS

The Monte Carlo-based Collapse Score (MCCS) utilizes a pre-trained identity descriptor (such as a face recognition model) to map generated images into a feature space. By analyzing the local density around sampled images, the framework identifies "crowded" regions where diversity is lacking. A high MCCS indicates that a specific mode is over-represented and collapsed.

2. Calibration through Latent Space Reshaping

Once a collapsed mode is identified, the authors propose "reshaping" the latent space ($Z$) to reduce the frequency of the over-represented samples without retraining the GAN. This is achieved through:

  • Gaussian Mixture Models (GMM): Modeling the latent space as clusters and adjusting weights to downplay over-represented ones.
  • Importance Sampling: Using rejection sampling to "thin out" samples coming from the convex hull of the collapsed mode.

Experimental Results

The framework was tested on state-of-the-art models including StyleGAN2 and BigGAN across datasets like CelebAHQ and LSUN-Car. A key finding is that even models trained on perfectly balanced datasets exhibit intra-mode collapse, suggesting it is an inherent artifact of GAN optimization rather than just a reflection of training data imbalance.

Visualizing Collapse

The repetitive nature of collapsed modes is evident when examining samples from the same region of the latent space. In a collapsed state, these "neighbors" are often virtually identical, failing to show natural variations in pose or expression.

Sample 1 from a detected collapsed mode in StyleGAN.

Calibration significantly improves diversity. For StyleGAN on CelebAHQ, the MCCS of the worst-case mode was reduced from 0.66 to 0.61. Crucially, the Fréchet Inception Distance (FID)—a measure of image quality—only moved from 5.93 to 5.95, meaning diversity improved without sacrificing realism.

Conclusion

This pilot study demonstrates that intra-mode collapse is a pervasive issue in modern GANs that can be addressed through black-box diagnosis and latent space calibration. By wrapping generators with a lightweight reshaper, researchers can enhance output diversity with almost zero impact on image quality and no need for expensive retraining.

Summary updated

BibTeX
@article{wu2021black,
  author = {Zhenyu Wu and Zhaowen Wang and Ye Yuan and Jianming Zhang and Zhangyang Wang and Hailin Jin},
  title = {{Black-Box Diagnosis and Calibration on GAN Intra-Mode Collapse: A Pilot Study}},
  journal = {ACM Trans. Multim. Comput. Commun. Appl.},
  year = {2021},
  doi = {10.1145/3472768},
}
Figure