🧲 Locality-Sensitive Hashing: Finding Similar Items in Massive Datasets
Explore how Locality-Sensitive Hashing flips the usual purpose of a hash function, making similar items collide on purpose so you can search millions of high-dimensional vectors without comparing against every single one.
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?
Explore locality-sensitive hashing, a technique that deliberately makes similar high-dimensional items collide into the same bucket for fast approximate nearest-neighbor search.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install