Papers › ANODE: Unconditionally Accurate Memory-Efficient Gradients for Neural ODEs

ANODE: Unconditionally Accurate Memory-Efficient Gradients for Neural ODEs

27 Feb 2019arXiv:1902.10298archive 2025-07-28

Amir Gholami, Kurt Keutzer, George Biros

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1902.10298")

Code

Syntology Ran 2 of 7 code samples harvested from 2 repositories linked to this paper; 5 have no recorded run. Of those that ran: 2 ran · honoured contract.

By repository: community (archive-listed): 7 samples from 2 repositories, 2 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

5yearsKim/HamiltonianFlow mentioned on GitHubpytorch report
alexandrejash/Chivvo mentioned on GitHubpytorch report
amirgholami/anode mentioned on GitHubpytorchMIT report
juliagusak/neural-ode-norm mentioned on GitHubpytorch report
rg321/anode_mtvso mentioned on GitHubpytorchGPL-3.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

7 samples harvested; 2 ran; 2 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · honoured contract
5unverified

Licence: 1 of the 7 samples is pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

flatten_params amirgholami/anode/anode/adjoint.py community (archive-listed) ran · honoured contract MIT (permissive) · ddfbcc8cc75b02bd · report
flatten_params_grad amirgholami/anode/anode/adjoint.py community (archive-listed) ran · honoured contract MIT (permissive) · ed0688b1a9390dd0 · report
ResNet18 amirgholami/anode/models/resnet.py community (archive-listed) unverified MIT (permissive) · 1b6ffb716fc20c05 · report
SqNxt_23_1x amirgholami/anode/models/sqnxt.py community (archive-listed) unverified MIT (permissive) · 4531de796056a938 · report
lr_schedule amirgholami/anode/models/resnet.py community (archive-listed) unverified MIT (permissive) · 2003406c1040031b · report
odesolver amirgholami/anode/anode/odesolver.py community (archive-listed) unverified MIT (permissive) · 0cdb14ad4e254911 · report
odesolver_adjoint alexandrejash/Chivvo/anode/adjoint.py community (archive-listed) unverified GPL-3.0 (copyleft) · pointer only · e97bad62391de89f · report

Tasks

Clustering Multivariate Time SeriesMultivariate Time Series Imputation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

1x1 ConvolutionAverage PoolingBatch NormalizationBottleneck Residual BlockConvolutionDense ConnectionsGlobal Average PoolingKaiming InitializationMax PoolingReLUResidual BlockResidual ConnectionSoftmaxSpatially Separable ConvolutionSqueezeNeXtSqueezeNeXt BlockXavier Initialization

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections