{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/differentiable-divergences-between-time","title":"Differentiable Divergences Between Time Series","arxiv_id":"2010.08354","date":"2020-10-16","proceeding":null,"authors":["Mathieu Blondel","Arthur Mensch","Jean-Philippe Vert"],"abstract":"Computing the discrepancy between time series of variable sizes is notoriously challenging. While dynamic time warping (DTW) is popularly used for this purpose, it is not differentiable everywhere and is known to lead to bad local optima when used as a \"loss\". Soft-DTW addresses these issues, but it is not a positive definite divergence: due to the bias introduced by entropic regularization, it can be negative and it is not minimized when the time series are equal. We propose in this paper a new divergence, dubbed soft-DTW divergence, which aims to correct these issues. We study its properties; in particular, under conditions on the ground cost, we show that it is a valid divergence: it is non-negative and minimized if and only if the two time series are equal. We also propose a new \"sharp\" variant by further removing entropic bias. We showcase our divergences on time series averaging and demonstrate significant accuracy improvements compared to both DTW and soft-DTW on 84 time series classification datasets.","url_abs":"https://arxiv.org/abs/2010.08354v3","url_pdf":"https://arxiv.org/pdf/2010.08354v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"differentiable-divergences-between-time","repo_url":"https://github.com/google-research/soft-dtw-divergences","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"dynamic-time-warping","task_name":"Dynamic Time Warping"},{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series","task_name":"Time Series Analysis"},{"task_slug":"time-series-averaging","task_name":"Time Series Averaging"},{"task_slug":"time-series-classification","task_name":"Time Series Classification"},{"task_slug":null,"task_name":"valid"}],"methods":[{"method_slug":"dtw","method_name":"DTW"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2010.08354","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2010.08354"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/google-research/soft-dtw-divergences","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":3},"by_repo_kind":{"official":{"samples":3,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"e8522eac4cb92887","entry":"sdtw","repo":"google-research/soft-dtw-divergences","repo_kind":"official","path":"sdtw_div/numba_ops.py","file_url":"https://github.com/google-research/soft-dtw-divergences/blob/HEAD/sdtw_div/numba_ops.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e8522eac4cb92887"}},{"code_sha256_prefix":"a340ceda4060c161","entry":"sdtw_C","repo":"google-research/soft-dtw-divergences","repo_kind":"official","path":"sdtw_div/numba_ops.py","file_url":"https://github.com/google-research/soft-dtw-divergences/blob/HEAD/sdtw_div/numba_ops.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a340ceda4060c161"}},{"code_sha256_prefix":"ac85fef3fa6d5be2","entry":"sdtw_grad_C","repo":"google-research/soft-dtw-divergences","repo_kind":"official","path":"sdtw_div/numba_ops.py","file_url":"https://github.com/google-research/soft-dtw-divergences/blob/HEAD/sdtw_div/numba_ops.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ac85fef3fa6d5be2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}