TL;DR
MinJoin introduces a novel randomized string-partitioning algorithm for edit similarity joins that scales efficiently to long strings and large error thresholds. By leveraging "local hash minima," it achieves 100% accuracy with high probability while outperforming state-of-the-art exact methods by orders of magnitude and approximate methods by 2-5x in speed.
What Problem Does This Paper Address?
Finding all pairs of strings in a dataset with an edit distance less than or equal to a threshold $K$—known as an edit similarity join—is a foundational operation in data cleaning, database integration, and bioinformatics.
However, modern applications, particularly third-generation DNA sequencing (like SMRT sequencing), generate very long reads (1,000 to 100,000+ base pairs) accompanied by high error rates (12-18%). Existing exact algorithms suffer from combinatorial explosions when dealing with large thresholds and long strings, rendering them unusable. Conversely, existing randomized approaches, such as EmbedJoin, scale better but suffer from imperfect recall (95-99%), which can cause researchers to miss critical genetic alignments. MinJoin bridges this gap by providing both scalability and perfect accuracy.
Methods
MinJoin operates on a signature-based string partition framework but introduces a unique twist: Local Hash Minima.
- Hashing $q$-grams: For a given string $s$, every substring of length $q$ ($q$-gram) is mapped to a random value between 0 and 1 using a hash function $\Pi$.
- Finding Anchors: A position within the string is designated as an "anchor" if its $q$-gram hash value is strictly the smallest within a local neighborhood of radius $r$.
- Partitioning: The string is cut at these anchor points into a set of substrings.
The core mathematical insight is that if two strings are highly similar, they will share a sufficiently long common substring. This guarantees, with high probability, that they will share identical local anchors within that substring, resulting in at least one identical partition.
The workflow is illustrated by the authors' running example:

Once partitioned, candidates sharing a substring are matched via a hash join. MinJoin then applies two fast pruning rules (checking string length differences and alignment bounds) before running a final exact verification step using Ukkonen’s dynamic programming algorithm to eliminate false positives.
Datasets
The authors evaluated MinJoin against state-of-the-art methods using three publicly available datasets:
- UNIREF: 400,000 protein sequences from the UniProt Project (average length: 445).
- TREC: 233,435 concatenated titles and abstracts from medical journals (average length: 1,217).
- GEN-X-Y: Synthetic human genome read datasets sampled from Chromosome 20, varying in size ($X$ from 20k to 320k strings) and length ($Y$ from 5k to 20k base pairs) to simulate third-generation sequencing data.
Key Insights and Ideas
- Independence is Power: Unlike methods like VChunk that rely on a global "chunk boundary dictionary" (which is NP-hard to optimize and data-dependent), MinJoin selects anchors purely based on local context. This allows each string to be processed completely independently in linear time $O(N)$.
- Strict Inequality Defeats Repetition: By requiring an anchor's hash value to be strictly smaller than its neighbors, MinJoin naturally suppresses false positives caused by low-complexity, periodic sequences (e.g., "AAAAAAAA"), which are common systematic errors in sequencing data.
- Dynamic Neighborhoods: MinJoin dynamically adjusts the neighborhood radius $r$ based on the string's length. This prevents long strings from generating an excessive number of partitions, keeping the candidate pool small and verification fast.
Key Results
- Perfect Accuracy: MinJoin achieved 100% recall across all tested datasets, eliminating the 1-5% missing pairs typical of alternative randomized approaches.
- Massive Speedups: On long genomic strings (
GEN50kSwith $K=150$), MinJoin outperformed the best exact deterministic algorithms by orders of magnitude and beat EmbedJoin by a factor of 4.5x. - Linear Scaling: The string partitioning phase scales strictly linearly $O(nN)$ with the total input size, making it highly scalable.
- Low Memory Footprint: MinJoin consistently maintained the lowest memory usage among all tested algorithms, particularly outperforming PassJoin on large text datasets.
Limitations and Future Work
- Theoretical vs. Practical Gap: To theoretically guarantee 100% accuracy with high probability, the algorithm requires a parallel repetition step ($\log n$ times). While a single execution achieved perfect accuracy in all empirical tests, massive or adversarial datasets might still require repetitions, increasing time and space complexity by a $\log n$ factor.
- Verification Bottleneck: As string length $N$ and threshold $K$ scale up significantly, the verification step ($O(NK)$ per candidate pair) becomes the primary bottleneck, slightly narrowing MinJoin's performance advantage over embedding-based approaches on exceptionally large datasets.
Summary updated