InfoGAN-CR: Disentangling Generative Adversarial Networks with Contrastive Regularizers

Zinan Lin, Kiran Koshy Thekumparampil, Giulia C. Fanti, Sewoong Oh

Abstract

Disentangled generative models map a latent code vector to a target space, while enforcing that a subset of the learned latent codes are interpretable and associated with distinct properties of the target distribution. Recent advances have been dominated by Variational AutoEncoder (VAE)-based methods, while training disentangled generative adversarial networks (GANs) remains challenging. In this work, we show that the dominant challenges facing disentangled GANs can be mitigated through the use of self-supervision. We make two main contributions: first, we design a novel approach for training disentangled GANs with self-supervision. We propose contrastive regularizer, which is inspired by a natural notion of disentanglement: latent traversal. This achieves higher disentanglement scores than state-of-the-art VAE- and GAN-based approaches. Second, we propose an unsupervised model selection scheme called ModelCentrality, which uses generated synthetic samples to compute the medoid of a collection of models. The current common practice of hyper-parameter tuning requires using ground-truths samples, each labelled with known perfect disentangled latent codes. As real datasets are not equipped with such labels, we propose an unsupervised model selection scheme and show that it finds a model close to the best one, for both VAEs and GANs. Combining contrastive regularization with ModelCentrality, we improve upon the state-of-the-art disentanglement scores significantly, without accessing the supervised data.

Introduction

In generative modeling, disentanglement is the objective of learning a latent space where individual dimensions (latent codes) control specific, interpretable attributes of the data—such as rotation, scale, or position—independently of others. While Variational Autoencoders (VAEs) have historically led this field, Generative Adversarial Networks (GANs) have struggled to produce high-quality disentangled representations. Furthermore, the field often relies on "cheating" with ground-truth labels for hyperparameter tuning. This paper addresses both issues by introducing a self-supervised training signal and a consensus-based model selection metric.

Methods: InfoGAN-CR and ModelCentrality

The authors propose two major innovations to bridge the gap between GANs and VAEs:

  1. InfoGAN-CR (Contrastive Regularization): This method introduces a Contrastive Regularizer (CR) based on the principle of latent traversal. If one latent code is fixed while others are randomized to generate a pair of images, the resulting images should share only the attribute controlled by that fixed code. To enforce this, a new discriminator ($H$) is added to the architecture.
The InfoGAN-CR architecture adds a CR Discriminator (H) to the standard GAN and InfoGAN components to perform self-supervised hypothesis testing on latent factors.
  1. ModelCentrality (Unsupervised Selection): To solve the model selection problem without labels, the authors propose ModelCentrality. They observed that well-disentangled models tend to be "close" to each other in their perception of data structure. By treating a pool of models as pseudo-ground truths for one another, the "medoid" (the most central model) is selected as the best performer.

Experimental Results

The framework was evaluated on standard benchmarks like dSprites and CelebA. InfoGAN-CR achieved a state-of-the-art FactorVAE score of 0.88 on dSprites, surpassing previous baselines.

Latent traversals on the dSprites dataset show clear, independent control over shape, rotation, scale, and spatial position.

As shown in the figure above, the model successfully isolates independent factors of variation. Notably, models selected via ModelCentrality often outperformed those selected using traditional supervised tuning, reaching scores as high as 0.92 on dSprites. On real-world data like CelebA, the model successfully disentangled complex traits such as hair color, head azimuth, and lighting without any manual annotation.

Discussion and Future Work

While InfoGAN-CR marks a significant step forward, the authors identify remaining challenges, such as the "Polar Coordinate Trap" where models struggle with non-Cartesian geometries (e.g., radius and angle). Future research will focus on developing latent structures that can accommodate these geometries and reducing the computational overhead required to train the model pools used in ModelCentrality.

Summary updated

Abstract

Disentangled generative models map a latent code vector to a target space, while enforcing that a subset of the learned latent codes are interpretable and associated with distinct properties of the target distribution. Recent advances have been dominated by Variational AutoEncoder (VAE)-based methods, while training disentangled generative adversarial networks (GANs) remains challenging. In this work, we show that the dominant challenges facing disentangled GANs can be mitigated through the use of self-supervision. We make two main contributions: first, we design a novel approach for training disentangled GANs with self-supervision. We propose contrastive regularizer, which is inspired by a natural notion of disentanglement: latent traversal. This achieves higher disentanglement scores than state-of-the-art VAE- and GAN-based approaches. Second, we propose an unsupervised model selection scheme called ModelCentrality, which uses generated synthetic samples to compute the medoid (multi-dimensional generalization of median) of a collection of models. The current common practice of hyper-parameter tuning requires using ground-truths samples, each labelled with known perfect disentangled latent codes. As real datasets are not equipped with such labels, we propose an unsupervised model selection scheme and show that it finds a model close to the best one, for both VAEs and GANs. Combining contrastive regularization with ModelCentrality, we improve upon the state-of-the-art disentanglement scores significantly, without accessing the supervised data.
BibTeX
@inproceedings{lin2020infogan,
  author = {Zinan Lin and Kiran Koshy Thekumparampil and Giulia C. Fanti and Sewoong Oh},
  title = {{InfoGAN-CR: Disentangling Generative Adversarial Networks with Contrastive Regularizers}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
}
Figure