Graph Hierarchical Recurrence for Long-Range Generalization

Stefano Carotti, Marco Pacini, Alessio Gravina, Davide Bacciu, Bruno Lepri, Sebastiano BontorinarXiv 2026

TL;DR

Graph Hierarchical Recurrence (GHR) is a novel framework that solves long-range dependency and out-of-range generalization problems in graph learning by pairing a recurrent architecture with a hierarchical graph abstraction. Remarkably, GHR achieves state-of-the-art performance across multiple benchmarks while using up to 99% fewer parameters than standard feedforward models.

What Problem Does This Paper Address?

Standard Message-Passing Neural Networks (MPNNs) face severe bottlenecks when propagating information across distant regions of a graph, primarily due to the well-documented phenomena of over-squashing (compressing massive neighborhoods into fixed vectors) and over-smoothing (features becoming indistinguishable). While Graph Transformers mitigate this by allowing all-to-all communication, they suffer from quadratic computational complexity.

Crucially, the authors point out a critical gap in current architectures: out-of-range generalization. Most existing graph models completely break down when evaluated on test instances that require capturing interactions over distances longer than those observed during training. The authors argue that the current trend of scaling up model capacity to build "graph foundation models" fails to address this fundamental structural limitation.

Methods

To overcome these limitations, the authors introduce Graph Hierarchical Recurrence (GHR), a dual-level recurrent architecture that couples two message-passing streams:

  1. Low-level stream ($G_L$): Operates on the original graph topology to preserve fine-grained local interactions.
  2. High-level stream ($G_H$): Operates on a pooled, abstracted version of the graph to model long-range relationships over a significantly reduced diameter.
Figure 2: Visualization of the global recurrent step RW . Visual representation of the nested recurrent scheme as described in Algorithm 2. RL,WL and RH,WH propagate nodes’ information across the low-level graph GL and the high level abstraction GH. Message passing is interleaved between two layers in a nested weight-sharing scheme, which enables deep computation with a minimal parameter budget.

Unlike traditional feedforward architectures that use pooling as a one-way downsampling step, GHR alternates pooling and unpooling inside a nested recurrent loop. The high-level graph acts as a parallel routing shortcut for long-range messages without introducing artificial edges or distorting the graph's true topology.

Because parameters are shared across iterations, GHR can scale its computational depth at test time simply by running more recurrent steps. The model is trained using Backpropagation Through Time (BPTT) with a temporally discounted loss function to ensure stable gradient flow.

Datasets

The framework was evaluated across a diverse set of long-range benchmarks:

  • ECHO Benchmark: Includes ECHO-Synth (algorithmic routing tasks: Single-Source Shortest Path (SSSP), Diameter, Eccentricity) and ECHO-Chem (quantum-chemical properties: atomic charges and molecular energies).
  • Long-Range Ising Model (LRIM): A physics-based benchmark predicting local energy changes on a 2D lattice.
  • Long Range Graph Benchmark (LRGB): Specifically the Peptides-struct task.
  • Random Geometric Graphs (RGG): Synthetic graphs specifically generated to rigorously test out-of-range shortest-path extrapolation.

Key Insights and Ideas

  • Capacity $\neq$ Generalization: Simply increasing parameter count does not grant a model the ability to extrapolate structurally. Fixed-depth models fail linearly when tested on distances just slightly larger than their training data.
  • Recurrence for Extrapolation: Reusing parameters across iterations allows the model to naturally extend its reasoning horizon at test time, aligning perfectly with the sequential nature of graph algorithms.
  • Topology-Preserving Shortcuts: Graph rewiring methods often harm inductive bias by inventing non-existent edges. GHR's hierarchical pooling naturally reduces graph diameter (as shown in Figure 3), allowing fast information flow while strictly respecting the underlying graph structure.
Figure 3: Diameter of graphs and their pooled abstraction. Comparison of graph diameter between the low-level graph GL and its high-level abstraction GH = Pool(GL) obtained via graclus. (a) Average diameter of GL and GH across the ECHO benchmark [24] and the RGG dataset of Section 4.3, binned by graph size. GH is obtained with one graclus iteration for ECHO and three for RGG. Error bars show the standard deviation. (b) Visualization of a sample RGG graph GL (top) and its pooled abstraction GH (bottom).

Key Results

  • Out-of-Range Mastery: On the RGG SSSP task, while standard deep GNNs and GPS-style Transformers see their error explode outside the training range, GHR maintains near-zero error across the full out-of-range region.
Figure 1: Out-of-Range Generalization for Graph Hierarchical Recurrence. Predicted distances on Single Source Shortest Path (SSSP) task from a sample source node in a Random Geometric Graph (RGG). We compare DeepGIN (10 layers) with our model GHR (TL = 4, TH = 3), both trained on distances of up to 10 hops. While both GIN and GHR accurately predict on in-range distances, only GHR achieves out-of-range generalization.
  • State-of-the-Art Performance: GHR achieved SOTA results on all ECHO-Synth tasks and matched or exceeded top-performing models on the LRIM and LRGB benchmarks.
  • Extreme Parameter Efficiency: On the LRGB Peptides-struct task, GHR achieved competitive performance using only 20k parameters, compared to the 500k+ parameters required by baseline models—a 96% reduction. On other benchmarks, it matched SOTA performance using as little as 1% of the baseline parameters.

Limitations and Future Work

Despite its strong performance, GHR has a few notable limitations:

  • Memory Footprint during Training: Training with full BPTT over deep unrolls causes peak VRAM to scale with the total effective depth ($R \times T_H \times T_L$), which can limit scalability during the training phase.
  • Hand-crafted Pooling: The pooling operators used in this study (like Graclus or geometric blocking) are fixed and chosen per task rather than being learned end-to-end.
  • Unverified Feature Shifts: The out-of-range evaluation focuses strictly on structural extrapolation (larger graph sizes and longer distances) but does not test robustness against node-feature distribution shifts.

Future work includes extending GHR beyond two hierarchical levels and exploring learned, task-adaptive pooling mechanisms.

Summary updated

BibTeX
@misc{carotti2026graph,
  author = {Stefano Carotti and Marco Pacini and Alessio Gravina and Davide Bacciu and Bruno Lepri and Sebastiano Bontorin},
  title = {{Graph Hierarchical Recurrence for Long-Range Generalization}},
  year = {2026},
  eprint = {2605.18387},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.18387},
}

Loading related content...

Figure