[Paper Review] Graph-Mamba: Towards Long-Range Graph Sequence Modeling with Selective State Spaces
Graph-Mamba introduces a selective state-space model (SSM) based graph block that replaces attention in GraphGPS, enabling data-dependent long-range context modeling with linear-time complexity and reduced memory. It shows superior performance on long-range graph benchmarks versus dense and sparse attention methods.
Attention mechanisms have been widely used to capture long-range dependencies among nodes in Graph Transformers. Bottlenecked by the quadratic computational cost, attention mechanisms fail to scale in large graphs. Recent improvements in computational efficiency are mainly achieved by attention sparsification with random or heuristic-based graph subsampling, which falls short in data-dependent context reasoning. State space models (SSMs), such as Mamba, have gained prominence for their effectiveness and efficiency in modeling long-range dependencies in sequential data. However, adapting SSMs to non-sequential graph data presents a notable challenge. In this work, we introduce Graph-Mamba, the first attempt to enhance long-range context modeling in graph networks by integrating a Mamba block with the input-dependent node selection mechanism. Specifically, we formulate graph-centric node prioritization and permutation strategies to enhance context-aware reasoning, leading to a substantial improvement in predictive performance. Extensive experiments on ten benchmark datasets demonstrate that Graph-Mamba outperforms state-of-the-art methods in long-range graph prediction tasks, with a fraction of the computational cost in both FLOPs and GPU memory consumption. The code and models are publicly available at https://github.com/bowang-lab/Graph-Mamba.
Motivation & Objective
- Motivate and address the computational bottleneck of Graph Transformers for long-range dependencies on large graphs.
- Develop a graph-adapted selective state space modeling (GMB) module that performs input-dependent node selection and context filtering.
- Integrate GMB into the GraphGPS framework to create Graph-Mamba and enable efficient long-range reasoning on non-sequential graph data.
- Propose node prioritization and permutation-based training/inference recipes to stabilize and improve graph-specific sequence modeling.
Proposed method
- Adapts Mamba, a selective state space model, to graphs by introducing a graph-centric node prioritization and permutation strategy.
- Replaces the GraphGPS attention with a Graph-Mamba Block (GMB) that combines MPNN-based local context with a node-focused GMB for global context.
- Implements a data-dependent selection mechanism that enables two levels of sparsification: input-dependent node selection and sequence-aware node prioritization.
- Uses a GPU-friendly discretization/parameterization of the state-space updates to achieve linear-time complexity in the input length.
- Introduces a permutation-based training and inference recipe to promote permutation invariance and stability across node orderings.
- Evaluates on ten Long Range Graph Benchmark datasets, comparing against dense Transformer and sparse attention baselines.
Experimental results
Research questions
- RQ1Can a graph-adapted selective state space model (Graph-Mamba) match or exceed the predictive power of dense/sparse graph attention on long-range dependency tasks while reducing computational cost?
- RQ2Does input-dependent node prioritization and permutation-based training improve long-range reasoning in non-sequential graph data?
- RQ3How does Graph-Mamba perform across diverse graph prediction tasks (node, graph, and edge levels) and graph sizes compared to state-of-the-art attention mechanisms?
Key findings
- Graph-Mamba achieves state-of-the-art or competitive results on long-range graph prediction tasks across ten datasets, particularly for graphs with 150–1,400 nodes.
- On large graphs, Graph-Mamba provides up to 5% improvement over other sparse attention methods and outperforms dense Transformer baselines in several cases.
- Graph-Mamba demonstrates linear-time computational complexity and reduced GPU memory usage, with up to 74% memory savings on large graphs and 66% FLOPs reduction vs Transformer on MalNet-Tiny.
- The node prioritization by degree combined with node-level permutation yields notable performance gains, and is recommended as the default training/inference recipe.
- Empirical FLOPs/memory benchmarks show Graph-Mamba has lower cost across datasets than dense and sparse attention baselines, enabling training on larger graphs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.