Semi-supervised Conditional GANs

Kumar Sricharan, Raja Bala, Matthew Shreve, Hui Ding, Kumar Saketh, Jin SunarXiv 2017

Abstract

We introduce a new model for building conditional generative models in a semi-supervised setting to conditionally generate data given attributes by adapting the GAN framework. The proposed semi-supervised GAN (SS-GAN) model uses a pair of stacked discriminators to learn the marginal distribution of the data, and the conditional distribution of the attributes given the data respectively. In the semi-supervised setting, the marginal distribution (which is often harder to learn) is learned from the labeled + unlabeled data, and the conditional distribution is learned purely from the labeled data. Our experimental results demonstrate that this model performs significantly better compared to existing semi-supervised conditional GAN models.

Introduction

Generative Adversarial Networks (GANs) have established themselves as a powerful tool for synthetic data generation. However, Conditional GANs (C-GANs)—which allow for the generation of data based on specific attributes—typically require vast amounts of labeled training data. In real-world scenarios, obtaining such labels is often prohibitively expensive or time-consuming. This paper introduces the Semi-supervised Conditional GAN (SS-GAN), a framework designed to achieve high-quality conditional generation by leveraging a small pool of labeled data alongside a much larger set of unlabeled data.

Methods: The Stacked Discriminator Architecture

The primary challenge in semi-supervised conditional generation is effectively utilizing unlabeled data to improve the model's understanding of the data's structure without losing the ability to map specific attributes to generated samples. Existing approaches, such as Supervised-only C-GANs (SC-GAN) or Auxiliary Classifier GANs (AC-GAN), often suffer from overfitting or mode collapse when labels are scarce.

Comparison of GAN architectures: (a) Unsupervised, (b) Conditional, (c) Auxiliary Classifier, and (d) the proposed Semi-supervised Stacked GAN.

The SS-GAN addresses these issues through a Stacked Discriminator Architecture. Instead of a single discriminator, the task is bifurcated:

  1. Unsupervised Discriminator ($D_u$): This component is trained on the entire dataset (labeled and unlabeled). Its objective is to distinguish between real and fake images, thereby learning the marginal distribution $p(x)$—the general characteristics of a realistic image.
  2. Supervised Discriminator ($D_s$): This component is trained only on the labeled subset. It receives intermediate features $h(x)$ from $D_u$ along with the attribute $y$ to determine if the pair $(x, y)$ is a valid match.
The proposed Semi-supervised Stacked GAN (SS-GAN) architecture, utilizing a dual-discriminator approach to leverage both labeled and unlabeled data.

By feeding $D_s$ the features learned by $D_u$, the model is forced to utilize generalized visual features learned from the entire dataset. This prevents the supervised component from memorizing the limited labeled examples, acting as a powerful regularizer.

Experimental Evaluation

The SS-GAN was evaluated against three benchmark datasets:

  • MNIST: Tested with as few as 10, 20, and 40 labels out of 60,000 images.
  • CelebA: Focused on 18 facial attributes using only 1,000 labeled images from a pool of over 200,000.
  • CIFAR-10: Evaluated with 4,000 labeled examples.

Key Insights and Results

The research highlights that learning the marginal distribution of images is significantly more difficult than learning the conditional distribution of attributes. By assigning the "hard" part of the task to the unsupervised discriminator, SS-GAN becomes highly efficient.

Quantitatively, SS-GAN consistently outperformed semi-supervised AC-GAN (SA-GAN) variants. For instance, on MNIST with only 20 labels, SS-GAN achieved a classification error of approximately 10%, compared to 24% for SA-GAN. Qualitatively, the model produced sharper, more accurate images on CelebA and demonstrated superior stability on CIFAR-10, avoiding the mode collapse common in other architectures.

Conclusion and Future Work

The SS-GAN framework demonstrates that a stacked discriminator approach can bridge the performance gap between semi-supervised and fully supervised conditional generation. While the model excels at generation, future work is needed to improve the utility of synthetic data for training external classifiers on complex datasets. Additionally, exploring the scalability of this architecture to datasets with hundreds of attributes remains an open area for research.

Summary updated

BibTeX
@misc{sricharan2017semi,
  author = {Kumar Sricharan and Raja Bala and Matthew Shreve and Hui Ding and Kumar Saketh and Jin Sun},
  title = {{Semi-supervised Conditional GANs}},
  year = {2017},
  eprint = {1708.05789},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1708.05789},
}
Figure