TripletCLIP: Improving Compositional Reasoning of CLIP via Synthetic Vision-Language Negatives

Contrastive Language-Image Pretraining (CLIP) models maximize the mutual information between text and visual modalities to learn representations. This makes the nature of the training data a significant factor in the efficacy of CLIP for downstream tasks. However, the lack of compositional diversity in contemporary image-text datasets limits the compositional reasoning ability of CLIP. We show that generating ``hard'' negative captions via in-context learning and synthesizing corresponding negative images with text-to-image generators offers a solution. We introduce a novel contrastive pre-training strategy that leverages these hard negative captions and images in an alternating fashion to train CLIP. We demonstrate that our method, named TripletCLIP, when applied to existing datasets such as CC3M and CC12M, enhances the compositional capabilities of CLIP, resulting in an absolute improvement of over 9% on the SugarCrepe benchmark on an equal computational budget, as well as improvements in zero-shot image classification and image retrieval. Our code, models, and data are available at: https://tripletclip.github.io

Paper

Similar papers

Peer review

Reviewer m3ja7/10 · confidence 3/52024-06-30

Summary

The paper proposes enhancing CLIP's compositional reasoning by generating high-quality negative image-text pairs using LLMs and text-to-image models. This approach improves beyond previous works that considered unrealistic, rule-based captions and unexplored negative images. Experiments show consistent improvements across different tasks.

Strengths

- **Dataset**: The paper proposes using LLMs and text-to-image models to generate hard negative captions and images, respectively. The generation and filtering methodology is effective. I find that releasing TripletData alone is already valuable for the community. - **Comprehensive experiments**: The paper shows extensive evaluation and consistent improvements over baselines on compositional and downstream tasks like SugarCrepe, zero-shot classification, and image-text retrieval. - **Clear presentation**: The paper is well-structured and clearly written, explaining the methodology and results effectively.

Weaknesses

- **Limited scaling**: The authors acknowledged the lack of experiments on increasing data and model size due to academic budget constraints. - **Limited study on the selection of LLM and image-to-text model**: The authors acknowledged the limited study on how the selection of the models could affect the quality of the TripletData. - **Nit**: Consider using \log and \exp in the equations.

Questions

- Have you considered splitting the test set and evaluating the models on the TripletData? - Could you clarify how the total of 13M image-text pairs is calculated? The numbers provided (2.6M for CC3M and 8.6M for CC12M) in Section 4.1 add up to 11.2M. - Since the negative images are generated from a text-to-image model, there's likely a distribution mismatch from the real positive images. Have you inspected this potential discrepancy? - Can you elaborate on the relatively poor performance on the Winoground benchmark compared to other compositional tasks? Are there specific aspects of Winoground that TripletCLIP struggles with? - There's a mention of "MiraData" in the Appendix - is this a typo for TripletData, or is it referring to something else?

Rating

7

Confidence

3

Soundness

4

Presentation

3

Contribution

4

Limitations

The authors have clearly addressed limitations in their paper.

Reviewer f4Gf6/10 · confidence 4/52024-07-03

Summary

This paper proposes a TripletCLIP, a pre-training framework aimed at enhancing compositional reasoning task. It computes the NegCLIP objective separately for each, with the image serving as the anchor in each instance. For training TripletCLIP, such triplet data is constructed as follows: Hard negative captions are generated from the original LaCLIP captions using a large language model (LLM) through in-context learning mechanism. Hard negative images are created from text-to-image diffusion models. The experiment section compared various hard negative (HN) based objectives and demonstrated the superior performance of the proposed TripletCLIP mechanism across a wide range of benchmarks: compositionality, zero-shot retrieval, and classification.

Strengths

[Originality and Significance] This paper addresses both model and data aspects in the context of pre-training CLIP. Given the challenges of synthesizing hard negative texts and particularly images at scale, the proposed work for constructing triplet data is likely to be valuable to the research community. On the model side, the proposed hard negative objective in pre-training, though simple, consistently enhances performance across a variety of tasks, including compositionality, retrieval, and classification. [Quality and Clarity] The experiments are well-designed and meticulously verify the claims made in the paper, demonstrating the necessity of such design choices. Some additional baselines, beyond the default LaCLIP, are included to demonstrate the effectiveness of TripletCLIP. The overall presentation was clear.

Weaknesses

- [W1] The effectiveness of the TripletCLIP objective is less convincing. Although the paper considered some hard negative (HN)-based baselines such as NegImage and NegCLIP++, it did not compare with HN baselines that jointly consider both HN text and image in the loss calculation, such as [1, 2, 3, 4, 5]. I understand that some works are concurrent, but it would be more comprehensive to see whether the design of the TripletCLIP objective is optimal, either quantitatively or conceptually. In addition, it is necessary to note the 'previous' work that generates hard negative images to enhance compositional reasoning tasks [2, 3]. Accordingly, the sentence from [L136-137] needs to be adjusted. - [W2] Though there are consistent improvements, the absolute level of performance is relatively weak compared to the 'default' CLIP models from the CyCLIP [1] and ALIP [6] papers (in terms of zero-shot imagenet and retrieval tasks). This may be due to the reduced computational resources during pre-training, which limits the significance of the results in the context of pre-training. The only possibility left, and neither the triplet data nor the pre-trained model shows the evidence of benefiting further downstream tasks in applications such as advanced VLMs like LLaVA, or text-to-image generation, as noted in [L70-72]. - [W3] Connected to [W2], if only a single GPU is used for pre-training, it would be an attractive alternative to fine-tune the pre-trained CLIP model with the (subset of) triplet data. It's clear that the proposed methodology remains valid, and it would be interesting to see whether employing triplet data with the proposed hard negative objectives proves superior compared to other compositional reasoning methodologies in the context of fine-tuning [7, 8], specifically on both compositional reasoning and retrieval/classification tasks. If the authors wish to focus solely on the pre-training context, referencing other previous work discussing both pre-training, as well as fine-tuning is missed [9]. - [W4] It is suggested to consider including additional compositional benchmarks for evaluation that consist of counterfactual image-text pairs, similar to the Winoground style: EqBen [2], COCO-Counterfactuals [10], MMVP-VLM [11], and SPEC [4], for comprehensiveness. In summary, the main concerns are the missing comparisons with hard negative (HN) objectives that incorporate both image and text, and the limited significance due to small-scale pre-training. Fine-tuning could be considered as an alternative approach to address these issues. Superiority over previous fine-tuning methodologies can further increase the significance. Meanwhile, I believe the large-scale triplet data constructed in the paper is valuable and could promote further studies in various aspects. --- References [1] Goel et al., CYCLIP: Cyclic Contrastive Language-Image Pretraining, in NIPS 2022. [2] Wang et al., Equivariant Similarity for Vision-Language Foundation Models, in ICCV 2023. [3] Sahin et al., Enhancing Multimodal Compositional Reasoning of Visual Language Models with Generative Negative Mining, in WACV 2024. [4] Peng et al., Synthesize, Diagnose, and Optimize: Towards Fine-Grained Vision-Language Understanding, in CVPR 2024. [5] Singh et al., Learn “No” to Say “Yes” Better: Improving Vision-Language Models via Negations, in arXiv preprint 2024. [6] Yang et al., ALIP: Adaptive Language-Image Pre-training with Synthetic Caption, in ICCV 2023. [7] Doveh et al., Teaching Structured Vision&Language Concepts to Vision&Language Models, in CVPR 2023. [8] Doveh et al., Dense and Aligned Captions (DAC) Promote Compositional Reasoning in VL Models, NIPS 2023. [9] Singh et al., Coarse-to-Fine Contrastive Learning in Image-Text-Graph Space for Improved Vision-Language Compositionality, in EMNLP 2023. [10] Le et al., COCO-Counterfactuals: Automatically Constructed Counterfactual Examples for Image-Text Pairs, in NIPS Dataset and Benchmark Track, 2023. [11] Tong et al., Eyes Wide Shut? Exploring the Visual Shortcomings of Multimodal LLMs, in CVPR 2024.

Questions

- Missing citations [L17-19]; image classification [CITATION], segmentation [CITATION], and image-text retrieval [CITATION] - From [L180], it needs referring to the proper section in the appendix - From [L227], what is the meaning of the 'real' hard negatives?

Rating

6

Confidence

4

Soundness

2

Presentation

3

Contribution

2

Limitations

Limitations are adequately and honestly addressed in the appendix.

Reviewer f4Gf2024-08-09

Thank you for the detailed response. I have no remaining concerns and will adjust the score to 6. I believe that including additional experiments with CyCLIP and fine-tuning comparisons will provide valuable references for future research. It would be great if that part of the codebase were released.

Authorsrebuttal2024-08-12

Reply to Reviewer f4Gf

Thank you for raising the score! We are pleased to see that all concerns have been effectively addressed. Yes, we will add all the new experiments in the camera-ready version as they will make our work more impactful. We are also planning to release the code, data, and checkpoints.

Reviewer U1Yz5/10 · confidence 4/52024-07-11

Summary

To enhance the compositional capabilities of CLIP, authors propose to generate “hard” negative captions via in-context learning and synthesizing corresponding negative images with text-to-image generators offers a solution.

Strengths

1. Authors introduce a novel CLIP pre-training strategy that employs hard negative images in conjunction with triplet contrastive learning to enhance compositionality. 2. TripletCLIP consistently improves across downstream tasks. 3. A new dataset TripletData is proposed.

Weaknesses

The novelty and contribution are limited. While [1] builds negative samples from the text perspective, similar to [1], authors primarily build additional negative samples from the image perspective with LLM and generated images. Given the existing observations (bag-of-words phenomenon, etc.) and soulutions presented in [1], I think the contribution of the current version is marginal. ### Reference [1] When and why vision-language models behave like bags-of-words, and what to do about it? ICLR 2023

Questions

see weakness

Rating

5

Confidence

4

Soundness

2

Presentation

2

Contribution

2

Limitations

n/a

Reviewer ZTUH6/10 · confidence 3/52024-07-13

Summary

The paper introduces a novel pre-training strategy aimed at enhancing the compositional reasoning capabilities of CLIP models. The authors identify the limitation in current image-text datasets that restricts the compositional understanding of CLIP models and propose a solution that involves generating "hard" negative captions and corresponding images. This is achieved through a two-step process: leveraging in-context learning for negative caption generation and utilizing text-to-image generators to create matching negative images. The improvement in modeling effectiveness is more significant with the manufactured negative sample dataset.

Strengths

[S1] This paper is well-written, making it easy for readers to follow. [S2] The method of the paper is concise and easy to implement, and the experimental results demonstrate its effectiveness, which could encourage more people to apply this method to their own tasks. [S3] For multimodal contrastive learning pre-training, incorporating both image negative samples and text negative samples is comprehensive.

Weaknesses

This research primarily involves leveraging LLMs to generate negative samples of similar image descriptions based on the original descriptions, followed by synthesizing the corresponding images using text-to-image models. It is well-known that using synthetic data can easily lead to model overfitting. Consequently, various techniques are typically employed to enhance data diversity, such as data augmentation. It would be intuitive to explore whether utilizing multiple models (multiple LLMs and text-to-image models) during the synthesis process might yield better results. I would be interested in seeing an analysis related to this issue, which could make this paper comprehensive.

Questions

See Weaknesses.

Rating

6

Confidence

3

Soundness

3

Presentation

3

Contribution

2

Limitations

Yes

Reviewer ZTUH2024-08-09

Thanks for the response. I have no more concerns.

Reviewer U1Yz2024-08-11

Thanks for authors' explanation. Although the methodology is simple and the results are actually not surprising to me as it is pretty intuitive that constructing such “hard” negative would lead to improvements, the additional analytical experiments and analysis could be interesting. I would raise my score to 5.

Authorsrebuttal2024-08-12

Reply to Reviewer U1Yz

Thank you for raising the score. While incorporating hard negative scores might seem obvious, much of the existing literature overlooks the significance of negative images and how to utilize them effectively. Through this work, we aim to offer a more comprehensive perspective on compositionality and demonstrate how recent generative models can aid in this, even in their simplest forms.

Reviewer m3ja2024-08-11

Thank you for the detailed response. I appreciate additional experiments that you provided. I have no further concerns. Overall, I’m looking forward to the dataset that you will provide.

Authorsrebuttal2024-08-12

Reply to Reviewer m3ja

Thank you for all your time and attention given to our work. We are pleased to see that all concerns have been effectively addressed. Yes, we are planning to release the all versions of the TripletData (CC3M, CC12M, and High-quality filtered version -- 2.8M).

Area Chair m6zB2024-08-12

Please read the author rebuttal, other reviews and respond to the authors NOW!

Dear Reviewers, Thanks to those of you who already responded to the authors acknowledging the rebuttal and asking follow-up questions if any. Those who have not responded yet, please do the following ASAP: thoroughly read the rebuttal, the other reviews and respond to the authors about whether all your questions / concerns have been addressed or not. If not, please elaborate on which questions / concerns are still not addressed so that the authors have fair chance of addressing them before the author-reviewer discussion period ends in ~41 hours from now (August 13th, 11:59pm AoE). Your AC

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC