[Paper Review] Improving CLIP Training with Language Rewrites
LaCLIP augments CLIP training by generating diverse rewritten captions via in-context learning with LLaMA, improving zero-shot, few-shot, and linear probing transfers without extra training cost.
Contrastive Language-Image Pre-training (CLIP) stands as one of the most effective and scalable methods for training transferable vision models using paired image and text data. CLIP models are trained using contrastive loss, which typically relies on data augmentations to prevent overfitting and shortcuts. However, in the CLIP training paradigm, data augmentations are exclusively applied to image inputs, while language inputs remain unchanged throughout the entire training process, limiting the exposure of diverse texts to the same image. In this paper, we introduce Language augmented CLIP (LaCLIP), a simple yet highly effective approach to enhance CLIP training through language rewrites. Leveraging the in-context learning capability of large language models, we rewrite the text descriptions associated with each image. These rewritten texts exhibit diversity in sentence structure and vocabulary while preserving the original key concepts and meanings. During training, LaCLIP randomly selects either the original texts or the rewritten versions as text augmentations for each image. Extensive experiments on CC3M, CC12M, RedCaps and LAION-400M datasets show that CLIP pre-training with language rewrites significantly improves the transfer performance without computation or memory overhead during training. Specifically for ImageNet zero-shot accuracy, LaCLIP outperforms CLIP by 8.2% on CC12M and 2.4% on LAION-400M. Code is available at https://github.com/LijieFan/LaCLIP.
Motivation & Objective
- Motivate improving CLIP through text augmentation to address language-side overfitting and limited textual diversity.
- Propose a scalable method to rewrite image captions using open-source LLMs without extra computation during training.
- Demonstrate that text augmentations improve transfer performance across multiple datasets and backbones.
- Show compatibility and gains when combining LaCLIP with existing CLIP-based frameworks.
Proposed method
- Introduce Language augmented CLIP (LaCLIP) by generating multiple rewritten captions per image using LLaMA ICL with meta-input-output prompts.
- Create meta-input-output caption pairs from ChatGPT, Bard, MSCOCO, and humans to guide rewriting.
- Rewrite each caption to produce M=4 diverse variants while preserving key concepts.
- Augment CLIP training with text augmentations by sampling between original and rewritten captions.
- Keep training cost and model parameters unchanged relative to standard CLIP while adding text augmentation.
- Optionally extend to LaCLIP-MT with multi-positive contrastive loss using all rewritten captions.
Experimental results
Research questions
- RQ1Can language rewrites of captions improve CLIP’s cross-modal alignment and transfer performance?
- RQ2How does LaCLIP perform across different pretraining data scales and backbone architectures?
- RQ3What is the impact of different sources of meta-input-output pairs on rewriting quality and downstream performance?
- RQ4Does text augmentation via language rewrites generalize to and improve SLIP-based or other CLIP-derived frameworks?
Key findings
- LaCLIP consistently outperforms vanilla CLIP on ImageNet zero-shot and downstream datasets across multiple pretraining scales (e.g., CC12M, LAION-400M).
- LaCLIP yields up to 8.2 percentage points improvement in ImageNet zero-shot accuracy over CLIP on CC12M and shows notable gains on LAION-400M.
- Text augmentation with LLM rewrites provides gains in zero-shot, few-shot, and linear probing without additional training cost or parameters.
- LaCLIP improves performance across backbone sizes (ViT-S/16, ViT-B/16, ViT-L/16) and remains compatible with other CLIP-based enhancements (e.g., SLIP).
- Using multiple text rewrites as inputs yields consistent gains, with human-generated rewrites often providing slight advantages over other sources.
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.