[Paper Review] Computing Continuous Dynamic Time Warping of Time Series in Polynomial Time
This paper presents the first exact polynomial-time algorithm for computing Continuous Dynamic Time Warping (CDTW) of one-dimensional time series curves, achieving an O(n⁵) time complexity. The method propagates continuous piecewise quadratic cost functions through a dynamic programming framework, with novel techniques to bound function complexity and ensure polynomial runtime, marking a foundational step toward practical CDTW usage in time series analysis.
Dynamic Time Warping is arguably the most popular similarity measure for time series, where we define a time series to be a one-dimensional polygonal curve. The drawback of Dynamic Time Warping is that it is sensitive to the sampling rate of the time series. The Fréchet distance is an alternative that has gained popularity, however, its drawback is that it is sensitive to outliers. Continuous Dynamic Time Warping (CDTW) is a recently proposed alternative that does not exhibit the aforementioned drawbacks. CDTW combines the continuous nature of the Fréchet distance with the summation of Dynamic Time Warping, resulting in a similarity measure that is robust to sampling rate and to outliers. In a recent experimental work of Brankovic et al., it was demonstrated that clustering under CDTW avoids the unwanted artifacts that appear when clustering under Dynamic Time Warping and under the Fréchet distance. Despite its advantages, the major shortcoming of CDTW is that there is no exact algorithm for computing CDTW, in polynomial time or otherwise. In this work, we present the first exact algorithm for computing CDTW of one-dimensional curves. Our algorithm runs in time $O(n^5)$ for a pair of one-dimensional curves, each with complexity at most $n$. In our algorithm, we propagate continuous functions in the dynamic program for CDTW, where the main difficulty lies in bounding the complexity of the functions. We believe that our result is an important first step towards CDTW becoming a practical similarity measure between curves.
Motivation & Objective
- Address the lack of an exact, polynomial-time algorithm for Continuous Dynamic Time Warping (CDTW), a similarity measure that combines the robustness of DTW and the continuity of the Fréchet distance.
- Overcome the limitations of existing measures: DTW's sensitivity to sampling rate and the Fréchet distance's sensitivity to outliers.
- Develop a dynamic programming approach that propagates continuous cost functions while bounding their complexity to ensure polynomial-time computation.
- Establish a theoretical foundation for CDTW to become a practical and widely adopted similarity measure in time series analysis.
Proposed method
- Formalize CDTW as a continuous alignment problem where the cost is the integral of point-wise distances along a monotonic traversal of two 1D polygonal curves.
- Use dynamic programming over a grid of curve segments, where each cell stores a continuous piecewise quadratic cost function representing the minimum cost to reach that point.
- Propagate cost functions through transitions (paths) of three types: (B1/B2) horizontal and vertical, and (C3.1/C3.2) diagonal with non-horizontal extensions.
- Apply cumulative minimum operations with non-horizontal (quadratic) extensions to model optimal paths, ensuring continuity and bounded complexity.
- Bound the number of pieces in each propagated cost function using structural analysis of quadratic functions and their derivatives.
- Prove that the total number of function pieces across all grid cells is polynomial, leading to an overall O(n⁵) time complexity.
Experimental results
Research questions
- RQ1Can an exact algorithm for CDTW be computed in polynomial time, despite the continuous nature of the alignment?
- RQ2What is the maximum complexity of the continuous cost functions that arise during dynamic programming propagation in CDTW?
- RQ3Can the propagation of continuous functions in CDTW be bounded well enough to yield a polynomial-time algorithm?
- RQ4Does the proposed method maintain the robustness of CDTW—resistance to sampling rate variation and outliers—while enabling exact computation?
Key findings
- The paper presents the first exact algorithm for computing CDTW of one-dimensional time series curves, running in O(n⁵) time.
- The algorithm propagates continuous piecewise quadratic cost functions through dynamic programming, with each function's complexity carefully bounded.
- The total number of pieces in all propagated functions is bounded by a polynomial in n, ensuring the overall runtime remains polynomial.
- The method achieves this by introducing non-horizontal, quadratic-shaped extensions in the cumulative minimum operation, which generalizes the standard approach used in discrete DTW.
- The analysis proves that the number of distinct (a,b) coefficient pairs in the quadratic functions is non-increasing across levels, enabling the O(n⁵) bound.
- The work establishes a foundational theoretical framework that supports the practical adoption of CDTW as a robust similarity measure in time series analysis.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.