Neural Delay Differential Equations
- Neural Delay Differential Equations are data-driven models that extend neural ODEs by integrating current and delayed states to capture non-Markovian dynamics.
- The framework jointly learns the underlying dynamics and delay parameters via gradient-based optimization, enabling flexible system identification in complex time-delay systems.
- NDDEs have demonstrated strong predictive performance and universal approximation properties, making them a powerful tool in forecasting and inverse problem settings.
Neural Delay Differential Equations (NDDEs) are a class of data-driven models that extend neural ordinary differential equations (NODEs) by incorporating explicit dependence on delayed states in the governing dynamical system. Unlike NODEs, which model trajectories as solutions to ODEs dependent on the current state and possibly time, NDDEs introduce a vector field parameterized by a neural network that receives both present and past (delayed) states, enabling representation of non-Markovian dynamics intrinsic to delay differential equations. The NDDE framework is designed to simultaneously learn both the unknown dynamics and the delay parameters directly from data via gradient-based optimization, offering a differentiable, mesh-free, and flexible approach to system identification, forecasting, and inverse problems for a broad class of time-delay systems (Breda et al., 4 Dec 2025).
1. Mathematical Formulation
An NDDE approximates the right-hand side of a delay differential equation (DDE) with a neural network, and the delay parameters themselves are treated as learnable variables. The general autonomous form for a system with discrete delays reads: where and .
In the NDDE, this is modeled as: with trainable delay scalars () and collecting all neural network weights and biases. The initial condition is specified by a history function on . All parameters, including the delays, are optimized jointly via backpropagation (Breda et al., 4 Dec 2025).
The NDDE can be extended to time-dependent, state-dependent, and multiple delays by making the delay functions themselves neural networks: where each is parameterized by a neural network (Monsel et al., 2023).
2. Neural Network Architectures
The typical NDDE architecture constructs a multilayer perceptron accepting the concatenated present and delayed states as input: The layers are structured as: with nonlinear activations (e.g., tanh, ReLU), and the last layer is linear.
The delays are real parameters, generally initialized within and updated by gradient-based optimization (e.g., ADAM). Small networks (2–3 layers of 5–20 neurons each) suffice in many applications due to the strong inductive bias imposed by the delay structure. In state- or time-dependent NDDEs, separate MLPs parameterize each delay as a function of the current state and time (Breda et al., 4 Dec 2025, Monsel et al., 2023).
For high-dimensional problems (e.g., images), the NDDE is integrated with convolutional blocks: with channel-wise concatenation (Zhu et al., 2023).
3. Training Paradigms and Loss Functions
Training NDDEs requires defining loss functions that capture either the derivative field or the system’s simulated trajectory:
- Derivative-Matching Loss (no integration): Given measurements ,
where observed values are substituted wherever possible (Breda et al., 4 Dec 2025).
- Simulation Loss (integration required): For trajectories computed over steps,
with obtained by integrating the learned NDDE from the observed initial history.
Gradients are computed via delayed adjoint equations. For derivative-matching loss, the gradient with respect to a delay takes the form: where is obtained by linear interpolation on the history grid (Breda et al., 4 Dec 2025). Optimization proceeds via ADAM, and delays are clipped to enforce positivity and possible upper bounds.
4. Integration, Adjoint Sensitivity, and Implementation
For simulation-based training, a standard DDE solver (e.g., MATLAB’s dde23) or a specialized continuous-time integrator is employed, which interpolates historical states as needed. The adjoint sensitivity method extends the classic ODE approach to delayed arguments:
with appropriate terminal conditions on . Gradients with respect to both network weights and delays are computed by backpropagating through the DDE and the interpolated delayed arguments (Oprea et al., 2023, Monsel et al., 2023).
A practical high-level pseudocode for derivative-matching loss is:
1 2 3 4 5 6 7 8 9 |
Initialize Θ, delays {τ_i} ∈ (0, τ_max)
for q in 1...q_max:
Sample minibatch of times {t_m}
Interpolate x(t_m - τ_i) from data
Predict x'(t_m) = net(x(t_m), x(t_m - τ1), ..., x(t_m - τk))
Compute loss
Backprop to get gradients for Θ and τ_i
Update Θ and τ_i with ADAM; project τ_i to [0, τ_max]
Return best Θ, τ |
5. Illustrative Example: Delay Logistic System
The delay logistic equation (Hutchinson system) serves as a prototypical test case: For NDDE learning:
- MLP with 2 hidden layers (10 units each, tanh activation)
- Derivative loss , minibatch size 64, ADAM optimizer, 8000 iterations
- Training on , test on ,
Outcomes:
- Learned delay (1% error)
- Test RMSE, RMSE (5s horizon)
- Fast convergence (<5s on a desktop) (Breda et al., 4 Dec 2025)
6. Theoretical Properties: Expressivity and Universal Approximation
Multiple works rigorously establish the universal approximation property for NDDEs: for any continuous map , there exists a neural vector field and a delay such that integrating the NDDE from a given initial history over the appropriate interval yields . The constructive proof exploits the constant-history regime and neural network approximation of (Zhu et al., 2021).
Extension to multiple discrete or even piecewise-constant delays (as in Neural PCDDEs (Zhu et al., 2022)) preserves the universal approximation property and supports mapping flows inaccessible to finite-dimensional ODEs—examples include systems with intersecting trajectories, chaotic attractors, and classification tasks where NODEs fail (Zhu et al., 2023, Breda et al., 4 Dec 2025).
7. Connections, Advantages, Limitations, and Future Directions
| Aspect | NDDE | SINDy with Delays |
|---|---|---|
| Dynamics learning | Jointly learns and via backprop | Requires basis library, external optimizers |
| Interpretability | Flexible but less interpretable | Sparse, interpretable algebraic form |
| Scaling | Gradient-based, many parameters | Manual basis design, may be costly |
| Data requirement | Needs sufficient training data | Basis richness and identifiability dependent |
NDDEs offer simultaneous identification of delays and nonlinear dynamics via gradient-based optimization, which can scale and adapt to complex, arbitrary nonlinearities without requiring manual library selection. Key advantages include flexibility, the ability to incorporate physically informed structures (e.g., network channels corresponding to known variables), and extensibility to time- and state-dependent delays (Breda et al., 4 Dec 2025, Monsel et al., 2023).
Limitations include potential trapping in local minima (e.g., learning numerical differentiation rather than true delayed dynamics if data are not sufficiently rich), reduced transparency relative to sparse regression methods, and sensitivity to the weighting between derivative-matching and simulation loss. Interpretability can be improved by imposing sparsity penalties or employing hybrid NDDE–SINDy architectures (Breda et al., 4 Dec 2025).
Future directions highlighted include:
- Hybridization with sparse regression for interpretability
- Systematic analysis of data richness versus identifiability
- Extension to distributed, variable, or state-dependent delays
- Refinement of training heuristics for robust delay recovery (Breda et al., 4 Dec 2025)
NDDEs constitute a central approach within the modern landscape of data-driven methods for time-delay systems, offering an end-to-end differentiable, highly expressive, and practically effective framework for modeling complex non-Markovian dynamical phenomena from data.