Dynamic time warping (DTW) is a standard way to measure the discrepancy between time series, but its dynamic-programming solution is slow and not differentiable. Earlier variants such as Soft-DTW and Continuous-DTW (CDTW) addressed differentiability, yet remained computationally expensive for large modern datasets.

In a new preprint, Houedry and colleagues revisit CDTW and establish its differentiability under mild conditions. They then introduce FastCDTW, an approximate solver with two computational strategies: an exact closed-form scheme for piecewise-linear warping functions, and an unbiased Monte Carlo estimator for smooth warping functions such as those represented by implicit neural networks.

Both strategies provide gradients with respect to the warping function and the input time series, and the algorithm is GPU-friendly. The authors demonstrate its usefulness by integrating FastCDTW into time series averaging, classification, and deep domain adaptation tasks. Since this is a single source, there are no conflicting findings to compare.