Learning a Complete Image Indexing Pipeline

Himalaya Jain, Joaquin Zepeda, Patrick Pérez, Rémi Gribonval

Abstract

To work at scale, a complete image indexing system comprises two components: An inverted file index to restrict the actual search to only a subset that should contain most of the items relevant to the query; An approximate distance computation mechanism to rapidly scan these lists. While supervised deep learning has recently enabled improvements to the latter, the former continues to be based on unsupervised clustering in the literature. In this work, we propose a first system that learns both components within a unifying neural framework of structured binary encoding.

Introduction

Large-scale image retrieval requires searching through millions of images in milliseconds. To achieve this, modern systems employ a two-step pipeline: an Inverted File Index (IVF) for "binning" (narrowing the search space) and Approximate Distance Computation (ADC) for ranking images within those bins using compressed codes.

While deep learning has significantly advanced ADC, the binning process has traditionally relied on unsupervised methods like K-means clustering. These methods are agnostic to semantic content, often resulting in "noisy" bins that degrade retrieval accuracy. This paper introduces the first unified neural framework that learns the entire indexing pipeline—both binning and encoding—using supervised deep learning to ensure semantic consistency across the search space.

Methodology: The SUBIC Framework

The proposed architecture is built upon SUBIC (SUpervised Block-structured binary Codes). It integrates bin selection and feature encoding into a single trainable pipeline.

The complete SUBIC indexing architecture, including bin selection, residual computation, and encoding blocks.

The pipeline consists of three primary modules:

  1. Bin Selection Block: Replaces traditional K-means with a supervised classifier. A fully connected layer followed by a softmax predicts the optimal bin for an image. Entropy-based losses are applied to ensure "sharp" assignments (nearly one-hot) and balanced bin utilization.
  2. Residual Computation: The system can compute the difference between an image's feature vector and its predicted bin center. This allows the subsequent encoder to focus on fine-grained discriminative details.
  3. Feature Encoder: A multi-block SUBIC encoder compresses features (or residuals) into compact binary strings, facilitating rapid ranking via look-up tables.

A critical innovation is the use of entropy losses. These penalties encourage the network to produce discrete-like outputs (0 or 1) suitable for indexing while remaining compatible with standard gradient-based optimization.

Experimental Evaluation

The framework was evaluated on standard benchmarks including Oxford5K, Paris6K, and Holidays, with large-scale distractors (Flickr1M) added to test scalability. Training was conducted on the Landmarks-full and ImageNet datasets.

Key Results and Insights

The supervised approach demonstrates a clear advantage over traditional unsupervised indexing across various datasets and shortlist sizes.

Retrieval performance (mAP) vs. shortlist size (T) across various datasets. SUBIC variants consistently outperform traditional baselines like IMI-PQ.
  • Performance Gains: On Oxford5K and Paris6K, the supervised SUBIC-I variant outperformed the state-of-the-art Inverted Multi-Index (IMI-PQ) by over 19% at a shortlist size of 300 images.
  • Efficiency and Scalability: The system maintains a low memory footprint (e.g., 8 bytes per image) and scales effectively to 1 million distractor images, preserving its performance margin over traditional baselines.
  • Semantic Synergy: By training binning and encoding together, the encoder learns to complement the partitioning of the search space, ensuring that semantically similar images are grouped and ranked accurately.

Conclusion

This work demonstrates that supervised learning can be successfully applied to the entire image indexing pipeline. By replacing unsupervised clustering with task-aware binning, the SUBIC framework achieves significant gains in retrieval accuracy. While the current model relies on labeled data, its performance on large-scale benchmarks highlights the potential of supervised indexing for domain-specific applications.

Summary updated

BibTeX
@inproceedings{jain2018learning,
  author = {Himalaya Jain and Joaquin Zepeda and Patrick Pérez and Rémi Gribonval},
  title = {{Learning a Complete Image Indexing Pipeline}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2018},
  url = {https://openreview.net/forum?id=B1b_nTZOWH},
}
Figure