NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Alleviating Mode Collapse in GAN via Diversity Penalty Module

Sen Pei, Richard Yi Da Xu, Shiming Xiang, Gaofeng MengarXiv 2021

Abstract

Generative Adversarial Networks (GANs) are frequently hindered by mode collapse, a state where the generator produces a limited variety of outputs regardless of input diversity. We present dp-GAN, a novel framework that introduces a pluggable Diversity Penalty (DP) module to enforce similarity consistency. By ensuring that the similarity between input latent vectors is proportionally reflected in the high-level feature representations of generated images, dp-GAN captures a wider array of data modes. Our evaluation across synthetic and real-world benchmarks, including MNIST, CIFAR-10, and CelebA, demonstrates that dp-GAN significantly improves image quality, reduces Fréchet Inception Distance (FID), and enhances the efficacy of GAN-based data augmentation.

Introduction

Generative Adversarial Networks have revolutionized image synthesis, yet they remain notoriously difficult to train due to mode collapse. This phenomenon occurs when the generator identifies a narrow subset of data that successfully deceives the discriminator, leading it to ignore the diversity inherent in the input latent space. Previous attempts to mitigate this—such as unrolling GANs or employing multiple generators—often introduce prohibitive computational overhead or complex architectural changes.

The core of the problem lies in the lack of a forced relationship between input diversity and output diversity. To address this, we propose a simple, pluggable loss term called the Diversity Penalty (DP). This module encourages the generator to maintain "similarity consistency," ensuring that distinct latent vectors produce semantically distinct images.

Methodology: The Diversity Penalty Module

The Diversity Penalty (DP) module is designed to be integrated into existing GAN architectures (e.g., WGAN-GP, DCGAN) with minimal modification. The primary objective is to align the similarity of two latent noise vectors ($z_1, z_2$) with the similarity of their corresponding generated image features ($f_1, f_2$).

Overview of the Diversity Penalty Module (DPM) architecture, illustrating the similarity consistency constraint between latent space and discriminator feature maps.

Feature Extraction and Similarity Measurement

Rather than comparing raw pixels—which are computationally expensive and semantically shallow—dp-GAN utilizes the discriminator as a feature extractor. By extracting flattened feature maps from the discriminator's internal layers, the model captures high-level semantic information. Similarity is measured using a normalized Gram Matrix (cosine similarity) for both the latent space ($G_z$) and the feature space ($G_f$). To ensure stable gradients during training, these values are mapped into a [0, 1] range using a scaled sigmoid function.

Key Insights: Similarity Consistency

The fundamental insight of this work is that pixel-wise distances, such as Mean Squared Error (MSE), are often poor proxies for semantic diversity. For instance, a minor spatial shift in an image can result in a high MSE despite the content remaining identical. By operating in the feature space of the discriminator, dp-GAN avoids this trap.

The DP loss term encourages the ratio of image feature similarity to latent similarity to remain near unity. This forces the generator to utilize the full breadth of the latent space, preventing it from collapsing multiple input vectors into a single output mode.

Experimental Results

We evaluated dp-GAN against several baselines across multiple datasets:

  • Mode Capture: On a 2D Grid synthetic dataset, vanilla GANs captured an average of 17.7 modes. With the DP module, the model captured 21.3 modes, outperforming specialized techniques like Unrolled GANs.
  • Image Quality: On the CelebA face dataset, dp-GAN achieved a Fréchet Inception Distance (FID) of 24.86, a significant improvement over the WGAN-GP baseline of 33.49. Visual results also showed smoother latent space interpolation.
  • Data Augmentation: Using dp-GAN to generate synthetic training data led to measurable gains in classification accuracy. On Fashion-MNIST, accuracy improved by 1.34%, and on CIFAR-10, it rose by 0.52% over standard WGAN-GP augmentation.

Conclusion

The Diversity Penalty module offers a computationally efficient and easily implementable solution to the persistent problem of mode collapse in GANs. By leveraging the discriminator's internal features to enforce similarity consistency, dp-GAN produces higher quality, more diverse samples that are better suited for downstream tasks like data augmentation. Future work will explore the sensitivity of the scaling hyperparameters and the module's performance in complex, multi-object scenes.

Summary updated

BibTeX
@misc{pei2021alleviating,
  author = {Sen Pei and Richard Yi Da Xu and Shiming Xiang and Gaofeng Meng},
  title = {{Alleviating Mode Collapse in GAN via Diversity Penalty Module}},
  year = {2021},
  eprint = {2108.02353},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2108.02353},
}
Figure