Skip to main content
QUICK REVIEW

[Paper Review] Practical and Optimal LSH for Angular Distance

Alexandr Andoni, Piotr Indyk|TU/e Research Portal|Sep 9, 2015
Advanced Image and Video Retrieval TechniquesComputer Science26 references212 citations
TL;DR

This paper introduces Cross-Polytope LSH, a practical and optimal Locality-Sensitive Hashing scheme for angular distance on the unit sphere, achieving the asymptotically optimal query time exponent ρ = 1/(2c²−1) while outperforming hyperplane LSH in practice. It combines fast rotations and a novel multiprobe strategy to deliver significant speedups on real and synthetic datasets, especially in high-dimensional sparse settings.

ABSTRACT

We show the existence of a Locality-Sensitive Hashing (LSH) family for the angular distance that yields an approximate Near Neighbor Search algorithm with the asymptotically optimal running time exponent. Unlike earlier algorithms with this property (e.g., Spherical LSH [Andoni, Indyk, Nguyen, Razenshteyn 2014], [Andoni, Razenshteyn 2015]), our algorithm is also practical, improving upon the well-studied hyperplane LSH [Charikar, 2002] in practice. We also introduce a multiprobe version of this algorithm, and conduct experimental evaluation on real and synthetic data sets. We complement the above positive results with a fine-grained lower bound for the quality of any LSH family for angular distance. Our lower bound implies that the above LSH family exhibits a trade-off between evaluation time and quality that is close to optimal for a natural class of LSH functions.

Motivation & Objective

  • To close the gap between theoretically optimal LSH schemes and practical nearest neighbor search performance for angular distance.
  • To design a locality-sensitive hashing family that achieves the optimal ρ = 1/(2c²−1) for cosine similarity while being efficiently computable.
  • To develop a multiprobe extension that enhances retrieval efficiency without sacrificing theoretical optimality.
  • To empirically validate that the new LSH scheme outperforms hyperplane LSH in real-world and synthetic settings under memory constraints.
  • To establish a fine-grained lower bound on LSH quality for angular distance, showing near-optimality of the proposed scheme.

Proposed method

  • Proposes a new LSH family based on randomly rotated cross-polytopes (unit balls of the ℓ₁-norm) for unit vectors.
  • Uses fast rotations via random orthogonal matrices to accelerate hash evaluation, enabling practical deployment.
  • Introduces a multiprobe strategy that queries multiple candidate buckets in a single table, improving recall without increasing space.
  • Employs partial cross-polytopes in the final k hash functions to smooth the trade-off between time, space, and quality.
  • Applies feature hashing to reduce computation time for high-dimensional sparse vectors (e.g., tf-idf data).
  • Performs grid search over parameters to optimize performance under memory constraints (L=10).

Experimental results

Research questions

  • RQ1Can a locality-sensitive hashing scheme for angular distance achieve both theoretical optimality and practical efficiency?
  • RQ2Is there a practical LSH family that matches the optimal ρ = 1/(2c²−1) of Spherical LSH while being faster than hyperplane LSH in practice?
  • RQ3How effective is the multiprobe extension in improving retrieval performance for the cross-polytope LSH?
  • RQ4What is the fundamental trade-off between evaluation time and quality in LSH for angular distance, and how close can a scheme get to it?
  • RQ5Does the cross-polytope LSH outperform hyperplane LSH on real-world high-dimensional sparse data?

Key findings

  • On random data with n=2^28 and d=128, cross-polytope LSH achieves a 10.3× speedup over hyperplane LSH and up to 700× speedup over linear scan.
  • On the SIFT dataset (n=10^6, d=128), cross-polytope LSH is 1.2× faster than hyperplane LSH, with minimal improvement due to smaller nearest neighbor distances.
  • On the high-dimensional tf-idf datasets (NYT and pubmed), cross-polytope LSH achieves 3.4× and 4.0× speedups, respectively, due to efficient feature hashing and multiprobe optimization.
  • The multiprobe variant of cross-polytope LSH is 13× faster than its non-multiprobe counterpart under memory constraints (L=10), making it competitive with hyperplane LSH.
  • Theoretical analysis confirms that the cross-polytope LSH achieves the optimal ρ = 1/(2c²−1), matching Spherical LSH, and a fine-grained lower bound shows it is near-optimal in the natural class of LSH functions.
  • The method reduces hashing time significantly on sparse data by using feature hashing with 512 and 2048 dimensions for NYT and pubmed, respectively.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.