Abstract
This paper presents the first $\varepsilon$-coresets for $k$-median clustering of point sequences under the Dynamic Time Warping (DTW) distance. DTW is a non-metric distance measure widely used for time-series analysis, but its lack of a triangle inequality makes standard data reduction techniques inapplicable. We overcome this by establishing a "weak iterated triangle inequality" and bounding the VC dimension of range spaces defined by DTW balls. Our approach yields the first polynomial-time approximation algorithms for $(k, \ell)$-median clustering with guarantees comparable to state-of-the-art metric methods.
Introduction
Clustering sequences of points, such as GPS trajectories or speech signals, is a cornerstone of modern data analysis. Dynamic Time Warping (DTW) is the preferred distance measure for these tasks because it accounts for temporal shifts and varying speeds by finding an optimal alignment between sequences. However, DTW's computational cost and non-metric properties—specifically the violation of the triangle inequality—pose significant hurdles for scaling to large datasets.
The Challenge of Non-Metric Spaces
Most coreset and clustering frameworks rely on the triangle inequality to bound errors when approximating a large dataset with a small weighted subset. Because DTW is not a metric, these standard tools fail. The authors address this by introducing a "Weak Iterated Triangle Inequality" (Lemma 22). This property demonstrates that while the triangle inequality doesn't hold strictly, the error from "jumping" through intermediate curves is bounded by a factor dependent on the curves' complexity.
Bounding Complexity via VC Dimension
To construct a coreset via sensitivity sampling, one must bound the complexity of the underlying range space. The authors prove new bounds on the Vapnik-Chervonenkis (VC) dimension of balls under DTW. They show that the VC dimension depends linearly on the complexity $\ell$ of the query centers but only logarithmically on the complexity $m$ of the input data. This insight is crucial for practical applications where input sequences are long, but cluster centers should remain simple and interpretable.
Algorithms and Results
By approximating the DTW distance with a "metric closure"—treating curves as nodes in a graph and using shortest paths—the authors adapt efficient metric clustering algorithms to the DTW setting. Key results include:
- Coreset Existence: The existence of $\varepsilon$-coresets for $(k, \ell)$-median clustering with size quadratic in $1/\varepsilon$ and $k$, and logarithmic in the number of input curves $n$.
- Linear-Time Approximation: A $((32+\varepsilon)(4m\ell)^{1/p}, 1)$-approximation algorithm that runs in linear time relative to $n$.
- Efficiency: These are the first polynomial-time algorithms for this problem that achieve competitive approximation factors.
Conclusion
This work provides a theoretical foundation for scaling DTW-based clustering. By showing that DTW's non-metric nature is structured and manageable, the authors open the door for high-performance trajectory analysis on massive datasets. Future work may focus on tightening approximation constants and empirical testing on real-world time-series archives.
Summary updated