This NeurIPS 2024 paper bridges the gap between the cutting-edge world of State Space Models (SSMs) and the complex domain of dynamic graph learning. The authors introduce GRAPHSSM, the first principled framework to adapt State Space Models (like Mamba and S4) for temporal graphs. By incorporating graph structure directly into the underlying mathematical theory of SSMs via Laplacian regularization, they achieve state-of-the-art performance on long-range graph sequences with linear computational complexity.
The Challenge of Temporal Graphs
Most real-world networks—such as social media platforms, traffic systems, and financial transaction networks—are temporal graphs. They are not static; nodes and edges continuously appear, disappear, and evolve over time. Traditionally, researchers have modeled these dynamic systems using Recurrent Neural Networks (RNNs) or Transformers.
However, both architectures have fundamental limitations in this domain:
- RNNs suffer from "rapid forgetting," making them poorly suited for capturing long-range dependencies in a graph's extensive history.
- Transformers can handle long sequences but suffer from quadratic ($O(N^2)$) computational complexity, making them prohibitively expensive for large graphs or long time horizons.
Recently, State Space Models (SSMs) have emerged as a powerful alternative for sequence modeling, offering the long-range memory capabilities of Transformers combined with the linear efficiency of RNNs. The catch? SSMs were designed for independent, 1D sequences (like audio or text). Out of the box, they do not inherently understand graph topology or how that topology evolves over time.
Methodology: First Principles of GRAPHSSM
Rather than simply plugging a Graph Neural Network (GNN) into an SSM, the authors return to the "first principles" of how SSMs approximate functions over time.
- GHIPPO (Graph High-order Polynomial Projection Operators): The authors extend the HIPPO framework, which serves as the mathematical foundation for many modern SSMs. They introduce a Laplacian regularization term into the online approximation objective. This forces the model’s "memory" to be smooth across adjacent nodes, effectively baking the graph's structure into the temporal evolution equations.
- Mixed Discretization: A major challenge in temporal graphs is dealing with "unobserved mutations." We typically only observe snapshots at specific discrete times ($\tau_1, \tau_2, \dots$), but the graph changes continuously in between. The authors propose a mixed discretization strategy that combines inter-node mixing (using GNNs to diffuse information spatially) and intra-node mixing (using 1D convolutions or gating to bridge temporal snapshots).
- The GRAPHSSM Architecture: The resulting framework is highly modular. The authors implemented three variants: GRAPHSSM-S4 (based on the Structured State Space model), -S5 (a multi-input/output version), and -S6 (utilizing the selective scan mechanism famous in Mamba).
Key Insights and Experimental Results
The model was evaluated on six diverse temporal graph benchmarks, ranging from small-scale networks (DBLP-3, Brain fMRI, Reddit) to massive, long-range datasets (arXiv citation network, Tmall e-commerce interactions).
Theoretical Insights
- Diffusion-then-Update: The mathematical derivation reveals that the optimal way to update a graph's memory is a two-stage process: first, diffuse features through the current graph structure (the GNN step), then update the hidden state (the SSM step).
- The Regularization "Aha" Moment: By adding the Laplacian term to the HIPPO objective, the authors proved that the resulting dynamical system is piecewise linear. This provides a rigorous theoretical justification for using GNNs as a "spatial" pre-processor for temporal SSMs.
- S4 vs. S6: Interestingly, while the "selective" S6 (Mamba) mechanism is a powerhouse in Natural Language Processing, the authors found that the S4 variant was often more robust for temporal graphs. This suggests that the selection mechanism might require further tuning to handle the discrete, jumpy nature of graph snapshots compared to continuous text streams.
Performance and Efficiency
- Superior Accuracy: GRAPHSSM-S4 outperformed top-tier baselines like ROLAND and EvolveGCN, demonstrating a 14% average improvement in Micro-F1 on the Reddit dataset.
- Long-Range Mastery: On datasets featuring longer sequences (like DBLP-10), GRAPHSSM's ability to retain historical information allowed it to significantly outperform RNN-based methods that tend to "forget" early snapshots.
- Efficiency at Scale: The linear complexity ($O(VLDN)$) of GRAPHSSM shines on large-scale datasets. On Tmall and arXiv, many traditional baselines (like STAR or tNodeEmbed) ran out of memory (OOM), whereas GRAPHSSM handled these massive graphs with ease.
Limitations and Future Directions
While GRAPHSSM marks a significant step forward, the authors note a few limitations that pave the way for future research:
- Discrete vs. Continuous Time: The current study focuses on Discrete-Time Temporal Graphs (DTTGs) (i.e., snapshots). Extending this to Continuous-Time Temporal Graphs (CTTGs)—where every edge is a timestamped event—remains a significant challenge, as CTTGs are "lossy" regarding the features of nodes not involved in a specific event.
- Piecewise Assumption: The model assumes the graph remains constant between snapshots. In reality, network changes are fluid. Future work could explore "smoother" versions of the Laplacian to better model truly continuous evolution.
- Selection Mechanisms: Exploring exactly why the selective mechanism (S6) didn't dominate in the graph domain as it does in NLP remains an open and intriguing research question.
Summary updated