CCMamba Cuts Graph Neural Network Memory by 85% With Linear-Time Topology
A new architecture swaps quadratic attention for linear-time selective state-space models to learn on hypergraphs, simplicial complexes, and cellular complexes.
ProTakeaways
- CCMamba is the first Mamba-based neural framework for combinatorial complexes, unifying graphs, hypergraphs, and simplicial and cellular complexes.
- It replaces quadratic self-attention with bidirectional selective state-space models that run in linear time.
- Rank-cell variant achieves 76.41% mean accuracy across 10 benchmarks, beating cellular baseline CWN by +2.64% on MUTAG.
- Memory drops 85.8% versus multi-head GAT on PROTEINS simplicial complex; training time falls 87.9%.
- Resists over-smoothing: holds ~88% accuracy on Cora from 2 to 32 layers where HyperGCN collapses to 12.7%.
- Expressive power proven upper-bounded by the 1-CCWL test, matching it under injective aggregation.
Graph neural networks that only look at pairwise edges miss a lot of what real systems actually do. Molecules have rings, proteins have functional cliques, and citation networks have overlapping communities that are inherently many-to-many. Topological deep learning tries to capture these higher-order patterns using structures like hypergraphs, simplicial complexes, and cellular complexes, but the state of the art has been bottlenecked by attention. A new paper introduces CCMamba, the first Mamba-based framework built for combinatorial complexes, and it claims linear-time message passing with better accuracy and dramatically lower memory.
Why higher-order graphs broke the attention playbook
Combinatorial complexes (CCs) bridge the gap between cell complexes and hypergraphs, providing a principled topological framework to capture higher-order interactions. They organize entities into ranked cells (nodes as 0-cells, edges as 1-cells, faces as 2-cells, and so on) and connect them through boundary and coboundary operators. Existing topological neural networks handle these structures with message passing plus attention, but that approach has two persistent problems.
- Attention-based methods suffer from the quadratic complexity of self-attention that makes them difficult to scale to large-scale graphs.
- Most existing designs are locked to a specific complex type and treat neighborhoods symmetrically, so they miss directional flow across ranks.
- Deep stacks tend to over-smooth, collapsing distinct cells into similar embeddings.
Selective state-space models like Mamba have become the go-to alternative to Transformers for long sequences, but naively swapping attention for Mamba layers ignores the rank structure that makes CCs interesting in the first place. Simply substituting attention mechanisms with Mamba layers fails to model rank-aware message propagation, as it ignores the complex boundary and coboundary relations inherent in higher-order structures.
Turning topology into a sequence Mamba can chew on
CCMamba's trick is to linearize the incidence relations between cells of different ranks into structured sequences, then feed each rank's sequence into its own bidirectional Mamba block. The architecture runs in three stages:
- Intra-neighborhood selective SSM filtering. For each rank k in {0, 1, 2}, incidence matrices B1 (node-edge) and B2 (edge-face) build rank-specific neighborhood sequences, which a bidirectional Mamba processes to capture long-range dependencies within that rank.
- Inter-neighborhood rank-level aggregation. Refined features are fused across adjacent ranks via incidence operators, so a node embedding actually sees signals from the edges and faces it participates in.
- Deep representation refinement. Residual connections, layer normalization, and a position-wise feed-forward network stabilize training.

The bidirectional block matters because linearizing an unordered topological neighborhood into a 1D sequence is arbitrary. Running Mamba forward and backward washes out the ordering bias. On the theory side, the authors prove that the expressive power of CCMamba is upper-bounded by the 1-dimensional combinatorial complex Weisfeiler-Lehman (1-CCWL) test, and that with injective aggregation it matches that bound exactly.
What the numbers actually show
The team ran CCMamba against a wide set of baselines spanning graph networks (GCN, GAT, GIN), hypergraph models (HyperGCN, UniGNN family, AllSet, EdGNN), simplicial networks (SCCN, SCCNN, SANN), and cellular models (CWN, CCCN). All models were evaluated on the same lifted higher-order structures using the TopoBench framework for fair comparison.
The rank-cell variant of CCMamba lands the highest mean accuracy (76.41%) across ten datasets, beating the graph variant (75.88%) and every hypergraph or simplicial baseline. Concrete deltas on graph classification:
- MUTAG: +2.64% over CWN, the strongest cellular baseline.
- PROTEINS: +3.95% over CWN on the same cellular inputs.
- IMDB-B on hypergraphs: CCMamba scores 72.40% where GAT collapses to 34.67%, a 37.7-point gap.
Where the linear-time claim pays off
The efficiency story is where this work should get developers' attention. Attention over a hypergraph or simplicial complex scales quadratically with the number of cells, and multi-head attention replicates that cost per head. CCMamba's selective SSM stays sub-linear because heads partition the state space instead of building separate attention maps.

On PROTEINS as a simplicial complex, CCMamba cuts GPU memory by 72.4% and training time by 87.9% versus GAT. The gap widens with multi-head configurations: Multi-head GAT needs 23,518 MB on PROTEINS while Multi-head CCMamba needs only 3,342 MB, an 85.8% reduction. On IMDB-B as a simplicial complex, the memory saving is 60.4%.
Depth without collapse
Over-smoothing is the classic reason GNNs stop improving past a handful of layers. The paper stress-tests depth from 2 to 64 layers on Cora, Citeseer, and PubMed. Baselines fall apart: HyperGCN plummets from 84.34% to 12.70% at 8 layers on Cora, and SCCN drops to 41.65% at 32 layers. CCMamba (graph) holds 87.44% at 2 layers and 87.74% at 32 layers on Cora, with only marginal decay at 64. The input-dependent state transitions in the selective SSM act as a learned gate on neighborhood information rather than a passive average, which is what keeps deep stacks from homogenizing.
What it's good for, and where to be careful
CCMamba is a fit for problems where the underlying structure is naturally higher-order and where sequences of cells can be long:
- Molecular property prediction where rings and cliques carry chemistry that pairwise edges hide.
- Protein function classification where amino-acid contact patterns form higher-dimensional structure.
- Large citation and co-purchase networks where attention memory becomes prohibitive.
- Deep architectures where over-smoothing has previously forced shallow designs.
The weak spots are worth flagging. The simplicial variant is unstable under some head counts (Cora accuracy drops from 67.65% at 2 heads to 40.62% at 4). Performance is sensitive to the maximum cell length hyperparameter: MUTAG peaks at S=15 and loses 11 points at S=30, since oversized cells blur structure. And the paper's expressive-power result is upper-bounded by 1-CCWL, so genuinely 3-WL-hard graph pairs remain out of reach.
No public code repository is linked in the paper, so reproducing the exact pipeline will require reimplementing the CC lifting on top of an existing Mamba backend such as the official Mamba implementation. The design itself is straightforward to build from the algorithm listings, and the incidence-matrix formulation slots cleanly into any TopoBench-compatible workflow.