ReHub: Linear Complexity Graph Transformers with Adaptive Hub-Spoke Reassignment

Tomer Borreda, Daniel Freedman, Or Litany

Introduction

Graph Neural Networks (GNNs) face a fundamental challenge: capturing long-range dependencies. Standard message-passing GNNs rely on local communication, which often leads to "oversquashing" (information bottlenecks) or "oversmoothing" (loss of node distinctiveness) as information travels across large graphs. While Graph Transformers (GTs) address this by providing global attention, their quadratic complexity ($O(N^2)$) makes them computationally prohibitive for large-scale datasets.

ReHub introduces a novel architecture that achieves linear complexity ($O(N)$) by borrowing the "hub-and-spoke" model from the airline industry. By routing global communication through a set of virtual "hubs," ReHub maintains the expressive power of global attention while remaining scalable to graphs with hundreds of thousands of nodes.

The ReHub Architecture

The core of ReHub is the Long-Range Spoke Update Layer, which facilitates communication between graph nodes (spokes) and virtual nodes (hubs).

Overview of the ReHub architecture and its hub-spoke communication layers.

A single ReHub layer consists of five primary operations:

  1. Spoke-to-Spoke (S2S): Local message-passing captures immediate neighborhood features.
  2. Spoke-to-Hub (S2H): Nodes send information to their assigned hubs via sparse attention.
  3. Hub-to-Hub (H2H): Hubs perform full self-attention. By keeping the number of hubs at $O(\sqrt{N})$, this step remains efficient.
  4. Hub-to-Spoke (H2S): Hubs broadcast updated global context back to the nodes.
  5. Adaptive Hub Reassignment: Nodes are dynamically reassigned to hubs at each layer to adapt to evolving feature representations.

Efficient Hub Reassignment

A key innovation in ReHub is its adaptive reassignment technique. Traditional reassignment requires calculating similarity for every node-hub pair, which is computationally expensive ($O(N_s \times N_h)$). ReHub optimizes this by calculating hub-hub similarity. Each node remains connected to its primary hub but also "borrows" connections to the $k-1$ most similar hubs in the feature space. This heuristic ensures that nodes always interact with the most relevant global context without breaking linear complexity.

Experimental Results

ReHub was evaluated on the Long-Range Graph Benchmark (LRGB) and other large-scale datasets. The results demonstrate that ReHub not only matches the performance of dense Graph Transformers but often surpasses them.

Performance comparison of ReHub against state-of-the-art graph models.

Key findings include:

  • State-of-the-Art Performance: ReHub consistently ranks in the top two on LRGB benchmarks like Peptides-func and PCQM-Contact, outperforming competitive baselines like GraphGPS and Exphormer.
  • Scalability: In synthetic stress tests, ReHub maintained linear memory scaling, successfully processing graphs with up to 700,000 nodes on a single GPU, whereas standard Transformers encountered out-of-memory errors at 100,000 nodes.
  • Efficiency: On the Coauthor Physics dataset, ReHub achieved comparable accuracy to Exphormer while using 36% less memory.

Conclusion

ReHub demonstrates that global communication in graphs does not require dense, quadratic attention. By utilizing a sparse, dynamic hub-spoke model, ReHub provides a scalable path for Graph Transformers to handle massive datasets without sacrificing the long-range modeling capabilities essential for complex graph tasks. Future work includes integrating geometric data for molecular modeling and exploring differentiable reassignment mechanisms.

Summary updated

BibTeX
@article{borreda2025rehub,
  author = {Tomer Borreda and Daniel Freedman and Or Litany},
  title = {{ReHub: Linear Complexity Graph Transformers with Adaptive Hub-Spoke Reassignment}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=L4S54TUOQR},
}
Figure