SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1902.10298 · 2019

ANODE: Unconditionally Accurate Memory-Efficient Gradients for Neural ODEs

arXiv · PDF · Open in the Atlas

Code that ran

4 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 2 have no contract verdict; 0 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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/1902.10298.json · badge: /api/ran/1902.10298.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
alexandrejash/Chivvo canonical (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
amirgholami/anode community (classifier label)
classifier basis: plan_row
4 ran · 2 no recorded run
FunctionStatusWhere it lives
ResNet18 Ran
ran on a synthesized input
amirgholami/anode/models/resnet.py
code served (permissive licence) · get_code("1b6ffb716fc20c05")
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 ResNet. 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)

class MockODEBlock(nn.Module):
    """Minimal ODE block that wraps a BasicBlock2 and calls it with (t, x)"""
    def __init__(self, block):
        super().__init__()
        self.block = block
    
    def forward(self, x):
        # The ResNet forward calls this as a layer, passing only x
        # but BasicBlock2.forward expects (t, x)
        # So we need to handle that mismatch
        t = torch.tensor(0.0)
        return self.block(t, x)

ARGS = {
    "ODEBlock": MockODEBlock
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
flatten_params Ran
ran, honoured the contract we drafted
amirgholami/anode/anode/adjoint.py
code served (permissive licence) · get_code("ddfbcc8cc75b02bd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Tensor, ndim 1, dtype family float, shape (29,) 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 parameter tensors with different shapes
params = [
    torch.randn(2, 4),      # 2D tensor with 8 elements
    torch.randn(3, 5),      # 2D tensor with 15 elements
    torch.randn(6),         # 1D tensor with 6 elements
]

ARGS = {
    "params": params
}
Setup block drafted by
a language model, Claude Sonnet 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 Tensor, ndim 1, dtype family float, shape (29,) — shape (29,) 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
flatten_params_grad Ran
ran, honoured the contract we drafted
amirgholami/anode/anode/adjoint.py
code served (permissive licence) · get_code("ed0688b1a9390dd0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Tensor, ndim 1, dtype family float, shape (23,) 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 simple neural network to get parameters
class SimpleModel(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = torch.nn.Linear(4, 3)
        self.linear2 = torch.nn.Linear(3, 2)
    
    def forward(self, x):
        return self.linear2(self.linear1(x))

# Create two models - one for params and one for params_ref
model1 = SimpleModel()
model2 = SimpleModel()

# Get parameters from both models
params = list(model1.parameters())
params_ref = list(model2.parameters())

ARGS = {
    'params': params,
    'params_ref': params_ref
}
Setup block drafted by
a language model, Claude Sonnet 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 Tensor, ndim 1, dtype family float, shape (23,) — shape (23,) 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
lr_schedule Ran
ran on a synthesized input
amirgholami/anode/models/resnet.py
code served (permissive licence) · get_code("2003406c1040031b")
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 float, 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 math

def lr_schedule(lr, epoch):
    optim_factor = 0
    if epoch > 250:
        optim_factor = 2
    elif epoch > 150:
        optim_factor = 1
    return lr / math.pow(10, optim_factor)

ARGS = {
    "lr": 0.1,
    "epoch": 100
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
SqNxt_23_1x Not yet run
unverified (harvested, no recorded run)
amirgholami/anode/models/sqnxt.py
code served (permissive licence) · get_code("4531de796056a938")
How it ran

no invocation recorded.

odesolver Not yet run
unverified (harvested, no recorded run)
amirgholami/anode/anode/odesolver.py
code served (permissive licence) · get_code("0cdb14ad4e254911")
How it ran

no invocation recorded.

odesolver_adjoint Not yet run
unverified (harvested, no recorded run)
alexandrejash/Chivvo/anode/adjoint.py
pointer only (licence: GPL-3.0) · get_code("e97bad62391de89f")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, alexandrejash/Chivvo, is not in the permissive set Syntology serves inline. 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 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, 5 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 4 later) and 2 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
SqNxt_23_1x 1 other paper
1 later
1911.07532 (2019-11)
Graph Neural Ordinary Differential Equations
flatten_params 1 other paper
1 later
2102.04668 (2021-02)
MALI: A memory efficient and reverse accurate integrator for Neural ODEs
flatten_params_grad 1 other paper
1 later
2102.04668 (2021-02)
MALI: A memory efficient and reverse accurate integrator for Neural ODEs
lr_schedule 1 other paper
1 later
1911.07532 (2019-11)
Graph Neural Ordinary Differential Equations
odesolver 1 other paper
1 dated earlier
1806.07366 (2018-06)
Neural Ordinary Differential Equations

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-23.

Repositories linked to this paper

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

Abstract

Residual neural networks can be viewed as the forward Euler discretization of an Ordinary Differential Equation (ODE) with a unit time step. This has recently motivated researchers to explore other discretization approaches and train ODE based networks. However, an important challenge of neural ODEs is their prohibitive memory cost during gradient backpropogation. Recently a method proposed in [8], claimed that this memory overhead can be reduced from O(LN_t), where N_t is the number of time steps, down to O(L) by solving forward ODE backwards in time, where L is the depth of the network. However, we will show that this approach may lead to several problems: (i) it may be numerically unstable for ReLU/non-ReLU activations and general convolution operators, and (ii) the proposed optimize-then-discretize approach may lead to divergent training due to inconsistent gradients for small time step sizes. We discuss the underlying problems, and to address them we propose ANODE, an Adjoint based Neural ODE framework which avoids the numerical instability related problems noted above, and provides unconditionally accurate gradients. ANODE has a memory footprint of O(L) + O(N_t), with the same computational cost as reversing ODE solve. We furthermore, discuss a memory efficient algorithm which can further reduce this footprint with a trade-off of additional computational cost. We show results on Cifar-10/100 datasets using ResNet and SqueezeNext neural networks.

For agents

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

get_harvested_code_for_paper("1902.10298")
get_code_for_paper("1902.10298")
have("1902.10298")

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

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

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

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

Connect an agent — have() is free.