SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2009.09457 · ICML · 2021

"Hey, that's not an ODE": Faster ODE Adjoints via Seminorms

Patrick Kidger, Terry Lyons, Ricky Chen

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 1 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/2009.09457.json · badge: /api/ran/2009.09457.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/torchcde canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
rtqichen/torchdiffeq community
Papers with Code archive
3 ran · 1 no recorded run
patrick-kidger/FasterNeuralDiffEq marked official in Papers with Code
Papers with Code archive
2 ran · 0 no recorded run
FunctionStatusWhere it lives
_flat_to_shape Ran
ran; our contract draft was wrong, not the code
rtqichen/torchdiffeq/torchdiffeq/_impl/adjoint.py
code served (permissive licence) · get_code("60d36a103bd951b8")
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 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
import torch.nn as nn

torch.manual_seed(0)

# Construct arguments for _flat_to_shape
# Parameters: tensor, length, shapes

# Create a flat tensor to be reshaped
# We need shapes to define the target shapes, so let's work backwards
shape1 = torch.Size([2, 3])      # First target shape: 2x3
shape2 = torch.Size([4])         # Second target shape: 4
shape3 = torch.Size([5, 2])      # Third target shape: 5x2

shapes = [shape1, shape2, shape3]

# Calculate total number of elements needed
total_numel = sum(s.numel() for s in shapes)  # 6 + 4 + 10 = 20

# length defines the leading dimensions
length = (3,)  # Batch dimension of size 3

# Create flat tensor with shape (3, 20)
tensor = torch.randn(3, total_numel)

ARGS = {
    "tensor": tensor,
    "length": length,
    "shapes": shapes
}
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 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
_mixed_norm Ran
ran, honoured the contract we drafted
rtqichen/torchdiffeq/torchdiffeq/_impl/adjoint.py
code served (permissive licence) · get_code("616aed78f20f4738")
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 0, dtype family float, shape () 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)

def _rms_norm(tensor):
    return tensor.abs().pow(2).mean().sqrt()

def _mixed_norm(tensor_tuple):
    if len(tensor_tuple) == 0:
        return 0.0
    return max([_rms_norm(tensor) for tensor in tensor_tuple])

# Create small test tensors with distinct sizes
tensor1 = torch.randn(2, 4)
tensor2 = torch.randn(2, 3)
tensor3 = torch.randn(2, 5)

# Test case 1: non-empty tuple of tensors
tensor_tuple = (tensor1, tensor2, tensor3)

ARGS = {
    "tensor_tuple": tensor_tuple
}
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 0, dtype family float, shape () — shape () 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
_rms_norm Ran
ran, honoured the contract we drafted
rtqichen/torchdiffeq/torchdiffeq/_impl/adjoint.py
code served (permissive licence) · get_code("2d6c73bb479f8a90")
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 0, dtype family float, shape () 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)

# Construct a small tensor for the _rms_norm function
# The function uses: .abs(), .pow(2), .mean(), .sqrt()
# These are standard tensor operations, so any tensor works
tensor = torch.randn(2, 4)

ARGS = {
    "tensor": 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 0, dtype family float, shape () — shape () 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
_rms_norm Ran
ran; our contract draft was wrong, not the code
patrick-kidger/FasterNeuralDiffEq/models/common.py
code served (permissive licence) · get_code("d5fe4428b7f73daf")
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 0, dtype family float, shape () 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)

# The function _rms_norm takes a tensor and computes:
# tensor.pow(2).mean().sqrt()
# This is the root mean square of the tensor elements.
# We need to provide a valid tensor as the 'tensor' parameter.

tensor = torch.randn(2, 4)

ARGS = {
    "tensor": 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 0, dtype family float, shape () — shape () 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
patrick-kidger/torchcde/example/time_series_classification.py
code served (permissive licence) · get_code("582d465aad5dd543")
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
import math

torch.manual_seed(0)

ARGS = {
    "num_timepoints": 50
}
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
make_norm Ran
ran; our contract draft was wrong, not the code
patrick-kidger/FasterNeuralDiffEq/models/common.py
code served (permissive licence) · get_code("df358ff6bb70bc96")
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 function. 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)

# The function make_norm takes a 'state' parameter
# It uses state.numel() to get the total number of elements
# It returns a _norm function that expects aug_state to be indexable
# aug_state should have structure: [something, y (state_size elements), adj_y (state_size elements), ...]

# Create a small state tensor
state = torch.randn(4)

ARGS = {
    "state": state
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
handle_adjoint_norm_ Not yet run
unverified (harvested, no recorded run)
rtqichen/torchdiffeq/torchdiffeq/_impl/adjoint.py
code served (permissive licence) · get_code("634734b11eb446c3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 6 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
get_data 3 other papers
1 dated earlier, 2 later
2005.08926 (2020-05)
Neural Controlled Differential Equations for Irregular Time Series
2105.13493 (2021-05)
Efficient and Accurate Gradients for Neural SDEs
2106.11028 (2021-06)
Neural Controlled Differential Equations for Online Prediction Tasks

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 differential equations may be trained by backpropagating gradients via the adjoint method, which is another differential equation typically solved using an adaptive-step-size numerical differential equation solver. A proposed step is accepted if its error, relative to some norm, is sufficiently small; else it is rejected, the step is shrunk, and the process is repeated. Here, we demonstrate that the particular structure of the adjoint equations makes the usual choices of norm (such as L 2 ) unnecessarily stringent. By replacing it with a more appropriate (semi)norm, fewer steps are unnecessarily rejected and the backpropagation is made faster. This requires only minor code modifications. Experiments on a wide range of tasks-including time series, generative modeling, and physical control-demonstrate a median improvement of 40% fewer function evaluations. On some problems we see as much as 62% fewer function evaluations, so that the overall training time is roughly halved.

For agents

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

get_harvested_code_for_paper("2009.09457")
get_code_for_paper("2009.09457")
have("2009.09457")

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

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

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

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

Connect an agent — have() is free.