Skip to main content
QUICK REVIEW

[Paper Review] Cross-Modal Contrastive Learning for Text-to-Image Generation

Han Zhang, Jing Yu Koh|arXiv (Cornell University)|Jan 12, 2021
Generative Adversarial Networks and Image SynthesisComputer Science61 references34 citations
TL;DR

XMC-GAN introduces cross-modal contrastive losses (image-sentence, image-image, region-word) with an attentional self-modulation generator and a contrastive discriminator, achieving state-of-the-art text-to-image synthesis across COCO, Localized Narratives, and Open Images datasets.

ABSTRACT

The output of text-to-image synthesis systems should be coherent, clear, photo-realistic scenes with high semantic fidelity to their conditioned text descriptions. Our Cross-Modal Contrastive Generative Adversarial Network (XMC-GAN) addresses this challenge by maximizing the mutual information between image and text. It does this via multiple contrastive losses which capture inter-modality and intra-modality correspondences. XMC-GAN uses an attentional self-modulation generator, which enforces strong text-image correspondence, and a contrastive discriminator, which acts as a critic as well as a feature encoder for contrastive learning. The quality of XMC-GAN's output is a major step up from previous models, as we show on three challenging datasets. On MS-COCO, not only does XMC-GAN improve state-of-the-art FID from 24.70 to 9.33, but--more importantly--people prefer XMC-GAN by 77.3 for image quality and 74.1 for image-text alignment, compared to three other recent models. XMC-GAN also generalizes to the challenging Localized Narratives dataset (which has longer, more detailed descriptions), improving state-of-the-art FID from 48.70 to 14.12. Lastly, we train and evaluate XMC-GAN on the challenging Open Images data, establishing a strong benchmark FID score of 26.91.

Motivation & Objective

  • Motivate high semantic fidelity and photo-realism in text-to-image synthesis beyond small or simplistic scenes.
  • Develop a one-stage GAN that aligns images with descriptive text via cross-modal contrastive learning.
  • Enforce both inter-modal (image-text, image-real vs fake) and intra-modal (region-word) correspondences to improve global and local fidelity.
  • Demonstrate strong empirical gains on diverse datasets (MS-COCO, Localized Narratives, Open Images) with human and automated evaluations.

Proposed method

  • Propose XMC-GAN with a single-stage attentional self-modulation generator.
  • Apply multiple contrastive losses: image-sentence (global alignment), image-image (real vs generated with shared caption), and image-region to word (local alignment via attention).
  • Use a discriminator that also serves as a feature encoder for contrastive learning and to compute region/global features.
  • Compute region-word alignments with attention to produce a word-to-region context vector for cross-modal supervision.
  • Incorporate Attentional Self-Modulation to modulate region features by word-context vectors during generation (enhancing region-level fidelity).
  • Train with a combination of GAN objective and NT-Xent contrastive losses with shared encoders for modality pairs.

Experimental results

Research questions

  • RQ1Can cross-modal contrastive losses improve both realism and textual alignment in text-to-image synthesis without object-level supervision?
  • RQ2How do inter-modal (image-sentence, region-word) and intra-modal (image-image) contrastive losses interact to improve global image quality and region-level fidelity?
  • RQ3Does an attentional self-modulation generator better capture fine-grained details and align with long/descriptive captions?
  • RQ4How does XMC-GAN perform on diverse datasets beyond MS-COCO (e.g., Localized Narratives, Open Images) compared to prior methods?

Key findings

  • XMC-GAN achieves a strong fidelity and alignment improvement, reducing COCO-14 FID from 24.70 to 9.33 and achieving an IS of 30.45 with Real Images having 6.09 FID and 69.36 R-precision baseline.
  • Human evaluations favor XMC-GAN for realism (77.3% of comparisons) and image-text alignment (74.1%).
  • On LN-COCO, XMC-GAN improves FID from 48.70 to 14.12 and shows substantial gains in text alignment metrics.
  • On LN-OpenImages, XMC-GAN attains an IS of 24.90, FID 26.91, and R-precision 57.55, establishing a strong benchmark.
  • Ablation studies show inter-modal losses (image-sentence and region-word) provide the largest FID improvements, and combining all four losses yields the best overall performance.
  • Attentional self-modulation significantly outperforms standard self-modulation, and contrastive losses outperform perceptual losses in guiding generation.

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.