Fine-grained Textual Inversion Network for Zero-Shot Composed Image Retrieval

Haoqiang Lin, Haokun Wen, Xuemeng Song, Meng Liu, Yupeng Hu, Liqiang Nie · DOI

Abstract

Composed Image Retrieval (CIR) allows users to search target images with a multimodal query, comprising a reference image and a modification text that describes the user's modification demand over the reference image. Nevertheless, due to the expensive labor cost of training data annotation, recent researchers have shifted to the challenging task of zero-shot CIR (ZS-CIR), which targets fulfilling CIR without annotated triplets. The pioneer ZS-CIR studies focus on converting the CIR task into a standard text-to-image retrieval task by pre-training a textual inversion network that can map a given image into a single pseudo-word token. Despite their significant progress, their coarse-grained textual inversion may be insufficient to capture the full content of the image accurately. To overcome this issue, in this work, we propose a novel Fine-grained Textual Inversion Network for ZS-CIR, named FTI4CIR. In particular, FTI4CIR comprises two main components: fine-grained pseudo-word token mapping and tri-wise caption-based semantic regularization. The former maps the image into a subject-oriented pseudo-word token and several attribute-oriented pseudo-word tokens to comprehensively express the image in the textual form, while the latter works on jointly aligning the fine-grained pseudo-word tokens to the real-word token embedding space based on a BLIP-generated image caption template. Extensive experiments conducted on three benchmark datasets demonstrate the superiority of our proposed method.

Introduction

Composed Image Retrieval (CIR) is a multimodal search task where a user provides a reference image and a text snippet specifying desired modifications (e.g., "this dress, but with 3/4 sleeves and in black and white"). While powerful, training CIR models typically requires large-scale datasets of (reference image, modification text, target image) triplets, which are prohibitively expensive to curate.

To address this, researchers have turned to Zero-Shot CIR (ZS-CIR). The prevailing strategy involves "textual inversion"—mapping a reference image into a single pseudo-word token ($S^*$) within a pre-trained multimodal space like CLIP. This allows the retrieval task to be treated as a standard text-to-image search. However, a single token often fails to capture the intricate details of an image, leading to a "coarse-grained" representation that struggles with specific attribute modifications.

Methodology: FTI4CIR

The proposed FTI4CIR (Fine-grained Textual Inversion for CIR) framework addresses the limitations of coarse-grained inversion by decomposing an image into multiple descriptive tokens.

Fine-grained Pseudo-word Mapping

Instead of a single token, FTI4CIR maps the reference image into a subject-oriented token ($S^*$) and a set of attribute-oriented tokens ($A_1^*, \dots, A_r^*$). This is achieved through a Dynamic Local Attribute Feature Extraction module. Using a Transformer-based architecture, the model aggregates local image patches and filters them based on their relevance to the global context, ensuring that only significant visual attributes are captured. To prevent redundancy among these tokens, an Orthogonal Loss is applied, forcing each attribute token to represent a distinct visual feature.

Comparison between existing coarse-grained textual inversion and the proposed fine-grained approach (FTI4CIR).

Tri-wise Caption-based Semantic Regularization

To ensure these pseudo-tokens are compatible with the pre-trained CLIP text encoder, the authors introduce a regularization technique using BLIP-generated captions. By aligning the pseudo-tokens with real-word embeddings from these captions at three levels—subject-wise, attribute-wise, and full-caption—the model learns to place these tokens correctly within the linguistic structure of a query.

Experiments and Results

FTI4CIR was trained on an unlabeled subset of ImageNet-1K and evaluated on three major benchmarks: FashionIQ, CIRR, and CIRCO.

  • FashionIQ: The model achieved an average R@10 of 29.39%, outperforming previous state-of-the-art (SOTA) methods like SEARLE and Pic2Word.
  • CIRR: It reached an average R@1 of 25.90%, showing strong performance in open-domain natural scenes.
  • CIRCO: On this challenging benchmark designed to account for multiple valid target images, FTI4CIR achieved a mAP@5 of 15.05%, a nearly 30% relative improvement over existing zero-shot techniques.

Qualitative results demonstrate that FTI4CIR is significantly more sensitive to complex, fine-grained text modifications compared to its predecessors. For instance, in cases where users asked for specific changes like "only one cup, heavily filled, on a wooden counter," FTI4CIR successfully retrieved the target where older models failed.

Conclusion

FTI4CIR represents a significant advancement in Zero-Shot Composed Image Retrieval by moving from coarse-grained to fine-grained textual inversion. By explicitly modeling subjects and attributes, the framework captures the visual nuances necessary for precise multimodal search. Future work will explore extending this fine-grained logic to multi-turn, interactive retrieval scenarios to better reflect real-world user behavior.

Summary updated

BibTeX
@inproceedings{lin2024fine,
  author = {Haoqiang Lin and Haokun Wen and Xuemeng Song and Meng Liu and Yupeng Hu and Liqiang Nie},
  title = {{Fine-grained Textual Inversion Network for Zero-Shot Composed Image Retrieval}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2024},
  doi = {10.1145/3626772.3657831},
}
Figure