[Paper Review] Text-Only Training for Image Captioning using Noise-Injected CLIP
This paper proposes CapDec, a text-only training method for image captioning that leverages CLIP's frozen text encoder and a learnable decoder trained exclusively on text data. By injecting noise into CLIP embeddings during training, the method mitigates the modality gap between vision and language, achieving state-of-the-art zero-shot image captioning performance across four benchmarks, including style transfer, without requiring any paired image-text data during training.
We consider the task of image-captioning using only the CLIP model and additional text data at training time and no additional captioned images. Our approach relies on the fact that CLIP is trained to make visual and textual embeddings similar. Therefore, we only need to learn how to translate CLIP textual embeddings back into text, and we can learn how to do this by learning a decoder for the frozen CLIP text encoder using only text. We argue that this intuition is "almost correct" because of a gap between the embedding spaces, and propose to rectify this via noise injection during training. We demonstrate the effectiveness of our approach by showing SOTA zero-shot image captioning across four benchmarks, including style transfer. Code, data, and models are available at https://github.com/DavidHuji/CapDec.
Motivation & Objective
- To develop a method for image captioning that requires no paired image-text data during training, relying only on CLIP and a text-only corpus.
- To address the domain gap between visual and textual embeddings in CLIP, which hinders direct decoding of image embeddings into natural language captions.
- To enable zero-shot style transfer in image captioning by leveraging unpaired text examples in the desired style.
- To demonstrate that text-only pre-training with noise injection can achieve competitive performance compared to supervised methods.
Proposed method
- A text-only decoder network is trained to reconstruct input captions from their CLIP text embeddings, using only a large text corpus and no images.
- Noise is injected into the CLIP text embeddings during training to create a robust, ball-like region in embedding space, improving generalization and reducing the modality gap.
- The decoder is trained end-to-end with a lightweight mapping head and a pretrained autoregressive language model to generate fluent, coherent captions.
- At inference, the frozen CLIP image encoder processes an input image, and the trained decoder generates a caption directly from the image embedding.
- The noise injection strategy is empirically tuned using the mean infinity-norm of embedding differences between captions of the same image, yielding optimal noise standard deviation of ϵ = √0.016.
- The method is evaluated on standard, cross-domain, and style-guided captioning benchmarks, showing strong zero-shot performance.
Experimental results
Research questions
- RQ1Can a vision-language model like CLIP be adapted for image captioning using only text data and no paired image-text examples?
- RQ2How can the modality gap between CLIP's visual and textual embeddings be effectively mitigated to enable accurate caption generation from image embeddings?
- RQ3Does noise injection during training improve the robustness and generalization of a text-only decoder for image captioning?
- RQ4Can this approach generate high-quality captions in diverse styles using only unpaired text examples from those styles?
- RQ5How does the proposed method compare to existing zero-shot and supervised captioning baselines in terms of performance and generalization?
Key findings
- CapDec achieves state-of-the-art zero-shot image captioning performance across four benchmarks, including standard, cross-domain, and style-guided captioning tasks.
- The method outperforms existing text-only and zero-shot approaches, including the concurrent work by Su et al. (2022), demonstrating superior empirical results.
- Noise injection significantly improves performance, while text reconstruction baselines show no benefit from noise, indicating that noise serves a specific role in modality-gap correction rather than general regularization.
- Offset correction using mean embedding shifts performs worse than noise injection, suggesting that the modality gap is complex and not fully captured by simple linear shifts.
- The method is effective for style transfer: captions can be generated in any desired style using only unpaired text examples from that style.
- Despite strong performance, CapDec still underperforms fully supervised baselines, indicating room for improvement in text-only training paradigms.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.