Manuscript Offprint
arXiv:2610.13129Fast Gradient-Based Approximation of Continuous Dynamic Time Warping
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. 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.
1 Introduction
Measuring similarity between time series is a core building block of many machine learning pipelines, including nearest-neighbor classification (Bagnall et al., 2017), time series averaging and clustering (Petitjean et al., 2011; Cuturi and Blondel, 2017), and, more recently, domain adaptation (Painblanc et al., 2023) and representation learning for temporal data (Lods et al., 2017; Rhodes and Lee, 2024). Because real-world signals rarely share a common clock (sensors sample at different rates (Rubanova et al., 2019), the same phenomenon can unfold faster or slower across instances, sequences start and end at slightly different times), a similarity measure between time series must account for such temporal misalignments rather than compare observations index by index, as the Euclidean distance would do. Dynamic Time Warping (DTW) (Vintsyuk, 1968; Sakoe and Chiba, 1978) has become the default answer to this need: it aligns two sequences by searching, over the combinatorially many monotonic correspondences between their samples, for the one that minimizes a cumulative discrepancy. This combinatorial construction is also the source of DTW's two main limitations. First, DTW reasons about discrete index correspondences rather than about the underlying continuous phenomenon the sequences sample from, which makes it sensitive to the sampling rate and treats differently-sampled realizations of the same signal as fundamentally different objects. Second, the arg min over warping paths that defines DTW is a non-differentiable, piecewise-constant function of its inputs, which rules out the use of DTW as a training loss or as a component of a pipeline optimized by gradient descent.
These two limitations have each spawned their own line of remedies, but, as we argue below, neither has been resolved without giving up on the other. On the differentiability side, Cuturi and Blondel (2017) introduced Soft-DTW, which replaces the minimum over alignments with a soft-minimum controlled by a temperature parameter. This relaxation is genuinely differentiable and has enabled applications such as barycenter computation, clustering, and end-to-end learning with temporal alignment. The relaxation, however, is not without cost: smoothing the minimum over an exponential number of paths tends to average alignments rather than select among them, which in practice manifests as a systematic denoising effect (Blondel et al., 2021).
A separate line of work reformulates time warping directly in continuous time. Rather than an index correspondence, a warping is modeled as a pair of continuous, monotonic reparametrizations of the two signals, and the cost of the alignment is obtained by integrating, rather than summing, a local discrepancy along the corresponding curves. This continuous counterpart to DTW, referred to as Continuous DTW (CDTW) (Buchin et al., 2025), has been argued to avoid artifacts that plague DTW. Turning this appealing formulation into a usable algorithm, however, has proven difficult: existing methods either operate at a computational cost that remains impractical at the sequence lengths and iteration budgets required by machine learning pipelines, and without differentiability. Section 2 reviews these methods and their complexity in detail.
Soft-DTW and CDTW thus address complementary symptoms of the same underlying issue (respectively, the non-differentiability of DTW and its discreteness), but neither closes both gaps at once, and the continuous formulations that do exist remain, by their own authors' admission, computationally out of reach for practical use. What is missing is a similarity measure that is simultaneously (i) genuinely continuous, to avoid the sampling-rate artifacts of discrete alignments; (ii) differentiable, so that it can serve as a training loss or as a component of a larger learned pipeline and (iii) tractable at the sequence lengths and iteration counts encountered in practice.
We introduce FastCDTW which proceeds by solving the CDTW problem by gradient descent over a finite-dimensional parametrization of the warping functions rather than solving this problem to global optimality via dynamic programming. This choice trades the global-optimality guarantee enjoyed by exact CDTW solvers for tractability: computing FastCDTW costs orders of magnitude less than exact or approximate CDTW solvers, and it is naturally suited to batched GPU computation. The price to pay is that gradient descent on the resulting non-convex objective is not guaranteed to converge to the global minimum. We show throughout Section 4 and in our experiments that, despite this lack of global guarantees, the resulting approximation is accurate enough, and considerably faster, to be useful in practice.
We make the following contributions:
• Theoretical properties of CDTW (Section 3): we reduce the CDTW optimization to a single warping, show that Lipschitz warpings reach the same optimal cost, and prove the differentiability of CDTW with respect to an input curve when the warping is restricted to a parametrized family. To our knowledge, the last two results are new;
• FastCDTW, a gradient-based method to compute CDTW (Section 4): the warping is optimized by gradient descent over a finite-dimensional parametrization, and the cost is evaluated either in closed form for piecewise-linear warpings or by an unbiased Monte Carlo estimator for smooth ones. The method is GPU-friendly;
• An empirical validation on averaging, classification and domain adaptation tasks, showing that FastCDTW can be used as a replacement for DTW or Soft-DTW at a lower computational cost: it notably avoids the peak-erosion pathology of Soft-DTW barycenters, and runs up to faster than DTW when plugged into a domain adaptation pipeline.
2.1 Dynamic Time Warping
Dynamic Time Warping (DTW) is an alignment-based similarity measure for time series that was introduced independently by Vintsyuk (1968) and Sakoe and Chiba (1978) for speech recognition applications. Unlike the Euclidean distance, which matches observations strictly by their timestamps, DTW finds an optimal warping path through the cost matrix that minimizes the cumulative distance between two sequences, thereby accounting for local speed variations in the time axis. Given two time series
with each , DTW is defined as
where denotes the set of admissible warping paths from to satisfying the usual monotonicity and step-size constraints. Although the number of admissible paths grows combinatorially, the optimal warping cost can be computed exactly via dynamic programming in time.
However, the optimal warping path is a non-smooth function of the inputs, limiting its direct use in gradient-based optimization. We therefore review two lines of work that relax different aspects of DTW: differentiability and its discrete, index-based alignment.
2.2 Differentiable relaxations of DTW
Soft-DTW (Cuturi and Blondel, 2017) replaces the minimum over admissible paths in Equation (1) by a soft-minimum, so that the resulting cost function SoftDTW reads as
with controlling the trade-off between smoothness and fidelity to the original DTW cost. This cost can be computed with the same dynamic-programming recursion as DTW, replacing the hard minimum by a soft-minimum. It is differentiable, with a gradient computable in time and space via a backward recursion, which has made Soft-DTW the common choice for using DTW-like alignments as a training loss or inside a barycenter/clustering objective. This smoothing has a side effect: rather than selecting the best-aligned path, the soft-minimum blends many competing alignments, which tends to blur sharp, localized features Blondel et al. (2021). Soft-DTW thus trades DTW's non-differentiability for a smoothing bias while keeping a discrete, index-based alignment.
2.3 Continuous-time formulations
A separate line of work instead formulates time warping directly in continuous time, replacing the warping path with a pair of continuous, monotonic reparametrizations of the two signals. This continuous counterpart to DTW is generally referred to as Continuous DTW (CDTW) (Buchin, 2007). More precisely, given two curves , the CDTW functional is defined as:
where the alignment cost of a pair of warping maps is
the dependence on the two curves and being left implicit and with being the set of increasing -diffeomorphisms satisfying and . Beyond the switch from a sum to an integral, the multiplicative factor is another key difference with DTW. Geometrically, is a path from to in the unit square and this factor is its length element, so is the length of the path weighted at each point by (Buchin, 2007). The cost therefore does not depend on the speed at which the path is traversed, which rules out uninformative solutions and allows reducing CDTW to a single warping (Proposition 3.1).
Computing CDTW is itself a hard problem. Buchin et al. (2025) proposed the first exact algorithm for CDTW, propagating continuous functions through a dynamic program that runs in time but only for one-dimensional curves of at most samples each. Ergür and Khowala (2026) instead target an approximate solution, proposing a fully polynomial-time approximation scheme (FPTAS) of multiplicative error for CDTW between piecewise algebraic curves of bounded degree, with complexity . Both algorithms are restricted to specific curve representations (one-dimensional, or piecewise algebraic) rather than arbitrary sampled, multivariate time series, and neither is designed to produce a differentiable objective: they compute a single scalar distance value through a dynamic program, with no notion of a gradient with respect to the input signals.
GDTW (Deriso and Boyd, 2023) takes a slightly different route: it warps only one of the signals, and replaces the multiplicative factor of Equation (3) by adding two regularization terms, penalizing deviations of the warping from the identity and of its derivative from 1. These two regularizers play the same role as the multiplicative factor in CDTW but at the price of tuning two hyperparameters weighting each of the two terms. Despite its continuous-time formulation, the problem above is solved by discretizing the space of warping values and running a dynamic program to find the optimal warping on this discretized grid, iteratively refining the grid to reach high accuracy. As a result, GDTW remains, at its core, a dynamic-programming solver: it is poorly suited for autodifferentiation or to batched GPU computation, which limits its use as a building block inside larger, gradient-trained pipelines.
Taken together, these two lines of work each relax one of DTW's limitations while leaving the other largely untouched: Soft-DTW is differentiable but keeps the discrete alignment, while GDTW and CDTW solvers reformulate time warping in continuous time but remain fundamentally dynamic-programming algorithms, unfit for embedding inside models trained end to end. This is the gap our solver strategy, introduced in Section 4, aims to close.
3 Properties of CDTW
Before turning to its computation, we derive some properties of the CDTW objective (3): the reduction to a single warping (Proposition 3.1), the fact that Lipschitz warpings reach the same optimal cost (Proposition 3.2), and the differentiability, with respect to an input curve, of CDTW restricted to a parametrized family of warpings (Proposition 3.3). A similar reduction to a single path appears in Buchin et al. (2025, Lemma 1), but only for one-dimensional curves. To the best of our knowledge, Propositions 3.2 and 3.3 are new. All proofs are given in Appendix A.
Reparametrization. A property of the functional is that the optimization can always be reduced to a single reparametrization,
Proposition 3.1. Let be two continuously differentiable curves and let be as in (3). Then for every , there exists a reparametrization of such that
where and .
From now on we therefore optimize over a single warping map , and write .
Lipschitz maps. The set C in (2) only contains smooth, strictly increasing warpings, whereas practical warpings such as piecewise-linear ones can have corners and flat pieces. The following proposition shows that allowing such warpings does not decrease the optimal cost.
Proposition 3.2. Let be continuous, and let be the set of nondecreasing Lipschitz maps with and . Then
Differentiability. CDTW can be used as a training loss on a curve produced by a network. The variable to optimize is then and we write to make its dependence on explicit. In practice, is not optimized over all of but over a family indexed by a finite-dimensional parameter, the family used in this paper is introduced in Section 4.2. The quantity to differentiate is then , itself defined by a minimization over . The following proposition states that it is enough to differentiate at an optimal warping, held fixed.
Proposition 3.3. Assume that is continuous on , that is compact, that for every the map is nondecreasing and Lipschitz with and , and that is continuous from to . Let . Then:
(i) the set is nonempty and compact, so the infimum defining is a minimum;
(ii) for every , has at a one-sided directional derivative in the direction , given by
where, for every Lipschitz ,
4 FastCDTW
Since the warping above is a function rather than a sequence of index pairs, it can be optimized by gradient descent instead of dynamic programming, provided the cost of a candidate can be evaluated cheaply and differentiated. Section 4.1 gives two ways of evaluating this cost. Unlike the exact CDTW solver of Section 2, we do not claim to return the global optimum: we return the value at the warping our optimizer reaches, for a cost that makes it usable inside a model trained end to end.
4.1 Evaluating the alignment cost
We propose two schemes to evaluate . First, the Piecewise-linear scheme, which assumes , and are piecewise-linear functions of time, evaluates in closed form, without any discretization error (Proposition 4.1). Second, the Monte-Carlo scheme, which only assumes and can be evaluated pointwise, estimates by Monte Carlo sampling (Equation (7)).
Piecewise-Linear (PL) scheme. In most real-world applications we do not have access to the exact continuous maps x and y: we are only given samples
We denote by and their piecewise-linear interpolants, and by the piecewise-linear map defined by values on the uniform grid .
In this case, the integral of splits over intervals and each piece integrates in closed form.
Proposition 4.1. Assume that is strictly increasing, so that each preimage is a single point. Let be the strictly increasing union of
and set, for ,
Then
Monte-Carlo (MC) scheme. For any warping , we can instead estimate by drawing i.i.d. samples and set
It is well known that this estimator is unbiased and decays as : the dimension and the sampling of x and y affect the multiplicative constant, but not this rate. This estimation strategy requires nothing beyond pointwise evaluability of , , x and y.

Figure 1: Alignments obtained using FastCDTW for different values of , the number of breakpoints in the warping function . The two time series only differ by a central stretching over a null value, yielding a zero DTW distance (up to sampling artifacts).
4.2 Parametrization of
Several options are available for the warping , as long as they result in a differentiable and monotonic function. A natural choice could be monotonic-by-construction Neural Networks (e.g. (Wehenkel and Louppe, 2019; Runje and Shankaranarayana, 2023)). Yet, in practice, we found that a simple piecewise-linear parametrization of on a uniform grid is sufficient to capture the warping between two time series, while being computationally efficient. We hence adopt the grid parametrization of Rhodes and Lee (2024), with a SoftPlus activation, which can be evaluated by both schemes: gives increments whose normalized cumulative sums , are the breakpoint values of a piecewise-linear on the uniform grid , so that and . The grid size sets a trade-off: a finer grid lets represent sharper, more localized warpings, with slopes up to , but increases the cost of each evaluation (linearly in for the PL scheme), while a coarser grid yields warpings that are cheaper to evaluate and easier to optimize, at the risk of missing fine alignments. This warping belongs to and is strictly increasing, since , so Propositions 3.2 and 4.1 apply. Since only depends on the normalized increments , Proposition 3.3 applies with the closed simplex , which is compact. SoftPlus only reaches the interior of , which leaves the minimum unchanged by density of the interior and continuity of (Lemma A.3). Flat pieces of () are only approached as , where the gradient vanishes. In Figure 1, we show the alignments obtained by our FastCDTW solver for different values of , the number of breakpoints in the warping function . Even moderate values of lead to warping paths that are smoother than DTW, and distance estimation (right panel) converges quickly.
Symmetry. CDTW is symmetric: in the single-map form of Proposition 3.1, writing for the cost (3) of the pair , the change of variables gives , and whenever , so the optimal warping for is the inverse of the one for . The grid parametrization above loses this property: the inverse of a strictly increasing piecewise-linear map on the uniform grid is piecewise linear, but with breakpoints at the non-uniform locations , so the family is not closed under inversion and FastCDTW is asymmetric in general. Both directions converge to as , so the asymmetry vanishes as the grid is refined. We do not symmetrize FastCDTW in our experiments, and have not observed this asymmetry to cause any problem.
4.3 Time complexities
With the PL scheme, the breakpoints of Proposition 4.1 are found by one sweep over those of and , and each interval costs , so one evaluation of costs . With the MC scheme, the breakpoint values of are computed once, in , after which the uniform grid gives
| Method | Time complexity |
|---|---|
| DTW (Vintsyuk, 1968; Sakoe and Chiba, 1978) | |
| Soft-DTW (Cuturi and Blondel, 2017) | |
| GDTW (Deriso and Boyd, 2023) | |
| Exact CDTW (Buchin et al., 2025) | (restricted to ) |
| Approx. CDTW (FPTAS) (Ergür and Khowala, 2026) | |
| FastCDTW-PL (ours) | |
| FastCDTW-MC (ours) |
Table 1: Time complexity of computing one alignment/distance value across the different methods. FastCDTW's rows are for a single evaluation of .
the interval of each sample directly by a floor operation, so and are evaluated in . Denoting by and the costs of evaluating and at a single time, one evaluation then costs . For sampled series, each sample locates its time among the samples of and by binary search, so and (or for regularly sampled series). When a curve is instead represented by a neural network, such as the INR barycenter of Section 5.1, its evaluation cost is that of a forward pass through the network. In all cases, automatic differentiation gives the gradient at the same cost (see discussion in Appendix B). Used as a distance, FastCDTW minimizes with gradient steps, which multiplies these costs by (Sections 5.1 and 5.2); when is shared across samples and trained with a model (Section 5.3), it takes one step per model update, so . Table 1 compares these costs with the baselines of Section 2. FastCDTW is far cheaper than the exact and approximate CDTW solvers, and than GDTW, which costs when its grid has the resolution of our . Compared with the of DTW and Soft-DTW, with and , FastCDTW is cheaper, up to constants, only when for the PL scheme and for the MC scheme. Moreover, all computations induced in FastCDTW (across the intervals for PL, across Monte Carlo samples for MC) can be efficiently parallelized on a GPU (see Figure 2 and Appendix C.2).
5 Numerical Experiments
In the tasks covered in this section, we use FastCDTW in place of DTW or Soft-DTW in a machine learning pipeline and expect comparable accuracy, with the PL and MC schemes close to each other. Its main advantage should be speed on a GPU, most prominent when a single warping is shared across samples and learned with the model (Section 4.3). For every experiment, the hyperparameters, hardware and remaining implementation details are given in Appendix C.
Before diving into the performance of FastCDTW in downstream tasks, we first illustrate the impact of series length in the computation time of DTW, Soft-DTW and FastCDTW in Figure 2. In the large series length regime, FastCDTW is significantly faster than DTW and Soft-DTW, with a speedup of up to 10x over Soft-DTW for series of length 10,000. Moreover, the GPU implementation unlocks the practical use of DTW-like approaches for longer time series.
5.1 Time series averaging
Experimental setup. We average series of length drawn from three synthetic families, accel (), ecg () and rate (), each built so that the series differ from a common template by a time reparametrization only. We compare five barycenters: the Euclidean mean; DTW Barycenter Averaging (DBA) (Petitjean et al., 2011); the Soft-DTW barycenter (Cuturi and Blondel, 2017); and two FastCDTW barycenters. The first FastCDTW barycenter is a free vector of samples, evaluated with the PL scheme; the second is an implicit neural representation (INR) (Naour et al., 2024), i.e. a function of continuous time, evaluated with the MC scheme (see Appendix C.1 for details). They show that FastCDTW can handle both sampled series and continuous-time curves. The Euclidean mean is used as initialization for all the barycenters.
Quantitative results. Table 2 scores these barycenters under DTW, as the mean and standard deviation over the ten draws, with Soft-DTW taken, on each family, at the temperature with the lowest mean DTW loss. Table 4 and Figure 8 give the full sweep over . On accel and rate, FastCDTW-PL

Figure 2: Computation time of DTW, Soft-DTW and FastCDTW as a function of the series length.

Figure 3: Barycenters of accel (top), ecg (middle) and rate (bottom). Grey: the averaged series.
attains a lower DTW loss than DBA and than Soft-DTW, although it does not optimize that objective. FastCDTW-MC does too on rate, and on accel it improves on DBA but not on Soft-DTW. On ecg, Soft-DTW at is the best of all methods.
Qualitative results. Figure 3 shows the barycenters on the three families, with Soft-DTW at the temperature selected above. Visually, both Soft-DTW and FastCDTW produce convincing barycenters that recover the shape of the common template. On ecg, however, the Soft-DTW barycenter slightly erodes the central peak, a known side effect of the smoothing induced by its soft-minimum (Blondel et al., 2021), whereas the FastCDTW barycenters preserve it. This erosion could be avoided by using the Soft-DTW divergence (Blondel et al., 2021), which corrects this bias, instead of Soft-DTW itself.
5.2 Time series classification
Experimental setup. We now evaluate the performance of the above discrepancies in terms of 1-nearest-neighbor accuracy on a subset of the UCR archive (Dau et al., 2019). Of its 128 univariate datasets, we keep 95, each with its predefined train/test split: we exclude the 14 with variable lengths or missing values and the ones with more than (test, train) pairs. For Soft-DTW, is cross-validated on the training set and for the two FastCDTW schemes, the learning rate of the warping optimization is cross-validated in the same way.
Results. Figure 4 gives the average rank of each discrepancy over the 95 datasets. Soft-DTW (2.47), FastCDTW-PL (2.54) and FastCDTW-MC (2.55) are not significantly different from one another, and
| method | accel | ecg | rate |
|---|---|---|---|
| Euclidean mean | |||
| DTW (DBA) | |||
| Soft-DTW (best ) | |||
| FastCDTW-PL | |||
| FastCDTW-MC |
Table 2: Loss of each barycenter (lower is better), mean standard deviation over ten draws of the series. Soft-DTW is taken at the temperature with the lowest mean DTW loss (Table 4).

Figure 4: Average rank of each discrepancy by 1-NN test accuracy over the 95 UCR datasets (1 is best). A horizontal bar joins methods whose accuracies are not significantly different (pairwise two-sided Wilcoxon signed-rank tests with Holm's correction, ).
all three are significantly more accurate than DTW (3.42) and the Euclidean distance (4.02). Mean accuracies are for Soft-DTW, for both FastCDTW schemes, for DTW and for the Euclidean distance, so the MC estimate loses no accuracy compared with the exact PL integral. Appendix C.2 gives the per-dataset accuracies.
5.3 Domain adaptation
Experimental setup. Match-And-Deform (Painblanc et al., 2023) (MAD) is an unsupervised domain-adaptation method for time series. Given a labeled source domain and an unlabeled target domain, MAD jointly learns (i) a per-batch optimal-transport plan coupling source and target samples and (ii) a global temporal alignment between domains, by alternating an OT step with a DTW-based alignment step solved by dynamic programming, and then uses both the coupling and the alignment to adapt a classifier across the source and target domains. This alternation is rerun to convergence at every loss evaluation, so the DTW step dominates the cost of the whole procedure.
We test whether FastCDTW can replace this DTW step, removing the dynamic-programming bottleneck without lowering classification accuracy.
Datasets. We reuse the two domain-adaptation benchmarks from the original MAD paper (Painblanc et al., 2023). TarnBrittany (TB) pairs satellite image time series of land-cover parcels from two French regions, giving two directions and . miniTimeMatch (mTM) is a reduced version of the TimeMatch crop-classification benchmark spanning three regions, yielding the four source/target pairs reported in Painblanc et al. (2023). For both datasets we use the same domain splits, class sets, and backbone classifier as Painblanc et al. (2023), so that any difference in accuracy can be attributed to the choice of alignment method rather than to confounding factors in the pipeline.
Results. Table 3 reports classification accuracy on the target domain, averaged over three seeds. Substituting FastCDTW for DTW inside MAD matches or slightly improves accuracy on most source/target pairs, for both the PL and MC variants, and the two variants perform comparably to one another. Appendix C.3 further compares several parametrizations of the warping with the MC variant, among which the grid parametrization of Section 4.2 yields the best downstream accuracy overall.
This substitution also changes MAD's computational profile. Using MAD, one postulates a global temporal shift between domains, hence in FastCDTW we train a single across samples, such that it can be treated as an ordinary model parameter and there is no need for a full gradient descent over parameters at each loss evaluation. The bottom rows of Table 3 report the resulting end-to-end speedup of MAD training over the DTW baseline, with the PL and MC variants respectively running and faster on GPU (Tesla V100). These figures measure the whole training pipeline, and thus combine
| Dataset | Pair | DTW | FastCDTW-MC | FastCDTW-PL |
| TB | ||||
| Average | ||||
| mTM | ||||
| Average | ||||
| Speedup vs. DTW | CPU | - | ||
| GPU | - |
Table 3: Domain-adaptation accuracy (mean std) for MAD instantiated with DTW, FastCDTW-MC, or FastCDTW-PL as the alignment step.
two effects: the lower cost of a single FastCDTW evaluation compared to DTW (cf Figure 2) and the amortization of the optimization of across model updates described above. Note that this amortization is not a change of training protocol that DTW could equally benefit from.
Overall, FastCDTW preserves the adaptation quality of MAD at a fraction of its computational cost.
6 Conclusion
We introduced FastCDTW, a solver for Continuous Dynamic Time Warping that optimizes a parametrized warping by gradient descent. The alignment cost is evaluated either exactly, in closed form, or by an unbiased Monte Carlo estimator, and both schemes are differentiable with respect to the warping and to the input curves, and amenable to batched GPU computation. As such, it unlocks potential use of CDTW in machine learning pipelines, where it can be used as a loss function or as a component of a larger differentiable model. On the theoretical side, we showed that Lipschitz warpings reach the same optimal cost as smooth ones, and that CDTW restricted to a parametrized family of warpings is differentiable with respect to an input curve. Empirically, FastCDTW serves as a drop-in replacement for DTW or Soft-DTW in averaging, classification and domain adaptation, at a lower computational cost. On the downside, our gradient-based solver does not guarantee global optimality because of the non-convexity of the objective. Yet, in practice, we demonstrated that it is accurate enough to be useful in machine learning pipelines.
Because FastCDTW compares curves rather than sequences of samples, and its Monte Carlo scheme only requires evaluating them at arbitrary times, it is naturally suited to continuous-time models of time series. A promising direction for future work is thus to use it as a training loss for continuous-time foundation models (e.g. building on implicit neural representations of time series (Naour et al., 2024)) for forecasting on irregular grids and imputation tasks.
Acknowledgements
This work was supported by the French National Research Agency (ANR) under the projects CALME (ANR-25-CE23-4419), OTTOPIA (ANR-20-CHIA-0030) and DATeS (ANR-25-CE23-6035), and by the ACORD chair of the SequoIA AI cluster (ANR-23-IACL-0009). CALME and OTTOPIA funded Pierre Houédry, and ACORD funded Romain Tavenard. The authors declare no competing financial interests.
References
Bagnall, A., Lines, J., Bostrom, A., Large, J., and Keogh, E. (2017). The great time series classification bake off: a review and experimental evaluation of recent algorithmic advances. Data Mining and Knowledge Discovery, 31(3):606–660.
Blondel, M., Mensch, A., and Vert, J.-P. (2021). Differentiable divergences between time series. In Banerjee, A. and Fukumizu, K., editors, Proceedings of The 24th International Conference on Artificial Intelligence and Statistics, volume 130 of Proceedings of Machine Learning Research, pages 3853–3861. PMLR.
Buchin, K., Nusser, A., and Wong, S. (2025). Computing continuous dynamic time warping of time series in polynomial time. Journal of Computational Geometry, 16(1):765–799.
Buchin, M. E. (2007). On the Computability of the Frechet Distance Between Triangulated Surfaces. PhD thesis, Freie Universität Berlin.
Cuturi, M. and Blondel, M. (2017). Soft-DTW: a differentiable loss function for time-series. In Precup, D. and Teh, Y. W., editors, Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 894–903. PMLR.
Dau, H. A., Bagnall, A., Kamgar, K., Yeh, C.-C. M., Zhu, Y., Gharghabi, S., Ratanamahatana, C. A., and Keogh, E. (2019). The ucr time series archive. IEEE/CAA Journal of Automatica Sinica, 6(6):1293–1305.
Deriso, D. and Boyd, S. (2023). A general optimization framework for dynamic time warping. Optimization and Engineering, 24(2):1411–1432.
Ergür, A. A. and Khowala, S. (2026). Approximating CDTW distance of piecewise algebraic curves. arXiv preprint arXiv:2609.04294.
Lods, A., Malinowski, S., Tavenard, R., and Amsaleg, L. (2017). Learning DTW-preserving shapelets. In Advances in Intelligent Data Analysis XVI (IDA 2017), volume 10584 of Lecture Notes in Computer Science, pages 198–209. Springer.
Naour, E. L., Serrano, L., Migus, L., Yin, Y., Agoua, G., Baskiotis, N., Gallinari, P., and Guigue, V. (2024). Time series continuous modeling for imputation and forecasting with implicit neural representations. Transactions on Machine Learning Research.
Painblanc, F., Chapel, L., Courty, N., Friguet, C., Pelletier, C., and Tavenard, R. (2023). Match-And-Deform: Time Series Domain Adaptation through Optimal Transport and Temporal Alignment. In ECML PKDD 2023, volume 14173 of Lecture Notes in Computer Science, pages 341–356. Springer Nature Switzerland.
Petitjean, F., Ketterlin, A., and Gançarski, P. (2011). A global averaging method for dynamic time warping, with applications to clustering. Pattern Recognition, 44(3):678–693.
Rhodes, T. and Lee, D. D. (2024). TimewarpVAE: Simultaneous time-warping and representation learning of trajectories. In IJCAI'24 Workshop on Artificial Intelligence for Time Series Analysis (AI4TS).
Rubanova, Y., Chen, R. T. Q., and Duvenaud, D. K. (2019). Latent ordinary differential equations for irregularly-sampled time series. In Wallach, H., Larochelle, H., Beygelzimer, A., d'Alché-Buc, F., Fox, E., and Garnett, R., editors, Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc.
Runje, D. and Shankaranarayana, S. M. (2023). Constrained monotonic neural networks. In Krause, A., Brunskill, E., Cho, K., Engelhardt, B., Sabato, S., and Scarlett, J., editors, Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 29338–29353. PMLR.
Sakoe, H. and Chiba, S. (1978). Dynamic programming algorithm optimization for spoken word recognition. IEEE Transactions on Acoustics, Speech, and Signal Processing, 26(1):43–49.
Tavenard, R., Faouzi, J., Vandewiele, G., Divo, F., Androz, G., Holtz, C., Payne, M., Yurchak, R., Rußwurm, M., Kolar, K., and Woods, E. (2020). Tslearn, a machine learning toolkit for time series data. Journal of Machine Learning Research, 21(118):1–6.
Vintsyuk, T. K. (1968). Speech discrimination by dynamic programming. Cybernetics, 4(1):52–57.
Wehenkel, A. and Louppe, G. (2019). Unconstrained monotonic neural networks. In Wallach, H., Larochelle, H., Beygelzimer, A., d'Alché-Buc, F., Fox, E., and Garnett, R., editors, Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc.
A Proofs
A.1 Proof of Proposition 3.1
Proposition 3.1. Let be two continuously differentiable curves and let be as in (3). Then for every , there exists a reparametrization of such that
where and .
Proof. Since is a strictly increasing -diffeomorphism on , it admits a well-defined inverse and everywhere. Introduce the change of variables
Define the new reparametrization
Then
Since
we have
Combining these identities yields
as required.
A.2 Proof of Proposition 3.2
Proposition 3.2. Let be continuous, and let be the set of nondecreasing Lipschitz maps with and . Then
Recall that is the set of increasing -diffeomorphisms with and (Section 2). Throughout, which is finite since and are continuous, and is the modulus of continuity of : it is nondecreasing, and as since is uniformly continuous on . Every is differentiable almost everywhere with , so is well defined on , and .
Lemma A.1 (continuity of ). Let with and . Then .
Proof. Since , . Let , , and , so that
Recall that for , . By the Cauchy-Schwarz and triangle inequalities, we have
We apply this with and . First, , and likewise . Second, the terms cancel, so . Since and is nondecreasing, . Hence, for every ,
Moreover , and since is 1-Lipschitz. Hence
Proof of Proposition 3.2. Since , . Conversely, let and . Then almost everywhere and . Continuous functions are dense in and the projection onto is 1-Lipschitz and leaves unchanged, so there are continuous with values in such that . In particular . For large enough that , set
Then is continuous, and , so is with positive derivative, and , that is . Hence,
By Lemma A.1, , so . Since is arbitrary, .
A.3 Proof of Proposition 3.3
Proposition 3.3. Assume that
(A1) x is continuous on ;
(A2) is compact;
(A3) for every , is nondecreasing and Lipschitz, with and ;
(A4) is continuous from to ,
and let . Then:
(i) the set is nonempty and compact, so the infimum defining is a minimum;
(ii) for every , has at a one-sided directional derivative in the direction , given by
where, for every Lipschitz ,
For and we write
and , finite by (A1). By (A2) and (A4), is continuous on a compact set, so and we set . This uniform slope bound is what allows and to be taken in . Since takes values in ,
Lemma A.2 ( is quadratic in ). Let be Lipschitz, and . For every and ,
with given by (5), and
In particular the limit defining exists and is two-sided, and is linear and continuous on .
Proof. All integrals are finite, since is bounded, is continuous, and . Expand pointwise, multiply by and integrate. The bounds follow from and the Cauchy-Schwarz inequality in .
Lemma A.3 (continuity in ). Under , is continuous on , and for fixed the map is continuous on .
Proof. We follow the proof of Lemma A.1, with two changes. First, is only in , so the pointwise bound by is replaced by the Cauchy-Schwarz inequality in together with (8). Second, is a sup-norm distance, which tends to 0 by (A4), so that and almost everywhere. This gives and
which tends to 0 as , since stays bounded. The same splitting applied to (5) gives, for fixed and ,
Proof of Proposition 3.3. (i) Existence and compactness. By Lemma A.3, is continuous on , which is compact by (A2). By the extreme value theorem, it attains its infimum: there is with , so and the infimum defining is a minimum. Moreover, is closed in as the preimage of the closed set under a continuous map, hence compact.
(ii) Upper bound. Let and . By Lemma A.2,
and the last term is at most , so . The right-hand side is continuous in (Lemma A.3) on the compact set , so its minimum over is attained, and
(ii) Lower bound. Let be a sequence along which converges to the lim inf, in . Pick , which is possible by (i). By Lemma A.2, whose quadratic term is nonnegative,
By compactness of , a subsequence of converges to some . We re-index and along it, which does not change the limit of the difference quotients, so that . For , , so by Lemma A.3, , that is . Dividing by and letting , Lemma A.3 gives
The combination of the two bounds gives (4).
A.4 Proof of Proposition 4.1
Proposition 4.1. Assume that is strictly increasing, so that each preimage is a single point. Let be the strictly increasing union of
and set, for ,
Then
Proof. Step 1: the sum decomposition. The map changes affine pieces only at its own breakpoints , and only at the grid points . Consequently changes affine pieces only where does, or where crosses a breakpoint of , that is at the preimages . All three sets belong to by assumption, so the three maps are affine on every interval , which gives the decomposition
where denotes the residual.
Step 2: one interval. Fix and work on . There is the constant , so the speed factor is constant and equal to
Moreover is a difference of two affine maps of , hence affine, hence equal to the linear interpolation of its endpoint values and . The -th term of (9) is therefore
Step 3: integral. The change of variables turns it into , and expanding the squared norm gives, for any two vectors ,
since in each coordinate. The k-th term of (9) is thus
the factors cancelling. Summing over gives (6).
If has flat pieces, the proposition still holds with taken as any point of its preimage, since the endpoints of a flat piece are grid points, which already belong to .
B Time complexity of the backward pass
The complexity of the backward pass of FastCDTW is the same as that of the forward pass, up to a constant factor, for both the PL and MC schemes. For the MC scheme, this is straightforward: the Monte Carlo samples are drawn independently of , so the loss is an average of terms, each a closed-form differentiable function of (including , obtained by automatic differentiation). For the PL scheme, the backward pass is more subtle because the breakpoints of the piecewise-affine integrand in Proposition 4.1 depend on .
Forward pass. The breakpoints of Proposition 4.1 come from three sorted sets. The grid points and the sampling times do not depend on . The preimages do: each one is obtained by locating the grid interval on which reaches , then inverting the affine piece of on this interval. Since is increasing and the are sorted, these preimages are already sorted, and the three sets are merged into in (our implementation simply uses a generic sort, which only adds a logarithmic factor). Equation (6) is then evaluated in per interval.
Backward pass. The operations above are of two kinds. Locating intervals and merging the three sets only output integer indices and a permutation: for almost every (i.e. away from the values at which two breakpoints coincide), these are locally constant in , so automatic differentiation treats them as constants, and the backward pass of the merge reduces to applying the same permutation to the incoming gradients. All other operations (the SoftPlus and normalized cumulative sum defining , the affine inversions, the evaluation of and at the , and the sum (6)) are differentiable closed-form expressions. Hence no root-finding is differentiated through and no custom backward pass is needed: by the usual property of reverse-mode automatic differentiation, the gradient costs a constant factor times the forward pass.
C Numerical experiments
C.1 Time series averaging
Hardware. No GPU is used in this section: every run is on CPU. The runs were spread over several machines, the fastest per core being an Intel Xeon Gold 6254 CPU at 3.10 GHz.
Toy datasets description. Each family has a template and one increasing warping per series, and series is generated as
, where for , , and with .
Writing
the three families differ only in z and in the warpings :
-
rate : on and beyond, and with evenly spaced in , so each series stays ahead of ( ) or behind it ( ) on the whole interval.
-
accel : on and beyond (the rate peak with both widths halved), and with evenly spaced in , so each series runs alternately faster and slower than .
• ecg : as in accel, and
The parameters of the warpings are fixed in each family, so two draws of the series differ only through the noise . Tables 2 and 4 report the mean and standard deviation over ten draws. Figures 3 and 8 show the draw of one seed.
INR barycenter. An implicit neural representation (INR) (Naour et al., 2024) represents the barycenter as a function , given by a neural network with parameters , instead of a vector of values at fixed timestamps. A time is first mapped to 2L Fourier features
so that the frequencies are spaced geometrically, each twice the previous one, from to . These features let the network represent sharp peaks. An MLP with ReLU activations then maps to (Figure 5). In every experiment of this section, , so the frequencies range from 1/2 to 256, and the MLP has 5 hidden layers of width 64. The warpings and the parameters are optimized by gradient descent on the FastCDTW loss. Since can be evaluated at any time, it is used with the MC scheme, and after training it can be read at any resolution, independently of the sampling grid of the averaged series (Figure 7).

Figure 5: INR barycenter: a time is mapped to Fourier features , then an MLP returns the value of the barycenter at time . In our experiments, and the MLP has 5 hidden layers of width 64.
| method | accel | ecg | rate |
|---|---|---|---|
| Euclidean mean | 11.88±0.11 | 14.81±0.06 | 13.19±0.10 |
| DTW (DBA) | 3.16±0.06 | 4.43±0.25 | 1.48±0.08 |
| Soft-DTW γ = 10 | 15.92±0.04 | 22.11±0.04 | 9.75±0.03 |
| Soft-DTW γ = 1 | 2.72±0.05 | 10.34±0.06 | 1.32±0.02 |
| Soft-DTW γ = 10-1 | 2.40±0.07 | 4.77±0.05 | 1.22±0.01 |
| Soft-DTW γ = 10-2 | 2.31±0.04 | 4.02±0.03 | 1.22±0.01 |
| Soft-DTW γ = 10-3 | 3.02±0.09 | 4.25±0.43 | 1.19±0.02 |
| Soft-DTW γ = 10-4 | 3.10±0.09 | 4.37±0.19 | 1.33±0.05 |
| FastCDTW-PL | 2.20±0.02 | 4.82±0.43 | 1.08±0.01 |
| FastCDTW-MC | 2.42±0.05 | 4.80±0.57 | 1.16±0.02 |
Table 4: DTW loss of each barycenter, as in Table 2, with Soft-DTW at every temperature of the sweep. Mean standard deviation over the same ten draws of the series.
Hyperparameters. Series are used without -normalization. Every barycenter starts from the Euclidean mean, and every warping from the identity (). DBA and the Soft-DTW barycenter use the implementations of tslearn (Tavenard et al., 2020). Soft-DTW is run for , and the main text reports, on each family, the value of with the lowest DTW loss (Table 4). Both FastCDTW solvers use the warping parametrization of Section 4.2 with , and alternate 30 times between a step on the warpings and a step on the centroid, each step being 500 Adam iterations. The learning rate is for the vector solver. The INR centroid is the network of Figure 5; before the alternation, it is fitted to the Euclidean mean by 2000 Adam steps with learning rate . The learning rate of the INR solver is then on accel and rate and on ecg, and its MC scheme draws samples per step on accel and rate and on ecg. We take for every INR run of this section.
Monte Carlo budget. The MC scheme draws times per step, so sets a trade-off between the variance of the gradient and the cost of each step. Figure 6 varies for the INR barycenter rate and accel, all other settings being those given above (30 alternations of 500 Adam steps, learning rate , ). The left panels show the barycenters, from light to dark as grows, and the right panels the final objective against , with the run time on the right axis. The objective decreases with , from to on rate and from to on accel, and at , our default, it is within and of its value at . Over the same range, the run time grows from about 180 s to 400 s. The peak height of the barycenter seems to depend on (0.98 to 1.01).
Coarsely sampled series. A vector barycenter only has values at the sampling times of the series, whereas the INR barycenter is a function of continuous time, which can be evaluated at any time once trained. To see when this matters, we keep 100 evenly spaced samples out of the 200 of each series, and compute the barycenters for each method on these 100 sampling times, with Soft-DTW at the temperature with the lowest DTW loss and the INR trained with 15 alternations and . In Figure 7, the barycenters of the other methods are drawn as points at the 100 sampling times, and the INR as a curve

Figure 6: Effect of the Monte Carlo budget S on the INR barycenter, rate (top) and accel (bottom), all other settings fixed. Left: the barycenter, from light to dark as S grows. Right: the final objective against S, with wall-clock time on the right axis.



Figure 7: Coarsely sampled series ( kept samples), rate (top), accel (middle) and ecg (bottom). The discrete barycenters live on the sample grid, while the INR centroid is a function. Soft-DTW is again taken at the temperature with the lowest DTW loss, selected on this grid.

Figure 8: Soft-DTW barycenter at the temperatures not shown in Figure 3, on accel (top), ecg (middle) and rate (bottom), on the same series as that figure.
| method | CPU (s) | GPU (s) |
|---|---|---|
| Euclidean | 0.01 | - |
| DTW | 27.3 | - |
| Soft-DTW | 199.3 | - |
| FastCDTW-PL | 2114.6 | 20.1 |
| FastCDTW-MC | 2484.9 | 15.2 |
Table 5: Cost of one cross-distance matrix, in seconds, averaged over the datasets on which every method was timed on CPU, excluding hyperparameter selection.
evaluated at 2000 evenly spaced times. On rate and accel, the peak spans several sampling times, so these 100 values are enough to describe it, and the INR matches the vector FastCDTW barycenter (peak 1.00 against 1.01 on rate, 0.99 against 1.00 on accel). On ecg, the central peak is about one sampling interval wide, so the highest sample of each series ranges from 0.80 to 1.00 (mean 0.92). At the sampling times, all barycenters stay at or below 0.79, including the INR (0.73), but the INR reaches 0.92 between two of them.
C.2 Time series classification
Hyperparameters. Series are used as provided by the archive, without further z-normalization. DTW and Soft-DTW use the implementations of tslearn (Tavenard et al., 2020). The Soft-DTW temperature is selected in by the 1-NN accuracy averaged over 5 random splits of the training set, with of it as reference series and as queries. For both FastCDTW schemes, the warping of each (test, train) pair uses the grid parametrization of Section 4.2 with , starts from the identity (), and is fitted by Adam steps, the same budget for every pair. The learning rate is selected in with the same protocol as the Soft-DTW temperature. The MC scheme draws samples per step.
Hardware. FastCDTW runs on GPU, with one NVIDIA A40 (48 GB), both for the accuracies and for the GPU column of Table 5. The Euclidean distance, DTW and Soft-DTW run on CPU. The CPU column of Table 5 is measured on a single core; these jobs ran on several machines, the fastest per core being an Intel Xeon Gold 6254 CPU at 3.10 GHz.
Timing protocol. The timings of Table 5 cover one final cross-distance matrix: and the learning rate are read from the selection already made on the training set, so no cross-validation is counted. All GPU rows were measured on one NVIDIA A40.
Per-dataset accuracies. Tables 6 and 7 give the 1-NN test accuracy of every method on each of the 95 datasets. Bold marks every method whose accuracy, as printed, is at least 99% of the best accuracy on that dataset.
C.3 Domain adaptation
Hyperparameters. We follow the experimental protocol of Painblanc et al. (2023), and only detail below the settings needed to reproduce our results. The backbone classifier is a fully convolutional network made of three 1D convolutional blocks with 128, 256 and 128 filters of size 8, 5 and 3 respectively, each followed by batch normalization and a ReLU activation, then global average pooling over time and a linear classification layer, as in Painblanc et al. (2023). It is trained with Adam, with learning rate and batch size 256 (class-balanced mini-batches drawn from each domain), for 3,000 iterations. The MAD loss weights its temporal alignment (feature transport) and label transport (cross-entropy) terms with and , the values used by Painblanc et al. (2023) with DTW. With FastCDTW, the alignment cost is an integral over rather than a sum over the matched pairs of a DTW path, so its scale differs by a factor of the order of the series length; we therefore rescale to , with the average of the source and target series lengths, for both FastCDTW variants. The shared warping uses the grid parametrization of Section 4.2 with , is initialized to the identity , and is trained jointly with the backbone, with the same optimizer and learning rate as the backbone. The MC variant draws samples per loss evaluation.
Other parametrizations of . Besides the grid parametrization of Section 4.2, we tried two smooth parametrizations of . Both lie in C whatever the value of .
• Integrated MLP. with a small MLP whose last layer is a SoftPlus, so that for every and in closed form. Smooth rather than piecewise-affine, so evaluated with MC.
- INR integrated MLP. The same construction with applied to a Fourier encoding of , to represent high-frequency warpings; MC as well. The frequencies follow the same geometric rule as for the INR barycenter of Appendix C.1, for , here with , so they range from 1/2 to 64. The MLP has 4 hidden layers of width 64 with ReLU activations, followed by the SoftPlus output layer.
Impact of the warping parametrization . Table 8 compares these parametrizations of within FastCDTW-MC. The grid parametrization is the strongest and most robust choice, matching or slightly exceeding DTW's accuracy on both datasets. The INR integrated MLP stays close to DTW's accuracy on both datasets. The Integrated MLP, which lacks this high-frequency Fourier encoding, lags further behind on both datasets, underlining the benefit of Fourier features for representing warpings competitive with DTW's. This validates our default choice of grid parametrization for the other experiments.
| dataset | Euc. | DTW | Soft-DTW | FastCDTW-PL | FastCDTW-MC |
|---|---|---|---|---|---|
| ACSF1 | 0.540 | 0.640 | 0.640 | 0.520 | 0.530 |
| Adiac | 0.611 | 0.604 | 0.598 | 0.693 | 0.693 |
| ArrowHead | 0.800 | 0.703 | 0.794 | 0.823 | 0.806 |
| BME | 0.827 | 0.893 | 0.993 | 0.993 | 0.993 |
| Beef | 0.667 | 0.633 | 0.633 | 0.667 | 0.667 |
| BeetleFly | 0.750 | 0.700 | 0.700 | 0.700 | 0.700 |
| BirdChicken | 0.550 | 0.750 | 0.750 | 0.750 | 0.750 |
| CBF | 0.852 | 0.997 | 0.997 | 0.996 | 1.000 |
| Car | 0.733 | 0.733 | 0.750 | 0.800 | 0.783 |
| Chinatown | 0.945 | 0.974 | 0.974 | 0.948 | 0.948 |
| ChlorineConcentration | 0.650 | 0.648 | 0.646 | 0.653 | 0.649 |
| CinCECGTorso | 0.897 | 0.651 | 0.920 | 0.893 | 0.904 |
| Coffee | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 |
| Computers | 0.576 | 0.700 | 0.696 | 0.612 | 0.548 |
| CricketX | 0.577 | 0.754 | 0.785 | 0.782 | 0.749 |
| CricketY | 0.567 | 0.744 | 0.754 | 0.744 | 0.744 |
| CricketZ | 0.587 | 0.754 | 0.782 | 0.785 | 0.762 |
| DiatomSizeReduction | 0.935 | 0.967 | 0.967 | 0.958 | 0.958 |
| DistalPhalanxOutlineAgeGroup | 0.626 | 0.770 | 0.770 | 0.683 | 0.683 |
| DistalPhalanxOutlineCorrect | 0.717 | 0.717 | 0.725 | 0.739 | 0.750 |
| DistalPhalanxTW | 0.633 | 0.590 | 0.655 | 0.612 | 0.619 |
| ECG200 | 0.880 | 0.770 | 0.840 | 0.860 | 0.860 |
| ECGFiveDays | 0.797 | 0.768 | 0.906 | 0.901 | 0.908 |
| EOGHorizontalSignal | 0.442 | 0.442 | 0.550 | 0.511 | 0.486 |
| EOGVerticalSignal | 0.362 | 0.434 | 0.489 | 0.481 | 0.483 |
| Earthquakes | 0.712 | 0.719 | 0.777 | 0.719 | 0.763 |
| FaceAll | 0.714 | 0.808 | 0.760 | 0.781 | 0.779 |
| FaceFour | 0.784 | 0.830 | 0.818 | 0.852 | 0.841 |
| FacesUCR | 0.769 | 0.905 | 0.926 | 0.926 | 0.924 |
| FiftyWords | 0.631 | 0.690 | 0.796 | 0.785 | 0.767 |
| Fish | 0.783 | 0.823 | 0.903 | 0.903 | 0.886 |
| FreezerRegularTrain | 0.805 | 0.899 | 0.949 | 0.954 | 0.955 |
| FreezerSmallTrain | 0.676 | 0.759 | 0.690 | 0.742 | 0.735 |
| Fungi | 0.839 | 0.796 | 0.796 | 0.984 | 0.989 |
| GunPoint | 0.913 | 0.907 | 0.980 | 0.973 | 0.987 |
| GunPointAgeSpan | 0.968 | 0.984 | 0.997 | 0.994 | 0.994 |
| GunPointMaleVersusFemale | 0.994 | 0.984 | 1.000 | 1.000 | 1.000 |
| GunPointOldVersusYoung | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 |
| Ham | 0.600 | 0.467 | 0.581 | 0.590 | 0.581 |
| Haptics | 0.370 | 0.377 | 0.477 | 0.406 | 0.393 |
| Herring | 0.516 | 0.531 | 0.594 | 0.562 | 0.594 |
| HouseTwenty | 0.681 | 0.840 | 0.840 | 0.790 | 0.782 |
| InlineSkate | 0.342 | 0.384 | 0.433 | 0.398 | 0.416 |
| InsectEPGRegularTrain | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 |
| InsectEPGSmallTrain | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 |
| InsectWingbeatSound | 0.562 | 0.355 | 0.559 | 0.551 | 0.546 |
| ItalyPowerDemand | 0.955 | 0.950 | 0.948 | 0.962 | 0.962 |
| LargeKitchenAppliances | 0.493 | 0.795 | 0.797 | 0.667 | 0.683 |
| Lightning2 | 0.754 | 0.869 | 0.902 | 0.836 | 0.869 |
| Lightning7 | 0.575 | 0.726 | 0.726 | 0.781 | 0.753 |
| Mallat | 0.914 | 0.934 | 0.934 | 0.932 | 0.931 |
| Meat | 0.933 | 0.933 | 0.933 | 0.933 | 0.933 |
| MedicalImages | 0.684 | 0.737 | 0.751 | 0.758 | 0.751 |
| MiddlePhalanxOutlineAgeGroup | 0.519 | 0.500 | 0.494 | 0.494 | 0.481 |
| MiddlePhalanxOutlineCorrect | 0.766 | 0.698 | 0.722 | 0.746 | 0.732 |
| MiddlePhalanxTW | 0.513 | 0.506 | 0.519 | 0.558 | 0.552 |
| MixedShapesRegularTrain | 0.897 | 0.842 | 0.921 | 0.917 | 0.917 |
| MixedShapesSmallTrain | 0.835 | 0.780 | 0.780 | 0.869 | 0.871 |
| MoteStrain | 0.879 | 0.835 | 0.920 | 0.886 | 0.895 |
| OSULeaf | 0.521 | 0.591 | 0.649 | 0.607 | 0.620 |
| OliveOil | 0.867 | 0.833 | 0.867 | 0.867 | 0.867 |
| PhalangesOutlinesCorrect | 0.761 | 0.728 | 0.719 | 0.766 | 0.769 |
| Phoneme | 0.109 | 0.228 | 0.242 | 0.157 | 0.128 |
| PigAirwayPressure | 0.091 | 0.183 | 0.197 | 0.159 | 0.163 |
Table 6: 1-NN test accuracy per dataset (1 of 2). Bold: within of the best method on that row.
| dataset | Euc. | DTW | Soft-DTW | FastCDTW-PL | FastCDTW-MC |
|---|---|---|---|---|---|
| PigArtPressure | 0.288 | 0.481 | 0.553 | 0.558 | 0.572 |
| PigCVP | 0.139 | 0.327 | 0.418 | 0.183 | 0.188 |
| Plane | 0.962 | 1.000 | 1.000 | 1.000 | 1.000 |
| PowerCons | 0.978 | 0.922 | 0.972 | 0.967 | 0.967 |
| ProximalPhalanxOutlineAgeGroup | 0.785 | 0.805 | 0.780 | 0.805 | 0.810 |
| ProximalPhalanxOutlineCorrect | 0.808 | 0.784 | 0.725 | 0.842 | 0.845 |
| ProximalPhalanxTW | 0.707 | 0.756 | 0.761 | 0.766 | 0.766 |
| RefrigerationDevices | 0.395 | 0.464 | 0.456 | 0.405 | 0.405 |
| Rock | 0.640 | 0.540 | 0.540 | 0.540 | 0.540 |
| ScreenType | 0.360 | 0.397 | 0.376 | 0.381 | 0.365 |
| SemgHandGenderCh2 | 0.898 | 0.915 | 0.915 | 0.943 | 0.930 |
| ShapeletSim | 0.539 | 0.650 | 0.650 | 0.639 | 0.672 |
| ShapesAll | 0.752 | 0.768 | 0.827 | 0.800 | 0.802 |
| SmallKitchenAppliances | 0.341 | 0.643 | 0.667 | 0.459 | 0.501 |
| SmoothSubspace | 0.953 | 0.827 | 0.887 | 0.953 | 0.973 |
| SonyAIBORobotSurface1 | 0.696 | 0.725 | 0.725 | 0.727 | 0.710 |
| SonyAIBORobotSurface2 | 0.859 | 0.831 | 0.836 | 0.855 | 0.855 |
| Strawberry | 0.946 | 0.941 | 0.946 | 0.943 | 0.943 |
| SwedishLeaf | 0.789 | 0.792 | 0.810 | 0.870 | 0.867 |
| Symbols | 0.899 | 0.950 | 0.968 | 0.949 | 0.948 |
| SyntheticControl | 0.880 | 0.993 | 0.990 | 0.987 | 0.987 |
| ToeSegmentation1 | 0.680 | 0.772 | 0.842 | 0.811 | 0.820 |
| ToeSegmentation2 | 0.808 | 0.838 | 0.838 | 0.869 | 0.900 |
| Trace | 0.760 | 1.000 | 1.000 | 0.990 | 0.990 |
| TwoLeadECG | 0.747 | 0.904 | 0.905 | 0.874 | 0.880 |
| UMD | 0.806 | 0.882 | 0.882 | 0.986 | 0.986 |
| Wine | 0.611 | 0.574 | 0.556 | 0.704 | 0.704 |
| WordSynonyms | 0.618 | 0.649 | 0.766 | 0.757 | 0.755 |
| Worms | 0.455 | 0.584 | 0.532 | 0.545 | 0.545 |
| WormsTwoClass | 0.610 | 0.623 | 0.649 | 0.649 | 0.636 |
| Yoga | 0.830 | 0.836 | 0.853 | 0.859 | 0.858 |
| mean | 0.703 | 0.739 | 0.767 | 0.763 | 0.763 |
Table 7: 1-NN test accuracy per dataset (3 of 3), with the mean over all 95 datasets. Bold: within of the best method on that row.
| Warping (φ) | TarnBrittany | miniTimeMatch |
|---|---|---|
| Grid | 94.4 ± 5.8 | 84.5 ± 7.2 |
| INR integrated MLP | 93.1 ± 7.5 | 79.3 ± 15.2 |
| Integrated MLP | 92.0 ± 9.4 | 76.6 ± 9.8 |
| DTW | 94.0 ± 6.4 | 78.9 ± 8.0 |
Table 8: Impact of the warping parametrization ( ) on FastCDTW-MC accuracy (mean over 3 seeds and over problem pairs within each dataset; std over problem pairs only).