Pre-trained vision-language models (VLMs) excel in multimodal tasks, commonly encoding images as embedding vectors for storage in databases and retrieval via approximate nearest neighbor search (ANNS). However, these models struggle with compositional queries and out-of-distribution (OOD) image-text pairs. Inspired by human cognition's ability to learn from minimal examples, we address this performance gap through few-shot learning approaches specifically designed for image retrieval. We introduce the Few-Shot Text-to-Image Retrieval (FSIR) task and its accompanying benchmark dataset, FSIR-BD - the first to explicitly target image retrieval by text accompanied by reference examples, focusing on the challenging compositional and OOD queries. The compositional part is divided to urban scenes and nature species, both in specific situations or with distinctive features. FSIR-BD contains 38,353 images and 303 queries, with 82% comprising the test corpus (averaging per query 37 positives, ground truth matches, and significant number of hard negatives) and 18% forming the few-shot reference corpus (FSR) of exemplar positive and hard negative images. Additionally, we propose two novel retrieval optimization methods leveraging single shot or few shot reference examples in the FSR to improve performance. Both methods are compatible with any pre-trained image encoder, making them applicable to existing large-scale environments. Our experiments demonstrate that: (1) FSIR-BD provides a challenging benchmark for image retrieval; and (2) our optimization methods outperform existing baselines as measured by mean Average Precision (mAP). Further research into FSIR optimization methods will help narrow the gap between machine and human-level understanding, particularly for compositional reasoning from limited examples.
Figures & tables
Figure 1: Example of FSIR-BD. Per query text we have multiple positive and hard-negative images.
Table 1: Analysis of quantitative and benchmarking aspects of FSIR-BD, CIRR and CIRCO datasets.
Prompt learning training employs learnable vectors with positive-negative image pairs to optimize context vectors, establishing an effective decision boundary for 1-way retrieval tasks.
Figure 2: BLIP scores fall within [0.1,0.5]; learnable scaling factors a,b map these to the full BCE range [0,1].
Figure 3: FSIR-CTR training architecture. The reference image plus text query are input to the MLLM, which fuse them and align the result to the external image encoder’s embedding space.
Figure 4: Query text plus reference image vs. target images from FSIR-TD.
VG
INQUIRE
OOD
Average
BLIP-L
41
28.2
15
28
BLIP-L PL
45.9
33
32.9
37.3
FSIR-CTR-Phi-3.5-BLIP-L
40.8
29.2
24.6
31.5
CLIP-L
25.9
34.5
27.7
29.4
CLIP-L PL
28.3
42.7
48.6
39.9
FSIR-CTR-Phi-3.5-CLIP-L
29.7
33
28.2
30.3
Table 2: mAP retrieval performance on FSIR-BD. Values in italic represent baseline performance for each image encoder, while values in bold indicate the results of best model performance and values in underline indicate the second best results.
Baseline
1
2
4
8
16
Compositional-VG
41
34.4
37.1
41.7
43.1
45.9
Compositional-Inquire
28.2
24.9
25.9
27.3
28.8
33
OOD
15
18.7
19.9
21
22.5
32.9
Table 3: mAP retrieval performance on FSIR-BD for different number of shots for BLIP-L PL. Values in italic represent baseline performance for each image encoder, values in underline indicate higher than baseline results, while values in bold indicate the results of best model performance.
Figure 5: Example pf FSIR-BD-Compositional-VG data. Per text query we provide multiple positive images and negative images.
Figure 6: Example pf FSIR-BD-Compositional-Inquire data. Per text query we provide multiple positive images and negative images.
Figure 7: Example pf FSIR-BD-OOD data. Per text query we provide multiple positive images and negative images.
Semantic aspect
FSIR
CIRR
CIRCO
Examples
Attributes
49.8%
63.0%
“blond girl or woman on a wooden bench”, “red brick building with signage”, “female beautiful demoiselle”, “male Northern Elephant Seal”.
Actions
17.8%
47.0%
“adults play with children”, “pedestrian crossing a street near park”, “macaques engaging in mutual grooming behavior”, “Dolphins performing acrobatics”.
Spatial relationships
20.5%
61.4%
45.7%
“adult and child on staircase or platform or escalator”, “bus next to blue or red sign”, “bike chained illegally to a street lamp post or traffic sign but not to fence”, “grebe with babies on its back”.
Conjunctions (and, with…)
23.4%
43.7%
75.1%
“man and woman both wearing glasses”, “dark shirt and backpack on man in park”, “Male Blue-black Grassquit in patchy blue-black and brown plumage”
Disjunctions (or, either)
10.6%
14.0%
“adult and child on staircase or platform or escalator”, “window with curtains that are not red or yellow”
Negations
6.6%
11.9%
12.2%
“bike chained illegally … but not to fence”, “pedestrians … with a car that is not white”, “red brick residential building without emergency ladder”, “Caribou without palmate antlers”.
Table 4: Analysis of semantic aspects covered by FSIR-BD, CIRR and CIRCO datasets, with examples from the FSIR-BD.
Figure 8: Example of FSIR-TD. Per query text we have multiple positive and hard-negative images.
VG
INQUIRE
OOD
Average
BLIP-L
41
28.2
15
28
Phi-3.5-E5V
31.4
28.6
28.6
29.5
FSIR-CTR-Phi-3.5-BLIP-L
40.8
29.2
24.6
31.5
Table 5: mAP retrieval performance on FSIR-BD. Values in italic represent baseline performance for each image encoder, while values in bold indicate the results of best model performance and values in underline indicate the second best results.
Composed image retrieval requires identifying a target image from a gallery by integrating a reference image with a textual modification instruction. In a training-free zero-shot setting, this task relies on constructing a retrieval-oriented textual query within a frozen vision--language embedding space at inference time. Existing approaches predominantly rely on a single-pass generation strategy that fuses the reference context and modification text into a unified description. This strategy makes it difficult to detect or correct semantic distortions and omissions during generation. Consequently, the preservation of reference attributes and the integration of textual requirements interfere with each other, which degrades retrieval precision. To address these challenges, we introduce PEC-CIR, a training-free framework that structures query construction as a multi-stage reasoning pipeline. The framework operates through a Planner--Executor--Critic architecture where the Planner extracts explicit constraints, the Executor generates multiple candidate target descriptions, and the Critic evaluates these candidates based on constraint compliance. By reframing query construction as a staged inference process instead of a single-pass output, PEC-CIR reduces the propagation of generative errors by explicitly evaluating candidate queries before retrieval, thereby improving retrieval stability.
Gunho Jung, Jeong-Woo Park, Seon Bin Kim +1
Department of Artificial Intelligence, Korea University, Seoul, 02841, Republic of Korea
Recent work has shown that "Vision-Free'' approaches (representing images as text) can be effective for standard image retrieval tasks. However, it remains unclear whether this paradigm can effectively handle a more complex, multimodal task, Composed Image Retrieval (CIR), due to the inherent information loss in textual descriptions. In this paper, we introduce a Vision-Free CIR framework that addresses this challenge through two key techniques: (1) Attribute-Augmented Hybrid Scoring, which compensates for lost visual details via explicit attribute matching, and (2) LLM-Based Reranking, which verifies semantic consistency of top candidates. Experiments on the open-domain CIRR dataset show that our approach outperforms existing Zero-shot CIR methods (44.04% R@1, +8.79%). On FashionIQ, our results highlight the trade-off between semantic reasoning and fine-grained visual matching. Ablation studies reveal that both attribute-augmented scoring and LLM-Based Reranking consistently improve performance.
Composed image retrieval (CIR) aims to retrieve a target image that depicts a reference image modified by a textual description. While recent vision-language models (VLMs) achieve promising CIR performance by embedding images and text into a shared space for retrieval, they often fail to reason about what to preserve and what to change. This limitation hinders interpretability and yields suboptimal results, particularly in fine-grained domains like fashion. In this paper, we introduce FIRE-CIR, a model that brings compositional reasoning and interpretability to fashion CIR. Instead of relying solely on embedding similarity, FIRE-CIR performs question-driven visual reasoning: it automatically generates attribute-focused visual questions derived from the modification text, and verifies the corresponding visual evidence in both reference and candidate images. To train such a reasoning system, we automatically construct a large-scale fashion-specific visual question answering dataset, containing questions requiring either single- or dual-image analysis. During retrieval, our model leverages this explicit reasoning to re-rank candidate results, filtering out images inconsistent with the intended modifications. Experimental results on the Fashion IQ benchmark show that FIRE-CIR outperforms state-of-the-art methods in retrieval accuracy. It also provides interpretable, attribute-level insights into retrieval decisions.
François Gardères, Camille-Sovanneary Gauthier, Jean Ponce +1
Louis Vuitton · Inria, École normale supérieure, CNRS, PSL Research University · Courant Institute of Mathematical Sciences and Center for Data Science, New York University