Variable Bit Quantisation for LSH

Sean Moran, Victor Lavrenko, Miles OsborneACL 2013

Abstract

Traditional Locality Sensitive Hashing (LSH) typically employs uniform bit allocation across all projection dimensions, often leading to suboptimal retrieval performance by wasting bits on uninformative hyperplanes. This paper introduces Variable Bit Quantisation (VBQ), a data-driven optimization framework that allocates a fixed bit budget across hyperplanes based on their ability to preserve local neighborhood structures. By formulating bit assignment as a Binary Integer Linear Program (BILP), VBQ significantly improves retrieval accuracy—up to 168% on text and image datasets—without increasing memory overhead.

Introduction

In large-scale information retrieval, finding the "nearest neighbors" to a query is a fundamental but computationally expensive task. Approximate Nearest Neighbor (ANN) search, particularly via hashing, is a common solution. Standard hashing involves projecting high-dimensional data onto hyperplanes and quantising these projections into binary bits.

However, a significant inefficiency exists in current methods: uniform quantisation. Most techniques, including standard LSH, assign the same number of bits (typically one) to every hyperplane. This approach ignores the fact that some hyperplanes are far more effective at preserving the data's neighborhood structure than others. Wasting bits on noisy or uninformative dimensions limits the potential accuracy for a given memory footprint.

Variable Bit Quantisation (VBQ)

The authors propose Variable Bit Quantisation (VBQ) to address this inefficiency. Instead of a fixed allocation, VBQ treats bit assignment as an optimization problem over a total "bit budget" $B$.

Scoring and Allocation

For each hyperplane, the algorithm calculates an F-measure that quantifies how well a specific number of bits (and their thresholds) preserves original neighbors.

VBQ scores hyperplanes by their ability to preserve neighborhood structure. Here, $n_2$ perfectly separates neighbors (F1=1.00) and receives 2 bits, while $n_1$ performs poorly (F1=0.25) and receives 0 bits.

As illustrated in the figure above, a hyperplane that perfectly separates neighbors from non-neighbors (like $n_2$) receives a high score and more bits. Conversely, a hyperplane that mixes them (like $n_1$) receives a low score and may be assigned zero bits, effectively performing feature selection.

The optimal bit distribution is found using a Binary Integer Linear Program (BILP). This framework selects bit counts for each hyperplane to maximize the total F-measure across the set while respecting the global budget $B$. Notably, VBQ is "projection-agnostic" and can be applied to various hashing methods, including LSH, Spectral Hashing (SH), and PCA Hashing (PCAH).

Experimental Evaluation

VBQ was evaluated on both text and image retrieval tasks, including the Reuters-21578 and TDT-2 text corpora, and the CIFAR-10 image dataset.

Key Results

The performance gains were substantial across all datasets and projection methods. On the Reuters dataset with a 128-bit budget, VBQ achieved a 95% gain over 1-bit LSH (SBQ) and a 168% gain over 2-bit Manhattan Hashing (MQ).

AUPRC performance across varying bit budgets. VBQ consistently outperforms standard 1-bit (SBQ) and 2-bit (MQ) uniform quantisation methods.

As shown in the AUPRC comparison, VBQ's advantage persists across different bit budgets, demonstrating its superior efficiency in utilizing available memory compared to uniform baselines.

Discussion and Future Work

VBQ's success stems from its ability to prioritize quality over quantity. By exploiting variance in data-dependent projections and aligning quantisation directly with neighborhood preservation goals, it achieves state-of-the-art results.

However, some areas remain for future exploration. The current study focuses on "Hamming ranking" rather than "hash lookup" (using tables for sub-linear time). Additionally, while the BILP optimization is an offline process, its scalability for extremely high-dimensional budgets and the sensitivity of the F-measure to its tuning parameters warrant further investigation.

Summary updated

BibTeX
@inproceedings{moran2013variable,
  author = {Sean Moran and Victor Lavrenko and Miles Osborne},
  title = {{Variable Bit Quantisation for LSH}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2013},
}
Figure