Abstract
Neural controlled differential equations (Neural CDEs) are a continuous-time extension of recurrent neural networks (RNNs), achieving state-of-the-art (SOTA) performance at modelling functions of irregular time series. In order to interpret discrete data in continuous time, current implementations rely on non-causal interpolations of the data. This is fine when the whole time series is observed in advance, but means that Neural CDEs are not suitable for use in online prediction tasks, where predictions need to be made in real-time: a major use case for recurrent networks. Here, we show how this limitation may be rectified. First, we identify several theoretical conditions that control paths for Neural CDEs should satisfy, such as boundedness and uniqueness. Second, we use these to motivate the introduction of new schemes that address these conditions, offering in particular measurability (for online prediction), and smoothness (for speed). Third, we empirically benchmark our online Neural CDE model on three continuous monitoring tasks from the MIMIC-IV medical database: we demonstrate improved performance on all tasks against ODE benchmarks, and on two of the three tasks against SOTA non-ODE benchmarks.
Introduction
Neural Controlled Differential Equations (Neural CDEs) represent the continuous-time analogue of Recurrent Neural Networks (RNNs). They are particularly effective for modeling irregular time series by constructing a continuous "control path" from discrete observations. However, standard implementations have historically relied on natural cubic splines for this interpolation. While effective for offline analysis, natural cubic splines are inherently non-causal: the value of the path at time $t$ depends on all future observations. This "information bleed" prevents Neural CDEs from being used in real-time applications like medical monitoring or high-frequency trading, where future data is unavailable and models must not "cheat" by seeing the future during training.
Methodology: Causal Interpolation Schemes
To enable online prediction, the authors define four critical requirements for control paths: adapted measurability (causality), smoothness (to aid ODE solver efficiency), boundedness, and uniqueness. They propose two primary alternatives to natural cubic splines to meet these needs:
1. Rectilinear Control
Rectilinear control provides a continuously online solution. It separates time and feature updates using a "lead-lag" approach. When a new observation arrives, the model processes the change in feature values over "virtual time" while the real-time clock is effectively paused. This allows the model to produce a prediction at any instant, bridging the gap between discrete RNN updates and continuous ODE flows.
2. Cubic Hermite Splines with Backward Differences
This scheme is discretely online, meaning it updates at the moment of observation. By using only current and previous data points to determine gradients, it maintains causality. Crucially, it is smoother than simple linear interpolation, which significantly reduces the number of function evaluations (NFEs) required by adaptive ODE solvers, leading to faster training and inference.
Empirical Evaluation and Key Insights
The researchers benchmarked these schemes across various datasets, including regularly sampled audio (SpeechCommands) and irregularly sampled medical data (MIMIC-IV).
- The "Cheating" Problem: Using a simulated Brownian motion task, the authors demonstrated that offline models (natural cubic splines) achieve artificially high accuracy (81.7%) compared to the theoretical causal limit (75%). This confirms that non-causal interpolation inadvertently leaks future information into the present.
- Performance on MIMIC-IV: The online Neural CDE using rectilinear interpolation outperformed standard ODE benchmarks on tasks like mortality prediction and sepsis detection. Notably, on the Length of Stay (LOS) task, it surpassed all benchmarks, including non-ODE models like GRU-D.
- Efficiency Gains: Cubic Hermite splines proved to be a highly efficient middle ground. On the SpeechCommands dataset, they required approximately 30% fewer NFEs than linear interpolation while achieving superior accuracy.
Conclusion
By introducing rectilinear and cubic Hermite interpolation schemes, this work transforms Neural CDEs from purely offline tools into models capable of real-time, online inference. While rectilinear control is computationally more intensive due to path doubling and derivative discontinuities, it offers the most robust online capabilities. For tasks where speed is prioritized over continuous updates, cubic Hermite splines provide a performant, causal alternative. These advancements allow Neural CDEs to be deployed in critical real-world environments, such as live hospital monitoring, where data arrives sequentially and decisions must be made in the moment.
Summary updated