bioRxivBioinformaticsPreprint
Cosine Similarity Estimation Using FracMinHash: Theoretical Analysis, Safety Conditions, and Implementation
Abstract
MotivationThe increasing number and volume of genomic and metagenomic data necessitates scalable and robust computational models for precise analysis. Sketching techniques utilizing k-mers from a biological sample have proven to be useful for large-scale analyses. In recent years, FracMinHash has emerged as a popular sketching technique and has been used in several useful applications. Recent studies on FracMinHash proved unbiased estimators for the containment and Jaccard indices. However, theoretical investigations for other metrics, such as the cosine similarity, are still lacking. Theoretical contributionsIn this paper, we present a theoretical framework for estimating cosine similarity from FracMinHash sketches. We establish conditions under which this estimation is sound, and recommend a minimum scale factor s for accurate results. Experimental evidence supports our theoretical findings. Practical contributionsWe also present frac-kmc, a fast and efficient FracMinHash sketch generator program. frac-kmc is the fastest known FracMinHash sketch generator, delivering accurate and precise results for cosine similarity estimation on real data. We show that by computing FracMinHash sketches using frac-kmc, we can estimate pairwise cosine similarity speedily and accurately on real data. frac-kmc is freely available here: https://github.com/KoslickiLab/frac-kmc/. 2012 ACM Subject ClassificationApplied computing [->] Computational biology
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- Connecting Syncmers to FracMinHash: similarities and advantages
Shaopeng Liu, David Koslicki·bioRxiv·Nov 9, 2023
- MaxGeomHash: An Algorithm for Variable-Size Random Sampling of Distinct Elements
Mahmudur Rahman Hera, David Koslicki, Conrado Martı́nez·bioRxiv·Nov 11, 2025
- CMash: fast, multi-resolution estimation of k-mer-based Jaccard and containment indices
Shaopeng Liu, David Koslicki·BioinformaticsPeer-reviewed·Apr 14, 2022
- Debiasing FracMinHash and deriving confidence intervals for mutation rates across a wide range of evolutionary distances
Mahmudur Rahman Hera, N. Tessa Pierce‐Ward, David Koslicki·Genome ResearchPeer-reviewed·Jun 21, 2023
- How do noise and precision contraints jointly determine the minimum sketch size for fixed-size MinHash Jaccard estimation?
Anicet Ebou, Dominique Koua·bioRxiv·Aug 20, 2026
- Improving Min Hash via the Containment Index with applications to Metagenomic Analysis
David Koslicki, Hooman Zabeti·Applied Mathematics and ComputationPeer-reviewed·Mar 1, 2019