CR-Graphormer: From Cascades to Tokens via Mesoscopic Graph Rewiring

Meher Chaitanya, My Le, Luana RuizNPGML @ NeurIPS 2025

TL;DR

This paper introduces CR-Graphormer, a novel graph transformer architecture that addresses the computational and receptive field limitations of existing methods. By employing a "mesoscopic edge rewiring" technique based on contagion cascades, CR-Graphormer creates a more efficient and structurally aware representation of graphs, leading to improved node classification accuracy on a variety of datasets.

What Problem Does This Paper Address?

Graph Neural Networks (GNNs) are powerful for analyzing graph-structured data, but they often struggle with "over-smoothing" and "over-squashing," limiting their ability to capture long-range dependencies. Graph Transformers (GTs) offer a solution with global self-attention, allowing nodes to interact with each other regardless of distance. However, standard GTs face two major challenges:

  1. Computational Cost: The quadratic complexity of self-attention ($O(n^2)$) makes them impractical for large graphs.
  2. Limited Receptive Field & Structural Awareness: Without explicit structural signals, GTs can struggle to understand the relationships between nodes, especially in heterophilous graphs (where similar nodes are far apart). Existing methods to inject structure, like positional encodings or sparse attention, have their own trade-offs, such as high computational cost or a narrowed receptive field.

This paper aims to bridge this gap by developing a graph transformer that is both computationally efficient and deeply aware of graph structure, particularly capturing higher-order relationships.

Methods

The core innovation of CR-Graphormer lies in its mesoscopic edge rewiring process, which constructs an auxiliary graph ($G^*$) to guide the transformer's attention. This process involves:

  • Deterministic Contagion Cascades: For each node, the method simulates "contagion cascades" (akin to memoryless, higher-order random walks) using two rules:
  • Adaptive-Threshold Contagion (MAS): Nodes are activated based on an adaptive threshold of their active neighbors.
  • Absolute-Threshold Contagion (TAS): Nodes are activated if a fixed number of their neighbors are active.
  • Rewiring to Auxiliary Graph ($G^*$): The cascades generate sequences of activated nodes. The most frequently co-activated nodes are identified, and direct edges are added between the source node and these frequent neighbors in the auxiliary graph $G^*$. This effectively replaces long, multi-hop paths with shorter, more informative connections.
  • Tokenization: Each node is assigned a fixed-length token list derived from its neighbors in the rewired auxiliary graph $G^*$.
  • Transformer Encoder: Standard self-attention is then applied to these token lists. Because the token lists are of fixed size, the overall attention complexity becomes linear with respect to the number of edges ($O(E)$), making it scalable.

This rewiring process is designed to amplify homophilous ties and preserve crucial heterophilous connections, creating a compact and information-rich context for each node.

Datasets

The paper evaluates CR-Graphormer on 14 publicly available benchmark networks from the Deep Graph Library (DGL). These datasets span both homophilic and heterophilic settings. Specific datasets mentioned include: Actor, Chameleon, Community, Computer, Cornell, Cycle, Grid, Photo, Pubmed, Shape, Squirrel, Texas, Wiki, and Wisconsin.

Key Insights and Ideas

  • Contagion Cascades as Structural Encoders: The paper demonstrates that deterministic contagion cascades can effectively capture higher-order structural information and community structures in graphs, serving as a powerful mechanism for graph rewiring.
  • Mesoscopic Rewiring for Efficiency and Expressiveness: By creating an auxiliary graph that directly connects nodes with strong multi-hop relationships, CR-Graphormer achieves computational efficiency ($O(E)$ complexity) while retaining rich structural awareness, overcoming the limitations of dense self-attention and traditional sparse attention methods.
  • Improved Homophily in Auxiliary Graphs: The rewiring process inherently increases the homophily scores of the auxiliary graphs, even for heterophilic datasets, which is a key factor contributing to improved node classification performance.
  • Strong Inductive Bias: Tokenizing over the "mesoscopic rewired graph" introduces a strong inductive bias that enhances graph learning, particularly for tasks requiring understanding of complex relationships.

Key Results

CR-Graphormer achieved competitive results on node classification tasks, outperforming or matching seven other baselines on 10 out of 14 benchmark networks. Notably, it showed significant improvements over state-of-the-art tokenized graph transformers like VCR-Graphormer and NAGphormer on challenging heterophilic benchmarks, with accuracy gains up to +18.8% on Chameleon. The ablation studies indicated that the proposed rewiring strategy enhances model stability against perturbations.

Limitations and Future Work

  • Sparse and Regular Networks: The authors acknowledge that for very sparse and highly regular networks (like cycles and grids), the proposed architecture might be less effective at rewiring, as the contagion-based procedures struggle to capture meaningful structural variations.
  • Future Work: Future research could explore adapting the rewiring strategy to different graph topologies by linking its effectiveness to structural properties like average degree or path length, potentially enabling adaptive mechanisms for various graph structures.

Summary updated

BibTeX
@inproceedings{chaitanya2025cr,
  author = {Meher Chaitanya and My Le and Luana Ruiz},
  title = {{CR-Graphormer: From Cascades to Tokens via Mesoscopic Graph Rewiring}},
  booktitle = {NPGML @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=Dq6U3m32v9},
}
Figure