arXiv · 2612.02276
BlockDTW: Efficient, Parallel and Differentiable Time-Series Alignment for Neural Learning Systems
Abstract
Dynamic Time Warping (DTW) is a cornerstone technique for measuring similarity between time-series under temporal distortions, but its quadratic time and space complexity limits scalability, real-time deployment, and its use as a loss function in neural networks. Existing approximations often trade off accuracy, differentiability, or computational efficiency. We introduce BlockDTW, a block-wise, differentiable temporal-alignment loss that partitions time-series into non-overlapping segments, computes local alignments independently, and aggregates them into a global objective compatible with gradient-based optimization. By constraining the admissible warping paths to block junctions (\emph{islands}), BlockDTW reduces complexity from $\mathcal{O}(N^2)$ to $\mathcal{O}(bN)$, and its parallel implementation processes blocks concurrently. We evaluate BlockDTW on three tasks: (i) similarity measurement and alignment of synthetic frequency-varying sinusoids, (ii) time-series prediction with feedforward networks on the Trace dataset and $73$ UCR Archive datasets, and (iii) training a deep model (hvEEGNet) for high-fidelity reconstruction of multichannel EEG signals. Results show that BlockDTW closely approximates SoftDTW, achieves prediction and reconstruction performance comparable to established differentiable alignment losses, and substantially reduces computational cost, with hardware-dependent speedups up to $120\times$ in parallel-runtime benchmarks. BlockDTW is thus an efficient and scalable differentiable objective for neural models on temporally distorted sequences, with particular potential for real-time and biomedical applications.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Alberto Zancanaro, Leonardo Badia, Giulia Cisotto. 2026-12-01. BlockDTW: Efficient, Parallel and Differentiable Time-Series Alignment for Neural Learning Systems. https://searcharxiv.org/abs/2612.02276
Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite Search arXiv by Indiciae: BibTeX · RIS.