Abstract
Estimating set similarity, specifically the Jaccard Index or Resemblance, is a critical task in large-scale data processing. While minwise hashing is the standard approach, its storage requirements can be prohibitive. This paper introduces $b$-bit minwise hashing, a technique that stores only the $b$ lowest bits of each hash value. We demonstrate that for $b$ as small as 1 or 2, this method significantly reduces storage and computational costs—often by over an order of magnitude—while maintaining high estimation accuracy.
Introduction
In web-scale applications like duplicate detection, search ranking, and social network analysis, calculating the similarity between billions of sets is a fundamental challenge. The Jaccard Index, or resemblance $R$, defined as $R = |A \cap B| / |A \cup B|$, is the standard metric. Minwise hashing estimates $R$ by comparing the minimum values of sets under random permutations. Traditionally, these minimum values are stored as 32-bit or 64-bit integers to avoid collisions. However, when thousands of permutations are needed per document, the memory footprint becomes a bottleneck.
Methodology: b-Bit Minwise Hashing
The core proposal is to store only the $b$ lowest bits of each minwise hash. While this introduces "accidental" matches—where two different minimum values share the same $b$ bits—the authors provide a rigorous mathematical framework to account for this noise.
The Variance-Space Trade-off
Reducing $b$ increases the variance of a single estimate, necessitating more permutations ($k$) to achieve a target accuracy. However, the reduction in bits per sample is so significant that the total space required ($b \times k$) is drastically lower than using full 64-bit hashes. This trade-off is particularly favorable for high-resemblance pairs.
Experimental Validation
The theory was tested on real-world datasets, including MSN Web Search Logs and the BLEWS News Corpus. These datasets allowed the authors to evaluate performance across varying word frequencies (rare vs. common words) and practical duplicate detection tasks. The empirical results matched the theoretical variance formulas almost perfectly.
Key Results
The most striking finding is the massive reduction in storage. For a resemblance of $R=0.5$, 1-bit hashing can reduce storage by a factor of over 20x compared to 64-bit hashing for the same level of precision. In practical news article duplicate detection, 4-bit hashing was virtually indistinguishable from 32-bit hashing in terms of precision and recall, despite using 8x less space.
Beyond storage, $b$-bit hashing offers significant computational speedups. Comparing single bits or small bit-vectors is more CPU-efficient than comparing 64-bit integers, particularly when leveraging modern SIMD instructions.
Conclusion and Limitations
While $b=1$ is often optimal for high resemblance ($R \ge 0.5$), its advantages diminish for very low similarity ($R < 0.1$), where $b=2$ or $b=3$ may be more efficient. The method assumes a large universe of elements, which is typical for web-scale data. Overall, $b$-bit minwise hashing provides a powerful optimization for large-scale similarity search, enabling massive datasets to be processed with significantly fewer resources.
Summary updated