Skip to main content
QUICK REVIEW

[Paper Review] Learning Disentangled Representation by Exploiting Pretrained Generative Models: A Contrastive Learning View

Xuanchi Ren, Tao Yang|arXiv (Cornell University)|Feb 21, 2021
Generative Adversarial Networks and Image SynthesisComputer Science13 citations
TL;DR

This paper proposes DisCo, a contrastive learning framework that leverages pretrained generative models (GAN, VAE, Flow) to jointly discover disentangled directions in latent space and learn disentangled representations without trade-offs between generation quality and disentanglement. By using a novel Δ-Contrastor to model image variations and an entropy-based domination loss, DisCo achieves state-of-the-art performance on multiple benchmark datasets and real-world FFHQ data.

ABSTRACT

From the intuitive notion of disentanglement, the image variations corresponding to different factors should be distinct from each other, and the disentangled representation should reflect those variations with separate dimensions. To discover the factors and learn disentangled representation, previous methods typically leverage an extra regularization term when learning to generate realistic images. However, the term usually results in a trade-off between disentanglement and generation quality. For the generative models pretrained without any disentanglement term, the generated images show semantically meaningful variations when traversing along different directions in the latent space. Based on this observation, we argue that it is possible to mitigate the trade-off by $(i)$ leveraging the pretrained generative models with high generation quality, $(ii)$ focusing on discovering the traversal directions as factors for disentangled representation learning. To achieve this, we propose Disentaglement via Contrast (DisCo) as a framework to model the variations based on the target disentangled representations, and contrast the variations to jointly discover disentangled directions and learn disentangled representations. DisCo achieves the state-of-the-art disentangled representation learning and distinct direction discovering, given pretrained non-disentangled generative models including GAN, VAE, and Flow. Source code is at https://github.com/xrenaa/DisCo.

Motivation & Objective

  • To address the trade-off between disentanglement and generation quality in unsupervised representation learning.
  • To enable disentangled representation learning using only pretrained, non-disentangled generative models.
  • To discover meaningful, semantically interpretable factors in the latent space of pretrained models.
  • To develop a unified, model-agnostic framework for disentanglement that does not require retraining the generator.
  • To leverage contrastive learning to model image variations and identify distinct disentangled directions.

Proposed method

  • DisCo uses a fixed pretrained generator and trains an encoder to learn disentangled representations by contrasting image variations along discovered latent directions.
  • It introduces a novel Δ-Contrastor module that models variations between image pairs generated by traversing latent directions, enabling contrastive learning on image-level features.
  • The framework employs a Navigator module to generate candidate traversal directions in the latent space for factor discovery.
  • An entropy-based domination loss is applied to encourage the representation to be more disentangled by promoting diversity in the latent code.
  • A hard negatives flipping strategy is used to improve optimization of the contrastive loss by dynamically selecting challenging negative samples.
  • The method is model-agnostic and works with GANs, VAEs, and normalizing flows without modifying the pretrained generator.

Experimental results

Research questions

  • RQ1Can we achieve state-of-the-art disentangled representation learning without compromising the generation quality of pretrained generative models?
  • RQ2Can we discover semantically meaningful, disentangled directions in the latent space of non-disentangled pretrained models?
  • RQ3How can contrastive learning be effectively applied to image variations to discover disentangled factors in the latent space?
  • RQ4Can a unified framework be designed to jointly learn disentangled representations and discover latent directions across different types of pretrained generative models?
  • RQ5What are the key components that improve disentanglement performance in a contrastive learning setup without explicit regularization?

Key findings

  • DisCo achieves state-of-the-art disentanglement performance on three major benchmark datasets (dSprites, Cars3D, Chairs) across all evaluation metrics.
  • On the FFHQ dataset, DisCo successfully discovers high-quality, semantically meaningful disentangled directions in the latent space of a pretrained StyleGAN.
  • The entropy-based domination loss significantly improves disentanglement by encouraging diversity in the learned representations.
  • The hard negatives flipping strategy enhances contrastive learning optimization, leading to more robust and disentangled representations.
  • DisCo outperforms both discovering-based methods and traditional VAE/InfoGAN-based approaches in disentanglement quality.
  • The framework maintains high-fidelity image generation quality since the pretrained generator is frozen and not finetuned.

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.