While foundation models have revolutionized natural language processing and computer vision by leveraging universal vocabularies, Graph Machine Learning (GML) remains fractured due to the absence of a unified feature and structural representation across diverse domains. Existing works claiming to be Graph Foundation Models (GFMs) are typically restricted to node-level predictions or require fixed feature dimensions, failing to provide a truly task-agnostic backbone for the full spectrum of graph learning applications. In this paper, we introduce the Universal Classifier (UC), which supports arbitrary feature and class cardinalities, unifying node-, edge-, and graph-level objectives under a single similarity-based classification objective. The UC reformulates all node-, edge-, and graph-level prediction tasks as maximizing similarity in the latent space: by lifting heterogeneous features and labels into 3D latent tensors, the model learns transferable features independent of specific input schemas. This architecture allows a single pre-trained model to generalize to node classification, node regression, and link prediction across unseen graphs with varying feature semantics. Experiments show strong zero-shot transfer performance across node-, link-, and graph-level tasks.
Figures & tables
Figure 1: Overview of the Universal Classifier generalizing across tasks. (a) Node Classification and Regression: a query node is compared to a support set of anchors, with similarities aggregated by class. In regression, continuous targets are discretized into bins, treated as distinct classes, and recovered via similarity-weighted interpolation. (b) Link Prediction: a source node acts as a query and is evaluated against target nodes. Nodes connected to the query serve as anchors of a positive class, while all other nodes act as anchors of a negative class. (c) Graph Classification and Regression: a source graph is represented by pooling its respective features into a single global query, which is then compared against anchor graphs representing specific labels, similar to node-level tasks.
Figure 3: The UC performance across tasks: (a) binary (left, AP ↑ ) and multi-class (right, Accuracy ↑ ) node classification; (b) node (left, R2↑ ) and graph (right, RSE ↓ ) regression; and (c) link prediction (Hits@10 ↑ ), comparing zero-shot transfer and fine-tuning to tabular FMs and supervised baselines.
Parameter
roman- empire (Acc)
city-roads- M-RH ( R2 )
Base UC
78.61
74.08
- 2 Trf layers
75.63
70.90
- 3 hops
77.25
67.94
- GNN encoder
64.35
53.30
- Tabular encoder
74.27
73.11
- Mean score agg
72.83
71.79
Table 1: UC architectural ablations.
Figure 4: t-SNE projections of UC anchor representations for node classification ( roman-empire, arxiv ) and regression ( artnet-views-RH ) datasets cluster around the labels. In regression datasets, labels are ordinal bins constructed around centroids, and nearby bins cluster together.
Figure 5: Inference-time performance (accuracy for classification and R2 for regression) scaling with larger context sizes. 5% of anchors is often enough to recover 80+% of the final performance.
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
Task
Dataset
Graphs
Nodes
Edges
Features
Classes
Node Classification
amazon-ratings
1
24,492
93,050
300
5
artnet-exp
1
50,405
280,348
75
2
arxiv
1
169,343
1,157,799
128
40
city-reviews
1
148,801
1,165,415
37
2
full-cora
1
19,793
63,421
8,710
70
full-dblp
1
17,716
52,867
1,639
4
Appendix
Table 2: Summary statistics of the datasets used in our experiments. Node and edge counts are averaged per graph, and edges are counted after symmetrization, matching the graph representation used at runtime. The link-prediction datasets are reported separately in Table 3 . EC graphs carry no node features, so we turn node types into one-hot encoded features. For the EC datasets, the number of graphs is given per train/validation/test split, and the EFF and VOUT targets share the same graphs.
Dataset
Nodes
Undirected edges
Message-passing edges
Features
Mean degree
roman-empire
22,662
32,927
30,927
300
2.9
wiki-cs
11,701
215,603
213,603
300
36.9
city-roads-M
57,073
107,104
105,104
68
3.8
tolokers-2
11,758
519,000
517,000
19
88.3
Appendix
Table 3: Statistics of the link prediction datasets after the preprocessing described above. Message-passing edges excludes the 2,000 held-out validation and test edges. Feature counts are post-transform (one-hot encoding and imputation), so city-roads-M and tolokers-2 exceed the raw GraphLand counts.
Model
amazon-ratings
full-cora
full-dblp
roman-empire
arxiv
Supervised GNN
47.18 ± 0.42
58.95 ± 0.55
73.87 ± 1.35
43.93 ± 0.45
73.65 ± 0.11
Zero-Shot Transfer
GraphAny
42.80 ± 0.09
51.18 ± 0.78
71.48 ± 1.44
63.34 ± 0.58
58.85 ± 0.03
TS-Mean
42.27 ± 1.40
53.58 ± 0.73
66.42 ± 3.65
66.36 ± 1.02
56.33 ± 2.58
NodePFN
44.68 ± 0.48
-
74.71 ± 0.39
-
-
UC
52.83
68.64
85.10
78.61
65.43
Appendix
Table 4: Node classification accuracies.
Model
hm-categories (Acc)
tolokers-2 (AP)
city-reviews (AP)
artnet-exp (AP)
RL
RH
RL
RH
RL
RH
RL
RH
Supervised GNN
67.96 ± 0.33
79.19 ± 0.21
53.78 ± 1.34
63.76 ± 1.30
77.67 ± 0.13
81.10 ± 0.11
46.62 ± 0.32
50.62 ± 0.35
Zero-Shot Transfer
TS-Mean
20.09 ± 1.29
15.48 ± 1.93
38.54 ± 0.94
31.83 ± 2.55
43.46 ± 5.17
-
20.44 ± 1.05
13.38 ± 2.59
GraphPFN
-
-
60.33 ± 0.60
-
79.89 ± 0.10
-
50.85 ± 0.31
-
UC
48.69
54.83
67.18
69.26
86.53
86.57
65.46
66.92
Appendix
Table 5: Node classification accuracies on GraphLand datasets.
Model
city-roads-M
city-roads-L
twitch-views
artnet-views
RL
RH
RL
RH
RL
RH
RL
RH
End-to-end
XGBoost
59.14 ± 0.11
70.93 ± 0.05
53.75 ± 0.07
64.62 ± 0.07
13.39 ± 0.00
13.34 ± 0.02
32.74 ± 0.04
36.83 ± 0.06
Supervised GNN
59.11 ± 0.20
70.53 ± 0.40
53.43 ± 0.20
66.03 ± 0.24
72.93 ± 0.17
76.06 ± 0.30
53.36 ± 0.78
59.01 ± 0.52
Zero-Shot Transfer
GraphPFN
63.55 ± 0.29
-
-
-
73.27 ± 0.13
-
61.77 ± 0.23
-
Appendix
Table 6: Node regression R2 on GraphLand datasets.
Model
roman-empire
wiki-cs
city-roads-M
tolokers-2
End-to-end
SEAL
87.33 ± 1.15
86.53 ± 1.97
99.47 ± 0.61
79.73 ± 0.61
NBFNet
88.00 ± 0.01
92.00 ± 0.40
99.20 ± 0.01
92.53 ± 0.92
BUDDY
58.40 ± 11.09
83.60 ± 4.51
91.47 ± 5.43
72.93 ± 1.22
Zero-Shot Transfer
UC
72.00
87.60
99.60
74.00
Appendix
Table 7: Link prediction Hits@10 on the four link prediction datasets.
EC-5
EC-7
EC-10
Method
EFF
VOUT
EFF
VOUT
EFF
VOUT
End-to-end
Ridge ( α=1.0 )
0.760
0.760
0.970
0.897
0.893
0.948
KNN ( k=10 )
0.778
0.783
1.009
1.001
0.935
1.053
Random Forest (200, d=5 )
0.752
0.751
0.988
0.926
0.889
0.952
GBDT (50, d=3 )
0.720
0.724
0.989
0.890
0.877
0.977
Appendix
Table 8: Graph Regression RSE on Electronic Circuits datasets.
Graph foundation models aim to transfer across graphs, feature spaces, relational schemas, and prediction tasks, yet existing approaches typically generalize only within particular graph modalities or tasks. We propose Wander, a graph foundation model designed to operate across these settings within a single pretrained checkpoint. Following the prior-predictive perspective, we formulate graph learning as completion of a partially observed graph. We realize this task-general view through a common interface based on random walks, allowing the same model to operate across homogeneous and multi-relational graphs with varying features, labels, and relational schemas. Wander can increase its structural context at inference time without changing its learned parameters and, under suitable assumptions, universally approximates the corresponding Bayes-optimal predictor on bounded connected graphs. Empirically, a single pretrained checkpoint achieves state-of-the-art or highly competitive results across node classification, homogeneous link prediction, and knowledge-graph link prediction. Moreover, joint pretraining across graph modalities and tasks preserves performance in specialized settings while enabling positive transfer and the composition of separately learned capabilities at inference time.
We propose Mochi, a Graph Foundation Model that addresses task unification and training efficiency by adopting a meta-learning based training framework. Prior models pre-train with reconstruction-based objectives such as link prediction, and assume that the resulting representations can be aligned with downstream tasks through a separate unification step such as class prototypes. We demonstrate through synthetic and real-world experiments that this procedure, while simple and intuitive, has limitations that directly affect downstream task performance. To address these limitations, Mochi pre-trains on few-shot episodes that mirror the downstream evaluation protocol, aligning the training objective with inference rather than relying on a post-hoc unification step. We show that Mochi, along with its more powerful variant Mochi++, achieves competitive or superior performance compared to existing Graph Foundation Models across 25 real-world graph datasets spanning node classification, link prediction, and graph classification, while requiring 8∼27 times less training time than the strongest baseline.
João Mattos, Arlei Silva
Computer Science Department · Ken Kennedy Institute
Unlike vision and language domains, graph learning lacks a shared input space, as input features differ across graph datasets not only in semantics, but also in value ranges and dimensionality. This misalignment prevents graph models from generalizing across datasets, limiting their use as foundation models. In this work, we propose ALL-IN, a simple and theoretically grounded method that enables transferability across datasets with different input features. Our approach projects node features into a shared random space and constructs representations via covariance-based statistics, thus eliminating dependence on the original feature space. We show that the computed node-covariance operators and the resulting node representations are invariant in distribution to permutations of the input features. We further demonstrate that the expected operator exhibits invariance to general orthogonal transformations of the input features. Empirically, ALL-IN achieves strong performance across diverse node- and graph-level tasks on unseen datasets with new input features, without requiring architecture changes or retraining. These results point to a promising direction for input-agnostic, transferable graph models.
Moshe Eliasof, Krishna Sri Ipsit Mantri, Beatrice Bevilacqua +2
University of Cambridge · Ben-Gurion University of the Negev · Purdue University