English

Hypercube LSH for approximate near neighbors

Data Structures and Algorithms 2017-12-08 v1 Computational Complexity Computational Geometry Cryptography and Security

Abstract

A celebrated technique for finding near neighbors for the angular distance involves using a set of \textit{random} hyperplanes to partition the space into hash regions [Charikar, STOC 2002]. Experiments later showed that using a set of \textit{orthogonal} hyperplanes, thereby partitioning the space into the Voronoi regions induced by a hypercube, leads to even better results [Terasawa and Tanaka, WADS 2007]. However, no theoretical explanation for this improvement was ever given, and it remained unclear how the resulting hypercube hash method scales in high dimensions. In this work, we provide explicit asymptotics for the collision probabilities when using hypercubes to partition the space. For instance, two near-orthogonal vectors are expected to collide with probability (1π)d+o(d)(\frac{1}{\pi})^{d + o(d)} in dimension dd, compared to (12)d(\frac{1}{2})^d when using random hyperplanes. Vectors at angle π3\frac{\pi}{3} collide with probability (3π)d+o(d)(\frac{\sqrt{3}}{\pi})^{d + o(d)}, compared to (23)d(\frac{2}{3})^d for random hyperplanes, and near-parallel vectors collide with similar asymptotic probabilities in both cases. For cc-approximate nearest neighbor searching, this translates to a decrease in the exponent ρ\rho of locality-sensitive hashing (LSH) methods of a factor up to log2(π)1.652\log_2(\pi) \approx 1.652 compared to hyperplane LSH. For c=2c = 2, we obtain ρ0.302+o(1)\rho \approx 0.302 + o(1) for hypercube LSH, improving upon the ρ0.377\rho \approx 0.377 for hyperplane LSH. We further describe how to use hypercube LSH in practice, and we consider an example application in the area of lattice algorithms.

Cite

@article{arxiv.1702.05760,
  title  = {Hypercube LSH for approximate near neighbors},
  author = {Thijs Laarhoven},
  journal= {arXiv preprint arXiv:1702.05760},
  year   = {2017}
}

Comments

18 pages, 4 figures

R2 v1 2026-06-22T18:22:23.486Z