Improving Bilayer Product Quantization for Billion-Scale Approximate Nearest Neighbors in High Dimensions

Artem Babenko, Victor S. LempitskyarXiv 2014

Abstract

Efficiently searching for nearest neighbors in high-dimensional datasets containing billions of vectors requires balancing memory usage, search speed, and accuracy. Current bilayer architectures often rely on global compression models that fail to account for local data variations and suffer from redundant distance computations. This paper presents two enhancements: Fast Bilayer Product Quantization (FBPQ) and Hierarchical Bilayer Product Quantization (HBPQ). FBPQ accelerates search by up to 15x through optimized distance caching, while HBPQ improves accuracy by employing region-specific local codebooks. Experimental results on the BIGANN and GIST50M benchmarks show significant improvements over existing state-of-the-art methods.

Introduction

The challenge of Approximate Nearest Neighbor (ANN) search at the billion-scale involves navigating high-dimensional spaces where raw data storage is prohibitive. Standard solutions employ a bilayer approach: an indexing layer to partition the space into cells and a compression layer using Product Quantization (PQ) to represent vectors compactly. However, these systems typically use a single "global" codebook for the entire dataset, ignoring the fact that data distributions vary significantly across different regions. Furthermore, distance evaluations often involve redundant calculations.

Proposed Methods

We propose two systems to address these limitations:

  1. Fast Bilayer Product Quantization (FBPQ): FBPQ focuses on speed. By decomposing the Euclidean distance formula and pre-calculating dot products between the query and compression codewords, FBPQ reduces the complexity of distance evaluation from $O(D)$ to $O(M)$, where $M$ is the number of quantization components. This makes search time largely independent of the original vector dimensionality.
  2. Hierarchical Bilayer Product Quantization (HBPQ): HBPQ targets accuracy. Instead of a one-size-fits-all global codebook, HBPQ learns "semi-local" codebooks tailored to specific Voronoi cells in the indexing layer. This approach significantly reduces quantization error by adapting the compression model to the local data distribution.
Figure 1: Visualization of varying data distributions within different Voronoi cells, justifying the need for local compression models in HBPQ.

Key Results

The proposed methods were evaluated on the BIGANN (1 billion SIFT descriptors) and GIST50M (50 million GIST descriptors) datasets.

FBPQ achieved remarkable speedups, performing up to 14.6x faster than the OMulti-D-OADC baseline on the high-dimensional GIST50M dataset without any loss in accuracy. On the SIFT1B dataset, it maintained a speedup factor of approximately 4x.

HBPQ established a new state-of-the-art for accuracy on the BIGANN dataset. As shown in the performance comparison, HBPQ provides a substantial boost in recall across various settings. For instance, at 8 bytes per vector, HBPQ increased Recall@1 from 0.179 to 0.268—a nearly 50% relative improvement.

Figure 6: Performance comparison on the BIGANN dataset (1 billion SIFT vectors). HBPQ (Hierarchical-BPQ) consistently outperforms the OMulti-D-OADC baseline in recall across different candidate list sizes (l) and bitrates.

Discussion and Conclusion

While HBPQ introduces a slight memory overhead (approximately 15%) and a minor increase in search time due to larger codebooks, the accuracy gains are decisive for high-precision applications. FBPQ, conversely, offers a "free" speedup for systems where accuracy is already sufficient. Together, these methods provide a flexible toolkit for scaling ANN search to the next generation of massive datasets. Future work may explore dynamic adaptation of local codebooks to further refine search performance.

Summary updated

BibTeX
@misc{babenko2014improving,
  author = {Artem Babenko and Victor S. Lempitsky},
  title = {{Improving Bilayer Product Quantization for Billion-Scale Approximate Nearest Neighbors in High Dimensions}},
  year = {2014},
  eprint = {1404.1831},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1404.1831},
}
Figure