FracMinHash is a locality-sensitive hashing technique that subsamples a k-mer set by retaining only those hash values that fall below a specified fraction s of the total hash space, creating a compact, unbiased sketch. Unlike standard MinHash, which selects a fixed number of minimum hash values, FracMinHash scales the sketch size proportionally to the original set cardinality, preserving abundance information critical for downstream analyses.
Glossary
FracMinHash

What is FracMinHash?
A sketching technique that selects a fraction of all k-mer hash values falling below a defined abundance threshold, providing a robust and scalable method for estimating the containment index and average nucleotide identity between two genomic datasets.
This method underpins tools like sourmash and enables efficient estimation of the containment index—the fraction of k-mers from one dataset present in another—without storing full k-mer sets. By adjusting the scaled parameter s, users trade off sketch size against resolution, making FracMinHash particularly effective for large-scale metagenomic comparisons, Average Nucleotide Identity (ANI) estimation, and taxonomic profiling where both presence and relative coverage matter.
Frequently Asked Questions
Clear, technically precise answers to the most common questions about the FracMinHash sketching technique, its relationship to MinHash, and its role in large-scale genomic comparisons.
FracMinHash is a k-mer sketching technique that selects a fraction of all k-mer hash values falling below a defined abundance threshold, providing a robust and scalable method for estimating the containment index and average nucleotide identity (ANI) between two genomic datasets. Unlike standard MinHash, which selects a fixed number of minimum hash values, FracMinHash defines a scaled parameter s that determines the fraction of the hash space retained. Specifically, it keeps all hash values that are less than H / s, where H is the maximum possible hash value. This scaling approach ensures that the sketch size grows linearly with the size of the input dataset, making it directly comparable across datasets of different sizes without the need for normalization. The technique is foundational to tools like sourmash and Mash Screen, enabling rapid containment queries and taxonomic profiling at terabase scale.
Key Properties of FracMinHash
FracMinHash is a downsampled MinHash technique that selects a fraction of k-mer hash values falling below a defined abundance threshold, enabling scalable and robust estimation of genomic similarity metrics like containment and average nucleotide identity (ANI).
Fractional Downsampling Mechanism
Unlike standard MinHash which selects a fixed number of minimum hash values, FracMinHash selects all k-mer hash values that fall below a fraction threshold (s) of the maximum possible hash value. This creates a sketch whose size scales linearly with the number of distinct k-mers in the input dataset, providing a scale-invariant representation.
- Threshold parameter (s): Defines the fraction of the hash space retained (e.g., s=0.001 retains 0.1% of k-mers)
- Dynamic sketch size: Larger genomes produce proportionally larger sketches
- Hash function: Typically uses MurmurHash3 or xxHash for uniform distribution
Containment Index Estimation
FracMinHash provides an unbiased estimator of the containment index—the fraction of k-mers from one dataset (the query) that are present in another (the reference). This is computed as the ratio of intersecting hash values to the total hash values in the query sketch.
- Formula: Containment ≈ |Sketch(A) ∩ Sketch(B)| / |Sketch(A)|
- Key advantage: Does not require the reference sketch to be a fixed size
- Use case: Determining what fraction of a metagenomic sample matches a known genome
Average Nucleotide Identity (ANI) Estimation
FracMinHash sketches enable rapid ANI estimation without expensive base-level alignment. By comparing the containment and Jaccard indices derived from sketches, tools like sourmash and skani can estimate ANI with high accuracy.
- Mash distance: Derived from Jaccard index to estimate mutation rate
- ANI formula: ANI ≈ 1 + (1/k) * ln(Jaccard) for sufficiently large k
- Benchmark: Achieves >99% correlation with BLAST-based ANI for genomes above 90% identity
- Throughput: Processes thousands of genomes per minute on consumer hardware
Abundance-Weighted Variants
Standard FracMinHash treats all k-mers equally, but abundance-weighted FracMinHash variants incorporate k-mer multiplicity information to improve distance estimation for metagenomic samples with varying coverage depths.
- Weighted MinHash: Extends FracMinHash to preserve relative abundance signals
- Confidence intervals: Abundance weighting reduces variance in low-coverage regions
- Implementation: Used in tools like sourmash gather for metagenomic decomposition
- Trade-off: Increased sketch size for improved resolution of closely related strains
Scaled MinHash Implementation
The scaled MinHash variant of FracMinHash uses a fixed sampling rate (e.g., 1 in 1000) rather than a fixed sketch size, ensuring that sketches from datasets of different sizes remain directly comparable without normalization.
- Parameter: Scaled factor (e.g., scaled=1000 retains 1/1000th of k-mers)
- Merge compatibility: Sketches with identical scaled parameters can be combined via union operations
- Streaming support: Enables sketching of unbounded data streams without pre-knowledge of dataset size
- Adoption: Core algorithm in sourmash for large-scale genomic indexing
Error Robustness and False Positive Control
FracMinHash sketches exhibit inherent error tolerance because sequencing errors generate random k-mers that are unlikely to consistently hash below the fraction threshold across multiple samples. This provides natural denoising without explicit quality filtering.
- Error k-mers: Low-abundance erroneous k-mers are stochastically excluded from the sketch
- False positive rate: Controllable via the fraction parameter (s) and k-mer size (k)
- k-mer size selection: Larger k (e.g., k=31) reduces random collisions between unrelated genomes
- Practical impact: Enables accurate comparisons directly from raw sequencing reads without assembly
FracMinHash vs. MinHash vs. ModHash
A technical comparison of k-mer hashing strategies used for genomic distance estimation, containment index calculation, and large-scale sequence comparison.
| Feature | FracMinHash | MinHash | ModHash |
|---|---|---|---|
Selection Criterion | Hash value below scaled abundance threshold (fraction of k-mer space) | Global minimum hash values across all k-mers | Hash values divisible by a fixed denominator (modulo condition) |
Sketch Size Determinant | User-defined scaled parameter (s) controlling fraction of retained hashes | User-defined sketch size (k) controlling number of minima retained | User-defined modulo denominator (d) controlling 1/d retention rate |
Primary Use Case | Containment index estimation and Average Nucleotide Identity (ANI) | Jaccard similarity estimation between sets | Subsampling k-mer sets with uniform probability |
Containment Index Support | |||
ANI Estimation | |||
Jaccard Similarity Estimation | |||
Downsampling Bias | Low (fraction-based selection preserves abundance distribution) | Low (consistent minima across similar sets) | Moderate (uniform subsampling independent of abundance) |
Implementation in Sourmash |
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
Understanding FracMinHash requires familiarity with the foundational sketching and genomic distance estimation techniques it builds upon.
Containment Index
An asymmetric similarity metric that measures what fraction of a query genome's k-mers are present in a reference genome. Unlike the symmetric Jaccard index, containment answers: 'How much of genome A is contained within genome B?' This is critical for metagenomic analysis where a sample may partially match a reference. FracMinHash provides an unbiased estimator of the containment index by comparing the fraction of query sketch elements that appear in the reference sketch.
Average Nucleotide Identity (ANI)
A pairwise measure of genomic relatedness between two microbial genomes, calculated as the mean nucleotide identity of all orthologous genes shared between them. ANI values above 95% typically indicate the same species. FracMinHash sketches enable rapid ANI estimation without full genome alignment by leveraging the relationship between k-mer containment and sequence identity. This allows ANI computation to scale to millions of comparisons in large metagenomic datasets.
k-mer Spectrum
The frequency distribution of all possible nucleotide subsequences of a fixed length k within a sequencing read or genome. The k-mer spectrum serves as a fundamental compositional feature for assembly-free classification and binning algorithms. FracMinHash operates on the k-mer spectrum by hashing each k-mer and selecting only those whose hash values fall below a defined abundance threshold, creating a scalable sketch that preserves the statistical properties needed for downstream analysis.
Scaled MinHash
A variant of MinHash implemented in the sourmash tool that selects hash values below a fixed fraction of the maximum hash value, rather than a fixed number of minimum values. This scaling approach makes the sketch size proportional to the number of unique k-mers in the input, enabling comparisons between datasets of vastly different sizes. FracMinHash generalizes this concept by introducing an abundance threshold that filters low-frequency k-mers, reducing noise from sequencing errors.

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