WETW: Learning Pair-Specific Weighted Euclidean Distances for Efficient DTW Search
Computer Science > Machine Learning arXiv:2611.17412 (cs) [Submitted on 12 Nov 2026] Title: WETW: Learning Pair-Specific Weighted Euclidean Distances for Efficient DTW Search Authors: Christos Panourgias, Qitong Wang, George Tzagkarakis, Themis Palpanas.
计算机科学 > 机器学习 arXiv:2611.17412 (cs) [提交于 2026 年 11 月 12 日] 标题:WETW:学习用于高效 DTW 搜索的成对加权欧几里得距离 作者:Christos Panourgias, Qitong Wang, George Tzagkarakis, Themis Palpanas。
Abstract: Dynamic Time Warping (DTW) is the standard distance for similarity search over time series that are misaligned in time, but its cost is quadratic in the series length and lower bounds often prune few candidates, so search over large collections of long series is slow. Learned approximations embed the series to make comparisons cheap, yet compare every pair with the same fixed rule, usually the Euclidean distance, although DTW aligns each pair differently.
摘要:动态时间规整(DTW)是针对时间上未对齐的时间序列进行相似性搜索的标准距离度量,但其计算成本随序列长度呈二次方增长,且下界往往只能剪枝少量候选对象,因此在大规模长序列集合上的搜索速度较慢。学习型近似方法通过对序列进行嵌入以降低比较成本,但通常使用相同的固定规则(通常是欧几里得距离)来比较每一对序列,尽管 DTW 对每一对序列的对齐方式各不相同。
We observe that, once a pair is aligned, DTW is a Euclidean distance over coordinates selected for that pair. Building on this view, we propose Weighted Euclidean Time Warping (WETW), a learned distance that adapts the comparison of fixed-length embeddings to each pair. A small symmetric network predicts one weight per embedding dimension and pair without computing an alignment, which halves the error of the best static distance on the same embeddings.
我们观察到,一旦一对序列完成对齐,DTW 就等同于在该对序列所选坐标上的欧几里得距离。基于这一观点,我们提出了加权欧几里得时间规整(WETW),这是一种能够根据每一对序列调整定长嵌入比较的学习型距离度量。一个小型对称网络无需计算对齐即可为每个嵌入维度和序列对预测一个权重,这使得在相同嵌入上的最佳静态距离误差减半。
The embeddings come from the Weighted Euclidean SEries Encoder (WESEE), whose multi-scale Temporal Feature Extractor keeps the timing information that global pooling removes and raises recall@1 from 0.90 to 0.95, although WETW works with any encoder. We also show that fitting DTW distances is not enough for search, as regression alone misorders the closest neighbours, and that ranking regularization raises recall@1 from 0.79 to 0.95.
这些嵌入来自加权欧几里得序列编码器(WESEE),其多尺度时间特征提取器保留了全局池化所移除的时间信息,并将 recall@1 从 0.90 提高到 0.95,尽管 WETW 适用于任何编码器。我们还证明,仅拟合 DTW 距离不足以进行搜索,因为单纯的回归会错误排序最近邻,而引入排序正则化可将 recall@1 从 0.79 提高到 0.95。
Our filter-and-verify pipeline, WETW-FV, uses WETW to build a shortlist and exact DTW to check it, so the search is approximate but every returned distance is exact. Over eight datasets, WETW-FV is 11.4x faster than the fastest exact method among the UCR Suite, lower bounds and MESSI-DTW, at a mean recall@10 of 0.93, while the best learned baseline reaches 0.59 at the same speed.
我们的过滤与验证流水线 WETW-FV 使用 WETW 构建候选列表,并使用精确的 DTW 进行核对,因此搜索过程是近似的,但返回的每个距离都是精确的。在八个数据集上,WETW-FV 的速度比 UCR Suite、下界方法和 MESSI-DTW 中最快的精确方法快 11.4 倍,平均 recall@10 为 0.93,而最佳学习基准在相同速度下仅达到 0.59。