LOCORE: Image Re-ranking with Long-Context Sequence Modeling
Zilin Xiao, Pavel Suma, Ayush Sachdeva, Hao-Jen Wang, Giorgos Kordopatis-Zilos, Giorgos Tolias, Vicente Ordonez
TL;DR
LOCORE reframes image re-ranking as a long-context, list-wise problem over local descriptors, enabling joint reasoning across the query and an entire shortlist. It leverages a Longformer-based backbone with a sliding-window strategy to process large candidate sets, producing per-image scores via token-level predictions and aggregation. Through gallery-shuffled training, global query attention, and effective inference with sliding windows, LOCORE achieves state-of-the-art re-ranking on ROxf, RPar, SOP, In-Shop, and CUB while maintaining competitive latency and memory. This approach widens the practical impact of local-descriptor re-ranking by capturing cross-image interactions and transitive relationships, offering robust gains across diverse benchmarks.
Abstract
We introduce LOCORE, Long-Context Re-ranker, a model that takes as input local descriptors corresponding to an image query and a list of gallery images and outputs similarity scores between the query and each gallery image. This model is used for image retrieval, where typically a first ranking is performed with an efficient similarity measure, and then a shortlist of top-ranked images is re-ranked based on a more fine-grained similarity measure. Compared to existing methods that perform pair-wise similarity estimation with local descriptors or list-wise re-ranking with global descriptors, LOCORE is the first method to perform list-wise re-ranking with local descriptors. To achieve this, we leverage efficient long-context sequence models to effectively capture the dependencies between query and gallery images at the local-descriptor level. During testing, we process long shortlists with a sliding window strategy that is tailored to overcome the context size limitations of sequence models. Our approach achieves superior performance compared with other re-rankers on established image retrieval benchmarks of landmarks (ROxf and RPar), products (SOP), fashion items (In-Shop), and bird species (CUB-200) while having comparable latency to the pair-wise local descriptor re-rankers.
