Skip to main content
QUICK REVIEW

[Paper Review] Sentence-level Prompts Benefit Composed Image Retrieval

Yang Bai, Xinxing Xu|arXiv (Cornell University)|Oct 9, 2023
Multimodal Machine Learning ApplicationsComputer Science5 citations
TL;DR

This paper proposes Sentence-level Prompt for Composed Image Retrieval (SPRC), a novel method that generates rich, descriptive sentence-level prompts from both reference images and relative captions using pretrained vision-language models like BLIP-2. By concatenating these prompts with the relative caption, the approach enables effective retrieval using standard text-based image retrieval models, outperforming prior late-fusion and pseudo-word-based methods, especially on complex changes like object removal and attribute modification, achieving state-of-the-art performance on Fashion-IQ and CIRR datasets.

ABSTRACT

Composed image retrieval (CIR) is the task of retrieving specific images by using a query that involves both a reference image and a relative caption. Most existing CIR models adopt the late-fusion strategy to combine visual and language features. Besides, several approaches have also been suggested to generate a pseudo-word token from the reference image, which is further integrated into the relative caption for CIR. However, these pseudo-word-based prompting methods have limitations when target image encompasses complex changes on reference image, e.g., object removal and attribute modification. In this work, we demonstrate that learning an appropriate sentence-level prompt for the relative caption (SPRC) is sufficient for achieving effective composed image retrieval. Instead of relying on pseudo-word-based prompts, we propose to leverage pretrained V-L models, e.g., BLIP-2, to generate sentence-level prompts. By concatenating the learned sentence-level prompt with the relative caption, one can readily use existing text-based image retrieval models to enhance CIR performance. Furthermore, we introduce both image-text contrastive loss and text prompt alignment loss to enforce the learning of suitable sentence-level prompts. Experiments show that our proposed method performs favorably against the state-of-the-art CIR methods on the Fashion-IQ and CIRR datasets. The source code and pretrained model are publicly available at https://github.com/chunmeifeng/SPRC

Motivation & Objective

  • To address the limitations of existing composed image retrieval (CIR) methods in handling complex visual changes, such as object removal and attribute modification.
  • To overcome the shortcomings of pseudo-word-based prompting, which fails to decouple multiple objects in reference images due to short, monolithic token representations.
  • To propose a new prompting strategy that leverages both visual and linguistic context for more precise, expressive descriptions of image changes.
  • To demonstrate that sentence-level prompts, rather than pseudo-words or late fusion, yield superior retrieval performance on benchmark CIR datasets.

Proposed method

  • Leverage a pretrained vision-language model (e.g., BLIP-2) to generate sentence-level prompts from the reference image and relative caption using a lightweight Q-Former module.
  • Concatenate the generated sentence-level prompt with the relative caption to form an enhanced text query for retrieval.
  • Train the prompt generation network using a dual loss: image-text contrastive loss and text prompt alignment loss to ensure semantic consistency and accuracy.
  • Use a Q-Former as the text prompt generation network, taking both image features and caption embeddings as input to produce contextually grounded sentence-level descriptions.
  • Optimize the model with a balance hyperparameter γ to weight the alignment loss, ensuring the prompt preserves both visual and linguistic information.
  • Fine-tune the entire system end-to-end to improve prompt quality and retrieval performance on CIR benchmarks.
Figure 1: Workflows of existing CIR methods and Ours: (a) Late fusion, (b) pseudo-word embedding, and (c) our proposed method. It can be seen that late fusion and pseudo-word embedding are limited in handling the cases where multiple objects are involved in the reference image and complex changes, e
Figure 1: Workflows of existing CIR methods and Ours: (a) Late fusion, (b) pseudo-word embedding, and (c) our proposed method. It can be seen that late fusion and pseudo-word embedding are limited in handling the cases where multiple objects are involved in the reference image and complex changes, e

Experimental results

Research questions

  • RQ1Can sentence-level prompts derived from both image and caption improve composed image retrieval over pseudo-word-based or late-fusion methods?
  • RQ2How does the length of the sentence-level prompt affect retrieval performance and computational cost?
  • RQ3Does jointly modeling image and caption features in prompt generation lead to better disentanglement of complex visual changes like object removal?
  • RQ4What is the optimal balance between image and text supervision in the prompt generation process for CIR?
  • RQ5Can existing text-based image retrieval models be effectively repurposed for CIR via sentence-level prompt augmentation?

Key findings

  • The proposed SPRC method achieves state-of-the-art performance on both Fashion-IQ and CIRR datasets, outperforming prior methods in handling complex visual changes.
  • On Fashion-IQ, SPRC achieves 54.39% recall@1, 84.76% recall@5, and 91.25% recall@10, significantly outperforming baselines.
  • On CIRR, SPRC achieves 81.27% average recall, surpassing previous methods, particularly on challenging cases involving object removal and attribute modification.
  • Ablation studies show that prompt length has a positive correlation with performance up to 32 tokens, with diminishing returns beyond that.
  • The alignment loss with γ = 0.8 yields optimal performance, indicating that balancing visual and textual supervision is critical for prompt quality.
  • The method outperforms both Ours RC (prompt from caption only) and Ours RI (prompt from image only), confirming the necessity of joint image-caption modeling.
Figure 2: Overall pipeline of our proposed SPRC . (a) Illustration of the training phase, where proper sentence-level prompts are integrated into the relative captions thereby providing essential textual prompts containing information about the objects depicted in the reference images and their rela
Figure 2: Overall pipeline of our proposed SPRC . (a) Illustration of the training phase, where proper sentence-level prompts are integrated into the relative captions thereby providing essential textual prompts containing information about the objects depicted in the reference images and their rela

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.