MinHash is a locality-sensitive hashing (LSH) scheme that compresses large sets into compact signatures called sketches. By applying multiple hash functions to each element of a set and retaining only the minimum hash value for each function, MinHash generates a fixed-size fingerprint. The probability that two sets share an identical minimum hash value is exactly equal to their Jaccard similarity coefficient, making it a statistically sound estimator for set overlap without requiring element-by-element comparison.
Glossary
MinHash

What is MinHash?
MinHash is a technique for rapidly estimating the Jaccard similarity between two sets by comparing the minimum hash values of their elements, enabling efficient private blocking in privacy-preserving record linkage.
In privacy-preserving record linkage (PPRL), MinHash enables efficient private blocking by grouping records with similar sketches into candidate blocks. This drastically reduces the quadratic computational complexity of pairwise comparison while operating on encoded or hashed identifiers, ensuring that plaintext similarity is never exposed. The technique is particularly effective for fuzzy matching of names and addresses where exact deterministic matching fails due to typographical variations.
Key Features of MinHash
MinHash is a foundational technique for efficient similarity estimation and private blocking. These cards break down its core properties, algorithmic steps, and role in privacy-preserving record linkage.
Jaccard Similarity Estimation
MinHash provides an unbiased estimator of the Jaccard similarity coefficient between two sets. The probability that the minimum hash value of a random permutation is identical for two sets equals their Jaccard index.
- Jaccard Formula:
J(A, B) = |A ∩ B| / |A ∪ B| - MinHash Property:
P[min(h(A)) = min(h(B))] = J(A, B) - By comparing hundreds of independent minimum hashes, the exact Jaccard similarity is approximated with high accuracy.
- This transforms an O(n) set comparison into a fixed-size signature comparison.
Signature Matrix Construction
A MinHash signature compresses a large set into a compact, fixed-length vector of integers. The signature length k determines the trade-off between accuracy and storage.
- Process: Apply
kindependent hash functions to each element of a set. For each hash function, keep only the minimum hash value observed. - Result: A set of any size is reduced to a signature vector of length
k. - Example: A document shingled into 500 n-grams becomes a signature of just 100 integers.
- Storage Efficiency: Comparing two signatures of length
krequires O(k) time instead of O(|A| + |B|) for exact Jaccard.
Locality-Sensitive Hashing (LSH) for Blocking
MinHash signatures are used directly within Locality-Sensitive Hashing (LSH) to perform private blocking. LSH bands the signature vector to ensure similar sets hash to the same bucket with high probability.
- Banding Technique: A signature of length
kis divided intobbands ofrrows each (wherek = b * r). - Collision Probability: The probability that two sets with Jaccard similarity
sbecome a candidate pair is1 - (1 - s^r)^b. - Threshold Tuning: Adjusting
bandrcreates a sharp S-curve that approximates a similarity threshold, drastically reducing the number of pairwise comparisons. - This is the core mechanism enabling private blocking in PPRL without revealing plaintext similarity.
Efficient Hash Function Families
MinHash relies on a family of independent, uniformly distributed hash functions. Cryptographic hash functions like SHA-256 are too slow for generating hundreds of permutations, so faster alternatives are used.
- Universal Hashing: Functions of the form
h(x) = (ax + b) mod pwherepis a large prime provide sufficient independence for MinHash. - One-Permutation Hashing: A memory-efficient variant that uses a single permutation and partitions the hash space, reducing computational cost for large
k. - Densified One Permutation Hashing: Handles empty bins in one-permutation hashing by borrowing values from neighboring bins, maintaining unbiased estimation.
- These optimizations make MinHash practical for datasets with billions of elements.
MinHash in Privacy-Preserving Record Linkage
In PPRL, MinHash is applied to encoded identifiers like Bloom filters or CLKs to enable private blocking. The technique reveals only the block assignment, not the raw similarity.
- Workflow: 1) Encode identifiers into a privacy-preserving representation (e.g., hardened Bloom filter). 2) Generate MinHash signatures from the encoded bit-vectors. 3) Apply LSH banding to assign records to blocks.
- Privacy Guarantee: The blocking process operates on already-encoded data, so even if an adversary observes the blocks, they learn only that certain encoded records are likely similar.
- Efficiency Gain: Reduces the quadratic comparison space of all-pairs linkage to linear or near-linear complexity by comparing only records within the same LSH bucket.
- This makes PPRL scalable to national-scale health data linkage projects.
Shingling for Document Similarity
Before MinHash can be applied to text, documents must be converted into sets of shingles (contiguous subsequences of tokens or characters).
- Word Shingling: A document becomes a set of overlapping word n-grams (e.g., 'the quick brown' for 3-word shingles).
- Character Shingling: More robust to spelling variations; uses character-level n-grams (e.g., 4-grams).
- Hashing Shingles: Large shingle sets are often compacted by hashing each shingle to a 32-bit or 64-bit integer to reduce memory.
- Example: The phrase 'privacy preserving record linkage' yields 3-word shingles: {'privacy preserving record', 'preserving record linkage'}.
- Shingling is the critical preprocessing step that bridges raw text and MinHash-based similarity estimation.
Frequently Asked Questions
Clear, technical answers to the most common questions about the MinHash algorithm and its critical role in efficient, privacy-preserving record linkage.
MinHash is a locality-sensitive hashing (LSH) technique for quickly estimating the Jaccard similarity between two sets. It works by applying multiple, independent hash functions to the elements of a set and, for each hash function, recording only the minimum hash value produced. This collection of minimum values forms a compact digital signature of the set. The core insight is that the probability that two sets share the same minimum hash value for a given hash function is exactly equal to their Jaccard index. By comparing the fraction of matching positions in two MinHash signatures, you can estimate the true Jaccard similarity without comparing the original, potentially massive sets element-by-element. This provides a massive computational speedup, reducing the comparison cost from O(n) for the original sets to O(k) for the fixed-length signatures, where k is the number of hash functions used.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Master the ecosystem of techniques that surround MinHash in privacy-preserving record linkage, from foundational data structures to advanced blocking strategies.
Locality-Sensitive Hashing (LSH)
The broader algorithmic family to which MinHash belongs. LSH functions hash similar items into the same buckets with high probability, enabling sub-linear similarity search. In PPRL, LSH is the primary mechanism for private blocking, drastically reducing the number of record pair comparisons without revealing plaintext identifiers.
Jaccard Similarity
The set similarity metric that MinHash estimates. Defined as the size of the intersection divided by the size of the union of two sets. For sets A and B: J(A,B) = |A ∩ B| / |A ∪ B|. MinHash signatures preserve this metric, allowing two parties to estimate the overlap of their encoded records without exchanging the raw elements.
Bloom Filter Encoding
A probabilistic data structure that encodes sensitive identifiers (names, addresses) into a fixed-length bit-array using multiple hash functions. Bloom filters enable approximate matching while resisting cryptanalysis. MinHash signatures are often computed on top of Bloom filter-encoded records to create a privacy-preserving representation suitable for LSH-based blocking.
Private Blocking
The cryptographic preprocessing step that partitions encoded datasets into mutually exclusive blocks to avoid the quadratic O(n²) complexity of all-pairs comparison. MinHash-based LSH is a dominant private blocking technique because it groups records with high Jaccard similarity into the same bucket without revealing the underlying plaintext similarity to any party.
Cryptographic Longterm Key (CLK)
A hardened, salted hash-based encoding derived from Bloom filters that generates irreversible, length-preserving tokens from personal identifiers. MinHash signatures can be computed over CLKs to enable efficient private blocking while maintaining strong cryptographic guarantees against frequency-based attacks.
Band Partitioning (LSH Amplification)
The AND-OR construction used to amplify the gap between high and low similarity pairs in MinHash LSH. Signatures are divided into b bands of r rows each. A pair is a candidate match if they collide in at least one band. Tuning b and r controls the precision-recall tradeoff: more bands increase recall, more rows per band increase precision.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us