Skip to main content
QUICK REVIEW

[Paper Review] Approximating Dynamic Time Warping and Edit Distance for a Pair of Point Sequences

Pankaj K. Agarwal, Kyle Fox|arXiv (Cornell University)|Dec 7, 2015
Time Series Analysis and ForecastingComputer Science8 citations
TL;DR

This paper presents the first subquadratic-time approximation algorithms for dynamic time warping (DTW) and edit distance (ED) on well-behaved point sequences in ℝᵈ, using geometric partitioning to reduce dynamic programming table entries. It achieves (1+ε)-approximations in near-linear time for κ-packed and κ-bounded curves, and subquadratic time for backbone sequences, leveraging spatial properties to optimize computation.

ABSTRACT

We give the first subquadratic-time approximation schemes for dynamic time warping (DTW) and edit distance (ED) of several natural families of point sequences in $\mathbb{R}^d$, for any fixed $d \ge 1$. In particular, our algorithms compute $(1+\varepsilon)$-approximations of DTW and ED in time near-linear for point sequences drawn from k-packed or k-bounded curves, and subquadratic for backbone sequences. Roughly speaking, a curve is $κ$-packed if the length of its intersection with any ball of radius $r$ is at most $κ\cdot r$, and a curve is $κ$-bounded if the sub-curve between two curve points does not go too far from the two points compared to the distance between the two points. In backbone sequences, consecutive points are spaced at approximately equal distances apart, and no two points lie very close together. Recent results suggest that a subquadratic algorithm for DTW or ED is unlikely for an arbitrary pair of point sequences even for $d=1$. Our algorithms work by constructing a small set of rectangular regions that cover the entries of the dynamic programming table commonly used for these distance measures. The weights of entries inside each rectangle are roughly the same, so we are able to use efficient procedures to approximately compute the cheapest paths through these rectangles.

Motivation & Objective

  • To develop efficient (1+ε)-approximation algorithms for DTW and ED on point sequences in ℝᵈ, where exact computation is known to be near-quadratic under SETH.
  • To address the computational bottleneck of dynamic programming tables by exploiting geometric properties of input sequences.
  • To achieve near-linear or subquadratic running times for natural classes of trajectories such as κ-packed, κ-bounded, and backbone sequences.
  • To enable scalable similarity computation for real-world applications like GPS trajectories, touch-screen patterns, and time-series analysis.

Proposed method

  • Constructing a hierarchical quadtree-based decomposition of the plane to group points into well-separated pairs.
  • Defining rectangular regions in the dynamic programming table where entry weights are approximately uniform, enabling efficient approximation.
  • Using a complete binary tree to maintain and query the minimum cost path through each rectangle in O(log n) time per operation.
  • Applying geometric constraints—κ-packed, κ-bounded, and backbone properties—to bound the number of relevant table entries visited.
  • Leveraging the fact that the number of boundary entries (|∂U|) is small due to curve regularity, ensuring efficient updates and queries.
  • Reducing the number of dynamic programming table entries processed by exploiting spatial locality and curve structure, leading to subquadratic performance.

Experimental results

Research questions

  • RQ1Can (1+ε)-approximate DTW and ED be computed in subquadratic time for point sequences in ℝᵈ with natural geometric structure?
  • RQ2What geometric properties of point sequences allow for significant reduction in the number of dynamic programming table entries that need to be processed?
  • RQ3Is it possible to achieve near-linear time for DTW and ED on κ-packed or κ-bounded curves in ℝᵈ?
  • RQ4Can the approach be extended to backbone sequences to yield subquadratic algorithms in higher dimensions?
  • RQ5Are there broader classes of geometric optimization problems solvable via similar table-reduction techniques based on input geometry?

Key findings

  • The algorithm achieves (1+ε)-approximation for DTW and ED in near-linear time for κ-packed and κ-bounded curves in ℝᵈ, with running time O(n log n) for fixed ε and d.
  • For backbone sequences, the algorithm runs in subquadratic time, specifically O(n^{2-1/(d+1)}) time under optimal parameter settings.
  • The number of relevant dynamic programming table entries is bounded by O(κ/ε n) for κ-packed, O(κᵈ/εᵈ n) for κ-bounded, and O(n^{2-1/(d+1)}/ε^{1-1/(d+1)}) for backbone sequences.
  • The use of a complete binary tree data structure enables efficient O(log n) updates and queries for maintaining minimum path costs through rectangular regions.
  • The approach reduces the number of processed table entries by exploiting geometric constraints, making it feasible to scale to large sequences.
  • The theoretical bounds are tight under SETH, confirming that subquadratic algorithms are unlikely for arbitrary sequences, justifying the focus on structured inputs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.