SoftDTW: a Differentiable Loss Function for TimeSeries
[edit]
Proceedings of the 34th International Conference on Machine Learning, PMLR 70:894903, 2017.
Abstract
We propose in this paper a differentiable learning loss between time series, building upon the celebrated dynamic time warping (DTW) discrepancy. Unlike the Euclidean distance, DTW can compare time series of variable size and is robust to shifts or dilatations across the time dimension. To compute DTW, one typically solves a minimalcost alignment problem between two time series using dynamic programming. Our work takes advantage of a smoothed formulation of DTW, called softDTW, that computes the softminimum of all alignment costs. We show in this paper that softDTW is a differentiable loss function, and that both its value and gradient can be computed with quadratic time/space complexity (DTW has quadratic time but linear space complexity). We show that this regularization is particularly well suited to average and cluster time series under the DTW geometry, a task for which our proposal significantly outperforms existing baselines (Petitjean et al., 2011). Next, we propose to tune the parameters of a machine that outputs time series by minimizing its fit with groundtruth labels in a softDTW sense. Source code is available at https://github.com/mblondel/softdtw
Related Material


