Abstract
Graph Neural Networks (GNNs) have demonstrated remarkable success in modeling complex relationships in graph-structured data. A recent innovation in this field is the family of Differential Equation-Inspired Graph Neural Networks (DE-GNNs), which leverage principles from continuous dynamical systems to model information flow on graphs with built-in properties such as feature smoothing or preservation. However, existing DE-GNNs rely on first or second-order temporal dependencies. In this paper, we propose a neural extension to those pre-defined temporal dependencies. We show that our model, called TDE-GNN, can capture a wide range of temporal dynamics that go beyond typical first or second-order methods, and provide use cases where existing temporal models are challenged. We demonstrate the benefit of learning the temporal dependencies using our method rather than using pre-defined temporal dynamics on several graph benchmarks.
Introduction
Recent advances in Graph Neural Networks (GNNs) have established a deep connection between network layers and continuous dynamical systems. By interpreting the evolution of node features as an Ordinary Differential Equation (ODE), researchers have developed Differential Equation-Inspired GNNs (DE-GNNs). These models offer desirable inductive biases, such as diffusion for feature smoothing or wave-like propagation for energy preservation. However, a significant limitation persists: most DE-GNNs are constrained to fixed first- or second-order temporal dynamics, which may not suit non-stationary or non-homophilic data.
The TDE-GNN Framework
We introduce the Temporal Domain Differential Equation Inspired GNN (TDE-GNN), which generalizes the temporal order of information flow. Instead of assuming a fixed ODE, TDE-GNN learns the optimal temporal dependencies directly from the data. The core innovation lies in the use of learnable temporal coefficients $c_p$. This allows the network to adaptively determine the influence of previous states on the current update, effectively "designing" its own differential equation.
We propose two variants of this parameterization:
- TDE-GNN$_D$ (Direct): Learns a static vector of coefficients via backpropagation.
- TDE-GNN$_A$ (Attention): Employs an attention mechanism to dynamically compute coefficients based on the hidden features of preceding layers.
To support higher-order dynamics (order $o > 1$), the model requires multiple initial conditions. For stationary tasks like node classification, we utilize an "expansion" strategy where multiple MLPs map the initial input to the required starting states. For time-series forecasting, the model is primed using the actual historical sequence.
Motivating Example: The Nonlinear Pendulum
The necessity of higher-order dynamics is clearly demonstrated by the nonlinear pendulum. A first-order system, which only considers the current position, is fundamentally incapable of capturing the oscillatory nature of a pendulum. In contrast, a second-order model—or a TDE-GNN that learns higher-order dependencies—can accurately model the velocity and acceleration required to predict the system's trajectory.
Experimental Evaluation
We evaluated TDE-GNN across a variety of benchmarks, including stationary node classification and non-stationary spatio-temporal forecasting.
- Node Classification: TDE-GNN showed significant improvements on non-homophilic datasets. On the Chameleon dataset, TDE-GNN$_A$ achieved 78.48% accuracy, outperforming the first-order baseline of 70.99%. This suggests that higher-order dynamics are crucial for preserving distinct features in graphs where neighbors are dissimilar, preventing the "over-smoothing" common in first-order diffusion models.
- Spatio-Temporal Forecasting: TDE-GNN outperformed specialized architectures like DCRNN and AGCRN. On the Chickenpox-Hungary dataset, it reduced the Mean Squared Error (MSE) to 0.787, compared to 0.998 for the baseline. Analysis of the learned coefficients revealed that the model naturally approximates finite difference derivatives, providing a degree of mathematical interpretability.
Conclusion
TDE-GNN represents a significant step forward in physics-inspired GNNs by moving beyond fixed temporal orders. By learning the underlying dynamics of the data, TDE-GNN provides a flexible and powerful framework for modeling complex relational systems. While stability at very high orders remains a consideration for future regularization strategies, the current results demonstrate that learning the temporal domain is superior to relying on pre-defined dynamics.
Summary updated