Temporal Graph ODEs for Irregularly-Sampled Time Series

Alessio Gravina, Daniele Zambon, Davide Bacciu, Cesare Alippi

Abstract

Modern graph representation learning works mostly under the assumption of dealing with regularly sampled temporal graph snapshots, which is far from realistic, e.g., social networks and physical systems are characterized by continuous dynamics and sporadic observations. To address this limitation, we introduce the Temporal Graph Ordinary Differential Equation (TG-ODE) framework, which learns both the temporal and spatial dynamics from graph streams where the intervals between observations are not regularly spaced. We empirically validate the proposed approach on several graph benchmarks, showing that TG-ODE can achieve state-of-the-art performance in irregular graph stream tasks.

Introduction: The Challenge of Irregularity

Most modern graph representation learning assumes that data arrives in neat, regularly spaced "snapshots"—for instance, a traffic update every 5 minutes. However, real-world network data is often messy. Social network interactions happen sporadically, and sensors in physical systems might fail or report at irregular intervals.

Existing Deep Graph Networks (DGNs) typically rely on Recurrent Neural Networks (RNNs) to handle time. RNNs struggle with irregular gaps because they assume a fixed time step between observations. While interpolation or padding are common workarounds, these methods often fail to capture the underlying continuous physical or social dynamics. The Temporal Graph Ordinary Differential Equation (TG-ODE) framework addresses this by modeling these systems as continuous processes observed at arbitrary points in time.

Methodology: Continuous Latent Dynamics

TG-ODE formulates the evolution of node states as a Cauchy problem (an initial value problem for an ODE). Instead of learning a direct mapping from time $t$ to $t+1$, the model learns the rate of change of node states through a derivative function $f_\theta$. This function follows the message-passing paradigm: a node's change depends on its current state, exogenous variables, and the states of its neighbors.

The TG-ODE framework models node states as continuous trajectories, reconciling internal predictions with irregular observations.

To predict a future state, the model numerically integrates the learned ODE. When a new observation arrives at an irregular time $t_i$, the model uses a combination function ($\psi$) to reconcile its internal prediction with the actual observed data, effectively "correcting" its trajectory. A key theoretical insight of this work is that many existing discrete-time DGNs can be reinterpreted as specific, discretized instances of a TG-ODE.

Experimental Evaluation

The researchers evaluated TG-ODE on two main types of benchmarks:

  • Synthetic Heat Diffusion: Simulating heat spread across a grid graph under various diffusion functions.
  • Real-World Traffic Forecasting: Utilizing six standard datasets—MetrLA, Montevideo, and PeMS (03, 04, 07, 08).

To test robustness, these datasets were modified by randomly sub-sampling snapshots (keeping as little as 3% of the data) to create truly irregular and sparse time series.

Key Results and Efficiency

TG-ODE demonstrated superior accuracy and stability across all benchmarks. In synthetic heat diffusion tasks, TG-ODE's error was 308% to 628% lower than the best-performing baseline. In traffic forecasting, it outperformed state-of-the-art models on all six datasets. For example, on PeMS03, it achieved an MAE of 17.423 compared to the runner-up's 18.652 (DCRNN).

Training time comparison across various graph benchmarks, demonstrating TG-ODE's superior scalability and speed.

Beyond accuracy, TG-ODE is remarkably efficient. Because it handles time through integration rather than complex recurrent gates, it is significantly faster to train. In traffic benchmarks, it was 2x to 13x faster per epoch than competing models like A3TGCN or GCRN. Furthermore, TG-ODE remained stable across all tests, avoiding the "gradient explosions" that plagued other ODE-based models like NDCN.

Discussion and Future Work

While TG-ODE offers a powerful framework for continuous-time graph modeling, the authors note that users must ensure the derivative functions are well-behaved (e.g., using Lipschitz continuous activations) to maintain numerical stability. Future research directions include the implementation of adaptive multistep solvers to adjust integration step sizes dynamically and extending the framework to handle the reconstruction of missing data points within a graph stream.

Summary updated

BibTeX
@inproceedings{gravina2024temporal,
  author = {Alessio Gravina and Daniele Zambon and Davide Bacciu and Cesare Alippi},
  title = {{Temporal Graph ODEs for Irregularly-Sampled Time Series}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=bD0eoYeUzS},
}
Figure