SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.15120 · EACL Findings · 2024

Fine-tuning CLIP Text Encoders with Two-step Paraphrasing

Trung Bui, Handong Zhao, Jaewoo Kang, Franck Dernoncourt, Seunghyun Yoon, Quan Tran, Hyunjae Kim

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 3 functions out of this paper's own repositories and ran 3 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
mlfoundations/open_clip — 3 of 3
FunctionStatusWhere it lives
GenLipLoss Ran mlfoundations/open_clip/src/open_clip/loss.py
pointer only (licence: NOASSERTION) · get_code("bdfa567e4c5010da")
caption_cross_entropy Ran mlfoundations/open_clip/src/open_clip/loss.py
pointer only (licence: NOASSERTION) · get_code("efde606d2f18e7d1")
resolve_caption_loss_dtype Ran mlfoundations/open_clip/src/open_clip/loss.py
pointer only (licence: NOASSERTION) · get_code("416baf9c9f70dfb7")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Contrastive language-image pre-training (CLIP) models have demonstrated considerable success across various vision-language tasks, such as text-to-image retrieval, where the model is required to effectively process natural language input to produce an accurate visual output. However, current models still face limitations in dealing with linguistic variations in input queries, such as paraphrases, making it challenging to handle a broad range of user queries in real-world applications. In this study, we introduce a straightforward fine-tuning approach to enhance the representations of CLIP models for paraphrases. Our approach involves a two-step paraphrase generation process, where we automatically create two categories of paraphrases from web-scale image captions by leveraging large language models. Subsequently, we fine-tune the CLIP text encoder using these generated paraphrases while freezing the image encoder. Our resulting model, which we call ParaCLIP, exhibits significant improvements over baseline CLIP models across various tasks, including paraphrased retrieval (with rank similarity scores improved by up to 2.0% and 5.6%), Visual Genome Relation and Attribution, as well as seven semantic textual similarity tasks.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2402.15120")
get_code_for_paper("2402.15120")
have("2402.15120")

Connect an agent — have() is free.