[Paper Review] HyperMinHash: Jaccard index sketching in LogLog space.
HyperMinHash is a streaming probabilistic sketch that estimates the Jaccard index between two sets using only O(log l + log log |A ∪ B|) bits per bucket—significantly reducing storage compared to MinHash. It achieves a relative error of O(1/l + √(k/δ)) with 64KiB memory, enabling accurate Jaccard estimation for set sizes up to 10^19, far exceeding MinHash’s 10^10 limit under the same memory constraints.
In this extended abstract, we describe and analyse a streaming probabilistic sketch, HYPERMINHASH, to estimate the Jaccard index (or Jaccard similarity coefficient) over two sets $A$ and $B$. HyperMinHash can be thought of as a compression of standard MinHash by building off of a HyperLogLog count-distinct sketch. Given Jaccard index $\delta$, using $k$ buckets of size $O(\log(l) + \log\log(|A \cup B|))$ (in practice, typically 2 bytes) per set, HyperMinHash streams over $A$ and $B$ and generates an estimate of the Jaccard index $\delta$ with error $O(1/l + \sqrt{k/\delta})$. This improves on the best previously known sketch, MinHash, which requires the same number of storage units (buckets), but using $O(\log(|A \cup B|))$ bit per bucket. For instance, our new algorithm allows estimating Jaccard indices of 0.01 for set cardinalities on the order of $10^{19}$ with relative error of around 5% using 64KiB of memory; the previous state-of-the-art MinHash can only estimate Jaccard indices for cardinalities of $10^{10}$ with the same memory consumption. Alternately, one can think of HyperMinHash as an augmentation of b-bit MinHash that enables streaming updates, unions, and cardinality estimation (and thus intersection cardinality by way of Jaccard), while using $\log\log$ extra bits.
Motivation & Objective
- To design a streaming sketch that estimates Jaccard similarity with significantly reduced memory usage compared to MinHash.
- To enable accurate Jaccard index estimation for very large sets (up to 10^19 elements) using limited memory.
- To integrate cardinality estimation and union operations into a compact, streaming-compatible sketch.
- To reduce per-bucket storage from O(log |A ∪ B|) bits in MinHash to O(log l + log log |A ∪ B|) bits, approaching LogLog space.
Proposed method
- HyperMinHash compresses standard MinHash by incorporating a HyperLogLog-style count-distinct sketch to track set cardinalities efficiently.
- It uses k buckets, each storing O(log l + log log |A ∪ B|) bits—typically 2 bytes per bucket—enabling compact storage.
- The algorithm streams over sets A and B, maintaining hash values and applying probabilistic counting to estimate Jaccard similarity.
- It leverages the HyperLogLog estimator to infer cardinality and intersection size, which are then used to compute the Jaccard index.
- The sketch supports streaming updates, unions, and cardinality estimation natively, extending b-bit MinHash functionality.
- The error bound is derived as O(1/l + √(k/δ)), where l is the number of hash functions and k is the number of buckets.
Experimental results
Research questions
- RQ1Can a sketch be designed to estimate Jaccard similarity with memory usage closer to that of HyperLogLog while retaining MinHash’s accuracy?
- RQ2What is the achievable error bound when compressing MinHash using HyperLogLog counting principles?
- RQ3Can the sketch support streaming updates, unions, and cardinality estimation within the same compact structure?
- RQ4How does the memory efficiency of this approach scale with increasing set cardinalities, particularly beyond 10^10 elements?
Key findings
- HyperMinHash achieves a relative error of approximately 5% when estimating Jaccard indices of 0.01 for sets of size up to 10^19 using only 64KiB of memory.
- The method reduces per-bucket storage from O(log |A ∪ B|) bits in MinHash to O(log l + log log |A ∪ B|) bits, enabling substantial memory savings.
- For the same 64KiB memory budget, HyperMinHash supports set cardinalities up to 10^19, whereas MinHash is limited to around 10^10.
- The sketch supports native streaming updates, unions, and cardinality estimation, extending the functionality of b-bit MinHash in a compact form.
- The error bound O(1/l + √(k/δ)) demonstrates that accuracy improves with more buckets (k) and higher l, while remaining robust even at low Jaccard indices.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.