Source-linked AI summary
VeCLIP: Improving CLIP Training via Visual-enriched Captions
Zhengfeng Lai, Haotian Zhang, Bowen Zhang, Wentao Wu, Haoping Bai, Aleksei Timofeev, Xianzhi Du, Zhe Gan, Jiulong Shan, Chen-Nee Chuah, Yinfei Yang, Meng Cao
TL;DR
Noisy and incomplete web AltTexts make image-text alignment difficult, and prior caption rewriting has been assessed mainly on curated datasets. VeCLIP creates image-enriched captions and alternates them with AltTexts in CLIP training; the authors report retrieval gains and strong zero-shot results when combining VeCap with curated data.
Problem
Web AltTexts can be noisy, irrelevant, or incomplete, while prior LLM caption rewriting has been evaluated on curated datasets and may reduce text diversity.
Source: §1 · pp. 1–2Method
VeCap fuses LLaVA-derived visual concepts with AltText, and VeCLIP alternates VeCap and original AltText during CLIP training.
Source: §1 · p. 2Results
Up to 25.2% improvement over CLIP in retrieval tasks; VeCap+DFN achieves 83.1% ImageNet zero-shot accuracy@1 with H/14.
Source: §1 · p. 3Takeaways & Limitations
VeCap and curated datasets are complementary, and the authors report reduced computational cost and data requirements for large models to reach results competitive with vanilla CLIP.
Source: §1 · p. 3, §5 · p. 10The study uses only LLaVA to extract visual concepts, and quality measurement for generative AI remains under study.
Source: §5 · p. 10
Abstract
from arXiv · showhide
Large-scale web-crawled datasets are fundamental for the success of pre-training vision-language models, such as CLIP. However, the inherent noise and potential irrelevance of web-crawled AltTexts pose challenges in achieving precise image-text alignment. Existing methods utilizing large language models (LLMs) for caption rewriting have shown promise on small, curated datasets like CC3M and CC12M. This study introduces a scalable pipeline for noisy caption rewriting. Unlike recent LLM rewriting techniques, we emphasize the incorporation of visual concepts into captions, termed as Visual-enriched Captions (VeCap). To ensure data diversity, we propose a novel mixed training scheme that optimizes the utilization of AltTexts alongside newly generated VeCap. We showcase the adaptation of this method for training CLIP on large-scale web-crawled datasets, termed VeCLIP. Employing this cost-effective pipeline, we effortlessly scale our dataset up to 300 million samples named VeCap dataset. Our results show significant advantages in image-text alignment and overall model performance. For example, VeCLIP achieves up to +25.2% gain in COCO and Flickr30k retrieval tasks under the 12M setting. For data efficiency, VeCLIP achieves +3% gain while only using 14% of the data employed in the vanilla CLIP and 11% in ALIGN. We also note the VeCap data is complementary with other well curated datasets good for zero-shot classification tasks. When combining VeCap and DFN, our model can achieve strong performance on both of image-text retrieval and zero-shot classification tasks, e.g. 83.1% accuracy@1 on ImageNet zero-shot for a H/14 model. We release the pre-trained models at https://github.com/apple/ml-veclip.
1. Introduction
Web-crawled AltTexts can be noisy, omit image contents, and vary in informativeness, while simple LLM rewriting cannot add image-specific details. VeCLIP combines visual-enriched captions with original AltTexts to improve caption quality and diversity at scale.
1. Introduction
- Web AltTexts may be noisy, irrelevant, or incomplete, and simple LLM rewriting cannot introduce new image-specific details; curated caption datasets are costly to scale.Prior rewriting evaluations on curated CC3M and CC12M leave suitability for extensive web-crawled data uncertain.Source: §1 · pp. 1–2
- LLM rewriting may reduce text diversity through uniform phrasing, while prior methods leave texts unaugmented and have uncertain suitability for uncensored web data.The paper motivates scalable improvements to data quality, diversity, and training methodology.Source: §1 · p. 2
- VeCap uses image-derived visual concepts and an LLM to fuse them with AltText, while VeCLIP alternates VeCap and original AltText during training.The approach retains image-text pairs rather than filtering noisy captions.Source: §1 · p. 2, Figure 1 · p. 2
- Up to 25.2% improvement over CLIP in retrieval tasks; VeCap scales beyond 300M, 5% data yields competitive retrieval, and VeCap+DFN reaches 83.1% ImageNet zero-shot accuracy@1 with H/14.The authors also report complementarity between VeCap and curated datasets.Source: §1 · p. 3
2. Related Work
Related work improves vision-language pretraining through model and dataset changes, but these approaches leave open the challenge of efficiently using noisy, large-scale web data.
2. Related Work
- Many CLIP successors add training inputs or losses, which may adversely affect training efficiency and memory usage.Examples include self-supervised objectives, an additional decoder, or freezing the image encoder while fine-tuning text encoders.Source: §2 · p. 3
- Dataset filtering can discard image-text pairs, while LLM rewriting has shown marginal advantage on noisy web captions despite evaluations on curated CC3M and CC12M.LaCLIP [12] is cited as an LLM rewriting approach; curated datasets begin with higher-quality captions.Source: §2 · p. 3
3. Methodology
The methodology starts from CLIP's symmetric contrastive training, then builds captions by extracting image concepts and fusing them with AltText. It scales rewriting through batch inference and trains with alternating AltText and VeCap.
3.1. Preliminary
- CLIP trains on batches of image-text pairs with a symmetric contrastive loss, treating matched pairs as positives and the remaining pairs as negatives.Image augmentations are applied before the vision encoder, and the image and text features are normalized.Source: §3.1 · p. 3
3.2. Recaptioning with Visual Concept Exploitation
- LLaVA generates visual concepts directly from images using prompts independent of AltText, producing captions that supply image-derived information.The pipeline then uses an LLM to check ethics and fuse concepts from AltText and visual-enriched captions into VeCap.Source: §3.2 · pp. 3–4, Figure 2 · p. 4
3.3. Scalable LLM Rewrite for Concept Fusion
- An LLM fuses AltText with LLaVA's visual concepts, retaining AltText information while restructuring the caption and helping mitigate hallucinated entities.The authors select an open-source LLM to make large-scale rewriting practical and use batch inference, reporting up to 64 times faster processing on an Nvidia A100.Source: §3.3 · pp. 4–5
3.4. VeCLIP: Mixed Training Scheme with Visual-enriched Captions for CLIP
- VeCLIP alternates AltTexts and VeCap to improve caption quality and diversity without filtering data or adding computational complexity or parameter overhead.The pipeline addresses ethical refusal and length constraints encountered during large-scale rewriting.Source: §3.4 · p. 5, §3.3 · p. 5
4. Experiments
Experiments evaluate CLIP trained at multiple VeCap data scales on zero-shot classification and image retrieval, with additional tests on curated datasets and combinations with DFN. Results show gains across tasks, diminishing returns at larger scales, and complementary strengths from VeCap and DFN.
4.2. Results on Retrieval Tasks
- Recall@1 gains reach +16.84%/+23.26% on COCO image-to-text and +28.40%/+29.20% on Flickr30k at 3M/12M, with consistent improvements across Recall@k and both retrieval directions.The reported comparisons are against CLIP; Table 1 summarizes COCO and Flickr30k retrieval results.Source: §4.2 · pp. 5–6, Table 1 · p. 6
- GPR1200 image-to-image retrieval gains are 5.22%/3.92% at 3M/12M and average 1.84% across six domains at 200M.The authors report that the main boost comes from the Sketch domain.Source: §4.2 · p. 6, Table 2 · p. 7
4.3. Results on Image Classification
- Top-1 gains reach +10.52%/+6.42% on ImageNet/ImageNetV2 at 3M and remain +0.90%/+0.83% at 200M.Table 3 reports zero-shot Top-k accuracy on ImageNet and ImageNetV2.Source: §4.3 · p. 7, Table 3 · p. 7
- VTAB average accuracy gains exceed 5% at 3M, 12M, and 100M, and are +1.91% at 200M.The evaluation covers nine natural and specialized tasks.Source: §4.3 · pp. 7–8, Table 4 · p. 7
4.4. Performance trend across scales
- Both CLIP and VeCLIP improve strongly through 100M, after which gains become gradual and marginal; VeCLIP starts higher at 3M and 12M.Figure 4 compares CLIP with original AltTexts and VeCLIP with LLM-VeC using ViT-B/16.Source: §4.4 · p. 8, Figure 4 · p. 9
4.5. Complementary to other datasets to achieve state-of-the-art performance
- Under the same learning-rate and maximum-step configuration, VeCap beats DFN in retrieval but trails in classification; combining them gives the most improvements for all model sizes, and ViT-H/14 reaches 83.1% ImageNet accuracy.Source: §4.5 · p. 8
4.6. Ablation Study
- VeCap improves retrieval but can lag original AltTexts on ImageNet zero-shot; alternating AltTexts and VeCap raises zero-shot results while retaining retrieval gains, and using all captions performs best in nearly all settings.The authors propose that prompt distribution shift and reduced text diversity may contribute to the classification gap.Source: §4.6 · p. 8, Table 6 · p. 10
- ViT-L/14 improves up to 5.87% over ViT-B/16, while VeCap on CC3M yields +18.16% on COCO image-to-text retrieval and +6.14% on ImageNet.The CC3M results are presented as evidence of VeCap's generalizability to well-curated datasets.Source: §4.6 · pp. 8, 10
5. Discussion
The discussion presents VeCLIP as a scalable, adaptable approach that improves large-scale VLM pre-training while reducing training cost and data requirements. It also identifies future work and limitations around applying the dataset to other VLMs, filtering generated captions, and measuring their quality.
5. Discussion
- VeCLIP is designed for scalable web-crawled datasets, and the authors report performance gains while reducing the computational cost and training-data size needed for large models to reach competitive results.The evaluation spans raw and noisy datasets at small, medium, and large scales.Source: §5 · p. 10
- The authors plan to apply the collected dataset to other VLM pre-training and investigate filtering for factual inaccuracies and hallucinations in LLM outputs.The paper uses CLIP as an illustrative instance.Source: §5 · p. 10
- The study uses LLaVA to exploit visual concepts, while quality measurement for generative AI remains under study.Source: §5 · p. 10
1. Appendix
- The supplementary material provides additional dataset, experimental-setting, results, and analysis details.Source: §1 · p. 13
A. Dataset details
The appendix describes nested WIT subsets drawn from a 300M-pair web-crawled dataset and specifies the datasets and prompt procedure used for VTAB zero-shot evaluation.
Pre-training datasets
- WIT-300M contains 300M web-crawled image-text pairs, with WIT-200M, WIT-100M, WIT-12M, and WIT-3M formed as successively smaller nested subsets.Source: A. Dataset details · p. 13
VTAB datasets
- VTAB evaluation uses nine zero-shot classification datasets and the same CLIP prompt set for original and proposed models.Class embeddings average the prompt-template embeddings and are then L2-normalized.Source: A. Dataset details · p. 13
B. Implementation details
The appendix summarizes CLIP pre-training hyperparameters and reports training on up to 512 TPUs using JAX.
Pre-training hyper-parameters
- CLIP models are pre-trained on up to 512 TPUs with JAX, with hyperparameters summarized in Table A2.Source: B. Implementation details · p. 13
C. More experimental results
This section provides further experimental results and ablations on large-backbone generalization and pre-training with public and well-curated datasets.
C. More experimental results
- The section covers additional results and ablations, including large-backbone generalization and pre-training with public and well-curated datasets.Source: C. More experimental results · p. 13
C.1. Larger backbone architectures
With ViT-L/14, VeCLIP consistently improves over CLIP across downstream tasks and outperforms its ViT-B/16 counterpart on classification. The results suggest potential scalability to larger backbones and datasets.
- VeCLIP with ViT-L/14 consistently improves over CLIP with ViT-L/14 across all downstream tasks.Source: §C.1 · p. 13
- VeCLIP with ViT-L/14 surpasses its ViT-B/16 counterpart, with over 5% improvement on both ImageNet and ImageNetV2.Source: §C.1 · p. 13
- The authors report potential for VeCLIP to scale with larger backbone architectures and larger-scale datasets.Source: §C.1 · p. 13
C.2. Generalization on well-curated datasets: CC3M and CC12M
VeCLIP improves results on both curated CC3M/CC12M and noisy WIT datasets. In a separate caption-format study, simplified entity captions do not match the zero-shot performance of original AltTexts.
C.2. Generalization on well-curated datasets: CC3M and CC12M
- CC3M exceeds WIT-3M by +10.70% on COCO I2T with CLIP, while VeCLIP improves Flickr30K I2T by over 30% and ImageNet and ImageNetV2 by over 5%.Source: §C.2 · p. 13
- +12.27% on COCO I2T for CC12M, with VeCLIP also improving ImageNet and ImageNetV2 by over 5%.Source: §C.2 · p. 13
C.3. Complete visual descriptions vs simplified entity representations
- Sole VeCap training may reduce zero-shot performance relative to original AltTexts, whereas the mixed training approach yields optimal outcomes.Source: §C.3 · p. 13
- Simplified Entity Representation extracts and filters noun entities into “a photo of [U],” but its zero-shot performance remains below original AltTexts; the authors hypothesize insufficient data diversity.Source: §C.3 · pp. 13–14
C.4. Main results with WIT-300M
For ViT-B/16, results with 300M samples are close to those with 200M, while VeCLIP retains retrieval improvements. VeCLIP with DFN also outperforms FLIP and OpenAI CLIP, reaching 83.1% ImageNet accuracy with ViT-H/14.
- WIT-300M results are close to those at 200M for CLIP and VeCLIP, suggesting 200 million samples suffice for ViT-B/16 training.Source: §C.4 · p. 14
- VeCLIP achieves significant retrieval-task improvement under the 300M setting, while its ImageNet and ImageNetV2 improvement is marginal.Source: §C.4 · p. 14
- 83.1% ImageNet accuracy is achieved by VeCLIP with DFN using ViT-H/14; the model also outperforms FLIP and OpenAI CLIP across different backbones.Source: §C.4 · p. 14
D. Caption quality comparison between well-curated Datasets and WIT datasets
The caption comparison contrasts precise, high-quality CC3M captions with more cluttered WIT AltTexts, and reports that VeCap adds visual concepts to both. The appendix also provides additional WIT-300M caption examples.
D. Caption quality comparison between well-curated Datasets and WIT datasets
- The section presents caption examples illustrating CC3M’s caption quality and VeCap’s additions, including descriptions of scenes and visible objects.Source: D. Caption quality comparison between… · p. 17
- CC3M captions are described as precise and closely aligned with images, while WIT-3M AltTexts tend to be more cluttered; VeCap adds visual concepts to both.Source: D. Caption quality comparison between… · p. 17
- The authors attribute significant retrieval-task improvement to integrating enriched visual concepts into captions.Source: Table A4 · p. 15, D. Caption quality comparison between… · p. 17
E. More examples of WIT with VeCap
- The pipeline was applied to 200 million image-text pairs, with additional WIT AltText and VeCap examples shown in Figure A1.Source: E. More examples of WIT with VeCap · p. 17, Figure A1 · p. 18
Related papers
This paper cites
- Learning Transferable Visual Models From Natural Language Supervision2021
- Microsoft COCO: Common Objects in Context2014
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale2020
- LLaMA: Open and Efficient Foundation Language Models2023
- A Simple Framework for Contrastive Learning of Visual Representations2020
- Flickr30k Entities: Collecting Region-to-Phrase Correspondences for Richer Image-to-Sentence Models2015