跳到正文
研踪PaperTrail
← 研踪 PaperTrail

arXiv:2611.30206 · v1

Location-Aware Matching Statistics

首次提交 2026-11-23 15:43
版本更新 2026-11-23 15:43
雷达观测 2026-11-24 13:48
arXiv ↗PDF ↗

摘要

Edit distance is the standard measure of string similarity, but its quadratic-time complexity is prohibitive for long strings. Popular linear-time alternatives, such as the qq-gram distance, or the average common substring measure (ACS) that is based on matching statistics (MS), consider the substrings shared by the two input strings but not where they occur in each string. Yet in many real-world applications, e.g., when comparing document versions or co-recorded time series, a shared substring is really relevant only if its occurrences are close in position. We introduce Location-Aware Matching Statistics (LAMAS). Given strings XX and YY and a displacement tolerance dd, LAMAS reports, for every position ii of YY, the longest substring starting at ii that occurs in XX at a position jj with ∣j−i∣≤d|j-i|\le d, together with the displacement (j−i)(j-i). MS is the special case of LAMAS with unbounded dd. Our main result is an algorithm that solves LAMAS in O(n)\mathcal{O}(n) time and space for strings of length at most nn and any dd; this is optimal and matches the complexity of MS. The algorithm reduces LAMAS to predecessor and successor queries over a sliding window of suffix ranks and answers them in linear total time via a window decomposition and interval union-find. Experiments on 20 real datasets and synthetic data show that LAMAS substantially improves over MS and qq-gram distance in similarity-based classification, top-KK retrieval, and clustering. It is competitive with edit distance and a constrained dynamic time warping variant in classification and generally outperforms a state-of-the-art method for top-KK retrieval under edit distance. Finally, our implementation of the main algorithm for LAMAS scales linearly in nn and does not slow down as dd grows.

AI 论文解读

基于摘要 · 非全文审阅

此版本尚未生成 AI 解读。解读由后台任务生成并按论文版本保存,登录后共享已有结果。

版本差异

目前只收录了一个版本。收录下一版后,可以对照标题、作者、分类和摘要。

观测到的版本

相邻记录可能跳过中间版本;首次发现 v2 及以上也会标为版本更新。

v1 · 2026-11-23 15:43 · 最新观测版本

Location-Aware Matching Statistics

Edit distance is the standard measure of string similarity, but its quadratic-time complexity is prohibitive for long strings. Popular linear-time alternatives, such as the qq-gram distance, or the average common substring measure (ACS) that is based on matching statistics (MS), consider the substrings shared by the two input strings but not where they occur in each string. Yet in many real-world applications, e.g., when comparing document versions or co-recorded time series, a shared substring is really relevant only if its occurrences are close in position. We introduce Location-Aware Matching Statistics (LAMAS). Given strings XX and YY and a displacement tolerance dd, LAMAS reports, for every position ii of YY, the longest substring starting at ii that occurs in XX at a position jj with ∣j−i∣≤d|j-i|\le d, together with the displacement (j−i)(j-i). MS is the special case of LAMAS with unbounded dd. Our main result is an algorithm that solves LAMAS in O(n)\mathcal{O}(n) time and space for strings of length at most nn and any dd; this is optimal and matches the complexity of MS. The algorithm reduces LAMAS to predecessor and successor queries over a sliding window of suffix ranks and answers them in linear total time via a window decomposition and interval union-find. Experiments on 20 real datasets and synthetic data show that LAMAS substantially improves over MS and qq-gram distance in similarity-based classification, top-KK retrieval, and clustering. It is competitive with edit distance and a constrained dynamic time warping variant in classification and generally outperforms a state-of-the-art method for top-KK retrieval under edit distance. Finally, our implementation of the main algorithm for LAMAS scales linearly in nn and does not slow down as dd grows.

查看此版本解读 →查看此版本原文 ↗