Skip to main content
QUICK REVIEW

[Paper Review] DivCo: Diverse Conditional Image Synthesis via Contrastive Generative Adversarial Network

Rui Liu, Yixiao Ge|arXiv (Cornell University)|Mar 14, 2021
Generative Adversarial Networks and Image SynthesisComputer Science45 references4 citations
TL;DR

This paper proposes DivCo, a novel contrastive learning-based framework that enhances diverse conditional image synthesis by jointly modeling positive and negative relations between generated images using a latent-augmented contrastive loss. By encouraging similarity between images from nearby latent codes and dissimilarity from distant ones, DivCo effectively mitigates mode collapse while preserving image quality, outperforming state-of-the-art methods on both unpaired and paired image generation tasks.

ABSTRACT

Conditional generative adversarial networks (cGANs) target at synthesizing diverse images given the input conditions and latent codes, but unfortunately, they usually suffer from the issue of mode collapse. To solve this issue, previous works mainly focused on encouraging the correlation between the latent codes and their generated images, while ignoring the relations between images generated from various latent codes. The recent MSGAN tried to encourage the diversity of the generated image but only considers "negative" relations between the image pairs. In this paper, we propose a novel DivCo framework to properly constrain both "positive" and "negative" relations between the generated images specified in the latent space. To the best of our knowledge, this is the first attempt to use contrastive learning for diverse conditional image synthesis. A novel latent-augmented contrastive loss is introduced, which encourages images generated from adjacent latent codes to be similar and those generated from distinct latent codes to be dissimilar. The proposed latent-augmented contrastive loss is well compatible with various cGAN architectures. Extensive experiments demonstrate that the proposed DivCo can produce more diverse images than state-of-the-art methods without sacrificing visual quality in multiple unpaired and paired image generation tasks.

Motivation & Objective

  • To address mode collapse in conditional GANs, which limits diversity in image generation despite using latent codes.
  • To improve generation diversity by modeling both positive (similar) and negative (dissimilar) relations between images generated from different latent codes.
  • To develop a method that is compatible with various cGAN architectures without requiring architectural changes.
  • To achieve better disentanglement between conditional input and latent code influence, avoiding bias toward either.

Proposed method

  • Introduces a novel latent-augmented contrastive loss that treats images generated from nearby latent codes as 'positive' pairs and those from distant codes as 'negative' pairs.
  • Uses a hyper-sphere around a query latent code to define positive samples, with positive samples drawn within the sphere and negative ones outside.
  • Applies contrastive learning in the feature space of generated images, encouraging feature similarity for positive pairs and dissimilarity for negative pairs.
  • Integrates the contrastive loss as a regularization term into the standard cGAN objective, maintaining compatibility with existing architectures.
  • Employs a temperature-scaled contrastive loss to stabilize training and improve feature discrimination.
  • The framework is applied to both unpaired and paired image translation tasks, as well as class-conditional image generation.

Experimental results

Research questions

  • RQ1Can modeling both positive and negative relations between generated images improve diversity in conditional image synthesis?
  • RQ2How does the inclusion of latent code proximity in defining positive/negative pairs affect mode collapse mitigation?
  • RQ3Can contrastive learning be effectively adapted to conditional image generation without architectural modifications?
  • RQ4How does the proposed method compare to existing approaches in terms of both image quality and diversity across multiple datasets and settings?

Key findings

  • DivCo achieves the lowest Fréchet Inception Distance (FID) of 25.21 ± 0.20 on CIFAR-10, outperforming DCGAN (28.34 ± 0.12) and MSGAN (27.09 ± 0.14) in class-conditional image generation.
  • On the Cityscapes and Winter2Summer datasets, DivCo generates significantly more diverse images than DRIT and MSGAN, as highlighted by red crosses in qualitative comparisons.
  • The sensitivity analysis shows that the optimal weight for the contrastive loss (λ_contra) is 1, with performance degrading sharply when set above 3 due to over-penalization of realism.
  • The method maintains high visual quality while achieving superior diversity, as confirmed by both FID and user studies on image variety.
  • The radius of the hyper-sphere (R) has a strong impact: too large or too small values degrade performance, indicating the need for careful hyperparameter tuning.
  • The temperature hyperparameter τ must be carefully set; both too high and too low values reduce performance, showing sensitivity to this scaling factor.

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.