[论文解读] Deep Declarative Dynamic Time Warping for End-to-End Learning of Alignment Paths
本文提出 DecDTW,一种基于深度声明网络与双层优化的可微分动态时间规整层,支持端到端学习并输出精确的最优对齐路径,而非软近似。与 Soft-DTW 不同,DecDTW 输出离散且精确的对齐路径,可直接与真实标签进行优化,在音频到乐谱对齐与视觉位置识别任务中实现最先进性能,准确率与训练效率均得到提升。
This paper addresses learning end-to-end models for time series data that include a temporal alignment step via dynamic time warping (DTW). Existing approaches to differentiable DTW either differentiate through a fixed warping path or apply a differentiable relaxation to the min operator found in the recursive steps used to solve the DTW problem. We instead propose a DTW layer based around bi-level optimisation and deep declarative networks, which we name DecDTW. By formulating DTW as a continuous, inequality constrained optimisation problem, we can compute gradients for the solution of the optimal alignment (with respect to the underlying time series) using implicit differentiation. An interesting byproduct of this formulation is that DecDTW outputs the optimal warping path between two time series as opposed to a soft approximation, recoverable from Soft-DTW. We show that this property is particularly useful for applications where downstream loss functions are defined on the optimal alignment path itself. This naturally occurs, for instance, when learning to improve the accuracy of predicted alignments against ground truth alignments. We evaluate DecDTW on two such applications, namely the audio-to-score alignment task in music information retrieval and the visual place recognition task in robotics, demonstrating state-of-the-art results in both.
研究动机与目标
- 为解决现有可微分 DTW 方法依赖软近似或固定对齐路径的局限性,这些方法在对齐路径精度至关重要的端到端学习中表现受限。
- 将动态时间规整建模为连续、带不等式约束的优化问题,实现精确最优对齐路径的计算与可微分性。
- 通过可微分梯度实现对对齐路径的直接监督,尤其在真实对齐路径可用时效果更佳。
- 在真实世界对齐任务(如音频到乐谱对齐与视觉位置识别)中,展示性能与效率的提升。
- 提供一种可扩展的可微分 DTW 层,输出离散且可解释的对齐路径,适用于路径相关损失函数。
提出的方法
- 基于 GDTW(广义 DTW)框架,将 DTW 建模为基于连续时间的非线性规划(NLP)问题,支持连续时间规整函数。
- 设计专用动态规划算法,用于前向传播计算两段时间序列的最优对齐路径。
- 通过深度声明网络(DDN)框架应用隐式微分,实现对 NLP 最优解的梯度反向传播。
- 利用隐函数定理推导梯度,避免对整个优化过程进行反向传播。
- 将 DecDTW 层集成至深度学习模型,实现基于路径敏感损失函数的端到端训练。
- 通过可微分损失函数直接优化对齐路径,惩罚预测路径与真实路径之间的差异。

实验结果
研究问题
- RQ1能否设计一种可微分 DTW 层,输出精确的离散对齐路径而非软近似,从而实现对对齐准确率的直接监督?
- RQ2在对齐路径精度为主要目标的任务中,使用精确对齐路径是否能提升端到端学习的性能?
- RQ3在真实世界对齐任务中,DecDTW 与 Soft-DTW 及其他可微分 DTW 基线相比,在效率与准确率方面表现如何?
- RQ4所提出的公式是否可扩展以支持显式优化对齐保真度的路径相关损失函数?
- RQ5在长时间序列中,精确路径计算与计算成本之间的可扩展性权衡如何?
主要发现
- DecDTW 在音频到乐谱对齐任务中达到最先进性能,在 MAESTRO 数据集上 5m 误差容忍度下准确率达 90.1%,优于 Soft-DTW 与其他基线方法。
- 在视觉位置识别任务中,DecDTW 在 TUM-ROV 数据集上 100m 误差容忍度下准确率达 88.0%,显著优于 DILATE 与基线模型。
- 与基线特征及 DILATE 相比,DecDTW 显著降低最大 GPS 误差,尤其在更严格的误差容忍度(≤5m)下表现更优,体现更强的对齐学习能力。
- 在 VPR 任务中,DecDTW 在 100m 误差容忍度下准确率较 DILATE 提升 13.5%,表明其在利用路径信息方面更具优势。
- 尽管 GDTW 在推理阶段比 DTW 慢 15–50 倍,但通过移除规整优化迭代,性能差距可缩小至 4–12 倍,且准确率仅损失 0.5%。
- 与 OTAM 和 Along GT 损失相比,使用 DecDTW 进行微调能显著降低定位误差,后者因缺乏路径监督而无法超越基线特征。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。