Skip to main content
QUICK REVIEW

[Paper Review] DeCap: Decoding CLIP Latents for Zero-Shot Captioning via Text-Only Training

Wei Li, Linchao Zhu|arXiv (Cornell University)|Mar 6, 2023
Multimodal Machine Learning ApplicationsComputer Science24 citations
TL;DR

DeCap introduces a lightweight, text-data-trained, CLIP-based zero-shot captioning framework with a training-free visual-to-text embedding projection, achieving state-of-the-art results on image and video captioning benchmarks without paired data.

ABSTRACT

Large-scale pre-trained multi-modal models (e.g., CLIP) demonstrate strong zero-shot transfer capability in many discriminative tasks. Their adaptation to zero-shot image-conditioned text generation tasks has drawn increasing interest. Prior arts approach to zero-shot captioning by either utilizing the existing large language models (e.g., GPT-2) or pre-training the encoder-decoder network in an end-to-end manner. In this work, we propose a simple framework, named DeCap, for zero-shot captioning. We introduce a lightweight visual-aware language decoder. This decoder is both data-efficient and computation-efficient: 1) it only requires the text data for training, easing the burden on the collection of paired data. 2) it does not require end-to-end training. When trained with text-only data, the decoder takes the text embedding extracted from the off-the-shelf CLIP encoder as a prefix embedding. The challenge is that the decoder is trained on the text corpus but at the inference stage, it needs to generate captions based on visual inputs. The modality gap issue is widely observed in multi-modal contrastive models that prevents us from directly taking the visual embedding as the prefix embedding. We propose a training-free mechanism to reduce the modality gap. We project the visual embedding into the CLIP text embedding space, while the projected embedding retains the information of the visual input. Taking the projected embedding as the prefix embedding, the decoder generates high-quality descriptions that match the visual input. The experiments show that DeCap outperforms other zero-shot captioning methods and unpaired captioning methods on the typical image captioning benchmarks, i.e., MSCOCO and NoCaps.

Motivation & Objective

  • Reduce reliance on paired image-text data for captioning by using text-only training.
  • Leverage CLIP's aligned multi-modal latent space to generate captions conditioned on visual inputs.
  • Propose a training-free projection mechanism to bridge the modality gap between image and text embeddings.
  • Demonstrate strong zero-shot performance across image and video captioning benchmarks.

Proposed method

  • Train a text decoder from scratch to reconstruct sentences conditioned on CLIP text embeddings (prefix language modeling).
  • Use a text-only training objective with sentences encoded by the fixed CLIP text encoder as the prefix.
  • At inference, project CLIP image embeddings into the CLIP text embedding space using a training-free, memory-based projection from a support memory of text embeddings.
  • Compute a weighted combination of text embeddings via cosine similarity and softmax to form a projected prefix for generation.
  • Decode captions with the transformer-based decoder conditioned on the projected text-space embedding.
  • Optionally compare with inference strategies (CLIPRe, VD, NND) to analyze modality-gap effects.

Experimental results

Research questions

  • RQ1Can a text-only trained decoder conditioned on CLIP text embeddings generate high-quality captions for visual inputs in a zero-shot setting?
  • RQ2Does a training-free projection from image embeddings to the CLIP text embedding space effectively bridge the modality gap for captioning?
  • RQ3How does DeCap perform on standard captioning benchmarks in zero-shot and cross-domain settings, and in video captioning tasks?

Key findings

  • DeCap achieves state-of-the-art zero-shot captioning performance on MSCOCO and NoCaps among methods without paired data.
  • The projection-based decoding mechanism significantly reduces the modality gap and improves caption quality across image and video benchmarks.
  • DeCap trained on text data from domain-relevant sources (e.g., CC3M-text, SS1M, Book Corpus) yields stronger results than generic baselines and shows strong cross-domain generalization.
  • Neural decoding with a text-only decoder can outperform retrieval-based and direct-embedding approaches in many zero-shot scenarios.
  • Video captioning results show competitive zero-shot performance on MSR-VTT and ActivityNet-Captions, with further gains when using domain-specific text data for decoder training.

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.