Adaptive Recurrent Message Passing for Test Time Computing on Graphs

Junshu Sun, Wanxing Chang, Qingming Huang, Shuhui Wang

Introduction: The Receptive Field Dilemma

In the realm of Natural Language Processing, "foundation models" like GPT-4 have achieved remarkable success by providing a unified backbone capable of generalizing across a vast array of downstream tasks. However, extending this "one-for-all" paradigm to graph learning has proven exceptionally challenging.

The primary obstacle lies in a structural mismatch: real-world graphs are incredibly diverse. Some graphs are homophilic (where connected nodes are similar) and require a "local" view to make accurate predictions. Others are heterophilic (where useful information is located many hops away) and demand a "global" perspective. Traditional Graph Neural Networks (GNNs) rely on a fixed number of layers, which inherently hard-codes their receptive field. A pre-trained 5-layer GNN is permanently restricted to a 5-hop view during test time. Adjusting this receptive field typically requires altering the architecture and retraining the model from scratch, effectively defeating the purpose of a foundation model.

To overcome this limitation, researchers have introduced AdaR (Adaptive Recurrent graph model), a novel framework that allows a single pre-trained graph model to dynamically adapt its receptive field at test time without changing model parameters.

The AdaR Approach: Recurrent Message Passing

Instead of stacking multiple unique layers, AdaR shifts the paradigm toward Recurrent Message Passing. The model utilizes a single layer iteratively for $S$ steps, allowing the receptive field to expand dynamically based on the iteration budget.

The Theoretical Core: Step Dependence

The paper's central theoretical contribution is the rigorous proof that for an adaptively convergent recurrent process, the model must be aware of its current step. Without this "step dependence," a model cannot generalize to iteration budgets it did not encounter during training. AdaR implements this and several other key mechanisms to ensure stable convergence:

  • Normalized Step Encoding: Similar to positional encodings in Transformers, AdaR uses sinusoidal encodings to inform the model of its current progress ($s/S$). This allows the model to treat different iteration budgets as varying "densities" of the same continuous trajectory.
  • Proxy-Based Relations: Downstream tasks often feature varying numbers of targets (e.g., 5 classes versus 40 classes). AdaR introduces a fixed set of "pseudo-nodes" as proxies to aggregate target information. This ensures the recurrent layer maintains a fixed parameter count regardless of the specific task.
  • Velocity Function: Rather than directly predicting a node's state, AdaR predicts a "velocity" (a residual update). This frames the GNN as a discrete approximation of a continuous dynamical system.
  • Gradient-Based Supervision: During training, AdaR is guided by gradient-based supervision signals that align its recurrent updates with the gradient of the task loss, ensuring that each step actively moves the representation closer to the correct target.

Experimental Setup and Key Findings

The authors evaluated AdaR extensively across two primary settings:

  1. Zero-Shot Inductive Transfer: The model was trained on four datasets (arXiv, bookhistory, amazon-ratings, PubMed) and tested without any fine-tuning on entirely unseen datasets (WikiCS, Cora, CiteSeer, DBLP).
  2. Supervised Transductive Transfer: The model was evaluated on both heterophilic graphs (Questions, Tolokers, Minesweeper) and homophilic graphs (CoauthorCS, AmazonPhoto).

Superior Generalization and Efficiency

AdaR demonstrated exceptional zero-shot capabilities, outperforming traditional GNNs by an average of 15.89% and existing graph foundation models by 21.99%.

Crucially, AdaR achieves this while maintaining the linear complexity $O(n+m)$ characteristic of traditional GNNs, avoiding the quadratic complexity often seen in Large Language Model (LLM)-based graph predictors. It is also highly efficient to train: AdaR can be trained with a small budget (e.g., 8 steps) and successfully "unrolled" to 300 steps at test time, drastically accelerating training cycles compared to deep GNN architectures like GCNII.

Insights into Test-Time Computing

The research yielded several fascinating insights into test-time graph computing:

  • Fixed Total Time: Fixing the "total time" of the process (e.g., $T=1$) and increasing the number of steps $S$ (effectively making the step sizes smaller) is significantly more stable than simply appending more steps of a fixed size.
  • Unimodal Performance: Model accuracy typically follows a unimodal curve as iterations increase. Performance improves as the model gathers necessary context, peaks, and eventually degrades due to over-smoothing.
  • The Exit Strategy: The authors discovered a reliable "early stopping" criterion: the average inner-product between node representations and target proxies peaks exactly when the model reaches its maximum accuracy.

Limitations and Future Directions

While AdaR offers unprecedented flexibility for graph foundation models, it currently operates within a pre-defined maximum iteration budget (set to $S=300$ in the study). Although the inner-product peak provides a strong heuristic for early stopping, automatically inferring the absolute optimal iteration budget for any arbitrary input graph remains an open challenge. Future research will likely focus on making this stopping point a fully learnable, input-dependent feature, pushing graph models even closer to true "adapt-on-the-fly" autonomy.

Summary updated

BibTeX
@inproceedings{sun2026adaptive,
  author = {Junshu Sun and Wanxing Chang and Qingming Huang and Shuhui Wang},
  title = {{Adaptive Recurrent Message Passing for Test Time Computing on Graphs}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=Ib2IjLO7JW},
}
Figure