This paper, presented by researchers from the IT University of Copenhagen, introduces Fast CoveringLSH (fcLSH), a significant upgrade to similarity search algorithms that guarantees you will never miss a "near neighbor" again.
TL;DR
Traditional Locality-Sensitive Hashing (LSH) is fast but probabilistic, meaning it often misses relevant results (false negatives). Fast CoveringLSH (fcLSH) provides a practical way to achieve 100% recall in Hamming space while using the Fast Hadamard Transform to slash computation time from $O(dL)$ to $O(d + L \log L)$.
What Problem Does This Paper Address?
In the world of "big data," finding similar items (like near-duplicate web pages or similar images) is a massive challenge. The standard tool for this is Locality-Sensitive Hashing (LSH). LSH works by hashing similar items into the same "buckets" with high probability, allowing us to search only a small fraction of the database.
However, LSH has a major Achilles' heel: it is probabilistic. There is always a chance that two very similar items won't collide in any hash table, leading to false negatives. For high-stakes applications like fingerprint recognition, plagiarism detection, or entity resolution, missing a match is unacceptable.
While a theoretical framework called "CoveringLSH" was recently proposed to eliminate these false negatives, it was computationally expensive. As the dimensionality of data ($d$) and the number of hash tables ($L$) grew, the time spent just calculating hashes became a bottleneck.
Methods
The authors bridge the gap between theoretical "total recall" and practical performance through two main innovations:
- The Hadamard Connection: The authors realized that the hash functions required for CoveringLSH—which carefully choose correlated bit positions to "cover" all possible differences—are mathematically related to the rows of a Hadamard matrix.
- Fast Hadamard Transform (FHT): By leveraging this connection, they can use the FHT to compute all $L$ hash values simultaneously. This moves the needle on computational complexity from a multiplicative $O(dL)$ to a much more scalable $O(d + L \log L)$.
To handle different search radii, they also employ "replication" (repeating bit strings to increase effective radius) and "partitioning" (splitting strings to decrease it) tricks, ensuring the algorithm stays efficient even when the search parameters aren't a perfect fit for the hash structure.
Datasets
The authors evaluated fcLSH against synthetic data and four diverse real-world datasets:
- ANN_SIFT1M: 1 million image feature vectors.
- Webspam: 350,000 web documents.
- Enron: ~40,000 emails (high-dimensional text).
- MovieLens: ~230,000 users and their movie ratings.
The properties of these datasets are summarized below:
Key Insights and Ideas
- Total Recall is Practical: You don't have to trade away accuracy for speed. By using structured, correlated hash functions instead of purely random ones, you can guarantee 100% recall.
- Pruning Power: Even though fcLSH guarantees finding every neighbor, it doesn't lose its "pruning power." It is just as good as traditional LSH at ignoring "far" points that aren't matches.
- Overcoming the Curse of Dimensionality: In high-dimensional spaces (like the 256-bit Webspam fingerprints), the distance gap between near and far points is often large enough that fcLSH can filter out 70% of the database, providing a 3x speedup over a simple linear search while remaining just as accurate.
Key Results
- Speedup: fcLSH is dramatically faster than the basic CoveringLSH (bcLSH) implementation. As dimensionality $d$ increases, the FHT-based approach stays relatively flat while the basic approach's time explodes.
- Accuracy: In tests on SIFT data, traditional LSH had a recall between 92% and 96%. fcLSH maintained a perfect 1.0 (100% recall) across all tested radii.
- Superiority over MIH: fcLSH consistently achieved higher precision than Multi-Index Hashing (MIH), especially on real-world data that isn't uniformly distributed.
Limitations and Future Work
- Space Complexity: For very large search radii, the number of hash tables required ($L$) grows exponentially ($2^{r+1}$). This can lead to high memory usage, limiting the "exact" search to a radius of about 20 in high-dimensional spaces.
- Hamming Space Only: The current implementation is specific to Hamming distance (binary vectors). The authors suggest that extending this "total recall" guarantee to other similarity measures (like Euclidean distance) is a key open direction.
- Linear Space Goals: A major future goal is to reduce the space requirement to be linear or near-linear relative to the dataset size while still maintaining the 100% recall guarantee.
Summary updated