HeteGraph-Mamba: Heterogeneous Graph Learning via Selective State Space Model

Zhenyu Pan, Yoonsung Jeong, Xiaoda Liu, Han Liu · DOI

TL;DR

HeteGraph-Mamba (HGMN) is the first framework to bring the efficiency of Selective State Space Models (SSSMs)—specifically the Mamba architecture—to the complex world of heterogeneous graph learning. By replacing computationally expensive Transformers with a novel two-level "graph-to-sequence" conversion, HGMN achieves state-of-the-art accuracy with linear-time complexity, effectively capturing long-range dependencies that traditional models often miss.

Introduction

In the world of Graph Neural Networks (GNNs), heterogeneous graphs (graphs with multiple types of nodes and edges, like a movie database containing actors, directors, and genres) present a unique challenge. To capture the "big picture," researchers have turned to Transformers. While powerful, Transformers suffer from $O(n^2)$ complexity, making them sluggish or even unusable on massive real-world datasets.

Furthermore, many heterogeneous graphs are sparse. For instance, the IMDB dataset has 21k nodes but relatively few edges, meaning a node might need to "look" many hops away to find relevant information. Existing models struggle to balance this need for long-range dependencies with the requirement for inference efficiency. The authors identify a critical gap: how do we map unordered, multi-typed graph data into a sequential format that a high-performance model like Mamba can process without losing structural meaning?

Methodology: The HGMN Framework

The authors introduce a six-step "scalable recipe" to transform graph data for the Mamba architecture:

Overview of the HGMN framework showing the six-step process from tokenization to outer updating.
  1. Tokenization: Instead of raw nodes, the model uses subgraphs centered on target nodes and their "meta-path" instances (predefined sequences of node types, like Author-Paper-Author) as tokens.
  2. Heterogeneity Alignment: Different node types are projected into a shared latent space using type-specific linear transformations.
  3. Inner Ordering: Within each node type, nodes are sorted by the number of meta-path instances they participate in. The logic? More "important" nodes are placed at the end of the sequence so they can "see" the maximum amount of context during Mamba’s recurrent scan.
  4. Inner Updating: A Mamba layer scans these type-specific sequences to capture homogeneity (relationships within the same type).
  5. Outer Ordering: All nodes across all types are re-ordered based on their global degree (connectivity).
  6. Outer Updating: A final Mamba layer processes the entire global sequence to capture heterogeneity (complex interactions across different types).

Importance-Based Sequencing

Unlike text, graphs have no natural "start" or "end." By sorting nodes by meta-path frequency and degree, the authors create a meaningful hierarchy. Placing high-degree "hub" nodes at the end of the sequence allows Mamba’s hidden state to accumulate the most information before reaching them.

The Inner Ordering process sorts nodes by the number of meta-path instances (m) to create a meaningful hierarchy for the Mamba scan.

Experimental Results

The model was evaluated on four major benchmarks: ogbn-mag, DBLP, IMDB, and ACM. The authors compared HGMN against 19 state-of-the-art baselines, including popular GNNs (GCN, GAT), specialized heterogeneous models (HAN, HGT), and recent Transformer-based hybrids (HINormer).

  • Superior Accuracy: HGMN outperformed all 19 baselines on ogbn-mag (0.5763 accuracy), DBLP (0.9602 F1), and ACM (0.9484 F1).
  • Efficiency Gains: On the DBLP dataset, HGMN achieved its top-tier F1 score with significantly lower memory consumption and faster training times than high-performing competitors like SeHGNN and HINormer.
  • Ablation Success: Removing the "Inner" or "Outer" ordering steps led to a noticeable drop in performance, proving that the specific way nodes are sequenced is vital for the model's success.

Key Insights and Limitations

By leveraging Mamba’s SSSM architecture, HGMN avoids the quadratic bottleneck of Transformers. This makes it a viable candidate for "next-generation" graph learning on web-scale data. Mamba’s selective mechanism acts as a natural "attention sparsifier," choosing which neighbor information to remember and which to forget, which is particularly effective for noisy, heterogeneous data.

However, the authors acknowledge that the "tokenization" process still relies on predefined meta-paths, which might be a limitation for graphs where the optimal paths aren't known beforehand. Future work should focus on providing more rigorous mathematical proofs for the ordering strategies and automated path discovery.

Summary updated

BibTeX
@misc{pan2024hetegraph,
  author = {Zhenyu Pan and Yoonsung Jeong and Xiaoda Liu and Han Liu},
  title = {{HeteGraph-Mamba: Heterogeneous Graph Learning via Selective State Space Model}},
  year = {2024},
  eprint = {2405.13915},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.13915},
}
Figure