2-Bit Random Projections, NonLinear Estimators, and Approximate Near Neighbor Search

Ping Li, Michael Mitzenmacher, Anshumali ShrivastavaarXiv 2016

Abstract

The method of random projections has become a standard tool for machine learning, data mining, and search with massive data at Web scale. The effective use of random projections requires efficient coding schemes for quantizing (real-valued) projected data into integers. In this paper, we focus on a simple 2-bit coding scheme. In particular, we develop accurate nonlinear estimators of data similarity based on the 2-bit strategy. This work will have important practical applications. For example, in the task of near neighbor search, a crucial step (often called re-ranking) is to compute or estimate data similarities once a set of candidate data points have been identified by hash table techniques. This re-ranking step can take advantage of the proposed coding scheme and estimator. As a related task, in this paper, we also study a simple uniform quantization scheme for the purpose of building hash tables with projected data. Our analysis shows that typically only a small number of bits are needed. For example, when the target similarity level is high, 2 or 3 bits might be sufficient. When the target similarity level is not so high, it is preferable to use only 1 or 2 bits. Therefore, a 2-bit scheme appears to be overall a good choice for the task of sublinear time approximate near neighbor search via hash tables. Combining these results, we conclude that 2-bit random projections should be recommended for approximate near neighbor search and similarity estimation. Extensive experimental results are provided.

Introduction

In the era of massive-scale data, finding "near neighbors"—items similar to a query—is a fundamental but computationally expensive task. Applications ranging from duplicate web page detection to image retrieval require methods that are both fast and memory-efficient. Random projections are a standard tool for dimensionality reduction in high-dimensional spaces. However, the resulting real-valued projections must be quantized into discrete bits for efficient storage and indexing.

Historically, researchers have faced a trade-off. 1-bit schemes, such as Sim-hash, are extremely compact but discard significant signal, leading to high estimation errors. Conversely, high-precision schemes are accurate but consume excessive memory and processing time. This paper explores the "sweet spot" of 2-bit quantization, proposing a sophisticated nonlinear Maximum Likelihood Estimator (MLE) that significantly outperforms 1-bit hashing while remaining far more efficient than high-precision alternatives.

Methodology: 2-Bit Quantization and Nonlinear MLE

The proposed method centers on two main components: a 2-bit quantization scheme and a nonlinear estimator.

2-Bit Quantization

Each projected value is mapped to an integer in the set {0, 1, 2, 3} based on a threshold $w$ and its negative $-w$. For a pair of vectors, this quantization creates a grid of 16 possible region combinations, as illustrated in Figure 1.

Nonlinear Maximum Likelihood Estimator (MLE)

Rather than relying on a simple linear count of matches, the authors derive a nonlinear MLE. This estimator leverages the full joint probability distribution of the 16 regions to extract maximum information about the data correlation $\rho$. By understanding the geometry of the bins, the MLE drastically reduces estimation error compared to linear baselines.

Threshold Optimization

Through Fisher Information analysis, the authors identified that while the optimal bin width $w$ varies slightly with data similarity, a value of $w \approx 0.75$ serves as an excellent general-purpose choice, providing robust performance across various datasets.

Experimental Results

The method was evaluated on three high-dimensional datasets: Youtube (~98k points), Peekaboom (~20k points), and LabelMe (~55k points).

MSE Reduction

Theoretical Fisher Information analysis and empirical simulations demonstrate that the 2-bit MLE consistently achieves much lower Mean Square Error (MSE) than the standard 1-bit estimator across all correlation levels $\rho$.

Search Accuracy and Efficiency

In re-ranking experiments, the 2-bit MLE produced superior Precision-Recall curves compared to both 1-bit and 2-bit linear baselines. Because of its higher accuracy, the target precision can often be achieved using fewer total projections, potentially halving preprocessing time compared to 1-bit methods.

Conclusion

2-bit random projections combined with nonlinear MLE represent a powerful middle ground for similarity estimation. This approach offers a significant jump in accuracy over 1-bit schemes for high-similarity search, which is the primary use case in large-scale retrieval. While solving the nonlinear MLE is more computationally intensive, the use of pre-computed lookup tables makes it practical for real-world applications.

Summary updated

BibTeX
@misc{li2016bit,
  author = {Ping Li and Michael Mitzenmacher and Anshumali Shrivastava},
  title = {{2-Bit Random Projections, NonLinear Estimators, and Approximate Near Neighbor Search}},
  year = {2016},
  eprint = {1602.06577},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1602.06577},
}
Figure