- Introduced by
- Chen, T. Q. et al.
- Year
- 2018
- Type
- Continuous-depth neural network (ODE-parameterised dynamics)
What does it do?
A Neural ODE, introduced by Chen and colleagues in 2018, represents a hidden state as the continuous solution of an ordinary differential equation whose dynamics are defined by a neural network.
It can be viewed as the continuous-time limit of residual networks, and because the state can be evaluated at arbitrary times, it suits irregularly spaced time series and physics-based modelling.
The intuition behind the method
A deep residual network adds a small learned increment to its hidden state at each layer. If those layers are imagined as shrinking until each step is infinitesimally small, the discrete sequence of updates becomes a continuous trajectory, and the network instead specifies the rate of change of the hidden state. A Neural ODE takes this limit literally: rather than stacking layers, it learns this rate of change and uses a numerical ODE solver to integrate it forward in time. The state can therefore be read off at any moment, not only at fixed layer boundaries.
History
Neural ODEs were introduced by Chen, Rubanova, Bettencourt and Duvenaud at NeurIPS 2018. The paper presents the continuous limit of residual networks as an ordinary differential equation solved by a numerical integrator, trained with the adjoint method. In 2019, Rubanova, Chen and Duvenaud extended this framework to Latent ODEs for irregularly sampled time series.
When to use it
Choose a Neural ODE for prediction or forecasting on continuous-valued, continuous-time data, particularly irregularly sampled time series and longitudinal trajectories, when a smoothly evolving dynamical system is a plausible description of the process. The method relies on an ODE solver and adjoint-based training, so it is better suited to users comfortable with numerical methods. Short or sparse series are a poor fit, because there is little signal from which to identify continuous dynamics. As a rough guide, the method facts suggest about 100 observations; treat this as a guideline rather than a fixed threshold, and compare against simpler baselines first. Avoid the method when the process is not plausibly continuous, or when observations are regularly spaced and a simpler discrete model answers the question adequately.
Limitations and considerations
- Needs a reasonable amount of data: short or sparse series give too little signal to identify the dynamics reliably.
- With very few observations, the fitted dynamics can be unreliable, and simpler baselines may perform as well or better.
- Training depends on an ODE solver and the adjoint method, which adds numerical and implementation complexity.
- Stiff or rapidly changing dynamics can make the solver slow and training unstable.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Handles irregularly and unevenly sampled time series directly, because the hidden state is defined at any time point.
- Memory-efficient training: the adjoint method avoids storing every intermediate solver step, so memory does not grow with the number of forward steps.
- Suits systems whose governing dynamics are naturally expressed as rates of change of a state.
- The continuous-depth view generalises residual networks, and solver tolerance provides a way to trade numerical accuracy against computation.
Applications
- Forecasting and prediction on irregularly sampled or unevenly spaced time series.
- Modelling continuous dynamical and physics-based systems.
- Longitudinal trajectory modelling where observations arrive at arbitrary times.
- Continuous-depth alternatives to deep residual networks where memory is constrained.
How it works
How it works
Rather than a fixed sequence of layers, a neural network f_theta defines the instantaneous rate of change of the hidden state as a function of the current state and time. This turns network depth into continuous time: the model specifies how the state evolves, not how many discrete transformations to apply.
Formula
\frac{dh(t)}{dt} = f_\theta(h(t), t)To obtain the state at a later time, a numerical ODE solver integrates the learned dynamics forward from the initial state. Because the solution is defined for any time point, the model handles observations that arrive at irregular, unevenly spaced moments without forcing them onto a fixed grid.
Formula
h(t_1) = h(t_0) + \int_{t_0}^{t_1} f_\theta(h(t), t)\, dtTraining requires gradients of the loss with respect to the network parameters. The adjoint sensitivity method obtains these by solving a second ODE backwards in time, so memory use does not grow with the number of steps taken by the forward solver. The gradient equations themselves are derived in Chen et al. (2018).
Common pitfalls
- Applying it to a very short series, where there is too little signal to identify a continuous dynamic.
- Leaving solver tolerance settings unexamined, so the accuracy and runtime trade-off goes unchecked.
- Resampling irregular timestamps onto a regular grid, which discards the main advantage of the continuous-time formulation.
- Training without the adjoint method, so memory grows with every stored solver step.
Frequently asked questions
How is a Neural ODE different from a residual network?
A residual network adds a discrete increment at each of a fixed number of layers. A Neural ODE takes the limit where those increments become infinitesimal, so a neural network defines the continuous rate of change of the state and an ODE solver integrates it. Depth becomes continuous time rather than a fixed layer count.
Why use the adjoint method for training?
The adjoint sensitivity method computes gradients by solving an auxiliary ODE backwards in time. This avoids storing every step of the forward solver, so memory use does not grow with the number of solver steps. It is the memory-efficient training route described in the original Neural ODE work.
When should I avoid a Neural ODE?
On small datasets. With very few observations the continuous dynamics are hard to identify, and fitted models can be unreliable. As a rough guide, the method facts suggest about 100 observations; treat this as a guideline, not a fixed threshold. For shorter series, simpler baselines are usually a safer starting point.
What kind of data does it suit best?
Continuous-valued time series and longitudinal data, especially when observations are irregularly or unevenly spaced. Because the state is defined at any time point, the method does not require resampling the data onto a fixed grid.
Related methods
Sources
Chen, T. Q., Rubanova, Y., Bettencourt, J. & Duvenaud, D. (2018). Neural Ordinary Differential Equations. Advances in Neural Information Processing Systems (NeurIPS).
Open publication referenceRubanova, Y., Chen, T. Q. & Duvenaud, D. (2019). Latent ODEs for Irregularly-Sampled Time Series. Advances in Neural Information Processing Systems (NeurIPS).
Open publication reference