dDTW Toolbox
The dDTW Toolbox provides PyTorch losses for differentiable sequence alignment. It implements a unified graph-based dynamic-programming framework for weakly supervised sequence learning problems where target order is known but frame-level timing is not. The toolbox is based on the accompanying paper [1] and a prior article. [2]
References
[1] Johannes Zeitler and Meinard Müller. dDTW: A Unified and Efficient Toolbox for Differentiable Sequence Alignment. Submitted 2026.
[2] Johannes Zeitler and Meinard Müller. A Unified Perspective on CTC and SDTW Using Differentiable DTW. IEEE Transactions on Audio, Speech and Language Processing, 34:936-951, 2026.
In the paper, alignment losses are represented as path-cost aggregation on a weighted directed acyclic graph (DAG). Vertices represent possible correspondences between sequence elements, while step sizes, edge weights, boundary conditions, local costs, and aggregation operators determine the actual objective. Classical DTW [3], Soft-DTW [4], smoothDTW [5], sparseDTW [6], subsequence alignment [7], partial matching [8], and CTC [9] are recovered as particular graph configurations.
Reference
References