ICML 2025

Improved Learning via k-DTW: A Novel Dissimilarity Measure for Curves
Amer Krivoˇsija 1 Alexander Munteanu 1 2 Andr´e Nusser 3 Chris Schwiegelshohn 4
Abstract
This paper introduces k-Dynamic Time Warping
(k-DTW), a novel dissimilarity measure for polyg-
onal curves. k-DTW has stronger metric proper-
ties than Dynamic Time Warping (DTW) and is
more robust to outliers than the Fr´echet distance,
which are the two gold standards of dissimilarity
measures for polygonal curves. We show inter-
esting properties of k-DTW and give an exact
algorithm as well as a (1 + ε)-approximation al-
gorithm for k-DTW by a parametric search for
the k-th largest matched distance. We prove the
first dimension-free learning bounds for curves
and further learning theoretic results. k-DTW not
only admits smaller sample size than DTW for the
problem of learning the median of curves, where
some factors depending on the curves’ complexity
m are replaced by k, but we also show a surpris-
ing separation on the associated Rademacher and
Gaussian complexities: k-DTW admits strictly
smaller bounds than DTW, by a factor ˜Ω(√m)
when k ≪m. We complement our theoretical
findings with an experimental illustration of the
benefits of using k-DTW for clustering and near-
est neighbor classification.
1. Introduction
Handwriting, panel data, time series, sensor-generated tra-
jectories, and many more types of data are instances of
polygonal curves in Euclidean space. These curves are
input for learning processes, both supervised and unsuper-
vised. To compare and quantify the distance of two curves,
a suitable dissimilarity measure is needed that reflects the
fact that similar curves that represent, for instance, the same
1TU Dortmund, Germany 2University of Cologne, Germany
3Universit´e Cˆote d’Azur, CNRS, Inria, France 4Aarhus University,
Denmark. Correspondence to: A. Krivoˇsija <amer.krivosija@tu-
dortmund.de>,
A.
Munteanu
<alexander.munteanu@tu-
dortmund.de>,
A.
Nusser
<andre.nusser@cnrs.fr>,
C.
Schwiege...