TL;DR
This paper demonstrates that off-the-shelf Multimodal Large Language Models (MLLMs) can be repurposed as highly effective, training-free re-rankers for large-scale, instance-level image retrieval. By framing image similarity as a zero-shot binary classification prompt and applying memory-efficient Product Quantization to visual tokens, the authors achieve state-of-the-art open-world retrieval performance without any domain-specific fine-tuning.
What Problem Does This Paper Address?
Traditional instance-level image retrieval—finding the exact same object across a database rather than just a matching category—typically relies on specialized architectures, global/local descriptors, and extensive domain-specific training. While these methods work well within their training domains (like landmarks), they generalize poorly to open-world scenarios containing diverse object categories.
On the other hand, MLLMs possess rich visual representations learned from massive web-scale pre-training. However, using them directly for image-to-image retrieval is historically seen as impractical due to extreme memory footprints and high computational latency. This paper tackles the challenge of making MLLMs scalable and efficient enough to serve as zero-shot similarity estimators within large-scale image retrieval pipelines.
Methods
The authors propose a practical two-stage retrieval pipeline:
- Coarse Ranking: An initial exhaustive search is performed using compact global descriptors to retrieve a top-$k$ candidate shortlist.
- MLLM Re-ranking: The query image and each candidate database image are fed into an MLLM alongside a task-specific text prompt: "Determine whether the exact same object instance from the query image is present in the candidate image. Output strictly a single digit... 0 or 1."
Instead of letting the model generate text auto-regressively, the authors extract the raw next-token softmax probabilities for the tokens "1" (yes) and "0" (no). The probability of "1" serves as the final re-ranking similarity score.
To make database storage scalable, they compress the database image tokens in advance using Product Quantization (PQ). This divides high-dimensional visual token embeddings into lower-dimensional subspaces represented by compact codes, drastically reducing the memory footprint while allowing the tokens to be reconstructed right before being fed into the language model decoder.
Datasets
The approach was evaluated across several diverse instance-level image retrieval benchmarks:
- ILIAS: A recent, large-scale, multi-domain dataset designed specifically to test open-world instance-level retrieval under challenging conditions.
- INSTRE: A benchmark for instance-level object retrieval and recognition.
- ROP+1M: A dataset focused on robust object patches mixed with a million distractor images.
- Product1M: A dataset tailored for weakly supervised instance-level product retrieval.
Key Insights and Ideas
- Zero-Shot Similarity via Next-Token Probabilities: Treating an MLLM as a binary classifier via its internal token logits bypasses the need for specialized similarity-learning heads or contrastive fine-tuning.
- Appearance Trumps Geometry: By shuffling the positional encodings of the visual patches before the language model decoder, the authors discovered only a minor drop in performance. This reveals that the MLLM primarily relies on rich appearance cues rather than strict geometric consistency to determine object identity.
- Quantization Beats Pruning: Surprisingly, standard Product Quantization (PQ) provided a significantly better accuracy-memory trade-off than advanced token-pruning methods (like DivPrune) or clustering techniques. Compressing tokens via PQ preserved essential fine-grained details better than discarding tokens entirely.
Key Results
- Massive Accuracy Gains: On the challenging ILIAS dataset, uncompressed Qwen variants achieved over a 22-point increase in mAP@1k compared to global descriptor baselines.
- Superior Robustness: MLLM re-rankers showed exceptional robustness in handling small objects, heavy background clutter, and partial occlusions, consistently outperforming task-specific re-rankers like AMES outside their native training domains.
- Favorable Time-Budget Scaling: While MLLMs have higher per-image inference latency than lightweight local descriptor matchers, they scale significantly better under a fixed query-time budget, achieving superior retrieval performance with as few as 20 re-ranked images.
Limitations and Future Work
Despite their strong open-world generalization, MLLMs exhibit distinct failure modes:
- Sensitivity to Drastic Appearance Changes: The models struggle with severe illumination changes (e.g., day vs. night) and significant motion blur, where specialized local descriptor methods like AMES still hold an advantage.
- Inference Latency: Processing pairs of images through a large language model decoder is computationally heavy. The system's overall throughput remains highly dependent on the quality of the initial coarse-ranking stage to keep the shortlist $k$ small.
Future research directions include improving MLLM robustness to extreme lighting variations and exploring more efficient attention mechanisms to further reduce query-time latency.
Summary updated