Papers › Deep Declarative Dynamic Time Warping for End-to-End Learning of Alignment Paths

Deep Declarative Dynamic Time Warping for End-to-End Learning of Alignment Paths

19 Mar 2023arXiv:2303.10778archive 2025-07-28

Ming Xu, Sourav Garg, Michael Milford, Stephen Gould

This paper addresses learning end-to-end models for time series data that include a temporal alignment step via dynamic time warping (DTW). Existing approaches to differentiable DTW either differentiate through a fixed warping path or apply a differentiable relaxation to the min operator found in the recursive steps used to solve the DTW problem. We instead propose a DTW layer based around bi-level optimisation and deep declarative networks, which we name DecDTW. By formulating DTW as a continuous, inequality constrained optimisation problem, we can compute gradients for the solution of the optimal alignment (with respect to the underlying time series) using implicit differentiation. An interesting byproduct of this formulation is that DecDTW outputs the optimal warping path between two time series as opposed to a soft approximation, recoverable from Soft-DTW. We show that this property is particularly useful for applications where downstream loss functions are defined on the optimal alignment path itself. This naturally occurs, for instance, when learning to improve the accuracy of predicted alignments against ground truth alignments. We evaluate DecDTW on two such applications, namely the audio-to-score alignment task in music information retrieval and the visual place recognition task in robotics, demonstrating state-of-the-art results in both.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2303.10778")

Code

Syntology Ran 0 of 18 code samples harvested from 1 repository linked to this paper; 18 have no recorded run.

By repository: official repository: 18 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

mingu6/declarativedtw officialmentioned in paperpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

18 samples harvested; 0 ran; 0 honoured the contract we drafted; 18 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

18unverified

Licence: 0 of the 18 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from mingu6/declarativedtw. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

batched_tridiagonal_solve mingu6/declarativedtw/decdtw/backward/utils.py official repository unverified MIT (permissive) · cb46bd04c7ac2de9 · report
build_Omega mingu6/declarativedtw/experiments/audio_score/dilate_loss.py official repository unverified MIT (permissive) · 6339ddb0b6dc5ae5 · report
build_Omega mingu6/declarativedtw/experiments/vpr/dilate_loss.py official repository unverified MIT (permissive) · e5f415e497a655b9 · report
compute_softdtw mingu6/declarativedtw/experiments/audio_score/comparisons.py official repository unverified MIT (permissive) · 63dedce93135c081 · report
compute_softdtw mingu6/declarativedtw/experiments/audio_score/soft_dtw.py official repository unverified MIT (permissive) · de6839d7b9993193 · report
compute_softdtw_backward mingu6/declarativedtw/experiments/audio_score/comparisons.py official repository unverified MIT (permissive) · b7ef42ad24e33b6d · report
compute_softdtw_backward mingu6/declarativedtw/experiments/audio_score/soft_dtw.py official repository unverified MIT (permissive) · cfd049ad7b29f58c · report
constraints_grad_hGlbConstr mingu6/declarativedtw/decdtw/backward/constraints.py official repository unverified MIT (permissive) · b6981241440d2103 · report
constraints_grad_hY mingu6/declarativedtw/decdtw/backward/constraints.py official repository unverified MIT (permissive) · 4c25b91eb64a6b88 · report
dtw_objective mingu6/declarativedtw/decdtw/utils.py official repository unverified MIT (permissive) · 3c2564bf11c3f00c · report
map_score mingu6/declarativedtw/experiments/audio_score/datasets.py official repository unverified MIT (permissive) · c011f7bc2d35843a · report
my_max mingu6/declarativedtw/experiments/audio_score/path_soft_dtw.py official repository unverified MIT (permissive) · ac24165407fc997f · report
my_max_hessian_product mingu6/declarativedtw/experiments/audio_score/path_soft_dtw.py official repository unverified MIT (permissive) · 2762a706aba6e342 · report
my_min mingu6/declarativedtw/experiments/audio_score/path_soft_dtw.py official repository unverified MIT (permissive) · f0e6c9e94033d95b · report
pairwise_distances mingu6/declarativedtw/experiments/audio_score/soft_dtw.py official repository unverified MIT (permissive) · f18232ab89e49092 · report
regularisation_loss mingu6/declarativedtw/decdtw/utils.py official repository unverified MIT (permissive) · e0a7117c444fa4cb · report
signal_error mingu6/declarativedtw/decdtw/utils.py official repository unverified MIT (permissive) · d4bac3ed82144852 · report
warp_fn_glb_bounds mingu6/declarativedtw/decdtw/gdtw_solver/dp_graph.py official repository unverified MIT (permissive) · af12f07b5f7014ec · report

Tasks

Dynamic Time WarpingInformation RetrievalMusic Information RetrievalRetrievalTime SeriesVisual Place Recognition

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

DTW

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections