# shapeDTW: shape Dynamic Time Warping

arXiv: https://arxiv.org/abs/1606.01601 · HTML: https://mlsanity.com/paper/1606.01601/

## Key facts

- Cited by 35 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 6 Jun 2016.

## Built on by (most cited first, 30 of 35)

- [Bake off redux: a review and experimental evaluation of recent time series classification algorithms](https://mlsanity.com/paper/2304.13029/) (2023)
- [Learning Discriminative Prototypes with Dynamic Time Warping](https://mlsanity.com/paper/2103.09458/) (2021)
- [STA-VPR: Spatio-temporal Alignment for Visual Place Recognition](https://mlsanity.com/paper/2103.13580/) (2021)
- [Learnable Dynamic Temporal Pooling for Time Series Classification](https://mlsanity.com/paper/2104.02577/) (2021)
- [Look Into the LITE in Deep Learning for Time Series Classification](https://mlsanity.com/paper/2409.02869/) (2024)
- [BP-SGCN: Behavioral Pseudo-Label Informed Sparse Graph Convolution Network for Pedestrian and Heterogeneous Trajectory Prediction](https://mlsanity.com/paper/2502.14676/) (2025)
- [ShapeDBA: Generating Effective Time Series Prototypes using ShapeDTW Barycenter Averaging](https://mlsanity.com/paper/2309.16353/) (2023)
- [An Unsupervised Learning Method with Convolutional Auto-Encoder for Vessel Trajectory Similarity Computation](https://mlsanity.com/paper/2101.03169/) (2021)
- [Tightly Coupled Learning Strategy for Weakly Supervised Hierarchical Place Recognition](https://mlsanity.com/paper/2202.06470/) (2022)
- [DTW-Merge: A Novel Data Augmentation Technique for Time Series Classification](https://mlsanity.com/paper/2103.01119/) (2021)
- [Parameterizing the cost function of Dynamic Time Warping with application to time series classification](https://mlsanity.com/paper/2301.10350/) (2023)
- [Data Augmentation for Multivariate Time Series Classification: An Experimental Study](https://mlsanity.com/paper/2406.06518/) (2024)
- [Nonlinear time-series embedding by monotone variational inequality](https://mlsanity.com/paper/2406.06894/) (2024)
- [Unlabeled Action Quality Assessment Based on Multi-dimensional Adaptive Constrained Dynamic Time Warping](https://mlsanity.com/paper/2410.14161/) (2024)
- [Multiscale Dubuc: A New Similarity Measure for Time Series](https://mlsanity.com/paper/2411.10418/) (2024)
- [Rock the KASBA: Blazingly Fast and Accurate Time Series Clustering](https://mlsanity.com/paper/2411.17838/) (2024)
- [TimePoint: Accelerated Time Series Alignment via Self-Supervised Keypoint and Descriptor Learning](https://mlsanity.com/paper/2505.23475/) (2025)
- [Generalized Time Warping Invariant Dictionary Learning for Time Series Classification and Clustering](https://mlsanity.com/paper/2306.17690/) (2023)
- [Clustering Time Series Data with Gaussian Mixture Embeddings in a Graph Autoencoder Framework](https://mlsanity.com/paper/2411.16972/) (2024)
- [Adaptive Classification of Interval-Valued Time Series](https://mlsanity.com/paper/2504.03318/) (2025)
- [Smart Energy Guardian: A Hybrid Deep Learning Model for Detecting Fraudulent PV Generation](https://mlsanity.com/paper/2505.18755/) (2025)
- [A Contrastive Diffusion-based Network (CDNet) for Time Series Classification](https://mlsanity.com/paper/2507.21357/) (2025)
- [Accurate shape and phase averaging of time series through Dynamic Time Warping](https://mlsanity.com/paper/2109.00978/) (2021)
- [DTW+S: Shape-based Comparison of Time-series with Ordered Local Trend](https://mlsanity.com/paper/2309.03579/) (2023)
- [Utilizing Data Fingerprints for Privacy-Preserving Algorithm Selection in Time Series Classification: Performance and Uncertainty Estimation on Unseen Datasets](https://mlsanity.com/paper/2409.08636/) (2024)
- [Algorithm Selection with Probing Trajectories: Benchmarking the Choice of Classifier Model](https://mlsanity.com/paper/2501.11414/) (2025)
- [Deep Time Warping for Multiple Time Series Alignment](https://mlsanity.com/paper/2502.16324/) (2025)
- [Interval-Valued Time Series Classification Using DK-Distance](https://mlsanity.com/paper/2504.04667/) (2025)
- [Intelligently Augmented Contrastive Tensor Factorization: Empowering Multi-dimensional Time Series Classification in Low-Data Environments](https://mlsanity.com/paper/2505.03825/) (2025)
- [Depth Matching Method Based on ShapeDTW for Oil-Based Mud Imager](https://mlsanity.com/paper/2512.01611/) (2025)

## Abstract (arXiv)

Dynamic Time Warping (DTW) is an algorithm to align temporal sequences with possible local non-linear distortions, and has been widely applied to audio, video and graphics data alignments. DTW is essentially a point-to-point matching method under some boundary and temporal consistency constraints. Although DTW obtains a global optimal solution, it does not necessarily achieve locally sensible matchings. Concretely, two temporal points with entirely dissimilar local structures may be matched by DTW. To address this problem, we propose an improved alignment algorithm, named shape Dynamic Time Warping (shapeDTW), which enhances DTW by taking point-wise local structural information into consideration. shapeDTW is inherently a DTW algorithm, but additionally attempts to pair locally similar structures and to avoid matching points with distinct neighborhood structures. We apply shapeDTW to align audio signal pairs having ground-truth alignments, as well as artificially simulated pairs of aligned sequences, and obtain quantitatively much lower alignment errors than DTW and its two variants. When shapeDTW is used as a distance measure in a nearest neighbor classifier (NN-shapeDTW) to classify time series, it beats DTW on 64 out of 84 UCR time series datasets, with significantly improved classification accuracies. By using a properly designed local structure descriptor, shapeDTW improves accuracies by more than 10% on 18 datasets. To the best of our knowledge, shapeDTW is the first distance measure under the nearest neighbor classifier scheme to significantly outperform DTW, which had been widely recognized as the best distance measure to date. Our code is publicly accessible at: https://github.com/jiapingz/shapeDTW.
