DG-Mamba: Robust and Efficient Dynamic Graph Structure Learning with Selective State Space Models

Haonan Yuan, Qingyun Sun, Zhaonan Wang, Xingcheng Fu, Cheng Ji, Yongjian Wang, Bo Jin, Jianxin Li

Abstract

Dynamic Graph Structure Learning (DGSL) is essential for refining noisy or incomplete dynamic graph data. However, existing methods often suffer from quadratic computational complexity and poor robustness against long-range dependencies and adversarial noise. We present DG-Mamba, a novel framework that integrates Selective State Space Models (Mamba) with kernelized message-passing. DG-Mamba achieves linear time and memory complexity relative to both node count and sequence length. Furthermore, it incorporates the Principle of Relevant Information (PRI) to enhance structural robustness. Experimental results on real-world datasets demonstrate that DG-Mamba significantly outperforms state-of-the-art models in efficiency, scalability, and adversarial robustness.

Introduction

Dynamic graphs, such as traffic networks and social interactions, are inherently noisy and evolving. DGSL aims to learn a refined graph structure to improve downstream tasks like link prediction. Current approaches face two primary challenges: (1) the complexity bottleneck, where $O(N^2)$ or $O(T^2)$ costs limit scalability to large-scale or long-term data, and (2) the robustness gap, where Markovian assumptions ignore long-range temporal patterns, making models susceptible to adversarial attacks and noise.

Methods

DG-Mamba addresses these issues through three core innovations:

  • Kernelized Dynamic Message-Passing: By utilizing Positive Random Features, the model approximates graph attention in linear time $O(N)$, enabling efficient structure refinement without the quadratic overhead of standard attention mechanisms.
  • Selective State Space Modeling (Mamba): Leveraging the Mamba architecture, DG-Mamba treats dynamic graphs as physical systems. It discretizes states using cross-snapshot adjacency matrices, capturing long-range dependencies with linear temporal complexity $O(T)$.
  • Principle of Relevant Information (PRI): A self-supervised regularizer based on information theory ensures the model retains predictive patterns while discarding noise and redundancy. This forces the model to find a "minimal but sufficient" representation.
The DG-Mamba architecture, featuring kernelized message-passing, selective state space modeling, and PRI regularization.

Experiments and Results

The framework was evaluated on three real-world datasets (COLLAB, Yelp, and ACT) for future link prediction tasks.

Efficiency and Scalability

DG-Mamba demonstrates superior hardware-aware efficiency. Compared to the state-of-the-art RDGSL, it reduces training time by up to 71.3% and peak GPU memory usage by 45.8%. As shown in scalability tests, while traditional models crash with "Out of Memory" (OOM) errors as sequences grow, DG-Mamba maintains linear performance.

Scalability analysis showing DG-Mamba's linear training time and GPU usage compared to quadratic baselines as node scale and sequence length increase.

Robustness

In adversarial scenarios involving edge removal or noise injection, DG-Mamba consistently outperformed 12 baselines. Under targeted poisoning attacks, it maintained high AUC scores where other models failed, effectively acting as a denoising filter for the underlying graph structure.

Conclusion

DG-Mamba represents a significant advancement in dynamic graph learning, breaking the quadratic complexity barrier while enhancing robustness through selective state space modeling and information-theoretic regularization. Future work will explore adapting the framework to continuous-time dynamic graphs and broader tasks like community detection.

Summary updated

BibTeX
@inproceedings{yuan2025dg,
  author = {Haonan Yuan and Qingyun Sun and Zhaonan Wang and Xingcheng Fu and Cheng Ji and Yongjian Wang and Bo Jin and Jianxin Li},
  title = {{DG-Mamba: Robust and Efficient Dynamic Graph Structure Learning with Selective State Space Models}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i21.34382},
}
Figure