Manuscript Offprint
arXiv:2611.01753ReCoG: Relative Node Contexts for Multi-Domain Graph Pre-training
Yupeng Tong
School of Computer
Science and Technology
Tianjin University
Tianjin, China
Lianze Shan
School of Computer
Science and Technology
Tianjin University
Tianjin, China
Jitao Zhao
School of Computer
Science and Technology
Tianjin University
Tianjin, China
Dongxiao He
School of Computer
Science and Technology
Tianjin University
Tianjin, China
Abstract
The success of foundation models in language and vision has motivated Graph Foundation Models (GFMs), which learn transferable knowledge through multi-domain graph pre-training. Existing methods advance GFMs through feature unification and structural learning, and in doing so they rely on the raw graph structure to organize node contexts. However, we observe that removing a large proportion of edges from source graphs during pre-training improves cross-domain transfer accuracy across four representative methods. Our theoretical analysis identifies the raw graph structure as a source of conflict in cross-graph model sharing. We therefore advocate defining node contexts using criteria consistent across graphs. Achieving this requires (1) constructing node contexts consistently across graphs without a shared positional structure, such as the token order of text or the pixel grid of images, and (2) retaining the structural and neighborhood information of the original graphs. To this end, we introduce Relative Contexts for Graphs (ReCoG) for multi-domain graph pre-training. Specifically, we first construct attribute contexts to provide a comparison rule independent of the raw graph structure. Furthermore, we construct structural contexts based on common neighbors and semantic contexts based on neighborhood attribute summaries to retain the topological and neighborhood information of the original graphs. Since all graphs share these construction rules, we pre-train a single graph encoder by reconstructing node attributes over these contexts, without domain-specific modules. We conduct extensive experiments on 18 target datasets, which demonstrate the effectiveness of ReCoG. In particular, ReCoG exceeds the strongest baseline by 7.61 percentage points in mean 1-shot cross-domain node classification accuracy and by 4.47 points in cross-type transfer to heterophilous graphs.
CCS Concepts
• Computing methodologies → Learning latent representations; • Information systems → Web mining; Data mining.
ACM Reference Format:
Yupeng Tong, Lianze Shan, Jitao Zhao, and Dongxiao He. 2026. ReCoG: Relative Node Contexts for Multi-Domain Graph Pre-training. In Manuscript draft. ACM, New York, NY, USA, 13 pages.

Figure 1: Mean 1-shot accuracy gains (percentage points) across six unseen target graphs under source-edge removal, relative to the same model pre-trained on full source graphs.
1 Introduction
Graphs represent entities and their relationships across the Web, including citation networks [25], recommender systems [39], and knowledge graphs, while also organizing retrieval in retrieval-augmented generation [7, 9] and modeling communication and task dependencies among large language model (LLM) agents [43, 52]. In language and vision, foundation models pre-trained on large-scale corpora generalize broadly to new data and downstream tasks [3, 4, 6]. Extending this paradigm to graphs is challenging because graphs from different applications vary widely in attribute dimensions, connectivity patterns, and task objectives. Graph Foundation Models (GFMs) address this challenge through multi-domain graph pre-training, learning transferable representations from unlabeled source graphs before adapting to unseen target graphs and tasks [17, 18].
Existing multi-domain graph pre-training methods reconcile cross-graph heterogeneity along two directions: feature alignment and structural transfer. For feature alignment, FUG [45] learns transformations across varying input dimensions, TIG [46] converts feature dimensions and their interactions into structural representations, MDGPT [41] aligns source features via domain tokens, and BRIDGE [42] pairs domain-invariant alignment with target adaptation. For structural transfer, SAMGPT [40] introduces structure tokens to modulate cross-domain aggregation, GFT [34] constructs a vocabulary of computation trees, and MDGFM [32] refines topologies using joint feature and structural signals. These methods address cross-graph heterogeneity through diverse strategies,
These authors contributed equally to this work.
Corresponding author.

Figure 2: Recorded relations determine node contexts. (a) The same facts expressed as text and labeled graph edges. (b) Communication and task dependencies give the same agents different neighbors.
and all of them organize node contexts by the raw graph structure. However, we observe a counterintuitive phenomenon. We randomly remove varying proportions of edges from source graphs during pre-training while keeping all other settings unchanged. As shown in Figure 1, removing 90% of these edges improves each of the four representative methods' mean 1-shot accuracy over six unseen target graphs. Our theoretical analysis identifies the raw graph structure as a source of conflict in cross-graph model sharing (Section 5).
The raw graph structure defines a node's context by specifying its neighbors and the relations through which it aggregates their information. In language and vision, sequential token order and regular image grids provide consistent positional rules for organizing local contexts across samples. General graphs lack any shared node ordering or coordinate system; instead, the raw graph structure defines neighborhoods according to the domain-specific relations recorded during graph construction. For instance, an edge in a knowledge graph encodes a specific semantic predicate (Figure 2(a)), whereas the same group of LLM agents forms distinct neighborhood topologies depending on whether edges represent communication relations or task dependencies (Figure 2(b)). Propagating along the raw graph structure therefore ties message passing to the specific relation types recorded in each source domain. We therefore propose constructing node contexts from relative node associations defined by criteria consistent across graphs.
Realizing this approach presents two challenges. First, graphs lack a shared positional structure such as the token order of text or the pixel grid of images, so node contexts must be constructed consistently across graphs through a relational criterion that compares nodes within each graph despite disparate node orderings and recorded edge types. Second, contexts constructed by such criteria depart from the raw graph structure, yet they must retain its structural and neighborhood information, because the raw graph structure both encodes local connection patterns and determines which neighbors contribute attributes to each node.
Based on this perspective, we propose Relative Contexts for Graphs (ReCoG) for multi-domain graph pre-training. Specifically, ReCoG first constructs attribute contexts that link related nodes
independently of the raw graph structure, addressing the first challenge. Furthermore, to address the second challenge, it constructs structural contexts from common neighbors and semantic contexts from similarities between neighborhood attribute summaries. Message passing thus operates over these contexts, and the raw graph structure is used only to construct them. During pre-training, ReCoG trains a shared attribute encoder and GNN over the union of the three contexts via node attribute reconstruction. For downstream tasks, we freeze the pre-trained encoder, adjust the propagation weights of the three context types, and train task-specific predictors for node-, edge-, and graph-level tasks.
Our main contributions are as follows:
- We identify the raw graph structure as a source of conflict in multi-domain graph pre-training. Removing a large proportion of edges from source graphs improves cross-domain transfer for four representative methods, and our theoretical analysis quantifies the conflicting reconstruction demands that graph-dependent attribute mixing imposes on a shared model.
- We introduce ReCoG, which constructs attribute, structural, and semantic contexts under criteria consistent across graphs and adapts their propagation weights with a frozen encoder. Our analysis bounds how weighted-context perturbations affect propagation and reconstruction loss.
- We evaluate ReCoG across 18 target datasets. It achieves leading average accuracy in cross-domain and cross-type transfer, and generalizes to node-, edge-, and graph-level tasks with a frozen encoder.
2 Related Work
Graph self-supervised learning. Contrastive and generative objectives learn graph representations without manual labels: DGI [31] contrasts node representations with graph summaries, GRACE [51] aligns augmented views, and BGRL [30] bootstraps representations across views. GraphMAE [11] reconstructs masked node attributes, GCC [23] uses subgraph discrimination to transfer structural patterns across networks, and Hu et al. [13] combine node- and graph-level pre-training strategies. These objectives use graph neighborhoods and their augmentations; ReCoG performs multi-domain attribute reconstruction over relative contexts defined by comparison rules shared across graphs.
Graph foundation models. Source graphs differ in attributes and topology. OFA [16], ZeroG [15], and UniGraph [10] map text-attributed graphs into a shared language-model space. For general attributes, FUG [45] learns dimension-adaptive basis transformations, TIG [46] models interactions among feature dimensions, and STAGE [28] encodes statistical dependencies between attributes. GCOPE [44] connects source graphs through coordinator nodes, MDGPT [41] introduces domain tokens, LEDA [26] aligns latent semantic distributions, and BRIDGE [42] combines feature aligners with target-specific routing. For structural transfer, SAMGPT [40] modulates aggregation via structure tokens, GFT [34] learns a computation-tree vocabulary, GIT [35] pre-trains on task-trees, RiemannGFM [29] learns a structural vocabulary in Riemannian geometry, MDGFM [32] aligns features with refined topology, and MDGMIX [48] mixes source subgraphs across domain boundaries. ProGFM [33] learns propagation patterns between edges and

Figure 3: Overview of ReCoG. (a) Shared criteria construct and symmetrize attribute, structural, and semantic contexts. (b) A shared feature projector (MLP) and context aggregator (GNN) reconstruct attributes using a deduplicated context union. (c) Context weights configure target propagation; the frozen encoder supports node classification, link prediction, and graph classification through task-specific predictors.
feature dimensions. To adapt to target graphs, MDGPT [41] and SAMGPT [40] tune target prompts, GraphControl [50] adds target-specific conditional control to a pre-trained model, BRIDGE [42] routes target features through a mixture of experts, GraphLoRA [38] applies structure-aware low-rank updates, and GraphAny [47] combines analytical linear graph predictors through learned attention for training-free target inference. ReCoG instead defines propagation through relative contexts using the same comparison rules across graphs, and adapts context weights and fits task predictors with the encoder frozen.
Relational construction for graph learning. IDGL [5] jointly refines graph connectivity and node embeddings, while SLAPS [8] uses self-supervision to learn graph connections. To handle non-local or heterophilous relations, Geom-GCN [21] aggregates over geometric neighborhoods and H2GCN [49] separates ego representations from higher-order neighborhoods. These methods learn or select neighborhoods within a single graph, whereas ReCoG applies fixed ranking rules to every source and target graph, so one frozen encoder receives contexts built under the same criteria.
3 Preliminaries
We use calligraphic letters for sets, bold uppercase letters for matrices, and bold lowercase letters for vectors.
Graphs and propagation. Let be an undirected graph with nodes, raw edge set , adjacency matrix , and raw neighborhood for node . We call and the raw graph structure. For a nonnegative symmetric weight matrix , define with , and write . Given a propagation operator , a Graph Convolutional Network (GCN) layer [14] computes
where and are learnable parameters and is a nonlinear activation. A standard GCN sets , aggregating each node's representation with those of its raw neighbors.
Multi-domain pre-training. Given unlabeled source graphs from distinct domains, each graph has nodes and raw attributes whose dimension and semantics vary across domains. Following text-free multi-domain pre-training [40, 41], we project via singular value decomposition (SVD) onto up to leading right singular vectors, zero-pad the result to columns, and normalize each nonzero row to unit length. This yields with row norms at most one; we omit the subscript when clear from context and write for the -th row of . The encoder is pre-trained on and transferred to unseen targets with the same label-free preprocessing.
4 Method
As illustrated in Figure 3, ReCoG replaces raw-edge propagation with relative node contexts across pre-training and adaptation. Relative Context Reconstruction (RCR) first extracts attribute, structural, and semantic contexts under criteria shared across domains (Section 4.1). We then pre-train a shared encoder over the union of these contexts via node attribute reconstruction (Section 4.2), and adapt to target graphs by reweighting the three context types while keeping the encoder frozen (Section 4.3).
4.1 Relative Context Reconstruction
RCR defines propagation pathways by ranking node pairs under three criteria: attribute similarity provides a comparison rule independent of raw adjacency, while common neighbors and neighborhood attribute summaries preserve topological and local semantic evidence from the raw graph. Using the preprocessed attributes and raw adjacency from Section 3, we apply identical scoring rules to every source and target graph.
Algorithm 1 ReCoG pre-training and target adaptation
Input: source graphs ; target graph with available supervision; , and update budget .
Output: frozen encoder and a fitted task predictor.
1: for do 2: Preprocess ; build () by Eqs. (2)–(4) with 3: by Eqs. (5) and (6) 4: for do 5: ; 6: Update by one Adam step on in Eq. (8) 7: Freeze and ; discard the decoder 8: Preprocess ; build its contexts with size by Eqs. (2)–(4) 9: Select context weights with target supervision (Section 4.3) 10: Encode by Eq. (9); fit the task predictor on
Attribute Context. To link nodes with related content regardless of raw connectivity, we select the nodes most similar in attribute space to node :
The operator returns the highest-scoring indices, keeping all candidates if fewer than exist. All other nodes are candidates, so isolated nodes and nodes outside the raw neighborhood are compared using the same attribute criterion.
Structural Context. Common raw neighbors define a structural association between nodes with different attributes. Measuring this overlap by , we select nonadjacent nodes that share at least one common neighbor:
These two-hop pairs capture shared neighborhood membership without propagating directly along raw edges.
Semantic Context. We compare neighborhood content even when two nodes have no common neighbors. To capture this association, we compute one-hop summaries and select the nodes with the most similar neighborhood summaries:
Here, includes self-loops and symmetric normalization. Structural contexts compare neighborhood membership; semantic contexts compare aggregated neighborhood content.
For each type , we symmetrize the selections into with binary indicator matrix , defining the reconstructed propagation pathways. Theorem 5.2 bounds changes in propagation and reconstruction.
4.2 Multi-Domain Pre-training over Relative Contexts
We train the shared encoder to aggregate context information while preserving each node's distinctive attributes. SVD preprocessing and a shared multilayer perceptron (MLP) provide fixed-dimensional inputs to graph propagation [42]. Let denote the projection, zero-padding, and row normalization in Section 3; the MLP maps each row of into a common hidden space. During pre-training, we take the union of the three context
types, counting each selected pair once with a common within-graph weight :
The weight preserves the total weight of a reference graph while distributing it over the context union. With and , we set
Here is the share of total weight, including self-loops, that newly added pairs receive before is clipped. The operator Norm adds unit self-loops and applies symmetric normalization. A shared GNN then aggregates the projected features over :
Both and share parameters across all source graphs.
Since downstream tasks are unknown during pre-training, we train the encoder via node attribute reconstruction [11] to preserve node content after context aggregation. Using as both input and target, we reconstruct node attributes with a shared affine decoder by minimizing the cosine loss
where with stabilizes normalization. Theorem 5.3 links target reconstruction loss to the classification error of an induced affine readout through the attribute classification margins. We minimize over the shared parameters , cycling through sources with one full-graph update per visit (details in Appendix A).
4.3 Downstream Adaptation with a Frozen Encoder
The useful context types and propagation strengths vary with the target graph and task. We adapt the propagation operator while keeping and frozen. Applying the same preprocessing and RCR rules to the target graph, we weight each context type by , where and the strength is shared across types with nonzero weight. Defining , we compute target representations via
For , let when and zero otherwise. The deployment weights are
This scales the degree-normalized context union before adding self-loops and re-normalizing. At , and each node is encoded using only its own attributes.
Adjusted homophily. For node pairs and node labels, the adjusted homophily [22] is , where is the fraction of pairs joining same-class nodes and is the empirical frequency of label across pair endpoints. It equals zero under label independence, and takes positive (negative) values when pairs preferentially link same-class (different-class) nodes.
We select using available target supervision. With a validation split, we select from a finite candidate grid. In few-shot node classification, because sparse support labels cover few context pairs, a support-set classifier fitted at first generates pseudo-labels to estimate the adjusted homophily of each context type; types with positive adjusted homophily receive nonzero weight, and their estimates set a prior propagation strength (refined via support-set cross-validation at 3 and 5 shots). For standard Q1 classification, a node-specific variant activates all context types and replaces by , where counts newly added context pairs incident to node ; Q2 also includes this variant as a candidate. Other configurations use a shared strength. We discard and fit task-specific predictors on frozen H: a linear node classifier, a node-pair predictor, or a pooled graph classifier. Appendix A lists task settings and selection grids.
5 Theoretical Analysis
We quantify how differences in attribute mixing create reconstruction conflicts, then bound changes in context-based propagation and the readout error associated with target reconstruction. Supplementary proofs are provided in Appendix C.
Shared reconstruction under different graph mixing. Following two-class analyses of graph convolution [1, 36], consider two equal-sized node groups carrying unit attributes and at angle , mapped by a shared nodewise encoder to distinct prototypes , . On graph , suppose each propagation step assigns mass to the opposite group. Two linear aggregation steps yield
where is the surviving attribute contrast. Let be the clipped cosine loss in Eq. (8).
PROPOSITION 5.1 (COST OF SHARED RECONSTRUCTION). Write , , , and . Each graph admits a zero-loss affine decoder, whereas one shared affine decoder satisfies
For equally weighted graphs, the mean loss is at least .
PROOF. An affine decoder independently chooses its value at and its action on , so each graph alone has zero loss. For , put , , and . The outputs on the two endpoint graphs obey
Set . If every loss were below , all four output directions would have target angles bounded by some . Projection onto the target plane preserves this bound. In coordinates where , write the projected -outputs as and , with . Their slopes satisfy , where and . The two mixed outputs must lie in the same target cones, implying
Multiplication gives
contradicting . For attainment, choose the affine decoder with outputs in this plane, where and . The identity bounds every target angle by , with equality at the endpoints. All norms exceed , so clipping is inactive. For the lower bound, clipping only increases positive-alignment losses. The case has zero shared loss, and the mean bound follows because at least one of the 2N group losses reaches the minimax bound.
In this two-group construction, varying mixing rates impose conflicting reconstruction demands even when node attributes are identical across graphs. If a nonlinear encoder achieves exact reconstruction under a shared decoder, it must correct this mismatch in its representations: for any nonzero decoded outputs with linear mixture , exact reconstruction requires relative deviation satisfying (Appendix C)
Since under an affine decoder, the learned representations must supply this correction.
Relative contexts remove this mismatch in a family of regular graphs (Appendix C): given two graphs with nodes per group—one wired within groups and the other across groups—with , attribute and semantic contexts select all within-group pairs while structural contexts exclude cross-group pairs. Both context unions form the same two within-group cliques, preserving the attribute prototypes and admitting a shared zero-loss decoder.
Stability of context-based propagation. We next examine how changes in reconstructed contexts affect a fixed model. For symmetric nonnegative context weights on the same node set, define the maximum relative incident-weight change, normalized by degree including self-loops, as
THEOREM 5.2 (PROPAGATION AND RECONSTRUCTION STABILITY). The normalized operators satisfy
For attribute row norms at most one, a fixed model that combines a nodewise Lipschitz map, a two-layer GCN of Eq. (1) with ReLU, and an affine decoder satisfies
where with fixed-model constant .
Theorem 5.2 bounds operator and reconstruction changes with graph-size-independent constants. RCR links raw-edge changes to this bound through candidate eligibility and top-k rankings. With attributes fixed and consistent tie-breaking, attribute contexts remain unchanged. Structural or semantic selections change only when candidate eligibility changes or a candidate crosses the top-k cutoff. For unchanged candidate sets, a cutoff gap greater than twice
Table 1: Q1 1-shot node classification accuracy (%), mean ± SD) over 500 shared tasks per held-out graph. Avg. denotes the six-target mean. Bold and underlined values mark the best and runner-up.
| Method | Cora | CiteSeer | PubMed | CS | Photo | Computers | Avg. |
|---|---|---|---|---|---|---|---|
| FUG | 46.40 ± 8.37 | 36.07 ± 6.81 | 52.23 ± 9.47 | 78.02 ± 5.88 | 63.62 ± 9.77 | 51.27 ± 12.82 | 54.60 |
| TIG | 48.88 ± 8.80 | 44.71 ± 9.02 | 50.94 ± 10.00 | 75.28 ± 6.22 | 63.52 ± 10.47 | 49.47 ± 13.08 | 55.47 |
| GFT | 36.19 ± 5.39 | 32.51 ± 5.36 | 50.56 ± 7.19 | 63.49 ± 6.42 | 49.91 ± 7.11 | 38.67 ± 7.91 | 45.22 |
| MDGPT | 42.49 ± 7.94 | 45.13 ± 8.81 | 55.34 ± 8.32 | 72.98 ± 6.61 | 64.19 ± 9.92 | 49.24 ± 10.88 | 54.90 |
| SAMGPT | 44.81 ± 8.42 | 41.52 ± 8.15 | 46.20 ± 9.67 | 76.48 ± 6.17 | 59.17 ± 8.63 | 46.73 ± 9.64 | 52.49 |
| MDGFM | 42.43 ± 6.05 | 38.84 ± 7.54 | 49.73 ± 8.60 | 74.11 ± 6.55 | 64.24 ± 9.52 | 49.63 ± 9.83 | 53.16 |
| BRIDGE | 42.77 ± 6.37 | 41.36 ± 9.26 | 54.36 ± 8.94 | 75.14 ± 6.36 | 63.38 ± 9.96 | 49.33 ± 10.46 | 54.39 |
| MDG MIX | 40.92 ± 5.49 | 29.86 ± 5.11 | 43.87 ± 6.30 | 69.69 ± 6.07 | 63.10 ± 8.74 | 49.87 ± 10.12 | 49.55 |
| GraphAny | 39.18 ± 7.71 | 35.48 ± 7.11 | 51.79 ± 8.41 | 64.50 ± 8.65 | 55.28 ± 11.45 | 43.51 ± 12.73 | 48.29 |
| GraphLoRA | 54.41 ± 10.75 | 50.63 ± 14.41 | 55.59 ± 11.19 | 74.82 ± 9.06 | 52.52 ± 9.01 | 41.50 ± 13.29 | 54.91 |
| ReCoG | 56.47 ± 10.04 | 53.62 ± 10.14 | 54.15 ± 9.58 | 84.40 ± 5.84 | 73.25 ± 9.03 | 56.59 ± 10.37 | 63.08 |

Figure 4: Q1 few-shot node classification accuracy (%) across 1-, 3-, and 5-shot budgets on six held-out target graphs (500 shared tasks per budget). ReCoG is compared against five representative baselines; full results appear in Tables 1 and 6.
the maximum score perturbation preserves the selected sets: no excluded score can overtake a selected score. When these selections and the calibration weight w are preserved, and the propagation operator is identical. Propagation therefore depends on changes in the selected relative associations and their weights, rather than on each raw-edge change.
Reconstruction supports a linear readout. Let be the margin of linear attribute class scores, let denote the fraction of target nodes with margin at most , and put .
THEOREM 5.3 (RECONSTRUCTION BOUNDS THE READOUT ERROR). For attribute row norms at most one and , the readout has target misclassification fraction
Accurate target reconstruction preserves attribute-based class distinctions in an affine readout of the frozen representations: when most nodes have margins above a fixed , small yields a low misclassification bound.
6 Experiments
We evaluate ReCoG across 18 target datasets to answer three questions: Q1: Does it transfer to unseen graph domains across different label budgets? Q2: Does it transfer from homophilous source graphs to heterophilous target graphs? Q3: Does pre-training on a single large graph support node-, edge-, and graph-level tasks with a frozen encoder? We then analyze context weighting, context construction, and the pre-training objective, followed by test-time robustness and hyperparameter sensitivity.
6.1 Experimental Setup
Datasets. Q1 uses six homophilous benchmarks: the citation networks Cora, CiteSeer, and PubMed [25, 37], the co-authorship network CS, and the co-purchase networks Photo and Computers [27]. Q2 uses these six graphs as sources and transfers to six heterophilous targets: Cornell, Texas, Wisconsin, Actor [21], Chameleon, and Squirrel [24]. Q3 pre-trains on either ogbn-products or ogbn-arxiv [12] and evaluates on nine targets: Cora, CiteSeer, and PubMed for node classification; Physics [27], WikiCS [19], and DBLP [2] for link prediction; and IMDB-B, COLLAB, and PROTEINS [20] for graph classification. Dataset statistics and task settings are summarized in Appendix A.
Baselines. We compare ReCoG with eight multi-domain graph pre-training methods: FUG [45], TIG [46], GFT [34], MDGPT [41], SAMGPT [40], MDGFM [32], BRIDGE [42], and MDG MIX [48]. For few-shot transfer, GraphAny [47] uses training-free target inference, while GraphLoRA [38] adapts through low-rank updates. Results of three graph self-supervised methods, DGI [31], GRACE [51], and BGRL [30], are reported in Appendix B. We use official implementations and input preprocessing. We evaluate each baseline
Table 2: Q2 cross-type transfer accuracy (%), mean ± SD) over ten splits. Avg. denotes the six-target mean. Bold and underlined values mark the best and runner-up.
| Method | Cornell | Texas | Wisconsin | Actor | Chameleon | Squirrel | Avg. |
|---|---|---|---|---|---|---|---|
| FUG | 48.92 ± 8.84 | 62.70 ± 4.80 | 56.47 ± 3.49 | 28.30 ± 1.37 | 35.92 ± 2.81 | 26.77 ± 1.28 | 43.18 |
| TIG | 47.03 ± 7.57 | 58.92 ± 3.59 | 50.20 ± 5.13 | 27.52 ± 1.14 | 36.05 ± 1.70 | 26.12 ± 0.82 | 40.97 |
| GFT | 71.62 ± 6.65 | 78.11 ± 4.26 | 83.53 ± 4.49 | 33.57 ± 0.79 | 45.07 ± 1.89 | 35.06 ± 1.02 | 57.83 |
| MDGPT | 61.08 ± 8.13 | 62.97 ± 2.97 | 55.29 ± 3.37 | 28.44 ± 0.86 | 40.86 ± 1.87 | 33.13 ± 1.35 | 46.96 |
| SAMGPT | 60.54 ± 6.07 | 62.43 ± 4.43 | 56.86 ± 4.21 | 28.86 ± 0.88 | 42.11 ± 3.34 | 32.98 ± 0.99 | 47.30 |
| MDGFM | 61.62 ± 7.72 | 62.97 ± 5.14 | 55.88 ± 7.14 | 28.96 ± 1.25 | 42.65 ± 2.75 | 32.90 ± 0.97 | 47.50 |
| BRIDGE | 61.62 ± 8.44 | 62.43 ± 4.09 | 55.29 ± 4.71 | 28.62 ± 0.72 | 42.70 ± 2.22 | 31.67 ± 1.35 | 47.05 |
| MDGMIX | 51.89 ± 5.51 | 57.84 ± 7.07 | 50.20 ± 3.84 | 26.32 ± 1.17 | 34.71 ± 3.28 | 28.38 ± 1.19 | 41.56 |
| ReCoG | 74.59 ± 5.01 | 80.00 ± 7.37 | 82.94 ± 5.04 | 34.31 ± 0.90 | 60.02 ± 3.17 | 41.91 ± 1.46 | 62.30 |
Table 3: Q3 transfer from ogbn-products: 5-shot node classification, link prediction, and graph classification. Entries are accuracy or AUC (%), mean±SD); each Avg. weights three targets equally. Bold and underlined values mark the best and runner-up.
| Method | Node classification (Acc.) | Link prediction (AUC) | Graph classification (Acc.) | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Cora | CiteS. | PubM. | Avg. | Phys. | Wiki. | DBLP | Avg. | IMDB | COLL. | PROT. | Avg. | |
| FUG | 66.15±4.59 | 58.84±3.59 | 64.97±5.44 | 63.32 | 98.02±0.09 | 98.74±0.07 | 92.50±0.13 | 96.42 | 68.26±2.16 | 75.76±0.96 | 71.14±3.24 | 71.72 |
| TIG | 66.53±3.94 | 61.04±3.25 | 63.24±4.68 | 63.60 | 98.54±0.05 | 91.32±0.35 | 93.73±0.18 | 94.53 | 69.64±1.84 | 76.30±1.36 | 72.01±2.23 | 72.65 |
| GFT | 38.76±3.54 | 37.23±2.85 | 54.09±4.71 | 43.36 | 98.02±0.04 | 98.54±0.03 | 87.13±0.39 | 94.56 | 70.05±2.84 | 75.59±1.26 | 72.42±1.63 | 72.69 |
| MDGPT | 60.03±3.79 | 59.74±3.37 | 64.09±4.53 | 61.29 | 98.24±0.03 | 99.01±0.04 | 92.25±0.39 | 96.50 | 69.32±1.58 | 73.30±1.27 | 71.82±1.96 | 71.48 |
| SAMGPT | 59.80±4.36 | 59.44±3.53 | 56.41±7.00 | 58.55 | 98.25±0.04 | 98.95±0.06 | 91.14±0.30 | 96.11 | 70.77±1.52 | 74.29±1.06 | 72.41±1.16 | 72.49 |
| MDGFM | 63.27±3.59 | 48.02±3.79 | 51.05±6.44 | 54.11 | 98.23±0.02 | 99.02±0.05 | 91.54±0.35 | 96.26 | 69.32±1.79 | 73.43±1.12 | 71.77±1.91 | 71.51 |
| BRIDGE | 63.12±3.45 | 58.61±3.35 | 67.75±4.61 | 63.16 | 98.32±0.04 | 99.01±0.04 | 92.26±0.36 | 96.53 | 69.29±1.82 | 73.69±1.07 | 71.74±1.46 | 71.57 |
| ReCoG | 74.63±2.58 | 67.92±2.82 | 67.66±4.98 | 70.07 | 98.51±0.05 | 98.85±0.05 | 94.95±0.08 | 97.44 | 70.13±1.87 | 76.04±1.09 | 73.82±1.42 | 73.33 |
with its official adaptation procedure or with the shared frozen-representation evaluation in Appendix A.
Evaluation. ReCoG uses one shared set of pre-training hyperparameters across all source collections and keeps its encoder frozen on target graphs (Appendix A). For few-shot node classification, all methods use the same 500 sampled tasks per target at 1, 3, and 5 shots. Standard node classification uses three random 20%/80% labeled/test splits, and we select the regularization strength of the logistic regression classifier by cross-validation within the labeled set. Q2 uses the ten public splits with linear evaluation, and Q3 uses frozen encoders with shared readouts on nodes, node pairs (evaluated by AUC), or pooled graph representations (evaluated by accuracy). Target test labels are excluded from model and context-weight selection.
6.2 Cross-Domain Transfer (Q1)
We pre-train on five unlabeled Q1 graphs and evaluate on the held-out sixth graph. We report 1-shot accuracy in Table 1, per-target trajectories across 1, 3, and 5 shots in Figure 4, and the 3-/5-shot results in Table 6 (Appendix B). The margin of the six-target mean over the strongest baseline narrows from 7.61 percentage points (pp) at 1 shot to 3.07 and 1.27 pp at 3 and 5 shots, respectively. This trend indicates that the frozen representations are most useful when labeled target nodes are scarce. In the 1-shot setting, ReCoG ranks first on five targets across citation, co-authorship, and co-purchase domains, outperforming the runner-up by 6.38 pp on CS and 9.01 pp on Photo.
ReCoG remains first on Cora, CiteSeer, and CS at both 3 and 5 shots, while GraphLoRA leads on PubMed and MDGFM leads on

Figure 5: Q2 accuracy (%) by context type and strength . Dashed: self-only encoding ().
Photo. Under the standard 20%-labeled protocol, ReCoG reaches 87.44% mean accuracy and ranks first on five targets (Table 7, Appendix B), indicating that its advantage extends beyond the few-shot setting.
6.3 Cross-Type Transfer (Q2)
To assess cross-type transfer, we pre-train on all six homophilous Q1 graphs and evaluate on six heterophilous targets. In Table 2, ReCoG

Figure 6: Test-time robustness: (a) Gaussian feature noise, (b) edge removal, and (c) edge insertion. Mean accuracy (%) over the six Q1 graphs, with rebuilt contexts and refitted classifiers on frozen representations.
ranks first on five targets and reaches 62.30% mean accuracy—surpassing the strongest baseline (GFT, 57.83%) by 4.47 pp, with gains over GFT of 14.95 pp on Chameleon and 6.85 pp on Squirrel, while GFT leads on Wisconsin.
Figure 5 shows how accuracy changes with the propagation strength of each context type. Cornell and Wisconsin favor attribute contexts, Texas favors weak structural propagation, and Chameleon and Squirrel benefit from stronger structural propagation. Actor favors minimal or self-only propagation. The contrast between Texas and the two Wikipedia graphs indicates that the preferred strength of structural propagation varies across targets. Selecting context types and strengths accommodates these differences while the encoder remains frozen.
6.4 Cross-Task Transfer (Q3)
We pre-train one encoder on ogbn-products and evaluate its frozen representations on nine targets spanning three tasks. In Table 3, ReCoG achieves the highest task-wise mean in every task: 70.07% accuracy for 5-shot node classification (+6.47 pp over the strongest baseline), 97.44% AUC for link prediction (+0.91 pp), and 73.33% accuracy for graph classification (+0.64 pp). The largest gains occur in node classification, where ReCoG exceeds the runner-up by 8.10 pp on Cora and 6.88 pp on CiteSeer.
With ogbn-arxiv as the source, ReCoG again leads on Cora, CiteSeer, DBLP, and PROTEINS, with task-wise means of 68.55%, 97.20%, and 73.32% (Table 8, Appendix B). Results from both sources show that one frozen encoder supports node-, edge-, and graph-level tasks.
6.5 Model Analysis
Context construction. Table 4 reports 1-shot ablation accuracy on six Q1 targets over the same 500 tasks. Replacing relative contexts with raw edges during pre-training and adaptation lowers accuracy on all six targets, reducing mean accuracy by 10.31 pp (-21.52 pp on Cora and -17.18 pp on CiteSeer). Removing structural contexts lowers accuracy on all six targets (-1.96 pp on average), indicating that common-neighbor relations consistently improve transfer. Removing semantic contexts causes the largest drops on Cora (-6.73 pp) and CiteSeer (-5.99 pp), suggesting that these citation graphs benefit most from neighborhood attribute summaries. Attribute contexts improve accuracy on Photo (+2.57 pp) and Computers (+1.86 pp) but slightly reduce it on Cora and PubMed, which supports selecting context types for each target.
Table 4: Q1 1-shot ablation accuracy (%), mean±SD) over 500 shared tasks per target. Avg. is the six-target mean change (pp) from full ReCoG (bold; 63.08% mean).
| Variant | Cora | CiteS. | PubM. | CS | Photo | Comp. | Avg. |
|---|---|---|---|---|---|---|---|
| Full ReCoG | - | ||||||
| w/o Attribute | -0.61 | ||||||
| w/o Structural | -1.96 | ||||||
| w/o Semantic | -2.65 | ||||||
| Raw edges | -10.31 | ||||||
| Contrastive | -9.29 | ||||||
| Link recon. | -2.00 |
Pre-training objective. Attribute reconstruction achieves the highest accuracy among the three pre-training objectives on five targets. Replacing it with contrastive learning or link reconstruction reduces the six-target mean by 9.29 pp and 2.00 pp, respectively. Contrastive learning causes a drop of 23.03 pp on CiteSeer, whereas link reconstruction slightly outperforms attribute reconstruction on Computers. These results indicate that training aggregated representations to retain node attributes benefits frozen transfer, consistent with the readout bound in Theorem 5.3.
Source connectivity. Removing 90% of source edges before RCR pre-training, while keeping target graphs and sampled tasks fixed, changes mean 1-shot accuracy by only -0.17 pp, from 63.08% to 62.91%. This repeats the source-side intervention of Figure 1 on ReCoG. In contrast, replacing relative contexts with raw-edge propagation lowers accuracy by 10.31 pp. Relative contexts therefore remain effective after substantial source-edge removal.
Test-time robustness. We pre-train on the six clean Q1 graphs and perturb those same graphs at test time, rebuilding contexts and refitting classifiers with the encoder frozen. Figure 6 reports mean accuracy under Gaussian feature noise, edge removal, and edge insertion. ReCoG leads throughout the tested ranges; under the strongest perturbation, accuracy decreases by 0.82, 3.06, and 2.96 pp, respectively. Attribute contexts retain their selection rule under edge perturbations, while structural and semantic contexts respond to neighborhood changes. This complements the source-edge intervention above, which evaluates transfer to clean unseen targets. Appendix B specifies the perturbations.
Hyperparameter sensitivity. Figure 7 varies target k from 6 to 32 at , and from 0.5 to 0.9 at k = 12, with . Averaged over three random splits of the standard Q1 protocol, mean accuracy ranges from 87.05% to 87.44% as k varies and from 87.35% to 87.44% as varies, and thus remains stable. Here, controls both pre-training calibration and node-specific target strengths.
7 Conclusion
We study how the raw graph structure affects multi-domain graph pre-training. Removing a large proportion of edges from source graphs improves cross-domain transfer for four representative methods, and our analysis traces this effect to graph-dependent attribute mixing, which imposes conflicting reconstruction demands on a shared model. We therefore propose ReCoG, which constructs attribute, structural, and semantic contexts under comparison rules shared across graphs, pre-trains a single encoder by attribute reconstruction over them, and adapts the frozen encoder by reweighting context types. Across 18 target datasets, ReCoG leads in mean cross-domain and cross-type accuracy and supports node-, edge-, and graph-level prediction.
References
[1] Aseem Baranwal, Kimon Fountoulakis, and Aukosh Jagannath. 2021. Graph Convolution for Semi-Supervised Classification: Improved Linear Separability and Out-of-Distribution Generalization. In Proceedings of the 38th International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 139). Marina Meila and Tong Zhang (Eds.). PMLR, 684–693. https://proceedings.mlr.press/v139/baranwal21a.html
[2] Aleksandar Bojchevski and Stephan Günnemann. 2018. Deep Gaussian Embedding of Graphs: Unsupervised Inductive Learning via Ranking. In International Conference on Learning Representations. https://openreview.net/forum?id=1zRdKJ-0W
[3] Rishi Bommasani, Drew A Hudson, Ehsan Jeadeli, Russ Altman, Simran Arora, Sydney von Arx, Michael S Bernstein, Jeanette Bohg, Antoine Besollet, Emma Brunskill et al. 2021. On the opportunities and risks of foundation models. arXiv preprint arXiv:2108.07258 (2021).
[4] Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. Advances in neural information processing systems 33 (2020), 1877–1901.
[5] Yu Chen, Lingfei Wu, and Mohammed Zaki. 2020. Iterative deep graph learning for graph neural networks: Better and robust node embeddings. Advances in neural information processing systems 33 (2020), 19314–19326.
[6] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. 2021. An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale. In International Conference on Learning Representations. https://openreview.net/forum?id=YicbFdNTTy
[7] Darren Edge, Ha Trinh, Newman Cheng, Joshua Bradley, Alex Chao, Apurva Mody, Steven Truitt, Dasha Metropolitansky, Robert Osazuwa Ness, and Jonathan Larson. 2024. From local to global: A Graph RAG approach to query-focused summarization. arXiv preprint arXiv:2404.16130 (2024).
[8] Bahare Fatemi, Layla El Asri, and Seyed Mehran Kazemi. 2021. SLAPS: Self-supervision improves structure learning for graph neural networks. Advances in Neural Information Processing Systems 34 (2021), 22667–22681.
[9] Xiaoxin He, Iyjun Sun, Yifei Sun, Nitesh V Chawla, Thomas Laurent, Yann LeCun, Xavier Bresson, and Bryan Hooi. 2024. G-Retriever: Retrieval-augmented generation for textual graph understanding and question answering. Advances in Neural Information Processing Systems 37 (2024), 132876–132907.
[10] Yufei He, Yuan Sui, Xiaoxin He, and Bryan Hooi. 2025. UniGraph: Learning a unified cross-domain foundation model for text-attributed graphs. In Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining V. 1. 448–459.
[11] Zhenyu Hou, Xiao Liu, Yukuo Cen, Yuxiao Dong, Hongxia Yang, Chunjie Wang, and Jie Tang. 2022. GraphMAE: Self-supervised masked graph autoencoders. In Proceedings of the 28th ACM SIGKDD conference on knowledge discovery and data mining. 594–604.
[12] Weihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong, Hongyu Ren, Bowen Liu, Michele Catasta, and Jure Leskovec. 2020. Open graph benchmark: Datasets for machine learning on graphs. Advances in neural information processing systems 33 (2020), 22118–22133.
[13] Weihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik, Percy Liang, Vijay Pande, and Jure Leskovec. 2020. Strategies for Pre-training Graph Neural Networks. In International Conference on Learning Representations. https://openreview.net/forum?id=HJlWWJSFDH
[14] Thomas N. Kipf and Max Welling. 2017. Semi-Supervised Classification with Graph Convolutional Networks. In International Conference on Learning Representations. https://openreview.net/forum?id=SJU4ayYgl
[15] Yuhan Li, Peisong Wang, Zhixun Li, Jeffrey Xu Yu, and Jia Li. 2024. ZeroG: Investigating cross-dataset zero-shot transferability in graphs. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining. 1725–1735.
[16] Hao Liu, Jiarui Feng, Lecheng Kong, Ningyue Liang, Dacheng Tao, Yixin Chen, and Muhan Zhang. 2024. One for all: Towards training one graph model for all classification tasks. In International conference on learning representations, Vol. 2024, 20188–20210.
[17] Jiawei Liu, Cheng Yang, Zhiyuan Lu, Junze Chen, Yibo Li, Mengmei Zhang, Ting Bai, Yuan Fang, Lichao Sun, Philip S Yu, et al. 2025. Graph foundation models: Concepts, opportunities and challenges. IEEE Transactions on Pattern Analysis and Machine Intelligence 47, 6 (2025), 5023–5044.
[18] Haitao Mao, Zhikai Chen, Wenzhuo Tang, Jianan Zhao, Yao Ma, Tong Zhao, Neil Shah, Mikhail Galkin, and Jiliang Tang. 2024. Position: Graph Foundation Models Are Already Here. In Proceedings of the 41st International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 235). Ruslan Salakhutdinov, Zico Kolter, Katherine Heller, Adrian Weller, Nuria Oliver, Jonathan Scarlett, and Felix Berkenkamp (Eds.). PMLR, 34670–34692. https://proceedings.mlr.press/v235/mao24a.html
[19] Péter Merneyi and Cătălină Cangea. 2020. Wiki-CS: A Wikipedia-based benchmark for graph neural networks. arXiv preprint arXiv:2007.02901 (2020).
[20] Christopher Morris, Nils M Kriege, Franka Bause, Kristian Kersting, Petra Mutzel, and Marion Neumann. 2020. TUDataset: A collection of benchmark datasets for learning with graphs. arXiv preprint arXiv:2007.08663 (2020).
[21] Hongbin Pei, Bingzhe Wei, Kevin Chen-Chuan Chang, Yu Lei, and Bo Yang. 2020. Geom-GCN: Geometric Graph Convolutional Networks. In International Conference on Learning Representations. https://openreview.net/forum?id=S1e2agrFvS
[22] Oleg Platonov, Denis Kuznedeleev, Artem Babenko, and Luidmila Prokhorenkova. 2023. Characterizing graph datasets for node classification: Homophily-heterophily dichotomy and beyond. Advances in Neural Information Processing Systems 36 (2023), 523–548.
[23] Jiezhong Qiu, Qibin Chen, Yuxiao Dong, Jing Zhang, Hongxia Yang, Ming Ding, Kuansan Wang, and Jie Tang. 2020. GCC: Graph contrastive coding for graph neural network pre-training. In Proceedings of the 26th ACM SIGKDD international conference on knowledge discovery & data mining. 1150–1160.
[24] Benedek Rozembertzki, Carl Allen, and Rik Sarkar. 2021. Multi-scale attributed node embedding. Journal of Complex Networks 9, 2 (2021), nab014.
[25] Prithiviraj Sen, Galileo Namata, Mustafa Bilgic, Lise Getoor, Brian Gallagher, and Tina Eliassi-Rad. 2008. Collective classification in network data. AI magazine 29, 3 (2008), 93–106.
[26] Lianze Shan, Jitao Zhao, Dongxiao He, Siqi Liu, Jiaxu Cui, and Weixiong Zhang. 2026. LEDA: Latent Semantic Distribution Alignment for Multi-domain Graph Pre-training. In Proceedings of the ACM Web Conference 2026. 614–625.
[27] Oleksandr Shchur, Maximilian Mumme, Aleksandar Bojchevski, and Stephan Günnemann. 2018. Pitfalls of graph neural network evaluation. arXiv preprint arXiv:1811.05868 (2018).
[28] Yangyi Shen, Jincheng Zhou, Beatrice Bevilacqua, Joshua Robinson, Charilaos Kanatsoulis, Jure Leskovec, and Bruno Ribeiro. 2025. Zero-Shot Generalization of GNNs over Distinct Attribute Domains. In Proceedings of the 42nd International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 267). Aarti Singh, Maryam Fazel, Daniel Hsu, Simon Lacoste-Julien, Felix Berkenkamp, Tegan Maharaj, Kiri Wagstaff, and Jerry Zhu (Eds.). PMLR, 54701–54731. https://proceedings.mlr.press/v267/shen25p.html
[29] Li Sun, Zhenhao Huang, Suyang Zhou, Qiqi Wan, Hao Peng, and Philip Yu. 2025. RiemannGFM: Learning a graph foundation model from Riemannian geometry. In Proceedings of the ACM on Web Conference 2025. 1154–1165.
[30] Shantanu Thakoor, Corentin Tallec, Mohammad Gheshlaghi Azar, Mehdi Azabou, Eva L Dyer, Remi Munos, Petar Velícković, and Michal Valko. 2022. Large-Scale Representation Learning on Graphs via Bootstrapping. In International Conference on Learning Representations. https://openreview.net/forum?id=0UXT6PpRpW
[31] Petar Velícković, William Fedus, William L. Hamilton, Pietro Liò, Yoshua Bengio, and R Devon Hjelm. 2019. Deep Graph Infomax. In International Conference on Learning Representations. https://openreview.net/forum?id=rklz9iAcKQ
[32] Shuo Wang, Bokui Wang, Zhihang Shen, Boyan Deng, and Zhao Kang. 2025. Multi-Domain Graph Foundation Models: Robust Knowledge Transfer via Topology Alignment. In Proceedings of the 42nd International Conference on Machine
Learning (Proceedings of Machine Learning Research, Vol. 267), Aarti Singh, Maryam Fazel, Daniel Hsu, Simon Lacoste-Julien, Felix Berkenkamp, Tegan Maharaj, Kiri Wagstaff, and Jerry Zhu (Eds.). PMLR, 64806–64821. https://proceedings.mlr.press/v267/wang25dj.html
[33] Yi Wang, Jitao Zhao, Di Jin, and Dongxiao He. 2026. Beyond Feature and Structure Alignment: Learning Transferable Propagation Knowledge for Graph Foundation Models. arXiv preprint arXiv:2607.28980 (2026).
[34] Zehong Wang, Zheyuan Zhang, Nitesh V Chawla, Chuxu Zhang, and Yanfang Ye. 2024. GFT: Graph foundation model with transferable tree vocabulary. Advances in neural information processing systems 37 (2024), 107403–107443.
[35] Zehong Wang, Zheyuan Zhang, Tianyi Ma, Nitesh V Chawla, Chuxu Zhang, and Yanfang Ye. 2025. Towards Graph Foundation Models: Learning Generalities Across Graphs via Task-Trees. In Proceedings of the 42nd International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 267), Aarti Singh, Maryam Fazel, Daniel Hsu, Simon Lacoste-Julien, Felix Berkenkamp, Tegan Maharaj, Kiri Wagstaff, and Jerry Zhu (Eds.). PMLR, 65518–65555. https://proceedings.mlr.press/v267/wang25eq.html
[36] Xinyi Wu, Zhengdao Chen, William Wei Wang, and Ali Jadbabaie. 2023. A Non-Asymptotic Analysis of Oversmoothing in Graph Neural Networks. In The Eleventh International Conference on Learning Representations. https://openreview.net/forum?id=CJd-BtnwtXq
[37] Zhilin Yang, William Cohen, and Ruslan Salakhudinov. 2016. Revisiting semi-supervised learning with graph embeddings. In International conference on machine learning. PMLR, 40–48.
[38] Zhe-Rui Yang, Jindong Han, Chang-Dong Wang, and Hao Liu. 2025. GraphLoRA: Structure-aware contrastive low-rank adaptation for cross-graph transfer learning. In Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining V. 1. 1785–1796.
[39] Rex Ying, Ruining He, Kaifeng Chen, Pong Eksombatchai, William L Hamilton, and Jure Leskovec. 2018. Graph convolutional neural networks for Web-scale recommender systems. In Proceedings of the 24th ACM SIGKDD international conference on knowledge discovery & data mining. 974–983.
[40] Xingtong Yu, Zechuan Gong, Chang Zhou, Yuan Fang, and Hui Zhang. 2025. SAMGPT: Text-free graph foundation model for multi-domain pre-training and cross-domain adaptation. In Proceedings of the ACM on Web Conference 2025. 1142–1153.
[41] Xingtong Yu, Chang Zhou, Yuan Fang, and Xinming Zhang. 2024. Text-free multi-domain graph pre-training: Toward graph foundation models. arXiv preprint arXiv:2405.13934 (2024).
[42] Haonan Yuan, Qingyun Sun, Junhua Shi, Xingcheng Fu, Bryan Hooi, Jianxin Li, and Philip S. Yu. 2025. How Much Can Transfer? BRIDGE: Bounded Multi-Domain Graph Foundation Model with Generalization Guarantees. In Proceedings of the 42nd International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 267), Aarti Singh, Maryam Fazel, Daniel Hsu, Simon Lacoste-Julien, Felix Berkenkamp, Tegan Maharaj, Kiri Wagstaff, and Jerry Zhu (Eds.). PMLR, 73604–73644. https://proceedings.mlr.press/v267/yuan25h.html
[43] Guibin Zhang, Yanwei Yue, Xiangguo Sun, Guancheng Wan, Miao Yu, Junfeng Fang, Kun Wang, Tianlong Chen, and Dawei Cheng. 2025. G-Designer: Architecting Multi-agent Communication Topologies via Graph Neural Networks. In Proceedings of the 42nd International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 267), Aarti Singh, Maryam Fazel, Daniel Hsu, Simon Lacoste-Julien, Felix Berkenkamp, Tegan Maharaj, Kiri Wagstaff, and Jerry Zhu (Eds.). PMLR, 76678–76692. https://proceedings.mlr.press/v267/zhang25cu.html
[44] Haihong Zhao, Aochuan Chen, Xiangguo Sun, Hong Cheng, and Jia Li. 2024. All in one and one for all: A simple yet effective method towards cross-domain graph pretraining. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining. 4443–4454.
[45] Jitao Zhao, Di Jin, Meng Ge, Lianze Shan, Xin Wang, Dongxiao He, and Zhiyong Feng. 2024. FUG: Feature-universal graph contrastive pre-training for graphs with diverse node features. Advances in Neural Information Processing Systems 37 (2024), 4003–4034.
[46] Jitao Zhao, Yi Wang, Yawen Li, Dongxiao He, Di Jin, Zhiyong Feng, and Weixiong Zhang. 2026. Towards Graph Foundation Model: Node Feature Transfer Invariant Modeling on General Graphs. In Proceedings of the ACM Web Conference 2026. 810–821.
[47] Jianan Zhao, Zhaocheng Zhu, Mikhail Galkin, Hesham Mostafa, Michael Bronstein, and Jian Tang. 2025. Fully-inductive node classification on arbitrary graphs. In International Conference on Learning Representations, Vol. 2025. 23968–23986.
[48] Ziyu Zheng, Yaming Yang, Ziyu Guan, Wei Zhao, and Xinyan Huang. 2026. MDGMIX: Boundary-Aware Subgraph Mixing for Multi-Domain Graph Pre-Training. In Proceedings of the 43rd International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 306), Tong Zhang, Miroslav Dudik, Martin Jaggi, Alekh Agarwal, Sharon Li, Dale Schuurmans, Jerry Zhu, Felix Berkenkamp, Hanze Dong, and Alberto Bietti (Eds.). PMLR, 163803–163829. https://proceedings.mlr.press/v306/zheng26aa.html
[49] Jiong Zhu, Yujun Yan, Lingxiao Zhao, Mark Heimann, Leman Akoglu, and Danai Koutra. 2020. Beyond homophily in graph neural networks: Current limitations
and effective designs. Advances in neural information processing systems 33 (2020), 7793–7804.
[50] Yun Zhu, Yaoke Wang, Haizhou Shi, Zhenshuo Zhang, Dian Jiao, and Siliang Tang. 2024. GraphControl: Adding conditional control to universal graph pretrained models for graph domain transfer learning. In Proceedings of the ACM Web Conference 2024. 539–550.
[51] Yanqiao Zhu, Yichen Xu, Feng Yu, Qiang Liu, Shu Wu, and Liang Wang. 2020. Deep Graph Contrastive Representation Learning. In ICML Workshop on Graph Representation Learning and Beyond. http://arxiv.org/abs/2006.04131
[52] Mingchen Zhuge, Wenyi Wang, Louis Kirsch, Francesco Faccio, Dmitrii Khizbullin, and Jürgen Schmidhuber. 2024. GPTSwarm: Language Agents as Optimizable Graphs. In Proceedings of the 41st International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 235), Ruslan Salakhutdinov, Zico Kolter, Katherine Heller, Adrian Weller, Nuria Oliver, Jonathan Scarlett, and Felix Berkenkamp (Eds.). PMLR, 62743–62767. https://proceedings.mlr.press/v235/zhuge24a.html
A Implementation and Evaluation
Datasets. Table 5 summarizes the 18 targets and two additional sources. Q3 node classification reuses Cora, CiteSeer, and PubMed. IMDB-B and COLLAB use one-hot node degrees. Other inputs follow the cited dataset releases [2, 12, 19–21, 24, 25, 27, 37].
Pre-training. We set , using a nodewise MLP with hidden widths 1024 and 512 followed by a linear layer, a two-layer GNN with widths 256 and 512 and ReLU, an affine decoder , and . Each context selects candidates; a fixed random key breaks common-neighbor ties. Adam uses learning rate , weight decay , a cosine schedule, gradient clipping at 10, seed 0, and 1,000 updates cycling through the sources. These settings are shared across all source collections. Context construction uses blocked similarity searches on X and , and the sparse product , on one GPU.
Context selection. Pre-training and deployment weights follow Eqs. (6) and (10). Standard Q1 uses these node-specific strengths and selects on a 70/30 hold-out of the labeled set (). Q2 uses and compares
Table 5: Dataset statistics. Labels of link-prediction targets are unused (-); IMDB-B and COLLAB use one-hot node degrees (deg.).
| Dataset | Nodes | Edges | Feat. | Cls. |
|---|---|---|---|---|
| Cora | 2,708 | 5,278 | 1,433 | 7 |
| CiteSeer | 3,327 | 4,552 | 3,703 | 6 |
| PubMed | 19,717 | 44,324 | 500 | 3 |
| CS | 18,333 | 81,894 | 6,805 | 15 |
| Photo | 7,650 | 119,081 | 745 | 8 |
| Computers | 13,752 | 245,861 | 767 | 10 |
| Cornell | 183 | 277 | 1,703 | 5 |
| Texas | 183 | 279 | 1,703 | 5 |
| Wisconsin | 251 | 450 | 1,703 | 5 |
| Actor | 7,600 | 26,659 | 932 | 5 |
| Chameleon | 2,277 | 31,371 | 2,325 | 5 |
| Squirrel | 5,201 | 198,353 | 2,089 | 5 |
| ogbn-products | 2,449,029 | 61,859,140 | 100 | 47 |
| ogbn-arxiv | 169,343 | 1,166,243 | 128 | 40 |
| Physics | 34,493 | 247,962 | 8,415 | - |
| WikiCS | 11,701 | 216,123 | 300 | - |
| DBLP | 17,716 | 52,867 | 1,639 | - |
| Dataset | Graphs | Mean nodes | Feat. | Cls. |
| IMDB-B | 1,000 | 19.8 | deg. | 2 |
| COLLAB | 5,000 | 74.5 | deg. | 3 |
| PROTEINS | 1,113 | 39.1 | 3 | 2 |
Table 6: Q1 accuracy (%, mean±SD) at 3 and 5 shots over 500 shared tasks per target. Avg. weights six targets equally; 1-shot results appear in Table 1. Bold and underlined values mark the best and runner-up.
| Method | Cora | CiteSeer | PubMed | CS | Photo | Computers | Avg. | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 3 | 5 | 3 | 5 | 3 | 5 | 3 | 5 | 3 | 5 | 3 | 5 | 3 | 5 | |
| DGI | 45.56±5.08 | 53.07±3.79 | 44.96±4.42 | 50.55±3.54 | 55.58±5.12 | 60.34±4.47 | 85.26±2.08 | 87.77±1.20 | 70.17±5.23 | 74.10±4.33 | 56.98±7.27 | 63.16±4.49 | 59.75 | 64.83 |
| GRACE | 38.59±4.00 | 44.50±3.25 | 30.63±3.88 | 34.72±3.42 | 45.68±4.85 | 49.95±4.23 | 65.49±3.51 | 71.96±2.75 | 57.22±6.52 | 64.24±5.42 | 50.64±6.08 | 56.71±5.15 | 48.04 | 53.68 |
| BGRL | 46.74±4.09 | 53.28±3.37 | 31.66±3.58 | 35.74±3.11 | 51.06±5.51 | 56.07±6.68 | 75.12±3.29 | 81.12±2.22 | 72.63±7.23 | 77.83±5.18 | 62.05±8.43 | 67.13±6.08 | 56.54 | 61.86 |
| FUG | 61.63±5.42 | 67.31±3.23 | 47.62±4.94 | 53.28±3.86 | 60.82±6.32 | 64.51±4.64 | 86.55±1.70 | 88.13±1.13 | 65.91±8.90 | 66.29±7.50 | 58.85±10.17 | 62.83±8.18 | 63.56 | 67.06 |
| TIG | 58.53±6.17 | 63.70±4.59 | 56.39±5.03 | 60.66±3.45 | 56.48±7.81 | 59.64±6.58 | 83.63±3.04 | 86.62±1.98 | 68.24±10.30 | 69.20±8.48 | 56.31±11.03 | 60.80±8.49 | 63.26 | 66.77 |
| GFT | 52.88±4.54 | 60.01±3.61 | 44.98±4.53 | 50.91±3.80 | 60.66±5.86 | 65.06±4.36 | 78.95±2.74 | 82.69±1.62 | 68.41±5.63 | 73.61±5.07 | 54.17±6.17 | 59.97±5.41 | 60.01 | 65.38 |
| MDGPT | 54.99±6.30 | 60.86±3.97 | 57.34±4.97 | 61.87±3.28 | 63.88±6.02 | 67.59±4.71 | 82.70±2.45 | 85.35±1.51 | 76.31±5.62 | 78.20±4.92 | 63.10±8.20 | 67.17±6.31 | 66.39 | 70.17 |
| SAMGPT | 58.66±6.25 | 64.52±3.90 | 54.44±6.27 | 60.74±3.98 | 52.99±9.13 | 57.45±8.61 | 85.27±2.00 | 87.01±1.24 | 74.87±5.26 | 78.14±3.81 | 61.08±6.77 | 66.69±5.11 | 64.55 | 69.09 |
| MDGFM | 53.68±4.89 | 58.91±3.70 | 50.41±4.89 | 57.75±5.34 | 59.48±6.25 | 63.78±4.98 | 84.93±2.17 | 87.28±1.30 | 80.15±4.43 | 82.86±3.67 | 64.38±7.07 | 69.30±5.39 | 65.50 | 69.98 |
| BRIDGE | 56.36±5.15 | 62.45±3.43 | 54.10±6.57 | 59.38±4.86 | 62.98±6.00 | 67.64±4.69 | 85.53±1.96 | 87.68±1.28 | 77.94±5.44 | 79.72±4.71 | 64.87±7.39 | 69.22±5.41 | 66.96 | 71.03 |
| MDGMIX | 53.55±4.54 | 59.39±3.44 | 39.56±4.29 | 44.87±3.77 | 52.03±5.22 | 57.39±4.55 | 83.40±2.49 | 86.66±1.46 | 76.90±4.83 | 80.72±3.68 | 63.03±6.84 | 68.09±4.66 | 61.41 | 66.19 |
| GraphAny | 57.17±5.93 | 64.86±4.42 | 50.15±5.53 | 56.42±4.13 | 61.89±6.18 | 66.39±4.95 | 82.90±3.73 | 86.73±2.00 | 77.05±6.39 | 82.30±4.45 | 62.53±8.05 | 67.97±6.20 | 65.28 | 70.78 |
| GraphLoRA | 68.37±5.29 | 72.02±3.35 | 63.67±7.58 | 66.42±4.08 | 65.89±7.76 | 70.48±5.45 | 87.61±2.47 | 89.25±1.48 | 71.06±6.59 | 77.82±4.89 | 60.44±8.67 | 66.97±6.68 | 69.51 | 73.83 |
| ReCoG | 69.96±5.25 | 73.65±2.68 | 65.76±4.71 | 69.00±2.65 | 63.71±6.34 | 67.47±4.62 | 90.59±1.49 | 91.47±0.98 | 79.54±5.53 | 80.41±4.75 | 65.89±6.38 | 68.60±4.11 | 72.58 | 75.10 |
Table 7: Standard Q1 classification accuracy (%, mean±SD) over three 20%/80% labeled/test splits. Avg. denotes the six-target mean. Bold and underlined values mark the best and runner-up.
| Method | Cora | CiteSeer | PubMed | CS | Photo | Computers | Avg. |
|---|---|---|---|---|---|---|---|
| DGI | 75.47±0.78 | 65.76±1.19 | 82.83±0.24 | 92.82±0.18 | 91.48±0.26 | 87.24±0.21 | 82.60 |
| GRACE | 72.00±0.36 | 56.29±0.71 | 76.80±0.37 | 90.29±0.09 | 90.76±0.15 | 86.82±0.15 | 78.83 |
| BGRL | 79.43±1.24 | 64.46±1.14 | 83.91±0.26 | 92.63±0.21 | 92.76±0.21 | 88.98±0.16 | 83.70 |
| FUG | 82.79±0.72 | 70.52±0.15 | 84.42±0.23 | 92.41±0.02 | 92.31±0.16 | 87.30±0.16 | 84.96 |
| TIG | 84.39±1.08 | 73.08±0.52 | 86.45±0.13 | 93.42±0.05 | 93.27±0.22 | 89.51±0.07 | 86.69 |
| GFT | 72.99±0.94 | 64.79±0.99 | 83.59±0.12 | 93.06±0.27 | 90.25±0.18 | 84.18±0.19 | 81.48 |
| MDGPT | 81.78±0.47 | 72.25±0.49 | 85.76±0.24 | 93.02±0.08 | 93.27±0.07 | 90.01±0.09 | 86.02 |
| SAMGPT | 81.64±0.56 | 71.59±0.34 | 85.44±0.23 | 93.04±0.09 | 92.98±0.20 | 89.91±0.16 | 85.77 |
| MDGFM | 81.60±0.70 | 71.66±0.61 | 85.63±0.25 | 92.84±0.09 | 93.33±0.15 | 90.19±0.13 | 85.88 |
| BRIDGE | 81.59±0.65 | 71.36±0.51 | 85.47±0.23 | 93.11±0.05 | 93.20±0.13 | 90.07±0.20 | 85.80 |
| MDGMIX | 80.74±1.21 | 67.24±1.04 | 83.80±0.27 | 93.02±0.01 | 93.37±0.22 | 89.89±0.07 | 84.68 |
| ReCoG | 84.86±0.17 | 74.07±0.09 | 84.84±0.19 | 94.67±0.06 | 94.99±0.25 | 91.23±0.09 | 87.44 |
{att}, {str}, {sem}, {str, sem}, {att, str, sem} at , plus self-only () and node-specific propagation (27 candidates), on each split's validation nodes; each candidate requires one forward pass of the frozen encoder.
Few-shot adaptation. With , a logistic classifier fitted to the support nodes at supplies pseudo-labels. We select context types with positive adjusted homophily and round ( denoting the mean degree of type ) to the nearest strength on the log grid above. At 3 or 5 shots, leave-one-out support validation compares the grid strengths and replaces the prior choice only if a one-sided McNemar test favors the validation-best strength, i.e., , where count support nodes classified correctly only by the validation-best or prior choice, respectively. Every method uses the same 500 tasks per target and budget; all remaining nodes are test nodes, and Q3 node classification uses 5 shots. Reported task SDs measure variation across the 500 tasks.
Readouts and splits. Standard Q1 uses three 20%/80% labeled/test splits and -normalized representations. Logistic regression selects using five 50/50 shuffle splits inside the labeled set, then refits on all labeled nodes (staying inside the 70% training portion when selecting ). Q2 uses the ten public train/validation/test masks. Link prediction uses five 85%/5%/10% edge splits, using only training edges for encoding and context construction; a shared two-layer 256-unit pair MLP uses , binary cross-entropy, equal-sized fresh random negatives, and validation-AUC early stopping. Graph classification uses TUDataset attributes or one-hot degrees, standardized mean/max pooled representations, and a two-layer 256-unit MLP with dropout 0.5 across 50 stratified 20%/80% splits with inner validation stopping. Link and graph tasks use all context types with and and 1, respectively.
Baselines. Pre-trained baselines use the same source collections and their official preprocessing: DGI, GRACE, and BGRL use SVD-projected attributes, whereas FUG and TIG use their native feature encoders. For downstream adaptation, MDGPT, SAMGPT, MDGFM, and BRIDGE tune target prompts with frozen encoders and select epochs by support loss; GFT fine-tunes with its prototype and linear objectives. GraphLoRA uses low-rank adaptation, and GraphAny performs training-free inference. Frozen-representation evaluations share these task readouts. Averages weight targets equally: six for Q1/Q2 and three per Q3 task.
Table 8: Q3 transfer from ogbn-arxiv under the same protocol as Table 3. Entries are accuracy or AUC (%), mean±SD); each Avg. weights three targets equally. Bold and underlined values mark the best and runner-up.
| Method | Node classification (Acc.) | Link prediction (AUC) | Graph classification (Acc.) | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Cora | CiteS. | PubM. | Avg. | Phys. | Wiki. | DBLP | Avg. | IMDB | COLL. | PROT. | Avg. | |
| DGI | 51.66 | 95.99 | 72.21 | |||||||||
| GRACE | 44.26 | 95.58 | 72.22 | |||||||||
| BGRL | 49.30 | 96.39 | 72.31 | |||||||||
| FUG | 56.00 | 96.44 | 71.92 | |||||||||
| TIG | 62.88 | 94.33 | 72.58 | |||||||||
| GFT | 40.73 | 93.80 | 72.29 | |||||||||
| MDGPT | 96.40 | 71.16 | ||||||||||
| SAMGPT | 59.64 | 96.12 | 71.77 | |||||||||
| MDGFM | 61.04 | 96.12 | 71.63 | |||||||||
| BRIDGE | 62.94 | 96.54 | 71.86 | |||||||||
| ReCoG | 68.55 | 97.20 | 73.32 | |||||||||
| (a) Target context size k | (τ = 0.8) | (b) Weight share τ | (k = 12) | Δ (pp) | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Cora | 84.65 | 84.53 | 84.77 | 84.86 | 84.28 | 84.39 | 84.03 | 84.03 | 84.51 | 84.34 | 84.66 | 84.86 | 84.86 | |
| CiteS. | 73.84 | 73.87 | 73.97 | 74.07 | 73.87 | 73.95 | 73.99 | 73.99 | 73.74 | 73.97 | 74.20 | 74.07 | 73.99 | 73.99 |
| PubM. | 85.02 | 84.99 | 84.89 | 84.84 | 84.61 | 84.50 | 84.34 | 84.19 | 84.89 | 84.90 | 84.85 | 84.84 | 84.77 | 84.77 |
| CS | 94.50 | 94.56 | 94.60 | 94.67 | 94.66 | 94.60 | 94.64 | 94.65 | 94.70 | 94.70 | 94.68 | 94.67 | 94.70 | 94.70 |
| Photo | 94.68 | 94.84 | 94.96 | 94.99 | 94.92 | 94.80 | 94.74 | 94.59 | 94.95 | 94.96 | 95.00 | 94.99 | 94.94 | 94.94 |
| Comp. | 91.14 | 91.36 | 91.27 | 91.23 | 91.18 | 91.13 | 90.99 | 90.85 | 91.30 | 91.25 | 91.26 | 91.23 | 91.23 | 91.23 |
| Avg. | 87.30 | 87.36 | 87.41 | 87.44 | 87.25 | 87.23 | 87.12 | 87.05 | 87.35 | 87.35 | 87.44 | 87.44 | 87.42 | 87.42 |
| 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | ||
Figure 7: Standard Q1 hyperparameter sensitivity (): (a) target context size k and (b) context weight share . Cells report accuracy (%) over three splits; colors show shifts (, pp) from the outlined defaults (, ).
B Additional Results
Tables 6–8 and Figure 7 give additional Q1 and Q3 results.
Perturbation protocol. For Figure 6, we add independent Gaussian noise with scale std(X), remove a fraction of undirected edges, or insert random non-edges. All encoders are jointly pre-trained on the six clean Q1 graphs and evaluated on their corrupted versions using the three-repeat 20%/80% protocol. We recompute preprocessing under feature noise, rebuild contexts, and refit classifiers while freezing each encoder.
C Supplementary Proofs
Proposition 5.1 is proved in the main text. Below we prove its non-linear consequence, the context construction, and both theorems.
Nonlinear correction, Eq. (12). Zero clipped cosine loss implies with . Choose the sign whose opposite -graph coefficient is no smaller than its own. The angle between its mixture and target is at least
Indeed, that mixture is proportional to with , and its angle increases with . For a vector at angle to a target ray, minimizing over gives for , and an infimum of one otherwise. Therefore , giving the stated bound. For the actual affine decoder, the bias cancels because , yielding the representation identity in the main text.
Relative-context construction. Take , , and even. On two groups of nodes, use a -regular graph within each group for and a -regular bipartite graph for . Their raw contrast factors are and . Set . Attribute contexts select all within-group pairs. The aggregated attributes of are proportional to and ; these have distinct directions, so semantic contexts also select within-group pairs. Common neighbors imply same-group membership in either graph. The union is two cliques; every positive uniform calibrated weight preserves the constant group prototypes under normalization. A shared affine decoder recovers both targets exactly. The condition ensures newly added pairs exist for calibration. The construction uses two attribute directions and is preserved by a common orthogonal SVD basis and zero-padding.
Propagation bound in Theorem 5.2. Let , , , and . Then
The first symmetric term is similar to , whose absolute row sums are at most , so its norm is at most . Degree changes obey . Hence the diagonal entries of satisfy . Entrywise nonnegativity gives
Here by similarity to a stochastic matrix. The triangle inequality then gives the bounds and 2, proving Eq. (13).
Reconstruction bound in Theorem 5.2. Write and , with . Let , be the nodewise Lipschitz constant, and . Nonexpansiveness gives
Put . The unit-row constraint gives and . Clipped normalization is projection onto the unit ball after division by , and is thus -Lipschitz. With , Cauchy-Schwarz yields
Taking as the larger coefficient and using Eq. (13) proves the claim. A second ReLU preserves the bound.
Readout bound in Theorem 5.3. Let be the clipped normalized decoder output. Both row norms are at most one, giving
Positive normalization preserves class-score ordering. If but selects , then
Thus the error indicator is at most . Averaging over target nodes proves the theorem.