Abstract
Image-text contrastive learning models like CLIP have revolutionized task transfer in computer vision. However, achieving high generality typically requires massive web-scale data collection and expensive pre-training to embed knowledge directly into model weights. We propose REACT (REtrieval-Augmented CusTomization), a framework that acquires relevant web knowledge to build customized visual models for specific target domains. By retrieving a small, relevant subset of image-text pairs (~3% of CLIP's pre-training data) and training only new modularized blocks while freezing original weights, REACT achieves significant performance gains. Our experiments demonstrate improvements across classification, retrieval, detection, and segmentation tasks, including a 5.4% improvement on ImageNet and a 3.7% average boost on the ELEVATER benchmark.
Introduction
The prevailing paradigm in computer vision follows a two-stage pipeline: pre-training on massive datasets followed by adaptation to downstream tasks. To improve performance, the field has largely focused on scaling—increasing data volume, model parameters, and training duration. However, this "generalist" approach is often inefficient. Unlike current models that attempt to memorize everything, humans specialize by focusing on relevant information to master specific domains.
REACT addresses this gap by introducing a "customization" stage between pre-training and adaptation. Instead of relying solely on the limited samples available in a target task, REACT systematically leverages "external knowledge"—billions of image-text pairs available on the web—to bridge the gap between a general foundation model and specialized downstream applications.
The REACT Framework
1. Multi-modal Retrieval
To specialize a model, REACT first identifies relevant external knowledge. We utilize a large-scale indexing system (via FAISS) over the LAION-400M dataset. When presented with a new task, such as identifying specific car models, the framework uses the task's class names as queries. To ensure a diverse and accurate knowledge base, REACT employs two retrieval strategies:
- Text-to-Text (T2T): Retrieving captions that match the semantic description of the task.
- Text-to-Image (T2I): Retrieving images that align with the task's visual requirements.
2. Modularized Customization
Rather than fine-tuning the entire model—which is computationally expensive and risks "catastrophic forgetting" of general features—REACT employs Locked-text Gated-image tuning:
- Frozen Backbone: The original text encoder and image encoder weights remain frozen.
- Gated Blocks: New "gated self-attention" and "dense blocks" are inserted into the image encoder.
- Efficient Training: Only these lightweight, modular blocks are trained on the retrieved web data. This allows the model to acquire domain-specific features while preserving its foundational knowledge.
Experimental Results
Zero-Shot Classification
REACT demonstrates superior performance in zero-shot settings. On ImageNet-1K, REACT (using a ViT-L/14 backbone) achieved 78.5% accuracy, representing a 3.2% improvement over standard CLIP. Notably, it outperformed models trained on significantly larger datasets (such as LAION-2B) by focusing on a more relevant data subset.
Broad Generalization (ELEVATER Benchmark)
To test the framework's versatility, we evaluated it on the ELEVATER benchmark, which consists of 20 diverse image classification datasets (e.g., Stanford Cars, FGVC Aircraft). REACT provided an average performance boost of 3.7% across these datasets, proving its effectiveness across varied domains.
Transfer to Dense Tasks
The benefits of customization extend beyond classification. In object detection and semantic segmentation tasks on MSCOCO, REACT improved performance by up to +1.9 AP50. This suggests that the customized features are not only semantically rich but also spatially robust.
Discussion and Insights
- The Power of Focused Data: A key finding is that REACT improves performance even when retrieving data the model may have already seen during initial pre-training. By focusing the model's capacity on a task-relevant subset (roughly 3% of the original data), the model adapts more effectively than it does during general pre-training.
- Retrieval as Supervision: Web captions provide richer semantic information than simple class labels. This natural language supervision helps the model learn fine-grained visual distinctions that are often absent in standard supervised datasets.
- Efficiency: REACT achieves these gains with high efficiency, requiring only a fraction of the data and compute compared to full-scale pre-training or global fine-tuning.
Limitations and Future Work
While powerful, REACT's performance is inherently limited by the contents of its retrieval database. For instance, performance gains were lower on specialized datasets like PatchCamelyon (medical imaging) because the LAION-400M dataset contains few relevant microscopic images. Additionally, the system is sensitive to noise in web-crawled data. Future research will focus on improving retrieval quality control and extending the framework to larger foundation models and additional modalities.
Summary updated