ELIP: Enhanced Visual-Language Foundation Models for Image Retrieval

Guanqi Zhan, Yuanpei Liu, Kai Han, Weidi Xie, Andrew Zisserman · OpenReview

Abstract

The objective in this paper is to improve the performance of text-to-image retrieval. To this end, we introduce a new framework that can boost the performance of large-scale pre-trained vision-language models, so that they can be used for text-to-image re-ranking. The approach, Enhanced Language-Image Pre-training (ELIP), uses the text query, via a simple MLP mapping network, to predict a set of visual prompts to condition the ViT image encoding. ELIP can easily be applied to the commonly used CLIP, SigLIP and BLIP-2 networks. To train the architecture with limited computing resources, we develop a 'student friendly' best practice, involving global hard sample mining, and curation of a large-scale dataset. On the evaluation side, we set up two new out-of-distribution (OOD) benchmarks, Occluded COCO and ImageNet-R, to assess the zero-shot generalisation of the models to different domains. The results demonstrate that ELIP significantly boosts CLIP/SigLIP/SigLIP-2 text-to-image retrieval performance and outperforms BLIP-2 on several benchmarks, as well as providing an easy means to adapt to OOD datasets.

Introduction

Modern text-to-image retrieval typically follows a two-stage pipeline: a fast initial ranking of millions of images followed by a precise re-ranking of the top candidates. While foundation models like CLIP and SigLIP are highly effective for the initial stage, they are limited by static image embeddings. In these models, the image encoder processes an image identically regardless of the specific text query. To achieve superior retrieval accuracy, models must become "query-aware," allowing the image encoder to focus on features relevant to the search terms. However, training such models from scratch is computationally prohibitive. ELIP addresses this by introducing a lightweight, "student-friendly" framework to add query awareness to existing frozen foundation models.

Methodology

Text-Guided Visual Prompting

The core of the ELIP framework is a Text-Guided MLP Mapping Network. Instead of treating text and image features as independent vectors until the final comparison, ELIP uses the text query to "steer" the image encoding process.

  1. Visual Prompting: A small MLP maps the text query into a set of visual prompt vectors.
  2. Early Fusion: These prompts are concatenated with standard image patch tokens and fed into a frozen Vision Transformer (ViT) image encoder.
  3. Query-Aware Encoding: The ViT’s self-attention mechanism allows image features to attend to the text-derived prompts. This results in an image embedding that is dynamically tuned to the specific search query.
The ELIP framework uses a text-guided MLP to generate visual prompts, conditioning the frozen image encoder for precise re-ranking.

Efficient Training and Hard Sample Mining

To train ELIP effectively with limited resources, the authors developed a strategy involving Global Hard Sample Mining. By grouping images that are visually similar but semantically distinct into the same training batch, the model is forced to learn the fine-grained nuances required to distinguish a correct match from a "hard negative."

The training strategy utilizes global hard sample mining to improve discriminative power during the pre-training phase.

Evaluation and Results

ELIP was evaluated across standard benchmarks (MS-COCO, Flickr30k) and two new out-of-distribution (OOD) benchmarks: Occluded COCO (partially hidden objects) and ImageNet-R (artistic renditions).

  • Performance Gains: ELIP consistently outperformed base models. On COCO, ELIP-C (CLIP-based) improved Recall@1 from 40.2% to 45.6%, while ELIP-S (SigLIP-based) rose from 54.2% to 61.0%.
  • State-of-the-Art Re-ranking: ELIP-B (based on BLIP-2) achieved a Recall@1 of 68.4% on COCO, outperforming previous state-of-the-art re-ranking models.
  • Robustness and Efficiency: ELIP models showed significantly higher mAP on Occluded COCO, proving that query-aware encoding helps identify objects even in difficult visual conditions. Notably, ELIP-C was trained in just 144 hours on two A40 GPUs, a fraction of the resources required for original foundation model training.

Conclusion

ELIP demonstrates that massive foundation models can be significantly enhanced for retrieval tasks without expensive fine-tuning of the backbone. By using a tiny, trainable MLP to provide visual prompts, ELIP achieves state-of-the-art performance and improved robustness. This approach democratizes the ability to adapt large-scale models to specific, high-precision retrieval tasks.

Summary updated

BibTeX
@misc{zhan2025elip,
  author = {Guanqi Zhan and Yuanpei Liu and Kai Han and Weidi Xie and Andrew Zisserman},
  title = {{ELIP: Enhanced Visual-Language Foundation Models for Image Retrieval}},
  year = {2025},
  eprint = {2502.15682},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.15682},
}
Figure