SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2005.08926 · NeurIPS · 2020

Neural Controlled Differential Equations for Irregular Time Series

Patrick Kidger, Terry Lyons, James Morrill, James Foster

arXiv · PDF · Open in the Atlas

Code that ran

9 of 20 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, 1 violated it and 5 have no contract verdict; 3 failures of our instrument; 11 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/2005.08926.json · badge: /api/ran/2005.08926.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
patrick-kidger/NeuralCDE canonical (classifier label)
classifier basis: census
3 ran · 3 no recorded run
google-research/torchsde canonical (classifier label)
classifier basis: classifier_2025
1 ran · 2 no recorded run
dungxibo123/NeuralCDE community (classifier label)
classifier basis: plan_row
2 ran · 3 no recorded run
copy not recorded community
not in the paper's declared repositories
2 ran · 0 no recorded run
philipdarke/torchtime community (classifier label)
classifier basis not recorded on the link
1 ran · 3 no recorded run
FunctionStatusWhere it lives
cdeint Ran
ran; our contract draft was wrong, not the code
dungxibo123/NeuralCDE/controldiffeq/cdeint_module.py
code served (permissive licence) · get_code("a4dafc84cbeb2bb5")
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 Tensor, ndim 3, dtype family float, shape (5, 2, 4) 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Define a simple func module that takes z and returns vector field
class SimpleFunc(nn.Module):
    def __init__(self, hidden_channels, input_channels):
        super(SimpleFunc, self).__init__()
        self.hidden_channels = hidden_channels
        self.input_channels = input_channels
        # Simple linear layer to map hidden -> (hidden x input)
        self.linear = nn.Linear(hidden_channels, hidden_channels * input_channels)
    
    def forward(self, z):
        # z shape: (..., hidden_channels)
        # Should return (..., hidden_channels, input_channels)
        batch_shape = z.shape[:-1]
        out = self.linear(z)
        # Reshape to (..., hidden_channels, input_channels)
        return out.reshape(*batch_shape, self.hidden_channels, self.input_channels)

# Define dX_dt - a callable that returns control gradients
class ControlGradient(nn.Module):
    def __init__(self, input_channels, batch_shape):
        super(ControlGradient, self).__init__()
        self.input_channels = input_channels
        self.batch_shape = batch_shape
    
    def forward(self, t):
        # t is a scalar tensor
        # Should return tensor of shape (..., input_channels)
        # where ... matches z0's batch dimensions
        return torch.ones(*self.batch_shape, self.input_channels)

# Set up dimensions
batch_size = 2
hidden_channels = 4
input_channels = 3

# Create initial state z0
z0 = torch.randn(batch_size, hidden_channels)

# Create the func module
func = SimpleFunc(hidden_channels, input_channels)

# Create the control gradient callable
batch_shape = (batch_size,)
dX_dt = ControlGradient(input_channels, batch_shape)

# Create time points to integrate over
t = torch.linspace(0, 1, 5)

# Build ARGS dictionary
ARGS = {
    'dX_dt': dX_dt,
    'z0': z0,
    'func': func,
    't': t,
    'adjoint': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchdiffeq — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (5, 2, 4) — shape (5, 2, 4) 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
cheap_stack Ran
ran on a synthesized input
patrick-kidger/NeuralCDE/controldiffeq/misc.py
code served (permissive licence) · get_code("f3fd7f081ad2b0ac")
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 Tensor, ndim 3, dtype family float, shape (2, 2, 4) 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 torch

torch.manual_seed(0)

# Create a list of small tensors with distinct shapes
tensors = [
    torch.randn(2, 4),
    torch.randn(2, 4),
]

dim = 0

ARGS = {
    "tensors": tensors,
    "dim": dim,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 2, 4) — shape (2, 2, 4) 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
dataloader Ran
ran on a synthesized input
patrick-kidger/NeuralCDE/experiments/datasets/common.py
code served (permissive licence) · get_code("3d00ef924475de36")
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 DataLoader. The image it ran in was not recorded. If your copy returns the same type 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 torch
from torch.utils.data import Dataset

torch.manual_seed(0)

class SimpleDataset(Dataset):
    def __init__(self, size=10):
        self.size = size
    
    def __len__(self):
        return self.size
    
    def __getitem__(self, idx):
        x = torch.randn(4)
        y = torch.randint(0, 2, (1,))
        return x, y

dataset = SimpleDataset(size=10)

ARGS = {
    'dataset': dataset
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
dataloader Ran
ran on a synthesized input
dungxibo123/NeuralCDE/experiments/datasets/common.py
code served (permissive licence) · get_code("3588c9b656c72587")
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 DataLoader. The image it ran in was not recorded. If your copy returns the same type 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 torch
from torch.utils.data import Dataset

torch.manual_seed(0)

class SimpleDataset(Dataset):
    def __init__(self, size=10):
        self.size = size
        self.data = torch.randn(size, 4)
        self.labels = torch.randint(0, 2, (size,))
    
    def __len__(self):
        return self.size
    
    def __getitem__(self, idx):
        return self.data[idx], self.labels[idx]

dataset = SimpleDataset(size=10)

ARGS = {
    'dataset': dataset
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
forward_impute Ran
ran on a synthesized input
philipdarke/torchtime/src/torchtime/impute.py
code served (permissive licence) · get_code("13f770aeadd69af7")
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 Tensor, ndim 3, dtype family float, shape (2, 5, 4) 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 torch

torch.manual_seed(0)

# Create input tensor with shape (batch=2, time=5, channels=4)
# Include some NaN values to test imputation
input_tensor = torch.randn(2, 5, 4)
input_tensor[0, 1, 0] = float('nan')
input_tensor[1, 2, 2] = float('nan')
input_tensor[0, 0, 3] = float('nan')

# Create fill tensor with mean values for each channel
fill_tensor = torch.tensor([0.5, 0.3, 0.7, 0.2])

# Create select tensor specifying which channels to impute (all channels in this case)
select_tensor = torch.arange(4)

ARGS = {
    "input": input_tensor,
    "fill": fill_tensor,
    "select": select_tensor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 5, 4) — shape (2, 5, 4) 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
get_data Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from patrick-kidger/torchcde
pointer only · get_code("582d465aad5dd543")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

parse_return Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
google-research/torchsde/torchsde/_core/sdeint.py
code served (permissive licence) · get_code("bd70944e548b69cd")
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) and returned tuple. The image it ran in was not recorded. If your copy returns the same type 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 torch

torch.manual_seed(0)

# y0 is used to get size(1), so it needs to be a 2D or 3D tensor
# Based on the function, y0.size(1) is used to determine split sizes
y0 = torch.randn(2, 5)  # batch_size=2, feature_dim=5

# ys is split and indexed, so it needs to be 3D: (time_steps, batch, features)
# The split uses y0.size(1) - 1 = 4 and 1, so total should be 5
ys = torch.randn(3, 2, 5)  # time_steps=3, batch=2, total_features=5

# extra_solver_state is returned as-is when extra=True
extra_solver_state = {"state": "solver_data", "value": 42}

# extra is a boolean flag
extra = True

# logqp is a boolean flag
logqp = True

ARGS = {
    "y0": y0,
    "ys": ys,
    "extra_solver_state": extra_solver_state,
    "extra": extra,
    "logqp": logqp,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
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
str2bool Ran
ran, violated the contract we drafted
this paper's copy was not recorded; identical code first harvested from google-research/torchsde
pointer only · get_code("6a904c09f82ab220")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

tridiagonal_solve Ran
ran on a synthesized input
patrick-kidger/NeuralCDE/controldiffeq/misc.py
code served (permissive licence) · get_code("bd529c79265ef41b")
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 Tensor, ndim 2, dtype family float, shape (2, 4) 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 torch
import numpy as np

torch.manual_seed(0)

# Create a simple tridiagonal system
# For a 4x4 system, we need:
# - b: shape (..., 4)
# - A_upper: shape (..., 3)
# - A_diagonal: shape (..., 4)
# - A_lower: shape (..., 3)

# Create with batch dimension for variety
batch_size = 2
k = 4

b = torch.randn(batch_size, k)
A_upper = torch.randn(batch_size, k - 1)
A_diagonal = torch.randn(batch_size, k)
A_lower = torch.randn(batch_size, k - 1)

ARGS = {
    "b": b,
    "A_upper": A_upper,
    "A_diagonal": A_diagonal,
    "A_lower": A_lower,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
GRU_ODE Not yet run
unverified (harvested, no recorded run)
dungxibo123/NeuralCDE/experiments/models/vector_fields.py
code served (permissive licence) · get_code("95c5d0ccacb5efc4")
How it ran

no invocation recorded.

check_contract Not yet run
unverified (harvested, no recorded run)
google-research/torchsde/torchsde/_core/sdeint.py
code served (permissive licence) · get_code("e6f3ab1566910024")
How it ran

no invocation recorded.

evaluate_loss Not yet run
unverified (harvested, no recorded run)
google-research/torchsde/examples/sde_gan.py
code served (permissive licence) · get_code("ff96c7be4662524f")
How it ran

no invocation recorded.

natural_cubic_spline_coeffs Not yet run
unverified (harvested, no recorded run)
patrick-kidger/NeuralCDE/controldiffeq/interpolate.py
code served (permissive licence) · get_code("9ecdee7c3249e7c8")
How it ran

no invocation recorded.

normalise_data Not yet run
unverified (harvested, no recorded run)
patrick-kidger/NeuralCDE/experiments/datasets/common.py
code served (permissive licence) · get_code("b9dfe82fa3003be5")
How it ran

no invocation recorded.

normalise_data Not yet run
unverified (harvested, no recorded run)
dungxibo123/NeuralCDE/experiments/datasets/common.py
code served (permissive licence) · get_code("aceed8741052218d")
How it ran

no invocation recorded.

packed_sequence Not yet run
unverified (harvested, no recorded run)
philipdarke/torchtime/src/torchtime/collate.py
code served (permissive licence) · get_code("d01650eee408e749")
How it ran

no invocation recorded.

replace_missing Not yet run
unverified (harvested, no recorded run)
philipdarke/torchtime/src/torchtime/impute.py
code served (permissive licence) · get_code("a1971b5815c2fc7a")
How it ran

no invocation recorded.

sort_by_length Not yet run
unverified (harvested, no recorded run)
philipdarke/torchtime/src/torchtime/collate.py
code served (permissive licence) · get_code("9828f771a54b575c")
How it ran

no invocation recorded.

split_data Not yet run
unverified (harvested, no recorded run)
patrick-kidger/NeuralCDE/experiments/datasets/common.py
code served (permissive licence) · get_code("39ae76dc29320765")
How it ran

no invocation recorded.

split_data Not yet run
unverified (harvested, no recorded run)
dungxibo123/NeuralCDE/experiments/datasets/common.py
code served (permissive licence) · get_code("a5ee2b2e1aa03e18")
How it ran

no invocation recorded.

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 20 distinct functions with an identity, 8 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 8 later) and 12 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
str2bool 175 other papers
16 dated earlier, 2 the same month, 157 later · 2 only as an assembly brick
1406.6247 (2014-06)
Recurrent Models of Visual Attention
1603.09382 (2016-03)
Deep Networks with Stochastic Depth
1710.10196 (2017-10)
Progressive Growing of GANs for Improved Quality, Stability, and Variation
and 172 more not named here
get_data 3 other papers
3 later
2009.09457 (2020-09)
"Hey, that's not an ODE": Faster ODE Adjoints via Seminorms
2105.13493 (2021-05)
Efficient and Accurate Gradients for Neural SDEs
2106.11028 (2021-06)
Neural Controlled Differential Equations for Online Prediction Tasks
cdeint 2 other papers
2 later
2303.10909 (2023-03)
Graph Neural Rough Differential Equations for Traffic Forecasting
2402.14989 (2024-02)
Stable Neural Stochastic Differential Equations in Analyzing Irregular Time Series Data
evaluate_loss 2 other papers
1 dated earlier, 1 later
2001.01328 (2020-01)
Scalable Gradients for Stochastic Differential Equations
2102.03657 (2021-02)
Neural SDEs as Infinite-Dimensional GANs
GRU_ODE 1 other paper
1 later
2402.14989 (2024-02)
Stable Neural Stochastic Differential Equations in Analyzing Irregular Time Series Data
check_contract 1 other paper
1 later
2102.03657 (2021-02)
Neural SDEs as Infinite-Dimensional GANs
parse_return 1 other paper
1 later
2102.03657 (2021-02)
Neural SDEs as Infinite-Dimensional GANs
split_data 1 other paper
1 later
2006.00873 (2020-06)
A Generalised Signature Method for Multivariate Time Series Feature Extraction

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

Neural ordinary differential equations are an attractive option for modelling temporal dynamics. However, a fundamental issue is that the solution to an ordinary differential equation is determined by its initial condition, and there is no mechanism for adjusting the trajectory based on subsequent observations. Here, we demonstrate how this may be resolved through the well-understood mathematics of controlled differential equations. The resulting neural controlled differential equation model is directly applicable to the general setting of partiallyobserved irregularly-sampled multivariate time series, and (unlike previous work on this problem) it may utilise memory-efficient adjoint-based backpropagation even across observations. We demonstrate that our model achieves state-of-the-art performance against similar (ODE or RNN based) models in empirical studies on a range of datasets. Finally we provide theoretical results demonstrating universal approximation, and that our model subsumes alternative ODE models.

For agents

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

get_harvested_code_for_paper("2005.08926")
get_code_for_paper("2005.08926")
have("2005.08926")

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

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

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

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

Connect an agent — have() is free.