Skip to main content
QUICK REVIEW

[Paper Review] IRGen: Generative Modeling for Image Retrieval

Yidan Zhang, Ting Zhang|arXiv (Cornell University)|Mar 17, 2023
Multimodal Machine Learning ApplicationsComputer Science3 citations
TL;DR

IRGen proposes a novel end-to-end generative modeling framework for image retrieval by treating image retrieval as a sequence-to-sequence task using a Transformer-based autoregressive model. It introduces a semantic image tokenizer that enables short, meaningful visual token sequences, achieving state-of-the-art performance—20.2% higher precision@10 on In-shop compared to the best baseline—while maintaining high recall through direct optimization from raw images to retrieval targets.

ABSTRACT

While generative modeling has become prevalent across numerous research fields, its integration into the realm of image retrieval remains largely unexplored and underjustified. In this paper, we present a novel methodology, reframing image retrieval as a variant of generative modeling and employing a sequence-to-sequence model. This approach is harmoniously aligned with the current trend towards unification in research, presenting a cohesive framework that allows for end-to-end differentiable searching. This, in turn, facilitates superior performance via direct optimization techniques. The development of our model, dubbed IRGen, addresses the critical technical challenge of converting an image into a concise sequence of semantic units, which is pivotal for enabling efficient and effective search. Extensive experiments demonstrate that our model achieves state-of-the-art performance on three widely-used image retrieval benchmarks as well as two million-scale datasets, yielding significant improvement compared to prior competitive retrieval methods. In addition, the notable surge in precision scores facilitated by generative modeling presents the potential to bypass the reranking phase, which is traditionally indispensable in practical retrieval workflows.

Motivation & Objective

  • To explore generative modeling for image retrieval, an area previously unexplored despite its success in NLP and vision.
  • To unify the traditionally separate stages of feature extraction and approximate nearest neighbor (ANN) search into a single end-to-end differentiable model.
  • To address the challenge of representing images as short, semantically meaningful sequences of tokens suitable for autoregressive generation.
  • To enable direct optimization from raw images to retrieval performance, bypassing heuristic pipeline stages.

Proposed method

  • Employ a sequence-to-sequence Transformer architecture to generate visual tokens that identify the nearest neighbor of a query image.
  • Design a semantic image tokenizer that injects image-level supervision instead of pixel-level supervision to improve semantic fidelity.
  • Leverage residual quantization’s recursive structure to generate dependent visual tokens in a sequence, enhancing modeling of semantic relationships.
  • Use global image features instead of patch embeddings to drastically reduce sequence length, improving inference speed.
  • Train the model end-to-end using contrastive learning objectives to align predicted visual tokens with ground-truth nearest neighbors.
  • Integrate beam search inference with validity checks to ensure predicted tokens correspond to actual images in the database.

Experimental results

Research questions

  • RQ1Can generative modeling be effectively applied to image retrieval, treating it as a sequence-to-sequence task?
  • RQ2How can images be represented as short, semantically meaningful sequences of visual tokens to enable efficient autoregressive retrieval?
  • RQ3Can end-to-end training of a generative model outperform conventional two-stage pipelines (feature extraction + ANN search) in image retrieval?
  • RQ4How does the model scale to million-level datasets such as ImageNet and Places365?
  • RQ5How does the model handle dynamic databases with fresh data not seen during training?

Key findings

  • IRGen achieves 20.2% higher precision@10 than the best baseline on the In-shop Clothes dataset, while maintaining comparable recall.
  • On CUB200 and Cars196, IRGen improves precision@2 by 6.0% and 2.4%, respectively, over strong baselines.
  • On ImageNet and Places365, IRGen achieves the highest MAP@100 (76.0 and 44.3, respectively), outperforming CLIP and fine-tuned CLIP.
  • The model maintains high recall (97.1% at precision@1) even as precision drops with increasing K, indicating robustness in top-k retrieval.
  • Beam search inference with beam size 10 takes ~0.19s per query, demonstrating acceptable inference speed for a generative retrieval model.
  • The model suffers a drastic precision drop when handling fresh data not in the training set, indicating a need for dynamic update mechanisms.

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.