open access publication

Conference Paper, 2024

Dynamic Dynamic Time Warping

Proceedings of the Annual ACM SIAM Symposium on Discrete Algorithms, Volume 2024-, Pages 208-242, 10.1137/1.9781611977912.10

Contributors

Bringmann K. 0000-0003-1356-5177 [1] [2] Fischer N. [3] van der Hoog I. [4] Kipouridis E. 0000-0002-5830-5830 [1] [2] Kociumaka T. [2] Rotenberg E. 0000-0001-5853-7909 [4]

Affiliations

  1. [1] Saarland University
  2. [NORA names: Germany; Europe, EU; OECD];
  3. [2] Max Planck Institute for Informatics
  4. [NORA names: Germany; Europe, EU; OECD];
  5. [3] Weizmann Institute of Science
  6. [NORA names: Israel; Asia, Middle East; OECD];
  7. [4] Technical University of Denmark
  8. [NORA names: DTU Technical University of Denmark; University; Denmark; Europe, EU; Nordic; OECD]

Abstract

The Dynamic Time Warping (DTW) distance is a popular similarity measure for polygonal curves (i.e., sequences of points). It finds many theoretical and practical applications, especially for temporal data, and is known to be a robust, outlier-insensitive alternative to the Fréchet distance. For static curves of at most n points, the DTW distance can be computed in O(n) time in constant dimension. This tightly matches a SETH-based lower bound, even for curves in R. In this work, we study dynamic algorithms for the DTW distance. Here, the goal is to design a data structure that can be efficiently updated to accommodate local changes to one or both curves, such as inserting or deleting vertices and, after each operation, reports the updated DTW distance. We give such a data structure with update and query time O(n log n), where n is the maximum length of the curves. As our main result, we prove that our data structure is conditionally optimal, up to subpolynomial factors. More precisely, we prove that, already for curves in R, there is no dynamic algorithm to maintain the DTW distance with update and query time O(n) for any constant δ > 0, unless the Negative-k-Clique Hypothesis fails. In fact, we give matching upper and lower bounds for various trade-offs between update and query time, even in cases where the lengths of the curves differ.

Data Provider: Elsevier