Skip to main content
QUICK REVIEW

[Paper Review] TripletGAN: Training Generative Model with Triplet Loss

Gongze Cao, Yezhou Yang|arXiv (Cornell University)|Nov 14, 2017
Generative Adversarial Networks and Image SynthesisComputer Science23 references9 citations
TL;DR

This paper proposes TripletGAN, a novel GAN training method that replaces the standard classification loss in the discriminator with triplet loss, enabling better mode coverage and theoretical convergence to the true data distribution via Integral Probability Metric (IPM) analysis. By encouraging the generator to maximize inter-sample distance within the same class, TripletGAN effectively mitigates mode collapse while maintaining strong generation quality across CIFAR-10, STL-10, and CelebA benchmarks.

ABSTRACT

As an effective way of metric learning, triplet loss has been widely used in many deep learning tasks, including face recognition and person-ReID, leading to many states of the arts. The main innovation of triplet loss is using feature map to replace softmax in the classification task. Inspired by this concept, we propose here a new adversarial modeling method by substituting the classification loss of discriminator with triplet loss. Theoretical proof based on IPM (Integral probability metric) demonstrates that such setting will help the generator converge to the given distribution theoretically under some conditions. Moreover, since triplet loss requires the generator to maximize distance within a class, we justify tripletGAN is also helpful to prevent mode collapse through both theory and experiment.

Motivation & Objective

  • To address the persistent issue of mode collapse in GANs, where generators fail to cover all data modes.
  • To improve training stability and generator diversity by replacing the discriminator’s classification loss with triplet loss.
  • To theoretically justify the convergence of the generator to the true data distribution using Integral Probability Metric (IPM) analysis.
  • To empirically validate that TripletGAN achieves better mode coverage and sample diversity than vanilla GAN, especially in high-accuracy face generation tasks.
  • To explore the feasibility of integrating metric learning principles into adversarial training without explicit class labels.

Proposed method

  • Replace the standard cross-entropy classification loss in the discriminator with triplet loss, which minimizes intra-class and maximizes inter-class distances in the embedding space.
  • Train the generator to maximize the distance between fake samples in the embedding space, promoting diversity and reducing mode collapse.
  • Use an embedding network to map real and fake samples into a low-dimensional space where triplet loss is computed.
  • Theoretical analysis shows that the triplet loss formulation corresponds to minimizing an IPM, ensuring convergence to the true data distribution under mild conditions.
  • Adopt a standard DCGAN-like architecture without batch normalization to fairly evaluate the intrinsic benefits of triplet loss.
  • Use hard negative mining to select challenging triplets during training, improving the discriminative power of the critic.

Experimental results

Research questions

  • RQ1Can replacing the discriminator’s classification loss with triplet loss lead to better convergence and mode coverage in GANs?
  • RQ2Does the use of triplet loss in the generator’s training objective help prevent mode collapse?
  • RQ3Can the theoretical convergence guarantees of IPM be extended to adversarial training via triplet loss?
  • RQ4How does TripletGAN compare to vanilla GAN and other SOTA GAN variants in terms of sample diversity and inception score?
  • RQ5Can triplet loss be used effectively in conditional GANs without explicit class labels?

Key findings

  • TripletGAN achieves an inception score of 4.42 ± 0.22 on CIFAR-10, significantly outperforming vanilla GAN (1.85 ± 0.04) and WGAN (2.33 ± 0.04).
  • On STL-10, TripletGAN achieves an inception score of 6.44 ± 0.31, surpassing EBGAN (5.73 ± 0.20) and WGAN.
  • On CelebA, TripletGAN generates 21 male faces out of 64 samples, compared to only 7 from vanilla GAN, indicating better demographic balance and mode coverage.
  • The loss curves show that TripletGAN maintains training dynamics longer, as the critic loss does not saturate at π, unlike vanilla GAN, due to continued updates from hard triplets.
  • TripletGAN generates diverse, high-quality samples even without batch normalization, demonstrating the method’s intrinsic robustness to architectural choices.
  • Theoretical analysis confirms that triplet loss in the critic corresponds to minimizing an IPM, ensuring generator convergence to the true data distribution under mild conditions.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.