← 🧲 Algorithms

🧲 Locality-Sensitive Hashing: Finding Similar Items in Massive Datasets

Candidates:
Avg similarity:
Drag — rotate · Scroll — zoom

🧲 Locality-Sensitive Hashing: Finding Similar Items in Massive Datasets

This simulation demonstrates how locality-sensitive hash functions map similar and dissimilar items into buckets, showing visually why similar items tend to collide while dissimilar ones spread apart, and how combining multiple hash functions and multiple hash tables changes the balance between catching true matches and rejecting false ones.

🔬 What It Demonstrates

This simulation demonstrates how locality-sensitive hash functions map similar and dissimilar items into buckets, showing visually why similar items tend to collide while dissimilar ones spread apart, and how combining multiple hash functions and multiple hash tables changes the balance between catching true matches and rejecting false ones.

🎮 How to Use

Adjust the number of hash functions combined per table to see precision rise as fewer dissimilar items sneak into the same bucket as your query. Adjust the number of independent hash tables to see recall rise as more chances are given for a truly similar item to collide with the query in at least one table. Watch how the size of the candidate bucket compares to the size of the full dataset, illustrating why only a small subset ever needs to be directly compared against the query.

💡 Did You Know?

Did you know that MinHash was originally developed at AltaVista in the 1990s to detect near-duplicate web pages at a time when the web was already too large to compare every page against every other page directly, and the same core idea now powers plagiarism detectors, genomic sequence comparison tools, and large-scale recommendation engines?