Reconfigurable Inverted Index

Yusuke Matsui, Ryota Hinami, Shin'ichi Satoh

Abstract

Traditional Approximate Nearest Neighbor (ANN) search systems are often optimized for static, full-database searches. However, real-world applications frequently require searching specific subsets or handling rapidly growing datasets, both of which can lead to significant performance degradation. We introduce the Reconfigurable Inverted Index (Rii), a framework designed for flexibility. By decoupling physical storage from logical indexing through a linear data layout, Rii enables efficient subset searches and fast index reconfiguration. Our evaluations on billion-scale datasets demonstrate that Rii maintains low latency and high accuracy even as data distributions shift.

Introduction

Most state-of-the-art ANN systems, such as Faiss or Annoy, excel at searching fixed-size indices. In practice, two scenarios break these systems:

  1. Subset Search: Filtering results after a full-database search is inefficient when the target subset (e.g., "images from a specific date") is small.
  2. Data Addition: As new vectors are added, internal clusters become unbalanced, causing search times to spike.

Rii addresses these gaps by providing a dynamic indexing structure that can be reconfigured on-the-fly without accessing original high-dimensional vectors.

Methods

Rii builds upon the Inverted File with Product Quantization (IVFADC) framework but introduces three critical architectural shifts.

Linear Data Layout

Unlike traditional systems that store data in separate posting lists (buckets), Rii utilizes a linear data layout. All Product Quantization (PQ) codes are stored in a single contiguous array. This allows for $O(1)$ access to any item by its ID, which is essential for both subset scanning and rapid re-clustering.

Hybrid Search Strategy

To optimize for varying subset sizes ($|S|$), Rii dynamically switches between two search modes. For small subsets, a PQ-linear-scan is performed directly on the target items. For larger subsets, the system utilizes a traditional inverted index approach.

Rii's hybrid search strategy switches between PQ linear scan and inverted index based on subset size |S|.

The system automatically determines the optimal crossover point, $\theta$, ensuring the fastest possible response time regardless of the filter criteria.

Dynamic Reconfiguration

When the database grows significantly, Rii invokes a reconfigure() function. This process uses PQk-means, a specialized clustering algorithm that operates directly on compressed PQ codes. This allows the system to update coarse cluster centers and reassign vectors without the massive overhead of decoding original features.

Performance recovery via the reconfigure() function as the database grows from 10^6 to 10^9 vectors.

Experimental Results

The authors evaluated Rii using standard benchmarks (SIFT1M, GIST1M, Deep1B) and a real-world metadata-filtered dataset from the MET Museum.

  • Subset Search Stability: On SIFT1M, Rii maintained a runtime under 2ms per query across all subset sizes, whereas traditional baselines slowed down significantly as subsets shrank.
  • Billion-Scale Scalability: On the Deep1B dataset, adding 99 million vectors to an initial 1 million vector index caused search latency to increase to 3.9ms. Reconfiguration reduced this to ~0.5ms, a 7.8x improvement.
  • Efficiency: Rii is highly memory-efficient, requiring only 69 MB for SIFT1M, significantly less than graph-based alternatives like HNSW (669 MB).

Conclusion and Future Work

Rii provides a robust solution for dynamic ANN search environments. While it currently uses direct vector encoding (rather than residual encoding), which slightly impacts peak accuracy, its flexibility and speed in subset searches and data addition are unmatched. Future work includes integrating graph-based coarse quantizers (like HNSW) to further enhance accuracy while maintaining the reconfigurable linear layout.

Summary updated

BibTeX
@inproceedings{matsui2018reconfigurable,
  author = {Yusuke Matsui and Ryota Hinami and Shin'ichi Satoh},
  title = {{Reconfigurable Inverted Index}},
  booktitle = {ACM Multimedia},
  year = {2018},
  doi = {10.1145/3240508.3240630},
}
Figure