Fast Gradient-Based Approximation of Continuous Dynamic Time Warping

Pierre Houedry, Romain Tavenard, Nicolas Courty, Romaric Gaudel
10/9/2026
stat.MLcs.LG

No confident code implementation found for this paper.

Abstract

Dynamic Time Warping (DTW) is a common choice for measuring the discrepancy between time series. It proceeds by finding an optimal warping between timestamps through dynamic programming, which can be slow and is not differentiable.

Show full abstract

Consequently, several variants have been proposed. Among them, Soft-DTW proposes a smooth formulation of DTW, amenable to gradient computation, while Continuous-DTW (CDTW) introduces a continuous formulation through parametrizable warping functions. Yet, computational costs remain high for both methods and impractical for large datasets in modern machine learning pipelines. This paper revisits CDTW in several ways. After establishing its differentiability under mild conditions, we introduce FastCDTW, which is an efficient approximate solver with two different computational strategies: an exact closed-form scheme for piecewise-linear warping functions, and an unbiased Monte Carlo estimator for smooth ones, such as implicit neural networks. Both strategies provide gradients with respect to the warping function and the input time series, and the resulting algorithm is GPU-friendly. We demonstrate its benefits through its integration into more complex learning problems, including time series averaging, classification and deep domain adaptation.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{houedry2026fast,
  title  = {Fast Gradient-Based Approximation of Continuous Dynamic Time Warping},
  author = {Pierre Houedry and Romain Tavenard and Nicolas Courty and Romaric Gaudel},
  year   = {2026},
  eprint = {2610.13129},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.13129v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.13129.svg)](https://codeofpaper.com/paper/2610.13129)

Discussion