Referring Expression Instance Retrieval and A Strong End-to-End Baseline

Xiangzhao Hao, Kuan Zhu, Hongyu Guo, Haiyun Guo, Ning Jiang, Quan Lu, Ming Tang, Jinqiao Wang · OpenReview

Abstract

Using natural language to query visual information is a fundamental need in real-world applications. Text-Image Retrieval (TIR) retrieves a target image from a gallery based on an image-level description, while Referring Expression Comprehension (REC) localizes a target object within a given image using an instance-level description. However, real-world applications often present more complex demands. Users typically query an instance-level description across a large gallery and expect to receive both the relevant image and the corresponding instance location. In this paper, we introduce a new task called Referring Expression Instance Retrieval (REIR), which supports both instance-level retrieval and localization based on fine-grained referring expressions. We propose a large-scale benchmark, REIRCOCO, and a strong baseline method, CLARE (Contrastive Language-Instance Alignment with Relation Experts), which employs a dual-stream architecture to address REIR in an end-to-end manner.

Introduction: Finding the Needle in the Visual Haystack

Imagine searching through a massive surveillance archive or a personal photo library. You don't just want to find an image of a "living room"; you want to find the specific "brown dog lying on a cushion near the fireplace with a red rug underneath."

Current AI models usually tackle this in two separate ways: Text-Image Retrieval (TIR) finds the right image but cannot point to the object, while Referring Expression Comprehension (REC) finds the object but only works if you already have the correct image. Researchers from the Chinese Academy of Sciences and Mashang Consumer Finance have introduced a unified task to bridge this gap: Referring Expression Instance Retrieval (REIR).

The core issue in modern visual search is a "granularity gap." TIR models, such as CLIP, are excellent at global image search but ignore spatial localization and struggle with detailed, instance-level descriptions. Conversely, REC models are experts at localization but are computationally expensive. They rely on early cross-modal fusion, meaning to search a gallery of 5,000 images, the model must be run 5,000 times for a single query—a significant scaling challenge.

Comparison of Text-Image Retrieval (TIR), Referring Expression Comprehension (REC), and the proposed Referring Expression Instance Retrieval (REIR) task.

REIR demands a system that is both efficient (like TIR) and precise (like REC). It requires a model to identify the single correct bounding box out of potentially millions of candidates across an entire image gallery.

CLARE: An End-to-End Baseline for REIR

To address the REIR task, the authors propose CLARE (Contrastive Language-Instance Alignment with Relation Experts). CLARE is designed for efficiency and precision through three primary innovations:

  1. Dual-Stream Efficiency: Unlike many REC models, CLARE decouples text and image encoding. This allows visual features for an entire gallery to be precomputed, enabling rapid retrieval.
  2. Mix of Relation Experts (MORE): Referring expressions often rely on spatial relationships (e.g., "to the left of"). The text branch uses a "Mixture of Experts" approach, dynamically routing the query to specialized sub-networks that focus on different types of relational semantics.
  3. Contrastive Language-Instance Alignment (CLIA): The model is optimized using an instance-level adaptation of the SigLIP loss function. Instead of matching a sentence to an image, the model learns to match a sentence to a specific bounding box while contrasting it against all other objects in the batch.
The CLARE architecture for Referring Expression Instance Retrieval and sample descriptions from the REIRCOCO dataset.

The REIRCOCO Dataset

Existing datasets often lack the unambiguous descriptions necessary for gallery-wide search. To facilitate REIR research, the authors created REIRCOCO, a large-scale benchmark based on MSCOCO and RefCOCO. The dataset includes 30,106 images and 215,835 object instances, featuring 613,548 verified descriptions.

The construction involved an "LLM-in-the-loop" pipeline: GPT-4o generated detailed, unique descriptions for every object, while DeepSeek R1 acted as a filter to prune ambiguous or low-quality samples, ensuring high-quality grounding data.

Key Insights and Results

The authors demonstrate that the common "two-stage" approach—using TIR to find images and then REC to find boxes—is suboptimal due to error propagation. If the TIR model misses the correct image, the REC model never sees it. CLARE’s end-to-end approach avoids this pitfall.

Performance Highlights: * State-of-the-Art: CLARE-ViT-L achieved a 29.53% Box Recall at top-1 (BR@1), nearly doubling the performance of strong two-stage baselines like CLIP + DeepSeek-VL2 (~13.3%). * Versatility: CLARE remains highly competitive on standard REC benchmarks (like RefCOCO) and TIR tasks, showing robust generalization. * Relational Reasoning: The MORE module significantly boosts performance by effectively routing appearance-based vs. relation-based queries.

Limitations and Future Work

Despite its success, CLARE faces challenges in extremely dense scenes with multiple similar objects or rare spatial configurations. Future work may involve incorporating stronger reasoning capabilities through larger multi-modal backbones to further resolve fine-grained ambiguities in complex visual environments.

Summary updated

BibTeX
@inproceedings{hao2025referring,
  author = {Xiangzhao Hao and Kuan Zhu and Hongyu Guo and Haiyun Guo and Ning Jiang and Quan Lu and Ming Tang and Jinqiao Wang},
  title = {{Referring Expression Instance Retrieval and A Strong End-to-End Baseline}},
  booktitle = {ACM Multimedia},
  year = {2025},
  doi = {10.1145/3746027.3755457},
}
Figure