Near-Duplicate Text Alignment with One Permutation Hashing
Zhencan Peng, Yuheng Zhang, Dong Deng
Abstract
This paper studies the near-duplicate text alignment problem under the constraint of Jaccard similarity. Specifically, given a collection of long texts and a short query text, this problem finds all the subsequences in each text whose Jaccard similarities to the query are no smaller than a given threshold. Near-duplicate text alignment is computationally intensive. This is because there are O(n 2 ) subsequences in a text with n tokens. To remedy this issue, a few recent studies propose to first generate the min-hash sketch of every subsequence in each text and then find all the subsequences whose min-hash sketches are similar to that of the query. They introduce the concept of "compact windows" and show that the O(n 2 k) min-hashes in a text with n tokens can be losslessly compressed in compact windows using O(nk) space, where k is the sketch size. However, the space cost O(nk) is still too high for long texts, especially when the sketch size k is large. To address this issue, we propose to use One Permutation Hashing (OPH) to generate the min-hash sketch and introduce the concept of "OPH compact windows". Although the size of each sketch remains the same, which is O(k), we prove that all the O(n 2 k) min-hashes generated by OPH in a text with n tokens can be losslessly compressed in OPH compact windows using only O(n+k) space. Note the generation of OPH compact windows does not necessitate the enumeration of the O(n 2 k) min-hashes. Moreover, we develop an algorithm to find all the sketches in a text similar to that of the query directly from OPH compact windows, along with three optimizations.We conduct extensive experiments on three real-world datasets. Empirical results show our proposed algorithms significantly outperformed existing methods in terms of index cost and query latency and scaled well.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Cited by top-tier papers2
- Near-Duplicate Text Alignment under Weighted Jaccard SimilarityYuheng Zhang, Miao Qiao, Zhencan Peng, Dong DengVLDB 2026 · 1 citation
- SeDA: Bridging the Gap between Efficient Syntactic and Precise Semantic Search of Similar Passages in Large Text CorporaPranay Mundra, Daniel Kocher, Martin Schaeler, Nikolaus AugstenVLDB 2026
Related papers
- LSHAlign: All-Pair Near-Duplicate Text Alignment via Locality-Sensitive HashingYuheng Zhang, Zhencan Peng, Miao Qiao, Wei Zhang et al.SIGMOD 2026
- Allign: Aligning All-Pair Near-Duplicate Passages in Long TextsWeiqi Feng, Dong DengSIGMOD 2021 · 13 citations
- TxtAlign: Efficient Near-Duplicate Text Alignment Search via Bottom-k Sketches for Plagiarism DetectionZhizhi Wang, Chaoji Zuo, Dong DengSIGMOD 2022 · 14 citations
- C-MinHash: Improving Minwise Hashing with Circulant PermutationXiaoyun Li, Ping LiICML 2022 · 16 citations
- minIL: A Simple and Small Index for String Similarity Search with Edit DistanceZhong Yang, Bolong Zheng, Xianzhi Wang, Guohui Li et al.ICDE 2022 · 2 citations
