SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1703.01541 · 2017

Soft-DTW: a Differentiable Loss Function for Time-Series

arXiv · PDF · Open in the Atlas

Code that ran

4 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 1 failure of our instrument; 7 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1703.01541.json · badge: /api/ran/1703.01541.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
mblondel/soft-dtw canonical (classifier label)
classifier basis: census
1 ran · 1 no recorded run
khdlr/softdtw_jax community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
lyprince/sdtw_pytorch reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 2 no recorded run
Maghoumi/DeepNAG community (classifier label)
classifier basis not recorded on the link
0 ran · 3 no recorded run
keonlee9420/Soft-DTW-Loss reimplementation (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
FunctionStatusWhere it lives
delannoy_num Ran
ran on a synthesized input
mblondel/soft-dtw/sdtw/path.py
code served (permissive licence) · get_code("4f2a86831e92d61e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# The function delannoy_num takes two integer parameters: m and n
# These represent the northeast corner coordinates of a rectangular grid
# The function computes the number of lattice paths from (0,0) to (m,n)

# Setting up small but distinct integer values for m and n
m = 3
n = 4

ARGS = {
    "m": m,
    "n": n,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
distance_matrix Ran
ran on a synthesized input
khdlr/softdtw_jax/softdtw_jax/softdtw_jax.py
code served (permissive licence) · get_code("f6de6e2b30a06bf5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ArrayImpl, ndim 2, dtype family float; no output shape is stated. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-26T21:51:12Z. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import jax.numpy as jnp

# The function expects two arguments: a and b
# Both should be JAX arrays that support:
# - len(a.shape) to check dimensionality
# - jnp.expand_dims() operation
# - jnp.square() and subtraction operations
# - jnp.sum() operation

# Create small test arrays with distinct dimensions
a = jnp.array([[1.0, 2.0, 3.0, 4.0],
                [5.0, 6.0, 7.0, 8.0]])  # shape: (2, 4) - 2 points with 4 features

b = jnp.array([[0.5, 1.5, 2.5, 3.5],
                [4.5, 5.5, 6.5, 7.5],
                [8.5, 9.5, 10.5, 11.5]])  # shape: (3, 4) - 3 points with 4 features

ARGS = {
    "a": a,
    "b": b
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 2, dtype family float — no output shape is stated: no later run recorded an output shape for this sample (observed_output and metamorphic_properties carry none; shape_contract and output_contract record ndim only)
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
pad_inf Ran
ran on a synthesized input
khdlr/softdtw_jax/softdtw_jax/softdtw_jax.py
code served (permissive licence) · get_code("05bf33cfc4c9c7cf")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ArrayImpl, ndim 2, dtype family float, shape (5, 6) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import jax.numpy as jnp

# Create a small input array
inp = jnp.array([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]])

# Define padding amounts
before = 1
after = 2

ARGS = {
    "inp": inp,
    "before": before,
    "after": after
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 2, dtype family float, shape (5, 6) — shape (5, 6) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sakoe_chiba_band Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lyprince/sdtw_pytorch/sdtw.py
pointer only (licence: NONE) · get_code("e1ffef61f9ff62a7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lyprince/sdtw_pytorch when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

dist_func_cos Not yet run
unverified (harvested, no recorded run)
Maghoumi/DeepNAG/models/hausdorff_distance.py
code served (permissive licence) · get_code("c542e2fb148a11f8")
How it ran

no invocation recorded.

jacobean_product_squared_euclidean Not yet run
unverified (harvested, no recorded run)
keonlee9420/Soft-DTW-Loss/sdtw_cuda_loss.py
code served (permissive licence) · get_code("2331123dca3def2c")
How it ran

no invocation recorded.

jacobean_product_squared_euclidean Not yet run
unverified (harvested, no recorded run)
lyprince/sdtw_pytorch/sdtw.py
pointer only (licence: NONE) · get_code("1d66eaff37129b6a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lyprince/sdtw_pytorch when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

load_ucr Not yet run
unverified (harvested, no recorded run)
mblondel/soft-dtw/sdtw/dataset.py
code served (permissive licence) · get_code("57a33bcae3c2374a")
How it ran

no invocation recorded.

masked_max Not yet run
unverified (harvested, no recorded run)
Maghoumi/DeepNAG/models/hausdorff_distance.py
code served (permissive licence) · get_code("8f1d21b59b848f46")
How it ran

no invocation recorded.

masked_mean Not yet run
unverified (harvested, no recorded run)
Maghoumi/DeepNAG/models/hausdorff_distance.py
code served (permissive licence) · get_code("f405ce4fd7400a67")
How it ran

no invocation recorded.

softmin Not yet run
unverified (harvested, no recorded run)
lyprince/sdtw_pytorch/sdtw.py
pointer only (licence: NONE) · get_code("3f0b3faa4c343689")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lyprince/sdtw_pytorch when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
masked_mean 3 other papers
3 later
2005.03545 (2020-05)
MISA: Modality-Invariant and -Specific Representations for Multimodal Sentiment Analysis
2205.15465 (2022-05)
Analyzing Modality Robustness in Multimodal Sentiment Analysis
2210.15359 (2022-10)
Exploiting modality-invariant feature for robust multimodal emotion recognition with missing modalities

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We propose in this paper a differentiable learning loss between time series, building upon the celebrated dynamic time warping (DTW) discrepancy. Unlike the Euclidean distance, DTW can compare time series of variable size and is robust to shifts or dilatations across the time dimension. To compute DTW, one typically solves a minimal-cost alignment problem between two time series using dynamic programming. Our work takes advantage of a smoothed formulation of DTW, called soft-DTW, that computes the soft-minimum of all alignment costs. We show in this paper that soft-DTW is a differentiable loss function, and that both its value and gradient can be computed with quadratic time/space complexity (DTW has quadratic time but linear space complexity). We show that this regularization is particularly well suited to average and cluster time series under the DTW geometry, a task for which our proposal significantly outperforms existing baselines. Next, we propose to tune the parameters of a machine that outputs time series by minimizing its fit with ground-truth labels in a soft-DTW sense.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1703.01541")
get_code_for_paper("1703.01541")
have("1703.01541")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1703.01541.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1703.01541.svg)](https://syntology.ai/paper/1703.01541)

Connect an agent — have() is free.