Triple Generative Adversarial Nets

Chongxuan Li, Taufik Xu, Jun Zhu, Bo Zhang

This NIPS 2017 paper by Li et al. introduces Triple-GAN, a framework designed to overcome the fundamental limitations of using Generative Adversarial Networks (GANs) for semi-supervised learning (SSL). By adding a third player to the traditional GAN game, the authors achieve a "best of both worlds" scenario: state-of-the-art classification and high-quality, class-conditional image generation.

TL;DR

Triple-GAN resolves the "identity crisis" in semi-supervised GANs by splitting the discriminator's role into two separate networks: a classifier and a judge. This three-player game allows the model to achieve state-of-the-art classification accuracy while simultaneously generating realistic images with precise semantic control.

What Problem Does This Paper Address?

In standard semi-supervised GANs (like Improved-GAN), the discriminator is forced to play two incompatible roles:

  1. The Judge: Distinguishing real data from fake generated data.
  2. The Classifier: Assigning correct labels to real data.

The authors argue this creates a conflict. If the generator becomes perfect, the "Judge" can no longer distinguish real from fake, which inadvertently degrades its performance as a "Classifier." Furthermore, because the discriminator in these models usually only looks at the image ($x$) and not the image-label pair ($x, y$), the generator lacks a strong signal to learn the relationship between classes and styles. This often results in a generator that produces "meaningless" images or cannot be told what to generate (e.g., "generate a 7").

Methods

The core innovation is the Triple-GAN architecture, which consists of three players:

  • Generator ($G$): Characterizes the conditional distribution $p_g(x|y)$. It takes a label and noise to produce an image.
  • Classifier ($C$): Characterizes the conditional distribution $p_c(y|x)$. It takes an image and predicts its label.
  • Discriminator ($D$): The sole judge. Unlike standard GANs, it evaluates pairs $(x, y)$.
Triple-GAN Architecture

The Three-Player Game

The Discriminator is presented with three types of pairs and must decide if they are from the "true" distribution:

  1. (Real image, Real label): From the labeled dataset. $D$ should accept these.
  2. (Real image, Predicted label): The classifier $C$ labels unlabeled real data. $D$ should reject these if the label is wrong.
  3. (Generated image, Real label): The generator $G$ creates an image for a given label. $D$ should reject these if the image looks fake or doesn't match the label.

Key Technical Additions

  • Pseudo Discriminative Loss: To boost the classifier, the authors use the generator to create "pseudo-labeled" data. Since $G$ knows exactly what label it intended to generate, it provides a massive stream of synthetic training data for $C$.
  • REINFORCE Variant: Because labels are discrete, backpropagating through the classifier is tricky. The authors use a variant of the REINFORCE algorithm (policy gradients) to provide feedback from the discriminator to the classifier.

Datasets

The model was evaluated on three standard benchmarks for semi-supervised learning:

  • MNIST: Handwritten digits (10, 20, 50, 100, and 200 labeled samples).
  • SVHN: Street View House Numbers (1,000 labeled samples).
  • CIFAR10: General objects like birds, planes, and cars (4,000 labeled samples).

Key Insights and Ideas

  • Compatibility over Competition: In Triple-GAN, the generator and classifier are not competing; they are both trying to fool the discriminator by matching the true joint distribution $p(x, y)$. A better generator provides better synthetic data for the classifier, and a better classifier provides better pseudo-labels to help the generator understand class boundaries.
  • Joint Distribution Matching: By forcing the discriminator to look at $(x, y)$ pairs, the model learns the relationship between data and semantics, not just the distribution of pixels.
  • Disentanglement: The model naturally learns to separate "class" (the label $y$) from "style" (the latent noise $z$). This allows for conditional generation where you can hold the digit "2" constant while varying its thickness or slant.

Key Results

1. Classification Accuracy

Triple-GAN outperformed existing Deep Generative Models (DGMs) across the board.

  • MNIST (20 labels): Achieved a 4.81% error rate, compared to 16.77% for Improved-GAN.
  • SVHN (1000 labels): Achieved a 5.77% error rate, significantly better than the 8.11% of Improved-GAN.
  • CIFAR10 (4000 labels): Achieved 16.99%, beating ALI and Cat-GAN.

2. Image Quality

The model produced much clearer images than "Feature Matching" GANs, which often produce blurry or "meaningless" blobs in SSL settings. On CIFAR10, Triple-GAN achieved an Inception Score of 5.08, compared to 3.87 for Improved-GAN without minibatch discrimination.

3. Latent Space Interpolation

The authors demonstrated that they could interpolate between two different styles (latent vectors) while keeping the class label fixed, resulting in smooth, semantically consistent transitions in the generated images.

Latent Space Interpolation

Limitations and Future Work

  • Computational Overhead: Training three networks instead of two increases the computational cost and the number of hyperparameters to tune (like the balance between generation and classification, $\alpha$).
  • Discrete Label Handling: While the REINFORCE variant works, the authors noted that using the "most probable label" instead of sampling was a necessary heuristic to keep the bias low and training stable.
  • Scaling: While successful on CIFAR10, the paper does not explore scaling this to much larger, more complex datasets like ImageNet, where the joint distribution $p(x, y)$ is significantly harder to model.

Summary updated

BibTeX
@inproceedings{li2017triple,
  author = {Chongxuan Li and Taufik Xu and Jun Zhu and Bo Zhang},
  title = {{Triple Generative Adversarial Nets}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2017},
  url = {https://openreview.net/forum?id=rJWtyu-ubr},
}
Figure