加权 Jaccard 相似度下的近似重复文本对齐
Near-Duplicate Text Alignment under Weighted Jaccard Similarity
AI总结:
本文提出 MONO,利用一致加权采样支持加权 Jaccard 相似度下的近似重复文本对齐,并在哈希框架中证明最优复杂度,实验显著提升索引与查询性能。
摘要:
近似重复文本对齐的任务是在语料库的文本中识别与给定查询相似的所有子序列(子串)。传统方法依赖“播种—扩展—过滤”启发式规则,缺乏准确性保证,并且需要许多难以调优的参数。近期方法在基于哈希的框架下利用 min-hash 技术:按照子序列的 min-hash 对其分组,并对任意查询找到与该查询草图相似的所有草图。这些方法保证报告所有与查询的估计非加权 Jaccard 相似度超过用户给定阈值的子序列,并且效率很高。然而,它们没有考虑 token 的重要性或频率,这限制了其在 token 带有权重的真实场景中的使用,例如 TF-IDF。为解决这一问题,我们提出 MONO,这是一种使用一致加权采样来支持加权 Jaccard 相似度的方法。MONO 在基于哈希的框架内达到最优性。例如,当 token 权重与频率成比例时,对于长度为 n 的文本,MONO 在期望意义下生成 O(n + n log f) 个分组,其中 f 是最大 token 频率。每个分组占用 O(1) 空间,并表示共享同一采样的少量子序列。我们证明该界是紧的:在最坏情况下,任何算法在期望意义下都必须产生 Ω(n + n log f) 个分组。实验表明,MONO 在索引构建时间上最高优于当前最优方法 26 倍,将索引大小最高减少 30%,并将查询延迟最高改善 3 倍,同时具有良好的可扩展性。
英文摘要:
Near-duplicate text alignment is the task of identifying, among the texts in a corpus, all the subsequences (substrings) that are similar to a given query. Traditional approaches rely on seeding-extension-filtering heuristics, which lack accuracy guarantees and require many hard-to-tune parameters. Recent methods leverage min-hash techniques under a hash-based framework: group subsequences by their min-hash, and for any query, find all sketches similar to the query's sketch. These methods guarantee to report all subsequences whose estimated unweighted Jaccard similarity with the query exceeds a user-provided threshold and are efficient. However, they fail to account for token importance or frequency, which limits their use in real scenarios where tokens carry weights, such as TF-IDF. To address this, we propose MONO, an approach that supports weighted Jaccard similarity using consistent weighted sampling. MONO achieves optimality within the hash-based framework. For example, when token weights are proportional to frequencies, MONO generates O(n + n log f) groups in expectation for a text of length n, where f is the maximum token frequency. Each group takes O(1) space and represents a few subsequences sharing the same sampling. We prove this bound is tight: any algorithm must produce Omega(n + n log f) groups in expectation in the worst case. Experiments show that MONO outperforms the state of the art by up to 26x in index construction time, reduces index size by up to 30 percent, and improves query latency by up to 3x, while scaling well.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。