Table of Contents
Fetching ...

Interpreting Temporal Graph Neural Networks with Koopman Theory

Michele Guerra, Simone Scardapane, Filippo Maria Bianchi

TL;DR

This work presents two methods to interpret the STGNN's decision process and identify the most relevant spatial and temporal patterns in the input for the task at hand, and shows how these methods can correctly identify interpretable features such as infection times and infected nodes in the context of dissemination processes.

Abstract

Spatiotemporal graph neural networks (STGNNs) have shown promising results in many domains, from forecasting to epidemiology. However, understanding the dynamics learned by these models and explaining their behaviour is significantly more complex than for models dealing with static data. Inspired by Koopman theory, which allows a simpler description of intricate, nonlinear dynamical systems, we introduce an explainability approach for temporal graphs. We present two methods to interpret the STGNN's decision process and identify the most relevant spatial and temporal patterns in the input for the task at hand. The first relies on dynamic mode decomposition (DMD), a Koopman-inspired dimensionality reduction method. The second relies on sparse identification of nonlinear dynamics (SINDy), a popular method for discovering governing equations, which we use for the first time as a general tool for explainability. We show how our methods can correctly identify interpretable features such as infection times and infected nodes in the context of dissemination processes.

Interpreting Temporal Graph Neural Networks with Koopman Theory

TL;DR

This work presents two methods to interpret the STGNN's decision process and identify the most relevant spatial and temporal patterns in the input for the task at hand, and shows how these methods can correctly identify interpretable features such as infection times and infected nodes in the context of dissemination processes.

Abstract

Spatiotemporal graph neural networks (STGNNs) have shown promising results in many domains, from forecasting to epidemiology. However, understanding the dynamics learned by these models and explaining their behaviour is significantly more complex than for models dealing with static data. Inspired by Koopman theory, which allows a simpler description of intricate, nonlinear dynamical systems, we introduce an explainability approach for temporal graphs. We present two methods to interpret the STGNN's decision process and identify the most relevant spatial and temporal patterns in the input for the task at hand. The first relies on dynamic mode decomposition (DMD), a Koopman-inspired dimensionality reduction method. The second relies on sparse identification of nonlinear dynamics (SINDy), a popular method for discovering governing equations, which we use for the first time as a general tool for explainability. We show how our methods can correctly identify interpretable features such as infection times and infected nodes in the context of dissemination processes.

Paper Structure

This paper contains 25 sections, 32 equations, 5 figures, 3 tables.

Figures (5)

  • Figure 1: The left-hand side, in green, depicts an example of , with node features $\bm{x}_t$ and adjacency matrix $\bm{A}_t$. In blue, the processes the input and provides an embedding $\bm{h}_t$ for each time step. The inner yellow box represents the mechanism that encourages the dynamics of embeddings $\bm{h}_t$ to be linear: the loss $\ell_\text{obs}$ in \ref{['eq:obs-loss']} pushes $\bm{h}_{t+1}$ to be a linear transformation of $\bm{h}_t$ (as an example, the picture shows a 2-dimensional rotation). In red, an produces the final output.
  • Figure 2: Comparison between the distribution $f_\text{gt}$ and the distribution $f_\text{r}$ for the Facebook dataset.
  • Figure 3: Examples of time explanations for the Facebook dataset. The red line represents the smoothed ground truth $m_\texttt{t}(t)$, the yellow line is the relevant Koopman mode $s^{(i)}(t)$, the background colour scale shows the explanation weight $w_\texttt{t}^{(i)}(t)$, the stars highlight those times $t$ where $w_\texttt{t}^{(i)}(t)>\delta$.
  • Figure 4: Spatial explanations from Facebook dataset. The colour scale on either nodes or edges represents the explanation weights $w_\texttt{s}^{(i)}(n)$ (for nodes) and $w_\texttt{e}(n,m)$ (for edges). The ground truth is reported in the corner.
  • Figure 5: Top: The colour scale represents the explanation $w_\mathcal{G}^{(i)}(t,n)$ for each time step ($x$ axis) and each node ($y$ axis). The red squares for some values of $t$ and $n$ show where $m_\texttt{st}(t,n)=1$. Middle: They show the $\mathcal{G}$ at three times, $t=50,~80,~100$. Nodes in the ground truth are highlighted in red. Bottom: It shows the value of the Brier score $\text{BS}(t)$.

Theorems & Definitions (1)

  • Definition 2.1: Discrete time