Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Retrieval-Enhanced Contrastive Vision-Text Models

About

Contrastive image-text models such as CLIP form the building blocks of many state-of-the-art systems. While they excel at recognizing common generic concepts, they still struggle on fine-grained entities which are rare, or even absent from the pre-training dataset. Hence, a key ingredient to their success has been the use of large-scale curated pre-training data aiming at expanding the set of concepts that they can memorize during the pre-training stage. In this work, we explore an alternative to encoding fine-grained knowledge directly into the model's parameters: we instead train the model to retrieve this knowledge from an external memory. Specifically, we propose to equip existing vision-text models with the ability to refine their embedding with cross-modal retrieved information from a memory at inference time, which greatly improves their zero-shot predictions. Remarkably, we show that this can be done with a light-weight, single-layer, fusion transformer on top of a frozen CLIP. Our experiments validate that our retrieval-enhanced contrastive (RECO) training improves CLIP performance substantially on several challenging fine-grained tasks: for example +10.9 on Stanford Cars, +10.2 on CUB-2011 and +7.3 on the recent OVEN benchmark, where we even outperform the fine-tuned models on unseen classes.

Ahmet Iscen, Mathilde Caron, Alireza Fathi, Cordelia Schmid• 2023

Related benchmarks

TaskDatasetResultRank
Text-to-Image RetrievalFlickr30k (test)
Recall@172.6
423
Image-to-Text RetrievalFlickr30k (test)
R@188.5
370
Image ClassificationStanford Cars (test)--
306
Image ClassificationCUB-200-2011 (test)
Top-1 Acc74.8
276
Image-to-Text RetrievalMS-COCO (test)
R@158
99
Image ClassificationStanford Dogs (test)
Top-1 Acc81.3
85
Text-to-Image RetrievalMS-COCO (test)
R@138.7
66
Image ClassificationOxford Flowers (test)
Accuracy84.1
46
Image ClassificationPlaces-365 (val)--
43
Visual Entity RecognitionOVEN (test)
Top-1 Acc (Seen)11.5
7
Showing 10 of 10 rows

Other info

Follow for update