STNAGNN: Data-driven Spatio-temporal Brain Connectivity beyond FC

Jiyao Wang, Nicha C Dvornek, Peiyu Duan, Lawrence H. Staib, Pamela Ventola, James s Duncan

TL;DR

Standard graph neural networks (GNNs) for brain fMRI rely heavily on predefined, noisy Functional Connectome (FC) graphs that oversimplify dynamic brain communication. The authors introduce STNAGNN, a spatio-temporal GNN that blends sparse predefined FC edges with a dense, global self-attention mechanism powered by a novel 2D spatio-temporal positional encoding. This enables direct, data-driven node-to-node interactions across both space and time, achieving state-of-the-art accuracy in autism spectrum disorder (ASD) and brain state classification tasks.

What Problem Does This Paper Address?

When applying GNNs to task-based functional MRI (fMRI), researchers model brain regions of interest (ROIs) as nodes and their interactions as edges. Typically, these edges are defined via the Functional Connectome (FC)—essentially correlation coefficients between BOLD time series. However, FC has major pitfalls:

  1. High Noise in Sliding Windows: When truncating fMRI into temporal sliding windows (graph snapshots), correlation estimates over short durations become extremely noisy.
  2. Oversimplification via Sparsification: To keep GNN message-passing efficient, practitioners prune all but the top few percent of edges, discarding subtle or non-linear connections.
  3. Disconnected Spatio-Temporal Modeling: Existing temporal GNNs typically use a two-step "spatial-then-temporal" pipeline (e.g., GNN followed by an RNN/LSTM), ignoring direct cross-time, cross-ROI interactions at the node level.

Methods

STNAGNN addresses these limitations by uniting local structural aggregation with a global, fully-connected attention layer:

Input Snapshots (G_1 ... G_T)
       │
       ▼
 [2-Layer GNN Backbone] (GCN / GAT / GraphSAGE / GT) ──► Extracts local, sparse spatial features
       │
       ▼
 [+ Multiplicative 2D Positional Encoding] ────────────► Injects spatial ROI index & temporal snapshot index
       │
       ▼
 [Nodewise Scaled Dot-Product Attention] ─────────────► Dense, all-to-all spatio-temporal aggregation
       │
       ▼
 [Pooling & Feed-Forward Layers] ─────────────────────► Final Classification Output
  • Novel 2D Spatio-Temporal Positional Encoding: Unlike general graphs, brain ROIs maintain fixed spatial ordering across subjects. The authors leverage this by introducing an absolute multiplicative 2D positional encoding that couples spatial index $j$ and temporal index $i$: $$\mathrm{PE}(j, i, 2f) = \sin(j / C_1^E) \sin((C_2 + i) / C_1^E)$$ $$\mathrm{PE}(j, i, 2f+1) = \cos(j / C_1^E) \cos((C_2 + i) / C_1^E)$$ where $E = 2f/d$, and $C_1, C_2$ are scaling/offset constants.

  • Node-Level Global Self-Attention: Following local message passing via standard GNN backbones, STNAGNN discards predefined edge constraints and computes dot-product self-attention across all nodes from all time steps. This simulates a fully-connected spatio-temporal supergraph.

Datasets

The authors evaluated their model on two distinct benchmarks:

  1. Biopoint Dataset: An in-house, task-based fMRI dataset with 118 age- and IQ-matched children (75 ASD, 43 healthy controls) viewing alternating biological vs. scrambled motion stimuli. Parcellated into 84 ROIs (Desikan-Killiany atlas) and sliced into 12 non-overlapping task-aligned sliding windows.
  2. Human Connectome Project (HCP): 1,025 subjects performing 7 diverse task-fMRI paradigms (emotion, gambling, language, motor, relational, social, working memory). Parcellated into 268 ROIs (Shen atlas) and segmented into 4 equal-length sliding windows for a 7-class brain state classification task.

Key Insights and Ideas

  • Dense Beats Purely Sparse: While local GNN convolution operates on sparse top-5% FC edges to suppress high-frequency noise, allowing full node-to-node attention globally mitigates inductive bias caused by inaccurate or missing FC edges.
  • Temporal Sequence Length Dictates Mechanism: In fMRI, temporal snapshots are typically short ($T=4$ to $12$). Traditional LSTMs struggle to extract long-term dependencies from such brief sequences, whereas global self-attention excels at capturing flexible cross-time associations.
  • Biomarker Dynamics: Using GNNExplainer, the authors observed that brain regions indicative of ASD are dynamic across tasks. For instance, the left parietal lobe became highly salient specifically during biological motion phases ($T=8, 12$), consistent with prior clinical findings linking it to ASD language development, while the right thalamus exhibited recurring importance.

Key Results

  • ASD Classification (Biopoint):
  • STNAGNN-GAT achieved 79.2% accuracy and 0.755 AUC, substantially outperforming baselines like GConvLSTM (63.8% Acc / 0.642 AUC), EvolveGCN (72.0% Acc / 0.734 AUC), and SVM (68.7% Acc / 0.608 AUC).
  • Brain State Classification (HCP 7-Class):
  • STNAGNN-GT and STNAGNN-SAGE reached 98.1% accuracy and 0.999 AUC, outpacing temporal baseline architectures (e.g., EvolveGCN at 95.7% Acc).
  • Ablation Studies:
  • Replacing the 2D positional encoding with a standard 1D raster sequence reduced accuracy from 79.2% to 74.6% on GAT.
  • Replacing the spatio-temporal attention block with an LSTM backbone capped accuracy at 76.0% (GAT-LSTM), confirming the value of direct node-level spatio-temporal connectivity.

Limitations and Future Work

  • Computational Overhead on Dense Node Sets: Global attention scales quadratically ($O((N \times T)^2)$) with the total number of spatio-temporal nodes. While feasible for moderate atlas sizes ($84$ or $268$ ROIs) and short window counts ($4$ to $12$), scaling to high-resolution voxel-level grids or long sequences will require sparse or linear attention variants.
  • Future Directions: The authors plan to extend STNAGNN beyond discrete classification to continuous targets, such as predicting behavioral/cognitive assessment scores and psychiatric clinical metrics.

Summary updated

BibTeX
@inproceedings{wang2025stnagnn,
  author = {Jiyao Wang and Nicha C Dvornek and Peiyu Duan and Lawrence H. Staib and Pamela Ventola and James s Duncan},
  title = {{STNAGNN: Data-driven Spatio-temporal Brain Connectivity beyond FC}},
  booktitle = {MIDL},
  year = {2025},
  url = {https://openreview.net/forum?id=nKLCB8d3Ko},
}
Figure