Relation-Aware Graph Foundation Model

Jianxiang Yu, Jiapeng Zhu, Yibo Zhao, Hao Qian, Ziqi Liu, Zhiqiang Zhang, Xiang Li

TL;DR

Large Language Models conquered text because words break cleanly into universal tokens—something messy, wildly varied graphs have sorely lacked. REEF solves this by treating relations (edges and tasks) rather than nodes as the fundamental "vocabulary" of graphs, using hypernetworks to dynamically generate custom neural network weights for any relationship on the fly. The result is a lightweight Graph Foundation Model that generalizes across wildly different domains—even predicting molecular properties in zero-shot settings without ever seeing chemistry data during pre-training.

What Problem Does This Paper Address?

Why don't we have a "GPT-4 for graphs" yet? Language models work because English, Python, and poetry can all be chopped into a shared vocabulary of sub-word tokens. Graphs have no obvious equivalent.

Consider two academic citation networks: Cora (computer science) and PubMed (biomedicine). At the node level, the features are completely heterogeneous; at the dataset level, there is a massive domain gap. Previous attempts at Graph Foundation Models (GFMs) tried to make nodes or entire datasets the fundamental unit of transfer, which quickly breaks down when shifting from social networks to e-commerce or molecules.

Figure 1: Comparison of transfer unit at the node, dataset, and relation levels.

The authors notice a simple invariant: while Cora and PubMed discuss totally different science, the act of citing means the exact same thing in both. Relations—the connective tissue of graphs—are coherent and transferable across domains. The challenge is turning that intuition into an architecture that can handle both shared relations and dataset-specific quirks.

Methods

REEF (RElation Encoding for a graph Foundation model) unifies graph tasks—whether link prediction or node classification—into a single binary question: does relation $r$ hold between subgraph A and subgraph B? (For node classification, subgraph B is simply a "label node" representing the centroid of training samples for that class).

Figure 3: The overall framework of REEF.

Here is how REEF builds and uses its relational vocabulary:

  • Feature Alignment (Standard): Because node features across datasets have different dimensions, REEF uses Singular Value Decomposition (SVD) to project them into a uniform size.
  • Relation Vocabulary via LMs: Text descriptions of edge types (e.g., "co-purchase", "citation") and classification tasks are embedded using a frozen Sentence-BERT model to form a relation vocabulary.
  • Relation Hypernetworks (Novel): Instead of learning static Graph Neural Network (GNN) weights, REEF trains two hypernetworks (neural networks that output the weights of other neural networks). Given a relation token's embedding, $\mathcal{F}_{\text{Agg}}$ generates custom message-passing aggregator weights, and $\mathcal{F}_{\text{Cls}}$ generates a custom task classifier.
  • Dataset Adaptation (Novel): Because "citations" in computer science still involve different node distributions than in biomedicine, REEF embeds a text description of the dataset itself. A third hypernetwork ($\mathcal{F}_{\text{Proj}}$) generates layer-wise projection matrices alongside a learned dataset-level feature bias to shift node features into the right semantic space.
  • Pre-training Strategy: REEF is pre-trained across mixed-domain batches with random edge-dropping (augmentation) to prevent overfitting to any single graph's topology.

Datasets

No new benchmarks are introduced, but REEF is stress-tested across a massive variety of existing real-world graphs:

  • Main Pre-training & Few-Shot Transfer (10 datasets): Knowledge graphs (FB15K237, WN18RR), Citation networks (PubMed, Citeseer, Cora), WebKB heterophilic web graphs (Wisconsin, Texas, Cornell), and Amazon co-purchase networks (Photo, Computers).
  • Broad Cross-Domain Suite: 26 diverse datasets (following the GraphAny protocol) spanning social networks, co-authorship, heterophilic benchmarks, and air-traffic graphs.
  • Zero-Shot Cross-Task: Molecular graph classification benchmarks (BBBP and HIV).
  • Text-Attributed Graphs: Cora, History, and Ratings (using LM-encoded text features).

Key Insights and Ideas

  • Graph tasks are all secretly relation prediction: Framing node classification as predicting a "task relation" between a node's local subgraph and a class centroid allows one unified pre-training objective to handle both edge-level and node-level tasks seamlessly.
  • Hypernetworks bridge semantics and topology: Rather than forcing an LLM to read graphs at inference time (which is slow and expensive), REEF distills Sentence-BERT's semantic understanding of relations directly into lightweight GNN message-passing parameters. No giant LLM is needed at test time.
  • Relations alone aren't quite enough: Ablation studies show that stripping away dataset-specific projectors and biases noticeably hurts transferability (dropping average transfer accuracy from 48.34% to ~42–45%). You need relation tokens for universal structure, and dataset conditioning for local flavor.

Key Results

  • Pre-training Stability: When jointly pre-trained across five diverse datasets, standard GCNs and GATs collapse (averaging ~55% and ~49% accuracy). REEF achieves the highest average accuracy at 79.70% with the smallest variance across domains ($\Delta = 3.38$).
  • 1-Shot Transfer: Transferring to unseen datasets with just one labeled example per class, REEF beats the strongest pre-training baselines across the board—boosting accuracy by +10.07% on Cora, +16.52% on Cornell, and +24.05% on Amazon Computers.
Table 2: Performance comparison of different methods under transfer learning (1-shot). “GCOPE+CL” and “GCOPE+Sim” denote the variants of GCOPE that utilize the contrastive learning frameworks of GraphCL and SimGRACE, respectively. The best results are highlighted in bold. “Improve.” represents the improvement of REEF over the best baseline on the corresponding metric.
  • Large-Scale & Heterophilic Generalization: Across the 26-dataset benchmark, REEF leads with a 70.75% average accuracy (vs. 68.23% for GraphAny), shining brightest on notoriously tricky heterophilic graphs (76.77% vs. 69.34%).
  • Zero-Shot Molecular Transfer: Without any molecular graphs in its pre-training data or QA fine-tuning, REEF achieves 63.17% AUROC on HIV graph classification—outperforming GOFA (53.02%), which was fine-tuned on 100k chemical question-answer pairs.

Limitations and Future Work

While the authors do not dedicate a separate section to limitations, their future work highlights clear boundaries of the current framework: REEF currently models pairwise, static relationships. The authors point toward extending this relation-centric vocabulary to capture higher-order and compositional relations (beyond simple node pairs) and adapting the framework to dynamic and temporal graphs that evolve over time. Scaling the relation vocabulary across an even wider array of domains remains the primary path toward a truly universal graph model.

Summary updated

BibTeX
@inproceedings{yu2026relation,
  author = {Jianxiang Yu and Jiapeng Zhu and Yibo Zhao and HAO QIAN and Ziqi Liu and Zhiqiang Zhang and Xiang Li},
  title = {{Relation-Aware Graph Foundation Model}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=WZUABeWpGW},
}
Figure