Locality-Sensitive Hashing (LSH)

A family of hashing methods designed so that similar items collide (hash to the same bucket) with high probability, while dissimilar items collide with low probability, enabling sublinear-time approximate similarity search.

Method

Design hash families for specific similarity measures (e.g., random projections for cosine, minhash for Jaccard). Amplify via AND/OR constructions (multiple tables, multiple hashes). Query by hashing the probe and checking colliding candidates. Theoretical guarantees on recall and complexity.

Applications

Near-duplicate detection, document similarity, image retrieval, genome sequence comparison, plagiarism detection, large-scale clustering, privacy-preserving similarity.

Advantages

Strong theoretical foundations; simple and parallelizable; works for various similarity measures; no training required for basic families.

Limitations

Parameter tuning (number of hashes/tables) is delicate; memory for multiple tables; performance degrades in very high dimensions or for certain distributions; less competitive with learned or graph-based ANN for dense vectors in practice.

Alternatives

HNSW, IVF-PQ, tree-based ANN, learned hash functions, quantization-based methods. Top Algorithms & Models — Part 2 (101–200) Research Compendium

Sources

Educational reference only, not professional advice.

All algorithms