Spatial Shortcuts in Graph Neural Controlled Differential Equations

Michael Detzel, Gabriel Nobis, Jackie Ma, Wojciech Samek

TL;DR

By injecting known physical graph topology directly as an "outer shortcut" between the driving control path and hidden state updates in Graph Neural Controlled Differential Equations (GNCDEs), models can forecast spatial-temporal dynamics with far greater parameter efficiency. On simulated advection tasks, this simple architectural change cuts prediction error by more than half while outperforming heavier, learned graph embedding methods.

What Problem Does This Paper Address?

Many real-world dynamical systems—such as river networks, traffic flows, epidemiological outbreaks, and atmospheric transport—are governed by continuous physical processes moving along network structures. Neural Controlled Differential Equations (NCDEs) excel at processing continuous-time and irregularly sampled data, and their graph extensions (GNCDEs) capture spatial correlations.

However, standard GNCDEs typically learn spatial relationships from scratch using learned node embeddings (such as Adaptive Graph Convolutions). When the underlying causal structure is already known from physics or geometry (e.g., the downstream flow of a river or road connectivity), forcing a neural network to infer spatial topology from data alone is inefficient and requires larger parameter budgets. The authors investigate how and where to directly inject prior graph connectivity into GNCDE architectures.

Methods

The authors model 1D continuous advection along directed graph edges ($\partial y / \partial t + \nabla \cdot (y \odot v) = 0$), where quantities transition between edges via a conserved transition matrix $A_E$ derived from the vertex adjacency matrix $A_V$.

In a two-stage GNCDE setup:

  1. A temporal NCDE encodes node-level observations into a hidden path $H(t)$.
  2. A spatial NCDE uses $H(t)$ as a continuous control path to drive the evolution of a spatial-temporal hidden state $Z(t)$: $$Z(T) = Z(0) + \int_0^T g_\gamma(Z(t)) A_V^{\text{outer}} \frac{dH(t)}{dt} dt$$

The key architectural contribution is identifying the ideal position to introduce the prior adjacency matrix $A_V$:

  • Inner Mechanism ($A_V^{\text{inner}}$): Embedded inside the neural vector field $g_\gamma$ (e.g., within internal neural network layers, similar to message-passing or learned convolutions).
  • Outer Mechanism ($A_V^{\text{outer}}$): Applied directly to the control derivative $dH(t)/dt$ before the vector field tensor multiplication. This creates a direct "spatial shortcut" connecting driving signals at source nodes to state updates at downstream nodes.
       [ Control dH/dt ]
               │
        ( A_V^outer )  <── Spatial Shortcut (prior topology)
               │
   g_γ(Z(t)) • ┴────────> [ State Update dZ/dt ]

Datasets

The authors evaluated the method using simulated advection data on two directed graph topologies:

  • 4-Node Graph: A 5-edge network containing branching and merging paths (1,000 simulated time-series).
  • 10-Node Graph: A sparse, sequential chain of directed edges (10,000 simulated time-series).

Edges were discretized into 100 spatial segments, initialized with random uniform pulses, and evolved over 48 time steps ($\Delta t = 5$ minutes). The task was to predict vertex measurements across the next 24 time steps given observations from the preceding 24 steps.

Key Insights and Ideas

  • Spatial Shortcuts vs. Virtual Time Shortcuts: Analogous to how residual connections (ResNets) bypass layers across depth/time, the outer informed operator acts as a spatial shortcut. It explicitly routes where the model should read driving inputs across the graph topology rather than forcing the neural vector field to discover these connections internally.
  • Inner vs. Outer Placement: Injecting graph priors at the outer control position performed substantially better than inserting them inside the vector field ($A_V^{\text{inner}}$).
  • Over-constraining Degrades Performance: Applying the adjacency matrix simultaneously at both inner and outer positions deteriorated performance.
  • Instability of Learnable Outer Matrices: Attempting to make the outer matrix fully learnable led to exploding gradients, highlighting the value of injecting fixed, known topology directly.

Key Results

Experiments across 2-layer and 3-layer GNCDE configurations demonstrated clear parameter and accuracy advantages:

  • 10-Node Graph (3-layer model):
  • Standard baseline with learned Adaptive Graph Convolution (AGC): 1.42 MAE (416,864 parameters).
  • Outer-informed NCDE alone (no AGC): 1.11 MAE (293,244 parameters)—beating the baseline with ~30% fewer parameters.
  • Outer-informed NCDE + AGC combined: 0.66 MAE—a 53.5% error reduction over AGC alone.
  • 4-Node Graph (3-layer model):
  • Outer-informed alone reached 2.75 MAE (293,184 params), nearly matching AGC at 2.73 MAE (416,744 params) without the parameter overhead.
  • Adding outer informedness on top of AGC reached the lowest overall error (2.67 MAE).

Limitations and Future Work

  • Synthetic Settings: Experiments were restricted to synthetic 1D advection under constant velocity fields on small graphs (4 and 10 nodes).
  • Non-Causal Patterns: Strongly enforcing prior graph structure could potentially hinder a model's ability to capture spurious or non-causal correlations spanning distant nodes.
  • Future Directions: The authors plan to scale to larger graph benchmarks, incorporate edge features, handle non-constant velocity fields, and test on real-world datasets with exogenous vertex inflows and stochastic behaviors (e.g., river discharge and traffic systems).

Summary updated

BibTeX
@inproceedings{detzel2024spatial,
  author = {Michael Detzel and Gabriel Nobis and Jackie Ma and Wojciech Samek},
  title = {{Spatial Shortcuts in Graph Neural Controlled Differential Equations}},
  booktitle = {D3S3 @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=tfVjODycMk},
}
Figure