betaFeedback

WorksComputer Science

To Learn is to Wander: Learning Across Graphs and Tasks with Random Walks

Abstract

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.

Code: https://github.com/louistichelman/wander-gfm

Introduction

Graph-structured data arises across a wide range of domains, from molecules and citation networks to social systems and knowledge graphs [45, 35, 27]. These domains differ in the information associated with their graphs and in the prediction problems of interest, and graph-learning models have traditionally been trained end-to-end for a specific task setting. Graph foundation models aim to make learning on such data more general: rather than training a separate model for every graph and task, the goal is to learn models that transfer across graphs, feature spaces, relation types, and prediction problems.

Existing approaches, however, only partially realize this goal and the emerging landscape of GFMs remains fragmented, as summarized in Table 1: some generalize node prediction across attributed homogeneous graphs with arbitrary feature and label spaces [72, 63, 14, 20, 7] (Emery et al. 2026), some others generalize link prediction across knowledge graphs with arbitrary relational vocabularies [16, 71, 28, 30], and some focus on link prediction on homogeneous graphs [10, 34]. What is still missing is a unified formulation that spans these different graph-learning settings. This leaves two closely related questions: what predictive function should such a general graph foundation model learn? How can a single architecture realize this function across previously unseen graphs, feature spaces, relations, and tasks?

Graph Foundation Model FamiliesInput Graphs: node featuresInput Graphs: edge typesPrediction Task: node propertyPrediction Task: link
Ultra (2024), Flock (2025)❌✅❌✅
OpenGraph, AnyGraph (2024)✅❌✅✅
TS-Net (2026), GraphPFN (2025)✅❌✅❌
UniLP (2024), TFMlinker (2026)❌❌❌✅
Wander (ours)✅✅✅✅

Table 1. Existing GFMs generalize across different subsets of graph modalities and prediction tasks. Wander uses a single model across both node- and edge-level tasks on homogeneous and multi-relational graphs.

This work makes three contributions toward answering these questions:

(1) A task-general predictive objective. We answer the first question through a probabilistic view of graph learning. Following the prior-predictive perspective of TabPFN (Hollmann et al., [24]), we view an observed graph as a partially specified realization of an underlying complete graph drawn from a graph distribution. Node- and edge-level prediction problems can then be expressed as completion tasks on this partially observed graph: completing node labels corresponds to node classification, while completing edges corresponds to link prediction. More generally, each task defines a query about an unobserved component of the graph, with the Bayes-optimal prediction given by the posterior expectation of the query-dependent target conditioned on the observation. This gives one predictive function across graph-learning tasks.

(2) A common computational architecture. Realizing this task-general predictor requires a common interface that can operate across varying graph structures, feature spaces, relations, and label spaces. We propose Wander, which uses random walks as this interface. Random walks have a long history in graph learning ([46, 19, 57, 55, 29]), and have recently re-emerged as a computational primitive in knowledge graph foundation models ([30]). Wander extends this interface across graph settings and prediction tasks by representing features, labels, and structure through separate channels and processing their information along sampled walks, enabling a single architecture to operate on homogeneous and multi-relational graphs, accommodate varying feature and label spaces, and answer both node- and edge-level queries. It has three properties particularly useful for a foundation model.

  • Unlike message-passing GFMs ([14, 13]), whose structural context is fixed by network depth, Wander can flexibly adjust its structural context at inference time by varying its random-walk sampling strategy, without modifying its learned parameters.

  • Random-walks can capture structural properties beyond standard message passing architectures. We formalize this by showing that, under suitable capacity assumptions, Wander is a universal approximator of the Bayes-optimal graph predictor on bounded connected graphs (Theorem 3).

  • Wander is permutation equivariant in distribution, allowing stochastic symmetry breaking while respecting graph symmetries at the distributional level to facilitate generalization (Proposition 4).

(3) A generalist model with compositional and adaptable capabilities. Empirically, we evaluate a single pretrained Wander checkpoint across node classification, homogeneous link prediction, and knowledge-graph link prediction, obtaining state-of-the-art or highly competitive results across all three settings. Beyond this breadth, joint pretraining yields positive transfer across graph-learning settings. Further to this, Wander can combine separately learned capabilities to solve new task settings. Finally, its random-walk interface supports adaptation without parameter updates: expanding or targeting the sampled context improves long-range reasoning on synthetic and real-world graphs. Together, these findings show benefits of unification beyond task coverage alone.

Related work

Graph foundation models for node property prediction. Node property prediction has traditionally relied on message-passing neural networks such as GCN ([31]), GAT ([60]), and GIN ([66]), which are typically trained end-to-end on a single graph. Early graph foundation models aim for architectures that transfer across feature and label spaces. GraphAny ([72]) combines predictions from multiple linear graph filters through learned attention that transfer across graphs. TS-GNN ([14]) formalizes the symmetry requirements of node-level graph foundation models under node, feature, and label permutations, and proposes a corresponding symmetry-preserving architecture. Another line of work builds on tabular foundation models ([24, 23, 48]), which perform in-context learning from labeled rows at inference time. G2T-FM ([12]) and TAG ([20]) encode graphs as node-level tables for in-context prediction with pretrained tabular foundation models. NodePFN ([7]) extends TabPFN ([24]) to graphs through pretraining on synthetic graphs, retaining a single representation per node and a fixed maximum feature dimension. GraphPFN ([13]) builds on Limix ([70]) with graph-aware aggregation between feature-tokenized blocks, more naturally accommodating varying feature dimensions across graphs. WANDER instead uses random walks as its structural interface for in-context learning, accommodating varying feature spaces and edge types.

Graph foundation models for link prediction. Classical approaches for link prediction over attributed graphs, where nodes carry features and edges are typically of a single type, range from GNN-based encoders [31] to link-specific architectures such as SEAL [69] and BUDDY [4]. More recent foundation models aim to replace graph-specific training with transferable predictors that generalize across unseen graphs, including Prodigy [26], OFA [36], UniLP [10], OpenGraph [64], and AnyGraph [63]. TFMLinker [34] instead tabularizes link-centric graph information for in-context prediction with a pretrained tabular foundation model. In parallel, knowledge graphs link prediction has developed a separate family of architectures, from R-GCN (Schlichtkrull et al., 2018) and CompGCN [59] to query-conditioned models such as NBFNet [75] and C-MPNNs [27]. Knowledge graph foundation models (KGFMs) further extend this setting to fully inductive transfer, where both entities and relation types can be unseen at test time. Ultra [16], Motif [28], and Trix [71] achieve this primarily through relation- and entity-level message passing, while Flock [30] instead uses random walks as the interface for structural reasoning. These models provide broad transfer within either homogeneous attributed graphs or relational graphs, but not a common model across both regimes and prediction tasks.

Random walks for graph learning. Random walks have long been used to capture graph structure, with DeepWalk [46] and node2vec [19] learning node embeddings from sampled walk sequences. Later methods use walks more directly as graph representations: CRaWL [57] processes collections of walks with neural networks, while WalkLM [55] incorporates node attributes into walk sequences for language-model-based processing. RWNN [29] further treats anonymized random walks as a general computational interface for graph learning. Flock [30] extends this paradigm to knowledge graphs for zero-shot link prediction. WANDER builds on this line by using the same walk-based graph computation across graph settings and tasks, while its in-context architecture accommodates node attributes, labels, and relational edge types within a single model.

Preliminaries

Attributed edge-typed graphs. An attributed edge-typed graph is a tuple G=(V,E,R,X,Y)G=(V,E,R,X,Y), where VV is the set of nodes, RR is the set of relation types, E⊆V×R×VE \subseteq V \times R \times V is the set of typed edges, X∈{∅}∪RV×dXX \in\{\emptyset\} \cup\mathbb{R}^{V \times d_X} is the matrix of dXd_X-dimensional node features, and Y∈{∅}∪([dY]∪{⊥})VY \in\{\emptyset\} \cup([d_Y] \cup\{\perp\})^V contains the node labels, with dY∈Nd_Y \in\mathbb{N} denoting the number of classes. For any k∈Nk \in\mathbb{N}, we write [k]:={1,…,k}[k] := \{1,\ldots,k\}. We call a node v∈Vv \in V unlabeled if Yv=⊥Y_v = \perp. Features and labels may both be absent. We define Gn,m,b\mathbb{G}_{n,m,b} as the set of attributed edge-typed graphs with at most nn nodes, mm relation types, and bb feature and label dimensions and Gn,m,b⋆⊂Gn,m,b\mathbb{G}^{\star}_{n,m,b} \subset\mathbb{G}_{n,m,b} as the set of fully specified graphs without unlabeled nodes. In the following, we refer to attributed edge-typed graphs simply as graphs.

Partial observations and graph isomorphism. We write π=(πV,πR,πX,πY)\pi=(\pi_V,\pi_R,\pi_X,\pi_Y) for bijective relabelings of nodes, relation types, feature dimensions, and class labels, respectively. We extend πY\pi_Y by πY(⊥)=⊥\pi_Y(\perp)=\perp and denote the relabeled graph by π(G)\pi(G). A graph GG is a partial observation of G′G' (written G⪯G′G \preceq G') if, up to such a relabeling, it can be obtained from G′G' by deleting a subset of its edges and masking a subset of its node labels with ⊥\perp. Two graphs are isomorphic (written G≅G′G \cong G') if G⪯G′G \preceq G' and G′⪯GG' \preceq G.

Modeling posterior graph distributions. In this work we are interested in predicting missing labels or edges in an (incomplete) observed graph Gobs∈Gn,m,bG_{\mathrm{obs}} \in\mathbb{G}_{n,m,b} conditioned on a prior distribution over graphs. Formally, let pp be a probability distribution over the isomorphism classes of Gn,m,b⋆\mathbb{G}^{\star}_{n,m,b}. In the following, we slightly abuse notation by identifying an isomorphism class with any of its representatives and write GG interchangeably for a graph and its isomorphism class. We denote by p(⋅∣Gobs)p(\cdot\mid G_{\mathrm{obs}}) the conditional distribution over graph completions consistent with GobsG_{\mathrm{obs}}.

However, rather than explicitly representing the full posterior distribution, we aim to model posterior expectations of query-dependent target random variables. Formally, we define a link prediction query q=(hq,rq,?)q=(h_q,r_q,?) consisting of a query head hq∈Vobsh_q \in V_{\mathrm{obs}} and query relation rq∈Robsr_q \in R_{\mathrm{obs}}, and a label prediction query q=Vq⊂Vobsq=V_q \subset V_{\mathrm{obs}} consisting of a set of unlabeled nodes. For G⋆∼p(⋅∣Gobs)G^\star\sim p(\cdot\mid G_{\mathrm{obs}}) we then define the query target random variable Tq(G⋆)T_q(G^\star), where

Tq(G⋆)={(1(hq,rq,t)∈E⋆)t∈Vif q=(hq,rq,?)Link Prediction((1Yv⋆=c)c∈[dY])v∈Vqif q=VqNode ClassificationT_q(G^\star)= \begin{cases} \left(\mathbf{1}_{(h_q,r_q,t)\in E^\star}\right)_{t\in V} & \text{if }q=(h_q,r_q,?) \qquad\text{Link Prediction}\\ \left(\left(\mathbf{1}_{Y_v^\star=c}\right)_{c\in[d_Y]}\right)_{v\in V_q} & \text{if }q=V_q \qquad\text{Node Classification} \end{cases}

The Bayes-optimal predictor for query qq is therefore

Mp⋆:(Gobs,q)↦EG⋆∼p(⋅∣Gobs)[Tq(G⋆)].M_p^\star:(G_{\mathrm{obs}},q)\mapsto\mathbb{E}_{G^\star\sim p(\cdot\mid G_{\mathrm{obs}})}[T_q(G^\star)].

Intuitively, the query specifies which missing part of the graph is to be completed, while the same predictor returns its posterior estimate regardless of whether that part is a node label or an edge.

Random walks. Given a graph GG, we define a walk η\eta of length SS in GG as a sequence η=(v0,r1α1,v1,…,rSαS,vS)\eta=(v_0,r_1^{\alpha_1},v_1,\ldots,r_S^{\alpha_S},v_S), where vj∈Vv_j\in V, rj∈Rr_j\in R, and (vj−1,rj,vj)∈E(v_{j-1},r_j,v_j)\in E if αj=1\alpha_j=1 and (vj,rj,vj−1)∈E(v_j,r_j,v_{j-1})\in E if αj=−1\alpha_j=-1. We denote the set of such walks of arbitrary length by W(G)\mathcal{W}(G). A random-walk algorithm AA associates with every graph-query pair (G,q)(G,q) a random variable A(G,q)A(G,q) taking values in W(G)\mathcal{W}(G).

Learning the Bayes-Optimal Graph Predictor

This section characterizes the task-general predictor introduced above. We establish Bayes-level compatibility across graph tasks, characterize when expanding the graph prior can improve target performance, and formalize the predictor’s permutation symmetries. Proofs are in Appendix § 13.

Learning across tasks. Any graph foundation model can be trained to approximate Mp⋆M_p^\star using samples G⋆∼pG^\star\sim p, incomplete observations Gobs⪯G⋆G_{\mathrm{obs}}\preceq G^\star, and queries qq, by minimizing

Lp(θ)=Ep[ℓq(Mθ(Gobs,q),Tq(G⋆))].\mathcal{L}_p(\theta)=\mathbb{E}_p[\ell_q(M_\theta(G_{\mathrm{obs}},q),T_q(G^\star))].

Here, the expectation includes observation and query sampling, consistent with the posterior defined above. Categorical cross-entropy for node classification and binary cross-entropy for link prediction both have Mp⋆M_p^\star as their population minimizer. Moreover, restricting this objective to one task leaves its optimal predictions unchanged: tasks merely query different components of the same posterior over graph completions. Thus, assuming sufficient capacity, joint training has no Bayes-level disadvantage over single-task training.

Learning across diverse graphs. Broadening the pretraining prior can improve coverage of target graphs, but may also introduce graph families whose predictions are unsuitable for some targets. Theorem 1 shows that expansion cannot hurt if the observation rules out the added family wherever its predictions would be worse. More generally, it guarantees improvement when the family’s posterior-weighted predictive benefits outweigh its harm.

Consider two graph distributions pp and rr and define pλp_\lambda by sampling from pp with probability (1−λ)(1-\lambda) and from rr otherwise. Further, define βλ,r(Gobs)\beta_{\lambda,r}(G_{\mathrm{obs}}) as the posterior weight of rr, i.e., the probability that the complete graph stems from rr given observation GobsG_{\mathrm{obs}}. Then we can write

Mpλ⋆(Gobs,q)=(1−βλ,r(Gobs))Mp⋆(Gobs,q)+βλ,r(Gobs)Mr⋆(Gobs,q).M_{p_\lambda}^\star(G_{\mathrm{obs}},q)=(1-\beta_{\lambda,r}(G_{\mathrm{obs}}))M_p^\star(G_{\mathrm{obs}},q)+\beta_{\lambda,r}(G_{\mathrm{obs}})M_r^\star(G_{\mathrm{obs}},q).

Thus, the influence of an added family depends on its posterior relevance to each target observation. Let now ν\nu be a target distribution over complete graphs, observations, and queries, and define the risk of a classifier MM as

Rν(M):=Eν[ℓq(M(Gobs,q),Tq(G⋆))].R_\nu(M):=\mathbb{E}_\nu[\ell_q(M(G_{\mathrm{obs}},q),T_q(G^\star))].

Theorem 1. Assume that ℓq\ell_q is convex in its prediction argument, that p(⋅∣Gobs)p(\cdot\mid G_{\mathrm{obs}}) is defined ν\nu-almost surely, and that the risks below are finite. Define the added family’s conditional risk difference relative to the existing predictor as

Δν(Gobs,q):=Eν[ℓq(Mr⋆(Gobs,q),Tq(G⋆))−ℓq(Mp⋆(Gobs,q),Tq(G⋆))∣Gobs,q].\Delta_\nu(G_{\mathrm{obs}},q) := \mathbb{E}_\nu\left[\ell_q\left(M_r^\star(G_{\mathrm{obs}},q),T_q(G^\star)\right)-\ell_q\left(M_p^\star(G_{\mathrm{obs}},q),T_q(G^\star)\right)\mid G_{\mathrm{obs}},q\right].

On observations with zero marginal probability density under rr, set Mr⋆=Mp⋆M_r^\star=M_p^\star. Then

Rν(Mpλ⋆)−Rν(Mp⋆)≤Eν[βλ,r(Gobs)⋅Δν(Gobs,q)].R_\nu(M_{p_\lambda}^\star)-R_\nu(M_p^\star)\leq\mathbb{E}_\nu\left[\beta_{\lambda,r}(G_{\mathrm{obs}})\cdot\Delta_\nu(G_{\mathrm{obs}},q)\right].

Thus, expanding the prior helps when the added graph family receives posterior mass where its predictions are beneficial and cannot hurt where it is ruled out by the observation.

Permutation equivariance. Lastly, we formalize the symmetries of the Bayes-optimal predictor under a relabeling π\pi as introduced in § 3. We write π(q)\pi(q) for the correspondingly relabeled query and πout\pi_{\mathrm{out}} for the induced relabeling of output indices: node indices transform according to πV\pi_V and, for node classification, class indices additionally transform according to πY\pi_Y.

Proposition 2. For any graph prior pp over isomorphism classes, the Bayes-optimal predictor is permutation equivariant:

Mp⋆(π(G),π(q))=πout (Mp⋆(G,q)).M_p^\star(\pi(G),\pi(q))=\pi_{\mathrm{out}\,}\left(M_p^\star(G,q)\right).

Methodology

In this section, we present the WANDER framework. The implementation details for the experiments presented in § 7 are provided in Appendix § 11. An overview is provided in Figure 1. We additionally include a comparison to existing foundation models in Appendix § 12.

Figure 1. Overview of Wander. Each layer combines (1) intra-node attention across feature, label, and structure tokens; (2) in-context attention from each node to context nodes within the same channel; and (3) a stochastic structural update that processes sampled walks and aggregates proposals through a consensus protocol. After LL layers, task-specific readouts map the query node’s label tokens to class probabilities or each candidate node’s structure token to a link probability.

Input and internal representation. Let G=(V,E,R,X,Y)G=(V,E,R,X,Y) and query qq be the input to WANDER. Depending on the prediction task, we define the set of context nodes as

Vcontext={{v∈V∣v=hq or (hq,rq,v)∈E},if q=(hq,rq,?),{v∈V∣Yv≠⊥},if q=Vq.V_{\mathrm{context}}= \begin{cases} \{v\in V\mid v=h_q\text{ or }(h_q,r_q,v)\in E\}, & \text{if }q=(h_q,r_q,?),\\ \{v\in V\mid Y_v\ne\bot\}, & \text{if }q=V_q. \end{cases}

Thus, context nodes correspond to observed positive examples for link prediction and observed labeled examples for node prediction.

Internally, Wander maintains node states v:V×[dX+dY+1]→Rd\mathbf{v}: V \times[d_X + d_Y + 1] \to\mathbb{R}^d and relation states r:R→Rd\mathbf{r}: R \to\mathbb{R}^d. Each node has one token for every feature dimension and label class, together with a single structure token; we refer to these indices collectively as channels. At the beginning of a forward pass, feature and label tokens are initialized from their observed values, structure tokens encode the node’s role relative to the query, and relation types all receive the same learnable initial state. We denote the resulting states by v(0)\mathbf{v}^{(0)} and r(0)\mathbf{r}^{(0)}.

Single layer. Each layer l∈{0,…,L−1}l \in\{0, \ldots, L - 1\} updates these states through three operations.

  • Intra-node update. For each node v∈Vv \in V, an intra-node processor μθ\mu_\theta is applied to the set of tokens v(l)(v,⋅)\mathbf{v}^{(l)}(v, \cdot) corresponding to vv, yielding intermediate updates v(l′)(v,⋅)\mathbf{v}^{(l')}(v, \cdot). This allows feature, label, and structural information associated with the same node to interact.

  • In-context-learning update. For each channel i∈[dX+dY+1]i \in[d_X + d_Y + 1], each token v(l′)(v,i)\mathbf{v}^{(l')}(v, i) attends to the context tokens {v(l′)(u,i)∣u∈Vcontext}\{\mathbf{v}^{(l')}(u, i) \mid u \in V_{\mathrm{context}}\}, yielding intermediate states v(l′′)(v,i)\mathbf{v}^{(l'')}(v, i). This provides the in-context learning mechanism through which observed examples can inform the query representations.

  • Stochastic structural update. Finally, graph structure is incorporated through random walks. This update consists of four steps: First, a random walk algorithm AA produces a set of walks η1,…,ηK\eta_1, \ldots, \eta_K on GG. Next, a recording protocol w:ηj↦{Zj,i∣i∈[dX+dY+1]}w : \eta_j \mapsto\{Z_{j,i} \mid i \in[d_X + d_Y + 1]\} broadcasts each walk to one walk recording per channel ii. Then, a sequence processor νθ:Zj,i↦Zj,i′\nu_\theta: Z_{j,i} \mapsto Z'_{j,i} is applied to each sequence independently. Since the same state may be encountered by several walks, a permutation-invariant consensus protocol aggregates its proposals, yielding updated states v(l+1)(⋅,⋅),r(l+1)(⋅)\mathbf{v}^{(l+1)}(\cdot, \cdot), \mathbf{r}^{(l+1)}(\cdot).

We require the recording protocol ww to be equivariant to permutations of node and relation identities. All channel-wise modules are shared across channels of the same type (feature, label and structure).

Readout. After LL layers, the same representation supports the different prediction tasks. For a node-prediction query q=Vqq = V_q, the label tokens of v∈Vqv \in V_q are passed to a node head, producing class probabilities Mθ(G,q)∈[0,1]Vq×dYM_\theta(G, q) \in[0, 1]^{V_q \times d_Y}. For a link-prediction query q=(hq,rq,?)q = (h_q, r_q, ?), the structure token of each candidate node, together with the state of the query relation rqr_q, is passed to a link head, producing Mθ(G,q)∈[0,1]VM_\theta(G, q) \in[0, 1]^V.

Theoretical analysis of Wander

This section establishes the model’s main theoretical guarantees, namely universality and permutation equivariance. All proofs can be found in Appendix § 13.

Universality. We first formalize universality with respect to a graph prior. We here restrict attention to admissible graph priors, under which the continuous graph attributes admit a continuous mapping within each discrete isomorphism class. A formal definition is given in Appendix § 13. We call a model architecture MM a universal graph prior approximator if for any admissible prior pp over isomorphism classes of Gn,m,b⋆\mathcal{G}_{n,m,b}^{\star} and any ϵ,δ>0\epsilon, \delta> 0, there exists a choice of network parameters θ\theta and a finite sampling budget K∈NK \in\mathbb{N} such that

Pr⁡[∥Mθ,K(G,q)−Mp⋆(G,q)∥<ϵ]>1−δ\Pr\left[\left\|M_{\theta,K}(G,q)-M_p^\star(G,q)\right\|<\epsilon\right]>1-\delta

for all connected observations G∈Gn,m,bG \in\mathcal{G}_{n,m,b} in the support of pp and all valid queries qq.

Theorem 3. Fix n,m,b∈Nn,m,b \in\mathbb{N}. With at least two layers, a walk length of at least nn, a sufficiently uniform random walk sampler, and sufficient hidden dimension and capacity of all modules1, WANDER is a universal graph prior approximator for graph priors over Gn,m,b⋆\mathcal{G}_{n,m,b}^{\star}.

The result concerns the general WANDER framework under the capacity assumptions of Appendix § 13, rather than the finite implementation used in our experiments. For graphs with at most nn nodes, a walk length of nn suffices. The number of sampled walks, however, can be increased arbitrarily at inference time without changing the learned parameters, allowing the sampling budget required by the approximation guarantee. Unlike the results of Kim et al. [29, 30], the required walk length need not scale with the graph’s cover time.

Permutation equivariance. A graph foundation model intended to approximate the Bayes-optimal predictor Mρ∗M_{\rho}^{*} should respect the same symmetries (see Proposition 2) by design. For the stochastic computation of WANDER, we require equivariance in distribution. We call a random-walk algorithm AA permutation invariant if, for every GG, qq, η\eta, and π\pi,

Pr⁡[A(G,q)=η]=Pr⁡[A(π(G),π(q))=π(η)],\Pr[A(G,q)=\eta]=\Pr[A(\pi(G),\pi(q))=\pi(\eta)],

and a stochastic model MθM_{\theta} permutation equivariant in distribution if

Mθ(π(G),π(q))=dπout(Mθ(G,q)).M_{\theta}(\pi(G),\pi(q)) \overset{d}{=} \pi_{\mathrm{out}}(M_{\theta}(G,q)).

Proposition 4. Suppose that the random-walk algorithm AA is permutation invariant and that the intra-node processor μθ\mu_{\theta} is equivariant in distribution with respect to permutations of the feature and label channels. Then every WANDER model is permutation equivariant in distribution with respect to node, relation, feature, and label permutations.

Experiments

We organize our experiments around four main questions.

(Q1) Can a single WANDER model remain competitive with foundation models specialized to individual graph-learning settings?

(Q2) Does joint pretraining across these settings cause interference or enable positive transfer?

(Q3) Can WANDER combine separately learned capabilities during inference?

(Q4) Can WANDER adapt its structural computation at inference time to different graph and task requirements?

Additional experiments on runtime, structural expressivity, finetuning, pretraining priors, and architecture ablations are provided in Appendices § 14.10–§ 14.14.

Generalist performance across graph learning tasks (Q1)

To answer Q1, we train WANDER across a deliberately diverse graph prior, spanning multiple tasks and evaluate on three standard graph-learning regimes represented in our benchmark suite: knowledge-graph link prediction, node classification on simple graphs, and homogeneous link prediction.

Pretraining prior. Following the prior-data fitted network paradigm [44, 24], we construct most of WANDER’s pretraining distribution synthetically. For attributed graphs, we combine two approaches inspired by NodePFN [7] and GraphPFN [13]: NodePFN generates attributes through an SCM before sampling graph structure using stochastic block or Erdős–Rényi models [22, 11], while GraphPFN first samples graph structure and subsequently generates attributes with a graph-aware SCM. We also diversify the structural prior using Watts–Strogatz [62], random geometric [17], and kernel-based graph models [38]. These synthetic graphs provide both node-classification and homogeneous link-prediction episodes. Since realistic synthetic generation of multi-relational graphs is less straightforward, we additionally include FB15k-237 [58], WN18RR [8], and CoDEx Medium [51] for multi-relational link-prediction pretraining. Details and discussion of the pretraining prior are provided in Appendix § 14.§ 1.

Knowledge graph link prediction. We evaluate whether WANDER can match foundation models specialized to knowledge graph reasoning by comparing against ULTRA [16], TRIX [71], and FLOCK [30] in the zero-shot setting. We consider entity prediction, where, given a head entity hh and relation rr, the model ranks candidate tails for the query (h,r,?)(h,r,?). All models are pretrained on the same three knowledge graphs included in WANDER’s pretraining. We evaluate on 54 knowledge graphs spanning diverse domains and three settings: inductive on entities and relations (inductive e,re,r), inductive on entities (inductive ee), and transductive. Note that in our experiment, all three settings are in principle indifferent, as all models encounter unseen relations in the inference graph and align with previous work (Galkin et al., [16]; Kim et al., [30]). We use the filtered ranking protocol (Bordes et al., [3]) and report mean reciprocal rank (MRR) and Hits@10; per-dataset results are given in Table 12. As shown in Table 2, Wander achieves the strongest overall results, with a mean MRR of 0.399 and Hits@10 of 0.565, compared with 0.391 and 0.560 for the strongest specialized baseline Flock.

Inductive (e,re,r) MRRInductive (e,re,r) H@10Inductive (ee) MRRInductive (ee) H@10Transductive MRRTransductive H@10Mean MRRMean H@10Mean rank MRRMean rank H@10
# graphs231813
Ultra0.3450.5130.4310.5660.3120.4580.3660.5183.2503.417
Trix0.3680.5400.4550.5920.3390.5000.3900.5482.6572.750
Flock0.3690.5540.4560.6040.3400.5090.3910.5602.3432.222
Wander0.3780.5580.4600.6090.3530.5160.3990.5651.7501.611

Table 2. Knowledge graph link prediction (MRR and Hits@10).

DatasetUltra MRRUltra H@10Trix MRRTrix H@10Flock MRRFlock H@10Wander MRRWander H@10
FB-250.3880.6400.3930.6500.4040.6640.404<u>0.663</u>
FB-50<u>0.338</u>0.5430.352<u>0.566</u>0.3520.568
FB-750.4030.6040.4010.6110.4180.6220.408<u>0.617</u>
FB-1000.449<u>0.642</u>0.4360.635<u>0.452</u>0.6630.4580.663
WK-250.3160.532<u>0.305</u>0.4960.2800.4910.2880.477
WK-500.1660.3240.166<u>0.313</u>0.1360.278<u>0.147</u>0.289
WK-750.365<u>0.537</u>0.3680.5130.3820.5380.3720.517
WK-1000.1640.286<u>0.188</u>0.2990.187<u>0.304</u>0.1900.309
NL-00.3420.5230.3850.549<u>0.381</u>0.6060.351<u>0.553</u>
NL-250.3950.569<u>0.377</u><u>0.589</u>0.3450.5900.3380.546
NL-500.407<u>0.570</u><u>0.404</u>0.5480.3660.5650.3910.579
NL-750.368<u>0.547</u>0.3510.5250.3110.524<u>0.357</u>0.555
NL-1000.4710.651<u>0.486</u>0.6760.452<u>0.692</u>0.4870.707
MT1 tax0.2240.3050.3580.452<u>0.282</u>0.3830.281<u>0.410</u>
MT1 health0.2980.3740.3760.457<u>0.385</u><u>0.481</u>0.3910.483
MT2 org0.0950.1590.0910.156<u>0.100</u><u>0.163</u>0.1020.167
MT2 sci0.2580.354<u>0.323</u>0.465<u>0.318</u>0.4580.3590.526
MT3 art0.2590.4020.284<u>0.441</u><u>0.301</u>0.4660.3040.466
MT3 infra0.6190.7550.6550.7970.6840.8210.6770.822
MT4 sci0.2740.4490.2900.460<u>0.301</u><u>0.463</u>0.3100.480
MT4 health0.6240.7370.6770.7750.6800.7800.7010.787
Metafam0.2380.6440.3410.815<u>0.476</u><u>0.935</u>0.5040.941
FBNELL0.4850.6520.4730.660<u>0.502</u>0.7000.5260.712
FB-v10.4980.656<u>0.515</u>0.6820.5000.6970.5240.701
FB-v20.5120.7000.5250.730<u>0.535</u>0.7370.5400.742
FB-v30.4910.6540.5010.669<u>0.511</u>0.6850.5140.693
FB-v40.4860.6770.4930.6870.505<u>0.702</u>0.5040.703
WN-v10.6480.7680.6990.7910.6980.8030.6900.807
WN-v20.6630.7650.6780.7810.696<u>0.790</u>0.6870.793
WN-v30.3760.4760.4180.5410.4670.6080.4780.627
WN-v40.6110.7050.6480.7230.653<u>0.729</u>0.6500.731
NL-v1<u>0.785</u>0.9130.806<u>0.898</u>0.6580.8630.6770.878
NL-v20.5260.7070.5690.7680.5880.797<u>0.587</u><u>0.794</u>
NL-v30.5150.7020.5580.743<u>0.590</u><u>0.783</u>0.6100.796
NL-v40.4790.7120.5380.765<u>0.555</u><u>0.786</u>0.5720.795
HM 1k0.0590.0920.0720.128<u>0.069</u><u>0.119</u>0.062<u>0.119</u>
HM 3k0.0370.0770.0690.119<u>0.067</u>0.1180.0690.126
HM 5k0.0340.0710.0620.110<u>0.064</u><u>0.116</u>0.0670.126
HM Indigo0.4400.648<u>0.436</u>0.6450.4230.6380.4160.636
ILPC Small0.3020.4430.3030.455<u>0.309</u>0.4590.3100.459
ILPC Large0.2900.4240.3070.428<u>0.318</u><u>0.438</u>0.3210.440
NELL9950.4060.5430.4720.629<u>0.494</u><u>0.655</u>0.5190.662
NELL23k0.2390.4080.2900.4970.2330.398<u>0.249</u><u>0.413</u>
WDsinger0.3820.4980.5110.609<u>0.410</u>0.5280.4020.521
ConceptNet100k0.0820.1620.1930.345<u>0.248</u><u>0.453</u>0.2580.477
CoDEx Small0.472<u>0.667</u>0.4720.6700.4410.644<u>0.457</u>0.658
CoDEx Large0.338<u>0.469</u>0.335<u>0.469</u><u>0.342</u>0.4640.3450.475
YAGO3100.451<u>0.615</u>0.4090.6270.4140.6740.499<u>0.666</u>
AristoV40.1820.2820.1810.2860.3080.443<u>0.295</u><u>0.424</u>
DBpedia100k0.3980.5760.4260.6030.4500.627<u>0.436</u><u>0.625</u>
Hetionet<u>0.257</u>0.3790.2790.4200.2460.3710.279<u>0.415</u>
FB15k-237(10)0.2480.398<u>0.246</u>0.3930.2460.4020.2480.404
FB15k-237(20)0.2720.4360.2690.430<u>0.273</u><u>0.444</u>0.2770.451
FB15k-237(50)0.3240.5260.3210.521<u>0.319</u>0.5180.3230.523
Mean0.3660.5180.3900.548<u>0.391</u><u>0.560</u>0.3990.565
Mean rank3.2503.4172.6572.750<u>2.343</u><u>2.222</u>1.7501.611

Table 12. Zero-shot knowledge graph link prediction results. Best in each row is bold, second-best is <u>underlined</u>.

Homogeneous link prediction. Next, we evaluate Wander on homogeneous link prediction, where, given a source node, the model ranks all other nodes as candidate link targets. We consider ten datasets from diverse domains (see Appendix § 14.§ 4) and report Recall@20. We compare against three classes of baselines: the classical heuristics Common Neighbors (CN) (Liben-Nowell and Kleinberg, [35]) and Resource Allocation (RA) (Zhou et al., [74]); the end-to-end link-prediction models Buddy (Chamberlain et al., [4]) and NBFNet (Zhu et al., [75]), tuned per dataset; and the graph foundation model AnyGraph (Xia and Huang, [63]).

Two recent foundation models, UniLP (Dong et al., [10]) and TFMLinker (Liao et al., [34]), also target homogeneous link prediction but omit node features and score node pairs individually. In contrast, Wander conditions on a source node and jointly scores all candidate targets. Because pairwise scoring makes full-candidate Recall@20 impractical at this scale, we compare with UniLP separately in Appendix § 14.§ 4.

Table 3 summarizes the results. Wander achieves the highest mean Recall@20 of 43.39%, compared with 38.82% for the strongest end-to-end baseline, NBFNet, and 27.85% for AnyGraph. Thus, Wander remains competitive with dataset-specific models while substantially outperforming the existing foundation-model baseline.

CiteSeerCoraPubMedCSDDIProducts HomeP2P GnutellaEmail EnronProteins Spec1SOC EpinionsMeanMean rank
CN29.8333.3011.0249.093.4556.941.4652.8815.6515.7326.945.00
RA30.2634.9911.1255.634.8563.211.2963.0720.6716.3730.154.10
Buddy44.3240.0325.7248.289.4258.667.1050.1813.6710.7830.824.00
NBFNet34.2145.9822.8862.1716.3468.199.2969.5639.8519.7038.821.90
AnyGraph32.3544.9815.5947.877.6755.045.8040.7515.3613.0627.854.70
Wander65.8856.7831.7364.6212.9871.129.0669.7831.4020.5943.391.30

Table 3. Homogeneous link prediction (Recall@20 %).

Node classification on simple graphs. Finally, to evaluate whether Wander can match models specialized to node classification, we evaluate it in the zero-shot setting on a test set of 26 attributed simple graphs from diverse domains (see Appendix § 14.§ 5 for details). We consider a stronger tuned GCN (Kipf and Welling, [31]) as a supervised baseline, performing a per-dataset grid search over learning rate, layer normalization, dropout, and skip connections. We further compare against the graph foundation models GraphAny (Zhao et al., [72]), NodePFN (Choi et al., [7]), and GraphPFN (Eremeev et al., [13]), as well as the tabular foundation model TabPFNv3 (Grinsztajn et al., [18]). While GraphAny was pretrained on the ogbn-arxiv graph from *NodePFN is omitted from columns containing datasets that exceed its maximum number of supported classes.

Hu et al. [25], all other foundation models were pretrained on synthetic priors. Table 4 summarizes the results, with datasets from the same family grouped into a single column. Overall, Wander closely matches the performance of the strongest node-classification foundation model, GraphPFN, achieving a mean accuracy of 68.20%, surpassing 66.55%.

Web-KBAirportsWiki filt.ActorPlanetoidAmazonWikiCSCit. FullRoman Emp.Amz. Rat.CoauthorHM Cat.Pokec 100kCity Netw.MeanMean rank
# graphs33213212112113
mean # nodes2065731.6k7.6k8.6k10.7k11.7k18.8k22.7k24.5k26.4k46.6k100k180k
GCN51.346.937.433.170.887.979.466.279.651.292.066.478.438.260.643.12
TabPFNv373.332.044.039.067.283.173.859.265.749.190.842.143.247.058.663.69
GraphAny63.040.229.229.174.786.975.464.264.242.591.737.144.018.954.853.96
NodePFN*74.559.144.332.776.285.776.0—48.844.291.7—78.144.6——
GraphPFN73.665.249.538.771.988.279.166.067.848.691.155.283.845.166.552.42
Wander78.564.045.936.475.488.379.369.965.449.092.548.786.153.868.201.73

Table 4. Node classification (test accuracy %, averaged over all available splits).

Transfer through joint training (Q2)

We next investigate whether joint pretraining across tasks causes interference or enables positive transfer. For each task, we train a single-task variant for exactly the number of steps allocated to that task during joint pretraining. This keeps the number of task-specific updates fixed, while the jointly trained model additionally receives updates from the other tasks. As shown in Table 5, knowledge-graph link prediction as well as node classification are essentially unaffected by joint training. For homogeneous link prediction, however, joint training improves Recall@20 from 40.37% to 43.39%. This suggests that joint pretraining does not necessarily trade off task specialization and can instead yield positive transfer across graph-learning settings. The effect is particularly pronounced for homogeneous link prediction, which shares the link-prediction objective with knowledge graphs while operating on the homogeneous attributed graphs also encountered in node classification.

KG LP (MRR)Hom. LP (R@20)NC (Acc.)
Wander0.39943.3968.20
Wander one task0.39840.3767.69

Table 5. Joint vs. single-task training.

Composing separately learned capabilities (Q3)

During pretraining, Wander encounters node features on simple graphs and edge types on knowledge graphs, but never both simultaneously. To test whether it can combine these separately learned capabilities, we augment several knowledge graphs with node features obtained by embedding entity names using MiniLM (Wang et al., [61]). As shown in Table 6, both sources of information improve entity prediction individually, while using them jointly performs best on all three benchmarks. This indicates that Wander can compositionally generalize to attributed, edge-typed graphs, even though this type of graph was never encountered during training.

edge typesfeaturesConcept-Net100kWN-v1-WN-v4WN-18RR
❌❌0.1350.1620.116
❌✓0.2020.2730.163
✓❌0.2580.6260.550
✓✓0.3340.6370.564

Table 6. KG entity prediction (MRR) with vs. without node features and edge types.

Inference-Time Adaptation (Q4)

A distinctive property of Wander is that its structural computation remains adjustable after training: we can vary the number and length of sampled walks, as well as the sampling mechanism, without changing learned parameters. We investigate whether this flexibility enables adaptation to different structural requirements at inference time (Q4).

Adapting the reasoning range. We first consider Grids, a synthetic node-classification task designed to require long-range propagation. It consists of five disconnected 25×2525 \times25 grids, one per class, with only two randomly labeled nodes per grid; test nodes are on average 11 hops from their nearest labeled node. Figure 2 shows the predicted true-class probability when evaluating the same pretrained model with walk lengths 4, 16, and 64. Increasing the walk length progressively propagates information from the labeled context nodes across the graph, raising accuracy from 56.6% at length 4 to 96.6% at length 64. At this setting, Wander also substantially outperforms all GFM baselines as shown in Table 7.

Predicted true-class probability on a single grid for increasing walk lengths and context-aware walk filtering

Figure 2. Predicted true-class probability on single grid taken from Grids for increasing walk lengths and context-aware walk filtering.

GridsReal-world
GraphAny20.034.0
NodePFN26.641.2
GraphPFN23.360.1
Wander96.676.5
Wander (filt.)100.078.3

Table 7. Accuracy on Grids and four real-world graphs without node features.

Inference-time adaptation is not limited to changing the walk budget. As a simple example, we additionally modify the sampling mechanism by retaining only length-64 walks that visit at least one labeled context node. This targeted sampling further increases accuracy on Grids to 100%, illustrating that Wander can adapt not only how much but also which information is collected.

Long-range supervision in real-world graphs. We next test whether the ability to exploit distant supervision extends beyond the synthetic setting. We consider PubMed, Full DBLP, Coauthor CS, and Coauthor Physics, whose training splits provide comparatively sparse label supervision. We remove all node features, leaving graph structure and observed training labels as the only predictive signals. As shown in Table 7, Wander achieves the best performance across the four datasets. This suggests that the long-range reasoning capability highlighted by Grids is also useful on real-world graphs with sparse supervision.

Conclusion

We introduced Wander, a graph foundation model that uses random walks as a shared interface across graph modalities and prediction tasks. By framing graph learning as completion of a partially observed graph, a single pretrained model supports node- and edge-level prediction on homogeneous and multi-relational graphs. Under suitable assumptions, Wander universally approximates the corresponding Bayes-optimal predictor. A single checkpoint achieves state-of-the-art or highly competitive performance across node classification, homogeneous link prediction, and knowledge-graph link prediction. More broadly, our results suggest that graph foundation models need not be organized around a fixed modality or task: a shared interface can support capabilities learned in one setting and reused in another, opening a path toward composing them across settings.

The current pretraining prior remains limited: most attributed graphs are synthetic, and multi-relational pretraining uses only three real-world knowledge graphs. Inference can also be costly, particularly with large random-walk budgets and repeated sampling. Reducing these budgets speeds up prediction without retraining, but may reduce predictive performance. Future work should broaden the prior, particularly toward graphs combining node features and edge types, extend the framework to node regression and graph classification, and develop more efficient, adaptive sampling strategies.

Acknowledgments

AITHYRA is supported by the Austrian Academy of Sciences and the not-for-profit Boehringer Ingelheim Stiftung.

References

Methodology details

We here provide further details on the implementation of WANDER used for our experiments. Note that the statements in § 6 refer to the more general framework described in § 5.

Initialization. At the beginning of each forward pass, all hidden states are initialized independently of the input graph identities. All relation types, including a start relation used at the beginning of random walks, receive the same learnable initial embedding. Structure tokens are initialized with one of three learnable embeddings according to the node’s structural relation to the link-prediction query head, when present: identical, neighboring, or neither. For node classification, where no query head is defined, all nodes receive the neither embedding. Feature tokens are initialized by applying a two-layer MLP to their scalar feature value. Finally, label tokens are initialized with one of three learnable embeddings, corresponding to an observed positive label, an observed negative label, or an unknown label.

Intra-node update. The intra-node module exchanges information between the channels of each node independently. For a node v∈Vv \in V, let

Vv(l):=(v(l)(v,1),…,v(l)(v,dX+dY+1))∈R(dX+dY+1)×d\mathbf{V}_{v}^{(l)} := \left(\mathbf{v}^{(l)}(v,1),\ldots,\mathbf{v}^{(l)}(v,d_X+d_Y+1)\right) \in\mathbb{R}^{(d_X+d_Y+1)\times d}

denote the sequence of its feature, label, and structure tokens. We update this sequence using a pre-normalized residual multi-head attention layer,

Vv(l)′=Vv(l)+MHA⁡RoPE(RMSNorm⁡(Vv(l))),\mathbf{V}_{v}^{(l)\prime} = \mathbf{V}_{v}^{(l)} + \operatorname{MHA}_{\mathrm{RoPE}}\left(\operatorname{RMSNorm}\left(\mathbf{V}_{v}^{(l)}\right)\right),

where the same module is applied independently to every v∈Vv \in V. We use rotary positional embeddings (RoPE) [54] to associate the individual channels with distinct positions and enable the model to distinguish two channels with distributionally similar values. Since fixed positional encodings would break equivariance with respect to permutations of feature and label channels, we uniformly randomize the ordering of feature and label channels in each forward pass and assign RoPE positions only after this permutation. The resulting model therefore remains equivariant in distribution with respect to feature and label permutations. We use RMSNorm [68].

ICL-update. The attention-to-context module instead exchanges information between nodes while keeping channels separate. For each channel i∈[dX+dY+1]i \in[d_X+d_Y+1], let

Vi(l)′:=(v(l)′(v,i))v∈V∈R∣V∣×d\mathbf{V}_{i}^{(l)\prime} := \left(\mathbf{v}^{(l)\prime}(v,i)\right)_{v\in V} \in\mathbb{R}^{|V|\times d}

We independently update each channel using a pre-normalized Transformer block,

V~i(l)=Vi(l)′+MHA⁡∣Vcontext∣(RMSNorm⁡(Vi(l)′)),\widetilde{\mathbf{V}}_{i}^{(l)} = \mathbf{V}_{i}^{(l)\prime} + \operatorname{MHA}_{|V_{\mathrm{context}}|}\left(\operatorname{RMSNorm}\left(\mathbf{V}_{i}^{(l)\prime}\right)\right),

followed by

Vi(l)′′=V~i(l)+FFN⁡(RMSNorm⁡(V~i(l))).\mathbf{V}_{i}^{(l)\prime\prime} = \widetilde{\mathbf{V}}_{i}^{(l)} + \operatorname{FFN}\left(\operatorname{RMSNorm}\left(\widetilde{\mathbf{V}}_{i}^{(l)}\right)\right).

Here, the attention is masked such that every node may attend only to keys and values corresponding to nodes in VcontextV_{\mathrm{context}}, while queries are computed for all nodes. We use separate attention modules for the three channel types (structural, feature, and label) while sharing the respective module across all channels of the same type. The feed-forward network (FFN) is implemented as a SwiGLU [52] block.

We next describe the random walk algorithm and then how we sample walks during training. Sampling during inference is explained in Appendix § 14.

Random walk algorithm. Let v0∈Vv_0 \in V be a starting node given as input to the random walk algorithm. The algorithm constructs a walk η=(v0,r1α1,v1,…,rSαS,vS)\eta= (v_0, r_1^{\alpha_1}, v_1, \ldots, r_S^{\alpha_S}, v_S) iteratively. At step j≥1j \ge1, given the current node vj−1v_{j-1}, we define its set of neighbors as

N(vj−1):={u∈V∣∃r∈R:(vj−1,r,u)∈E∨(u,r,vj−1)∈E}.N(v_{j-1}) := \{u \in V \mid\exists r \in R : (v_{j-1},r,u) \in E \lor(u,r,v_{j-1}) \in E\}.

Note that we include incoming neighbors in this definition. To avoid immediate backtracking whenever possible, we define the set of admissible next nodes as

Nj:={N(v0),if j=1,N(vj−1)∖{vj−2},if j>1 and N(vj−1)∖{vj−2}≠∅,N(vj−1),if j>1 and N(vj−1)={vj−2}.(1)N_j := \begin{cases} N(v_0), & \text{if } j = 1,\\ N(v_{j-1}) \setminus\{v_{j-2}\}, & \text{if } j > 1 \text{ and } N(v_{j-1}) \setminus\{v_{j-2}\} \ne\varnothing,\\ N(v_{j-1}), & \text{if } j > 1 \text{ and } N(v_{j-1}) = \{v_{j-2}\}. \end{cases} \tag*{(1)}

We first sample the next node uniformly, vj∼Unif⁡(Nj)v_j \sim\operatorname{Unif}(N_j). Given vjv_j, let

R(vj−1,vj):={(r,1)∣(vj−1,r,vj)∈E}∪{(r,−1)∣(vj,r,vj−1)∈E}R(v_{j-1},v_j) := \{(r,1) \mid(v_{j-1},r,v_j) \in E\} \cup\{(r,-1) \mid(v_j,r,v_{j-1}) \in E\}

denote the set of relation–direction pairs connecting vj−1v_{j-1} to vjv_j. We then sample (rj,αj)∼Unif⁡(R(vj−1,vj))(r_j,\alpha_j) \sim\operatorname{Unif}(R(v_{j-1},v_j)). Thus, neighboring nodes are sampled independently of the number of relation types connecting them, and immediate backtracking occurs only if the previously visited node is the only available neighbor.

Choice of random walks. Let KbaseK_{\mathrm{base}} denote the base walk budget, which may depend on the input graph (see Appendix § 14.§ 2). For each structural update, we sample 3Kbase3K_{\mathrm{base}} walks, with their starting locations chosen according to the prediction task.

For a link-prediction query q=(hq,rq,?)q = (h_q,r_q,?), we follow Kim et al. [30] and divide the walks into three equally sized groups. The first KbaseK_{\mathrm{base}} walks start at the query head hqh_q, providing structural context local to the query. For the next KbaseK_{\mathrm{base}} walks, we first sample a relation s∼Unif⁡(R)s \sim\operatorname{Unif}(R) and then an edge (v,s,u)(v,s,u) uniformly among the observed edges of type ss; this edge forms the first step of the walk, after which the usual random-walk transition rule is applied. Sampling the relation before the edge prevents frequent relation types from dominating the walk budget and ensures coverage of broad relations. The remaining KbaseK_{\mathrm{base}} walks start from nodes sampled uniformly from VV, providing broader, query-independent coverage of the graph.

For node prediction query VqV_q, we likewise sample 3Kbase3K_{\mathrm{base}} walks. We start ⌈3Kbase/2⌉\lceil3K_{\mathrm{base}}/2 \rceil walks from nodes sampled uniformly from VqV_q and the remaining ⌊3Kbase/2⌋\lfloor3K_{\mathrm{base}}/2 \rfloor from nodes sampled uniformly from VcontextV_{\mathrm{context}}.

Recording protocol. Let η=(v0,r1α1,v1,…,rSαS,vS)\eta= (v_0, r_1^{\alpha_1}, v_1, \ldots, r_S^{\alpha_S}, v_S) be a sampled walk, and let V(η)⊆VV(\eta) \subseteq V and R(η)⊆RR(\eta) \subseteq R denote the sets of nodes and relation types occurring in η\eta, respectively. We define bijections

anon⁡η,V:V(η)→[∣V(η)∣],anon⁡η,R:R(η)→[∣R(η)∣],\operatorname{anon}_{\eta,V}: V(\eta) \to[|V(\eta)|], \qquad\operatorname{anon}_{\eta,R}: R(\eta) \to[|R(\eta)|],

which assign identifiers according to the order of first appearance in η\eta. For each walk position, we first construct a shared walk embedding that is independent of the channel. At layer ll, the shared embedding associated with node vv, incoming relation r∈R∪{start}r \in R \cup\{\mathrm{start}\}, direction α\alpha and query qq is

step⁡η(l)(v,rα,q)=enode(l)(anon⁡η,V(v))+erel(l)(anon⁡η,R(r))+edir(l)(α)+equeryhead(l)(1hq=v)+equeryrel(l)(1rq=r)+Wrel(l)r(l)(r).(2)\operatorname{step}_{\eta}^{(l)}(v,r^\alpha,q) = e_{\mathrm{node}}^{(l)}(\operatorname{anon}_{\eta,V}(v)) + e_{\mathrm{rel}}^{(l)}(\operatorname{anon}_{\eta,R}(r)) + e_{\mathrm{dir}}^{(l)}(\alpha) + e_{\mathrm{queryhead}}^{(l)}(\mathbf{1}_{h_q=v}) + e_{\mathrm{queryrel}}^{(l)}(\mathbf{1}_{r_q=r}) + W_{\mathrm{rel}}^{(l)}\mathbf{r}^{(l)}(r). \tag*{(2)}

where the query indicators are set to zero whenever the corresponding query component is not defined (i.e., for a label prediction query Vq⊂VV_q \subset V). For the relation start we set direction α=1\alpha= 1. The embedding tables e∗(l)e_*^{(l)} and projection Wrel(l)W_{\mathrm{rel}}^{(l)} are layer-specific.

For each channel i∈[dx+dy+1]i \in[d_x+d_y+1], we combine this shared walk embedding with the current hidden state of the corresponding node–channel pair:

zη,v,r,α,i(l)=Win,τ(i)(l)v(l)(v,i)+gτ(i)(l)step⁡η(l)(v,rα,q),z_{\eta,v,r,\alpha,i}^{(l)} = W_{\mathrm{in},\tau(i)}^{(l)} \mathbf{v}^{(l)}(v,i) + g_{\tau(i)}^{(l)} \operatorname{step}_{\eta}^{(l)}(v,r^\alpha,q),

where τ(i)∈{feature,label,structure}\tau(i) \in\{\text{feature},\text{label},\text{structure}\} denotes the channel type. Both Win,τ(i)(l)W_{\mathrm{in},\tau(i)}^{(l)} and the learnable scalar gate Gτ(i)(l)\mathcal{G}_{\tau(i)}^{(l)} are layer- and channel-type-specific, but shared across all channels of the same type.

For each walk η\eta and channel ii, the position embeddings are stacked in walk order to obtain

Zη,i(l)=(Zη,v0,start,i(l),Zη,v1,r1,α1,i(l),…,Zη,vS,rS,αS,i(l))Z_{\eta,i}^{(l)} = \left(Z_{\eta,v_0,\mathrm{start},i}^{(l)}, Z_{\eta,v_1,r_1,\alpha_1,i}^{(l)}, \ldots, Z_{\eta,v_S,r_S,\alpha_S,i}^{(l)}\right)

Nodes and relation types may occur multiple times in this sequence whenever they are revisited by the walk.

Sequence processor. Each sequence is then processed by a bidirectional GRU ([6]) followed by a SwiGLU feed-forward network, both with pre-normalization and residual connections:

Z~η,i(l)=Zη,i(l)+WGRU(l)BiGRU⁡(l)(RMSNorm⁡(Zη,i(l))),\widetilde{Z}_{\eta,i}^{(l)} = Z_{\eta,i}^{(l)} + W_{\mathrm{GRU}}^{(l)} \operatorname{BiGRU}^{(l)}\left(\operatorname{RMSNorm}\left(Z_{\eta,i}^{(l)}\right)\right),
Zη,i(l)′=Z~η,i(l)+FFN⁡(l)(RMSNorm⁡(Z~η,i(l))).Z_{\eta,i}^{(l)\prime} = \widetilde{Z}_{\eta,i}^{(l)} + \operatorname{FFN}^{(l)}\left(\operatorname{RMSNorm}\left(\widetilde{Z}_{\eta,i}^{(l)}\right)\right).

We use separate modules for the three channel types (structural, feature, and label) while sharing the respective module across all channels of the same type. Finally, linear output projections are applied independently at every sequence position. Let z′∈Rdz' \in\mathbb{R}^{d} denote the processed representation at a position associated with node vv and channel ii. For every channel type, we produce a multi-head node–channel update proposal and confidence vector,

Δv,i=reshape⁡dH×H(WΔ,τ(i)(l)z′),av,i=Wa,τ(i)(l)z′,\Delta_{v,i} = \operatorname{reshape}_{d_H \times H}\left(W_{\Delta,\tau(i)}^{(l)}z'\right), \qquad a_{v,i} = W_{a,\tau(i)}^{(l)}z',

where dH⋅H=dd_H \cdot H = d, such that Δv,i∈RdH×H\Delta_{v,i} \in\mathbb{R}^{d_H \times H} and av,i∈RHa_{v,i} \in\mathbb{R}^{H}. The output projections are layer- and channel-type-specific and are shared across channels of the same type.

For the structure channel i=dX+dY+1i = d_X + d_Y + 1, the same processed position additionally proposes an update to its incoming relation r∈R∪{start}r \in R \cup\{\mathrm{start}\}:

Δr=reshape⁡dH×H(WΔ,rel(l)z′),ar=Wa,rel(l)z′.(3)\Delta_r = \operatorname{reshape}_{d_H \times H}\left(W_{\Delta,\mathrm{rel}}^{(l)}z'\right), \qquad a_r = W_{a,\mathrm{rel}}^{(l)}z'. \tag*{(3)}

Thus, every position proposes an update to its corresponding node–channel state, while structure-channel positions additionally propose an update to the hidden state of their incoming relation type. Since nodes and relation types may occur repeatedly within and across sampled walks, each hidden state can receive multiple proposals.

Consensus protocol. The sequence processor yields for all pairs (v,i)∈V×[dX+dY+1](v,i) \in V \times[d_X + d_Y + 1] as well as relation types r∈R∪{start}r \in R \cup\{\mathrm{start}\} a (possibly empty) set P={(Δ(m),a(m))}m=1M\mathcal{P} = \{(\Delta^{(m)},a^{(m)})\}_{m=1}^{M}, with Δ(m)=(Δ(m,1),…,Δ(m,H))\Delta^{(m)} = (\Delta^{(m,1)},\ldots,\Delta^{(m,H)}) and a(m)=(a(m,1),…,a(m,H))a^{(m)} = (a^{(m,1)},\ldots,a^{(m,H)}), of update proposals and confidence scores. The consensus protocol then forms a multi-head softmax-normalized weighted average over each set of update proposals to decide on the final update:

c(P):=∥h=1H∑m′=1Mexp⁡(a(m′,h))∑m=1Mexp⁡(a(m,h))Δ(m′,h),c(\mathcal{P}) := \mathbin{\|}_{h=1}^{H} \sum_{m'=1}^{M} \frac{\exp(a^{(m',h)})}{\sum_{m=1}^{M}\exp(a^{(m,h)})}\Delta^{(m',h)},

where ∥\mathbin{\|} denotes concatenation. For P=∅\mathcal{P} = \varnothing, we set c(P)=0c(\mathcal{P}) = \mathbf{0}. Finally, hidden states are updated in a residual way, i.e., v(l+1)(v,i)=v(l)(v,i)+c(Pv,i)v^{(l+1)}(v,i) = v^{(l)}(v,i) + c(\mathcal{P}_{v,i}) and r(l+1)(r)=r(l)(r)+c(Pr)r^{(l+1)}(r) = r^{(l)}(r) + c(\mathcal{P}_r) for all v∈Vv \in V, i∈[dX+dY+1]i \in[d_X + d_Y + 1] and r∈R∪{start}r \in R \cup\{\mathrm{start}\}.

Readout. For node classification, we apply a shared two-layer MLP out⁡node:Rd→R\operatorname{out}_{\mathrm{node}} : \mathbb{R}^{d} \to\mathbb{R} independently to each final label token. Specifically, for a query node vv and class c∈[dY]c \in[d_Y], we obtain the class logit

ℓv,c=out⁡node(v(L)(v,dX+c)).\ell_{v,c} = \operatorname{out}_{\mathrm{node}}\left(v^{(L)}(v,d_X+c)\right).

A softmax over the dYd_Y class logits yields the corresponding class probabilities.

For link prediction with query q=(hq,rq,?)q=(h_q,r_q,?), we score every candidate tail t∈Vt \in V using its final structure token together with the final state of the query relation. A shared two-layer MLP outlink⁡:Rd→R\operatorname{outlink}:\mathbb{R}^{d}\to\mathbb{R} produces

ℓhq,rq,t=outlink⁡(v(L)(t,dX+dY+1)+r(L)(rq)).\ell_{h_q,r_q,t}=\operatorname{outlink}\left(\mathbf{v}^{(L)}(t,d_X+d_Y+1)+\mathbf{r}^{(L)}(r_q)\right).

We convert this logit into a link probability pθ(hq,rq,t)=σ(ℓhq,rq,t)p_\theta(h_q,r_q,t)=\sigma(\ell_{h_q,r_q,t}).

Loss. For node-classification training steps, we minimize the cross-entropy loss over the predicted class logits of all query nodes VqV_q. The loss is

LNC=−1∣Vq∣∑v∈Vqlog⁡exp⁡(ℓv,Yv)∑c=1dYexp⁡(ℓv,c).\mathcal{L}_{\mathrm{NC}}=-\frac{1}{\lvert V_q\rvert}\sum_{v\in V_q}\log\frac{\exp(\ell_{v,Y_v})}{\sum_{c=1}^{d_Y}\exp(\ell_{v,c})}.

For link-prediction steps, each positive triple (h,r,t)(h,r,t) is paired with kk negative tails t1−,…,tk−t_1^{-},\ldots,t_k^{-}. Following Kim et al. [30], we use self-adversarial negative weighting, which assigns larger weight to negative candidates receiving larger model scores. Writing τadv>0\tau_{\mathrm{adv}}>0 for the adversarial temperature, we define

wiadv=exp⁡(ℓh,r,ti−/τadv)∑j=1kexp⁡(ℓh,r,tj−/τadv).w_i^{\mathrm{adv}}=\frac{\exp(\ell_{h,r,t_i^-}/\tau_{\mathrm{adv}})}{\sum_{j=1}^{k}\exp(\ell_{h,r,t_j^-}/\tau_{\mathrm{adv}})}.

The resulting binary cross-entropy loss is

LLP=−log⁡pθ(h,r,t)−∑i=1kwiadvlog⁡(1−pθ(h,r,ti−)).\mathcal{L}_{\mathrm{LP}}=-\log p_\theta(h,r,t)-\sum_{i=1}^{k}w_i^{\mathrm{adv}}\log\left(1-p_\theta(h,r,t_i^-)\right).

The losses are averaged over all link-prediction queries in the batch. Note that, due to the self-adversarial weighting used for link prediction, the practical objective no longer has Mp⋆M_p^\star exactly as its population minimizer.

Comparison to related (graph) foundation models

While the framework stated in § 5 is stated more generally, in our implementation we instantiate the intra-node processor with self-attention and the ICL update with masked attention (see Appendix § 11). The resulting first two updates therefore follow the two-dimensional attention pattern common to recent tabular foundation models, alternating interactions within samples and across samples ([23]).

In the node-classification setting, this also yields an architectural connection to GraphPFN ([13]). Both architectures combine within-node feature processing and in-context information exchange with a graph-structural update. However, GraphPFN incorporates structure through adjacency-masked attention over neighbors, whereas Wander uses sampled random walks and a shared sequence processor as its structural interface. This distinction provides two notable advantages. First, random walks allow Wander to capture structural information beyond the expressive scope of standard message-passing architectures, as formalized in Theorem 3 and empirically investigated in Section D.11. Second, the amount of structural information available to the model can be adjusted at inference time by varying the number and length of sampled walks, without modifying the learned parameters.

In the setting of knowledge graph link prediction, Wander is instead closely related to the knowledge graph foundation model Flock ([30]). While Flock likewise uses random walks as its primary structural inductive bias, it does not include an explicit in-context update that allows query representations to attend to context nodes.

Theoretical analysis

In this section, we provide proofs of the statements from § 4 and § 6.

Bayes-Optimal Predictor

We start by proving Theorem 1.

Proof of Theorem 1. For an observed graph GobsG_{\mathrm{obs}}, let Zp(Gobs)Z_p(G_{\mathrm{obs}}) and Zr(Gobs)Z_r(G_{\mathrm{obs}}) denote its marginal likelihood (probability mass or density) under pp and rr, respectively. For pλ=(1−λ)p+λrp_\lambda=(1-\lambda)p+\lambda r, its marginal likelihood is

Zpλ(Gobs)=(1−λ)Zp(Gobs)+λZr(Gobs).Z_{p_\lambda}(G_{\mathrm{obs}})=(1-\lambda)Z_p(G_{\mathrm{obs}})+\lambda Z_r(G_{\mathrm{obs}}).

Hence, whenever Zp(Gobs)>0Z_p(G_{\mathrm{obs}})>0, the posterior under the mixture prior can be written as

pλ(H∣Gobs)=(1−βλ,r(Gobs))p(H∣Gobs)+βλ,r(Gobs)r(H∣Gobs),p_\lambda(H\mid G_{\mathrm{obs}})=\left(1-\beta_{\lambda,r}(G_{\mathrm{obs}})\right)p(H\mid G_{\mathrm{obs}})+\beta_{\lambda,r}(G_{\mathrm{obs}})r(H\mid G_{\mathrm{obs}}),

where

βλ,r(Gobs)=λZr(Gobs)(1−λ)Zp(Gobs)+λZr(Gobs).\beta_{\lambda,r}(G_{\mathrm{obs}})=\frac{\lambda Z_r(G_{\mathrm{obs}})}{(1-\lambda)Z_p(G_{\mathrm{obs}})+\lambda Z_r(G_{\mathrm{obs}})}.

If Zr(Gobs)=0Z_r(G_{\mathrm{obs}})=0, then βλ,r(Gobs)=0\beta_{\lambda,r}(G_{\mathrm{obs}})=0, and by convention Mr⋆=Mp⋆M_r^\star=M_p^\star on such observations. Taking the posterior expectation of the query target therefore gives

Mpλ⋆(Gobs,q)=(1−βλ,r(Gobs))Mp⋆(Gobs,q)+βλ,r(Gobs)Mr⋆(Gobs,q).M_{p_\lambda}^\star(G_{\mathrm{obs}},q)=\left(1-\beta_{\lambda,r}(G_{\mathrm{obs}})\right)M_p^\star(G_{\mathrm{obs}},q)+\beta_{\lambda,r}(G_{\mathrm{obs}})M_r^\star(G_{\mathrm{obs}},q).

For brevity, write

β:=βλ,r(Gobs),Mp:=Mp⋆(Gobs,q),Mr:=Mr⋆(Gobs,q),\beta:=\beta_{\lambda,r}(G_{\mathrm{obs}}),\qquad M_p:=M_p^\star(G_{\mathrm{obs}},q),\qquad M_r:=M_r^\star(G_{\mathrm{obs}},q),

and T:=Tq(G⋆)T:=T_q(G^\star). By convexity of ℓq\ell_q in its prediction argument,

ℓq((1−β)Mp+βMr,T)≤(1−β)ℓq(Mp,T)+βℓq(Mr,T).\ell_q((1-\beta)M_p+\beta M_r,T)\leq(1-\beta)\ell_q(M_p,T)+\beta\ell_q(M_r,T).

Subtracting ℓq(Mp,T)\ell_q(M_p,T) and taking expectation under ν\nu yields

Rν(Mpλ⋆)−Rν(Mp⋆)≤Eν[βλ,r(Gobs)(ℓq(Mr⋆(Gobs,q),Tq(G⋆))−ℓq(Mp⋆(Gobs,q),Tq(G⋆)))]=Eν[βλ,r(Gobs)Eν[ℓq(Mr⋆(Gobs,q),Tq(G⋆))−ℓq(Mp⋆(Gobs,q),Tq(G⋆))∣Gobs,q]]=Eν[βλ,r(Gobs)Δν(Gobs,q)].\begin{aligned} R_\nu(M_{p_\lambda}^\star)-R_\nu(M_p^\star)\leq\mathbb{E}_\nu\left[\beta_{\lambda,r}(G_{\mathrm{obs}})\left(\ell_q(M_r^\star(G_{\mathrm{obs}},q),T_q(G^\star))-\ell_q(M_p^\star(G_{\mathrm{obs}},q),T_q(G^\star))\right)\right] \\ &=\mathbb{E}_\nu\left[\beta_{\lambda,r}(G_{\mathrm{obs}})\mathbb{E}_\nu\left[\left.\ell_q(M_r^\star(G_{\mathrm{obs}},q),T_q(G^\star))-\ell_q(M_p^\star(G_{\mathrm{obs}},q),T_q(G^\star))\right|G_{\mathrm{obs}},q\right]\right] \\ &=\mathbb{E}_\nu\left[\beta_{\lambda,r}(G_{\mathrm{obs}})\Delta_\nu(G_{\mathrm{obs}},q)\right]. \end{aligned}

where the second equality uses that βλ,r(Gobs)\beta_{\lambda,r}(G_{\mathrm{obs}}) depends only on the observation. The support assumption on pp ensures that the above quantities are defined ν\nu-almost surely, which proves the claim.

The bound makes explicit that an added graph family matters only to the extent that it receives posterior weight on the target observation. In particular, adding rr cannot increase the target risk if Δν(Gobs,q)>0\Delta_\nu(G_{\mathrm{obs}},q)>0 only on observations for which βλ,r(Gobs)=0\beta_{\lambda,r}(G_{\mathrm{obs}})=0. More generally, beneficial and harmful contributions are weighted by the posterior relevance of the added family.

Proof of Proposition 2. Let π=(πV,πR,πX,πY)\pi=(\pi_V,\pi_R,\pi_X,\pi_Y). Since pp is a distribution over isomorphism classes, p(π(H))=p(H)p(\pi(H))=p(H) for every HH. Moreover,

G⪯H⟺π(G)⪯π(H),G\preceq H\quad\Longleftrightarrow\quad\pi(G)\preceq\pi(H),

so H↦π(H)H\mapsto\pi(H) gives a bijection between the completions of GG and those of π(G)\pi(G). Hence

p(π(H)∣π(G))=p(H∣G).p(\pi(H)\mid\pi(G))=p(H\mid G).

By definition of the query targets,

Tπ(q)(π(H))=πout(Tq(H)).T_{\pi(q)}(\pi(H))=\pi_{\mathrm{out}}(T_q(H)).

Therefore,

Mp⋆(π(G),π(q))=EH∼p(⋅∣π(G))[Tπ(q)(H)]=EH∼p(⋅∣G)[Tπ(q)(π(H))]=πoutEH∼p(⋅∣G)[Tq(H)]=πout(Mp⋆(G,q)),\begin{aligned} M_p^\star(\pi(G),\pi(q))=\mathbb{E}_{H\sim p(\cdot\mid\pi(G))}[T_{\pi(q)}(H)] \\ &=\mathbb{E}_{H\sim p(\cdot\mid G)}[T_{\pi(q)}(\pi(H))] \\ &=\pi_{\mathrm{out}}\mathbb{E}_{H\sim p(\cdot\mid G)}[T_q(H)] \\ &=\pi_{\mathrm{out}}\left(M_p^\star(G,q)\right), \end{aligned}

which proves the claim.

Universality

Before we can prove Theorem 3, we need to formalize the notion of admissible priors.

Admissible graph prior. Let pp be a probability distribution over the isomorphism classes of Gn,m,b⋆\mathcal{G}_{n,m,b}^{\star}. For every isomorphism class GG, we separate its discrete attributes from its continuous attributes. Denote by κG\kappa_G its discrete isomorphism class, which fixes the graph structure, relation types, feature dimension, and all discrete-valued attributes, and by

zG∈ZκG⊆RdκGz_G \in\mathcal{Z}_{\kappa_G} \subseteq\mathbb{R}^{d_{\kappa_G}}

its continuous attributes. We can then write the prior as

p(G)=p(κG)pκG(zG),pκG(zG):=p(zG∣κG).p(G) = p(\kappa_G) p_{\kappa_G}(z_G), \qquad p_{\kappa_G}(z_G) := p(z_G \mid\kappa_G).

We call pp an admissible graph prior if, for every discrete isomorphism class κ\kappa with p(κ)>0p(\kappa) > 0, the domain Zκ\mathcal{Z}_{\kappa} is a compact product domain and pκp_{\kappa} admits a continuous and strictly positive density on Zκ\mathcal{Z}_{\kappa}. Moreover, for each fixed discrete observed graph-query class κˉ\bar{\kappa}, all compatible positive-mass completions share the same observed-attribute domain: after partitioning z=(x,u)z = (x,u) into observed and unobserved attributes,

Zκ=Xκˉ×Uκ,κˉ.\mathcal{Z}_{\kappa} = \mathcal{X}_{\bar{\kappa}} \times\mathcal{U}_{\kappa,\bar{\kappa}}.

Throughout, we fix an observation mechanism that reveals a subset of attributes, with selection probabilities depending only on the discrete completion, not on the continuous attributes.

Continuous Bayes-optimal predictors. We now show that the Bayes-optimal predictor introduced in § 3 is well-behaved under admissible priors. This is required later to show that it can be approximated.

Lemma 5. Let pp be an admissible graph prior. Then, within every fixed discrete isomorphism class of observed graph-query pairs, the Bayes-optimal predictor

Mp⋆(Gobs,q)=EG⋆∼p(⋅∣Gobs)[Tq(G⋆)]M_p^{\star}(G_{\mathrm{obs}},q) = \mathbb{E}_{G^{\star} \sim p(\cdot\mid G_{\mathrm{obs}})}[T_q(G^{\star})]

is continuous in the continuous attributes observed in GobsG_{\mathrm{obs}} for link prediction and node classification.

Proof. Fix a discrete observed graph-query class κˉ\bar{\kappa} and write x∈Xκˉx \in\mathcal{X}_{\bar{\kappa}} for its observed continuous attributes. Let K\mathcal{K} be the finite, nonempty set of positive-mass discrete completions that can produce this observation. For each κ∈K\kappa\in\mathcal{K}, define

pκ,X(x):=∫Uκ,κˉpκ(x,u) du.p_{\kappa,X}(x) := \int_{\mathcal{U}_{\kappa,\bar{\kappa}}} p_{\kappa}(x,u)\,du.

Continuity on the compact product domain implies that pκ,Xp_{\kappa,X} is continuous on the common domain Xκˉ\mathcal{X}_{\bar{\kappa}}. Strict positivity of pκp_{\kappa} implies pκ,X(x)>0p_{\kappa,X}(x) > 0 there.

Let aκ>0a_{\kappa} > 0 denote p(κ)p(\kappa) multiplied by the probability of the fixed discrete observation given κ\kappa. For link prediction and node classification, each target coordinate is determined by the discrete completion; denote its value by cκ,j∈{0,1}c_{\kappa,j} \in\{0,1\}. Bayes’ rule gives

Mp,j⋆(x,q)=∑κ∈Kaκcκ,jpκ,X(x)∑κ∈Kaκpκ,X(x).M_{p,j}^{\star}(x,q) = \frac{\sum_{\kappa\in\mathcal{K}} a_{\kappa} c_{\kappa,j} p_{\kappa,X}(x)}{\sum_{\kappa\in\mathcal{K}} a_{\kappa} p_{\kappa,X}(x)}.

The numerator and denominator are finite sums of continuous functions on Xκˉ\mathcal{X}_{\bar{\kappa}}, and the denominator is strictly positive there. Hence every output coordinate is continuous. □

Proof of Theorem 3. We are now able to prove Theorem 3 from § 6, here stated in a more detailed form. Note that we prove universality of the WANDER framework under the assumptions below. This does not necessarily correspond to the implementation details given in Appendix § 11.

Theorem 3. Fix n,m,b∈Nn,m,b \in\mathbb{N}. Assume a WANDER configuration with at least two layers, a walk length SS of at least nn, and which fulfills the following assumptions on the random walk sampler and model capacity:

(A1) each v∈Vv \in V and each r∈Rr \in R has positive probability of being chosen as the starting node or the first traversed relation type of a walk, respectively, every non-backtracking walk of length at most SS has positive probability of occurring as a prefix of a sampled walk and all walks are sampled independently and have probabilities bounded away from zero by constants depending only on nn and mm;

(A2) after the intra-node update, every node token can retain an injective encoding of the complete collection of tokens of that node;

(A3) at every sequence position, the sequence processor can retain an injective encoding of the complete recorded walk together with the distinguished position;

(A4) the consensus protocol can retain an injective encoding of the multiset of update proposals associated with a hidden state, while preserving its previous state; and

(A5) the output head is a universal approximator of continuous functions on compact domains.

Then Wander is a universal graph prior approximator for graph priors over Gn,m,b⋆G^\star_{n,m,b}.

Note that the context-attention module may be chosen as the identity and plays no role in this argument.

We start with a simple observation, which will help us in proving that with high probability, random walks break all symmetries.

Lemma 6 (Random counts break finite symmetries). Let UU be a finite set and let X1,…,XKX_1,\ldots,X_K be i.i.d. samples from a distribution pp satisfying p(u)>0p(u)>0 for every u∈Uu \in U. For u∈Uu \in U, define

Cu(K):=∑j=1K1{Xj=u}.C_u^{(K)} := \sum_{j=1}^{K} \mathbf{1}_{\{X_j=u\}}.

Then

Pr⁡[Cu(K)≠Cu′(K) for all distinct u,u′∈U]⟶1as K→∞.\Pr\left[C_u^{(K)} \ne C_{u'}^{(K)}\ \text{for all distinct }u,u' \in U\right] \longrightarrow1 \quad\text{as } K \to\infty.

Proof. Fix distinct u,u′∈Uu,u' \in U.

First suppose p(u)≠p(u′)p(u) \ne p(u'). By the strong law of large numbers,

Cu(K)−Cu′(K)K⟶p(u)−p(u′)≠0almost surely.\frac{C_u^{(K)}-C_{u'}^{(K)}}{K} \longrightarrow p(u)-p(u') \ne0 \quad\text{almost surely}.

Hence Pr⁡[Cu(K)=Cu′(K)]→0\Pr[C_u^{(K)}=C_{u'}^{(K)}]\to0. Now suppose p(u)=p(u′)=β>0p(u)=p(u')=\beta>0. Let MK:=Cu(K)+Cu′(K)M_K:=C_u^{(K)}+C_{u'}^{(K)}. Then MK∼Bin⁡(K,2β)M_K\sim\operatorname{Bin}(K,2\beta) and, conditional on MK=ℓM_K=\ell, Cu(K)∼Bin⁡(ℓ,1/2)C_u^{(K)}\sim\operatorname{Bin}(\ell,1/2). Consequently,

Pr⁡[Cu(K)=Cu′(K)∣MK=ℓ]≤(ℓ⌊ℓ/2⌋)2−ℓ=O(ℓ−1/2).\Pr\left[C_u^{(K)}=C_{u'}^{(K)}\mid M_K=\ell\right]\le\binom{\ell}{\lfloor\ell/2\rfloor}2^{-\ell}=O(\ell^{-1/2}).

Since MK→∞M_K\to\infty in probability, it follows that Pr⁡[Cu(K)=Cu′(K)]→0\Pr[C_u^{(K)}=C_{u'}^{(K)}]\to0. Since UU is finite, a union bound over all unordered pairs {u,u′}⊆U\{u,u'\}\subseteq U gives the claim. □

Now we first show that with sufficiently many walks, all nodes and relation types are uniquely identifiable after a single layer.

Lemma 7 (First-layer node and relation identifiers). Under assumptions (A1)–(A4), for every n,m∈Nn,m \in\mathbb{N} and every δ>0\delta>0, there exists a finite number K1=K1(n,m,δ)K_1=K_1(n,m,\delta) of first-layer walks such that, with probability at least 1−δ1-\delta, after the first structural update:

  1. every node v∈Vv \in V contains a unique identifier ιV(v)\iota_V(v),

  1. every relation type r∈Rr \in R contains a unique identifier ιR(r)\iota_R(r), and

  1. the original observed node attributes and labels are preserved.

Proof. For each node v∈Vv \in V, let

Cv:=#{j∈[K1]:ηj starts at v},C_v := \#\{j \in[K_1] : \eta_j\text{ starts at }v\},

and for every relation type r∈Rr \in R, let

Dr:=#{j∈[K1]:r is the first relation traversed by ηj}.D_r := \#\{j \in[K_1] : r\text{ is the first relation traversed by }\eta_j\}.

By assumption (A1), the starting node of a sampled walk follows a categorical distribution assigning strictly positive probability to every v∈Vv \in V. Similarly, the first traversed relation follows a categorical distribution assigning strictly positive probability to every r∈Rr \in R. Lemma 6 therefore implies

Pr⁡[Cv≠Cv′ for all v≠v′]⟶1\Pr[C_v \ne C_{v'}\text{ for all }v \ne v'] \longrightarrow1

and

Pr⁡[Dr≠Dr′ for all r≠r′]⟶1\Pr[D_r \ne D_{r'}\text{ for all }r \ne r'] \longrightarrow1

as K1→∞K_1 \to\infty.

The beginning of a walk is explicitly distinguished by the start-relation record, while the first traversed relation is identifiable from its position in the recorded sequence. By assumption (A3), the corresponding update proposals may therefore encode whether a node occurs as the starting node and whether a relation occurs as the first traversed relation. By assumption (A4), the consensus protocol may retain the multiplicity of these proposals. Consequently, the updated node state may retain CvC_v, and the updated relation state may retain DrD_r.

We may therefore take

ιV(v):=Cv,ιR(r):=Dr.\iota_V(v) := C_v,\qquad\iota_R(r) := D_r.

With probability tending to one, these values are injective on VV and RR, respectively.

Finally, assumption (A2) ensures that the complete local node state, including all observed features and labels, can be retained before the structural update, while assumption (A4) allows the structural update to preserve this information. Hence the random identifiers do not overwrite the original node information.

Since ∣V∣≤n|V| \le n and ∣R∣≤m|R| \le m, the required number of walks can be chosen uniformly over all considered graphs in Gn,m,b\mathcal{G}_{n,m,b}.

Next we will show that when choosing the walk length to be at least the diameter of the graph, for any node-edge pair there always exists a walk that traverses both.

Lemma 8 (Short non-backtracking edge witnesses). Let G=(V,E,R,X,Y)G=(V,E,R,X,Y) have connected underlying undirected graph with diameter DD. For every target node t∈Vt \in V and every edge e=(u,r,v)∈Ee=(u,r,v) \in E, there exists a non-backtracking walk starting at tt, of length at most

D+1≤∣V∣≤n,D+1 \le|V| \le n,

that traverses ee in one of its two directions.

Proof. Fix t∈Vt \in V and e=(u,r,v)∈Ee=(u,r,v) \in E. Let

P=(t=v0,v1,…,vℓ=u)P=(t=v_0,v_1,\ldots,v_\ell=u)

be a shortest path in the underlying undirected graph from tt to uu. Then ℓ≤D\ell\le D. Since PP is a shortest path, it contains no immediate backtracking.

If either ℓ=0\ell=0 or vℓ−1≠vv_{\ell-1}\ne v, append the traversal from uu to vv along ee. The resulting walk is non-backtracking and has length

ℓ+1≤D+1.\ell+1 \le D+1.

If instead vℓ−1=vv_{\ell-1}=v, then the final step of PP already traverses the edge ee, namely from vv to uu. Since traversal direction is recorded, this already identifies the original directed edge (u,r,v)(u,r,v). In this case PP itself is the required witness and has length at most DD.

Thus in either case there exists a non-backtracking witness walk of length at most D+1D+1. Since a connected graph on at most nn nodes satisfies D≤∣V∣−1D\leq|V|-1, the witness has length at most nn.

Lemma 9 (Simultaneous edge witnessing). Assume that the walk length SS is at least nn. For every n,m∈Nn,m\in\mathbb{N} and every δ>0\delta>0, there exists a finite number K2=K2(n,m,δ)K_2=K_2(n,m,\delta) of second-layer walks such that, with probability at least $1-\delta$, for every node t∈Vt\in V and every edge e∈Ee\in E, at least one sampled walk starts at tt and contains a traversal of $e.

Proof. By Lemma 8, for every pair (t,e)∈V×E(t,e)\in V\times E there exists an admissible non-backtracking witness walk of length at most nn.

By assumption (A1) on the sampler, a walk that contains such a prefix has probability of at least βn,m>0\beta_{n,m}>0. Therefore,

Pr⁡[(t,e) is not witnessed in K2 walks]≤(1−βn,m)K2.\Pr[(t,e)\text{ is not witnessed in }K_2\text{ walks}]\leq(1-\beta_{n,m})^{K_2}.

Since ∣E∣≤∣V∣2∣R∣≤n2m|E|\leq|V|^2|R|\leq n^2m, there are at most n3mn^3m target-edge pairs. A union bound yields

Pr⁡[∃(t,e)∈V×E that is not witnessed]≤n3m(1−βn,m)K2.\Pr[\exists(t,e)\in V\times E\text{ that is not witnessed}]\leq n^3m(1-\beta_{n,m})^{K_2}.

The right-hand side converges to zero as K2→∞K_2\to\infty, proving the claim.

Lemma 10 (Two-layer graph reconstruction). Suppose the events in Lemmas 7 and 9 both occur. Then, after the second structural update, the hidden state associated with every node t∈Vt\in V can retain an encoding from which the complete observed graph GG and, in the case of link prediction, the query qq can be reconstructed up to isomorphism.

Proof. By Lemma 7, after the first layer every node and relation type carries a persistent identifier

ιV:V→N,ιR:R→N.\iota_V:V\to\mathbb{N},\qquad\iota_R:R\to\mathbb{N}.

which is injective on VV and RR, respectively. The first-layer node states also retain all observed node attributes and labels.

Consider now the second structural layer and fix a target node tt. By Lemma 9, for every edge e=(u,r,v)∈Ee=(u,r,v)\in E there exists a sampled walk ηe\eta_e that starts at tt and traverses ee.

Because the first-layer identifiers are part of the hidden states used by the recording protocol, the recording of ηe\eta_e contains enough information to identify the traversal of ee as

(ιV(u),ιR(r),ιV(v)),(\iota_V(u),\iota_R(r),\iota_V(v)),

together with its orientation. In addition, whenever a node occurs in a walk, its recorded hidden state contains its observed local attributes.

By assumption (A3), the update proposal produced at the starting position tt may retain an injective encoding of the complete recorded walk ηe\eta_e. Thus, the proposal associated with tt contains the information that the edge

(ιV(u),ιR(r),ιV(v))(\iota_V(u),\iota_R(r),\iota_V(v))

exists.

By assumption (A4), the consensus update at tt can retain injectively the multiset of all such proposals. Since every edge is witnessed by at least one walk starting at tt, the resulting state can therefore recover

{(ιV(u),ιR(r),ιV(v)):(u,r,v)∈E}.\{(\iota_V(u),\iota_R(r),\iota_V(v)):(u,r,v)\in E\}.

Because ιV\iota_V and ιR\iota_R are injective, this determines the complete edge-typed graph up to a renaming of nodes and relation types.

Since the underlying graph is connected, every node is incident to an edge. Hence the collection of edge-witnessing walks also contains the first-layer state of every node and therefore determines all observed node features and labels.

Finally, the recording protocol contains the link query indicators. It follows that the second-layer state at tt determines GG, and in the case of link prediction qq, up to isomorphism.

We are now ready to prove the main result.

Proof of Theorem 3. Fix ϵ,δ>0\epsilon, \delta> 0. By Lemmas 7 and 9, the probabilities of successful symmetry breaking in the first layer and complete edge witnessing in the second layer both converge to one as the number of sampled walks grows. Hence, there exists a common finite sampling budget K∈NK \in\mathbb{N} such that, when KK walks are sampled in each layer, the event in Lemma 7 and the event in Lemma 9 each occur with probability at least 1−δ/21-\delta/2. By a union bound, both events therefore occur simultaneously with probability at least 1−δ1-\delta.

Condition on such a successful realization of the sampled walks. By Lemma 10, the second-layer hidden state used by the output head determines the observed graph-query pair (G,q)(G,q) up to isomorphism.

Fix now a discrete isomorphism class κˉ\bar{\kappa} of connected observed graph-query pairs. Let K(κˉ)\mathcal{K}(\bar{\kappa}) denote the set of discrete isomorphism classes of fully specified graphs that are compatible with κˉ\bar{\kappa} and have positive prior probability. Since nn, mm, and bb are bounded, K(κˉ)\mathcal{K}(\bar{\kappa}) is finite.

For every κ∈K(κˉ)\kappa\in\mathcal{K}(\bar{\kappa}), let Xκˉ,κ\mathcal{X}_{\bar{\kappa},\kappa} denote the projection of Zκ\mathcal{Z}_{\kappa} onto the continuous coordinates observed in κˉ\bar{\kappa}, and define

Xκˉ:=⋃κ∈K(κˉ)Xκˉ,κ.\mathcal{X}_{\bar{\kappa}} := \bigcup_{\kappa\in\mathcal{K}(\bar{\kappa})} \mathcal{X}_{\bar{\kappa},\kappa}.

Each Xκˉ,κ\mathcal{X}_{\bar{\kappa},\kappa} is compact as the projection of the compact set Zκ\mathcal{Z}_{\kappa}. Since the union is finite, Xκˉ\mathcal{X}_{\bar{\kappa}} is compact. Let x∈Xκˉx \in\mathcal{X}_{\bar{\kappa}} denote the continuous observed attributes.

For a fixed successful realization ω\omega of the discrete random choices made by the model, let

Φκˉ,ω:Xκˉ⟶Rd\Phi_{\bar{\kappa},\omega} : \mathcal{X}_{\bar{\kappa}} \longrightarrow\mathbb{R}^{d}

denote the resulting representation supplied to the output head. The model modules are continuous, so Φκˉ,ω\Phi_{\bar{\kappa},\omega} is continuous. Moreover, by Lemma 10, the representation determines the corresponding graph-query pair up to isomorphism. After fixing a canonical representative of κˉ\bar{\kappa}, we may therefore regard Φκˉ,ω\Phi_{\bar{\kappa},\omega} as injective.

A continuous injection from a compact space into Rd\mathbb{R}^{d} is a homeomorphism onto its image. Hence

Φκˉ,ω−1\Phi_{\bar{\kappa},\omega}^{-1}

is continuous on Φκˉ,ω(Xκˉ)\Phi_{\bar{\kappa},\omega}(\mathcal{X}_{\bar{\kappa}}).

Let Mp,κˉ⋆M^\star_{p,\bar{\kappa}} denote the restriction of the Bayes-optimal predictor to the observed discrete class κˉ\bar{\kappa}, viewed as a function of its continuous observed attributes xx. By Lemma 5, Mp,κˉ⋆M^\star_{p,\bar{\kappa}} is continuous. Consequently,

h⟼Mp,κˉ⋆(Φκˉ,ω−1(h))h \longmapsto M^\star_{p,\bar{\kappa}}\left(\Phi_{\bar{\kappa},\omega}^{-1}(h)\right)

is continuous on the compact representation domain Φκˉ,ω(Xκˉ)\Phi_{\bar{\kappa},\omega}(\mathcal{X}_{\bar{\kappa}}).

Because nn, mm, and bb are bounded, there are only finitely many discrete isomorphism classes of connected observed graph-query pairs. For a fixed number and length of sampled walks, there are also only finitely many discrete walk realizations. Hence the successful representation domains form a finite union of compact sets. Whenever two such domains intersect, Lemma 10 implies that the shared representation determines the same graph-query pair up to isomorphism, and therefore the same Bayes-optimal output. The continuous functions defined above thus agree on intersections and together define a continuous function on this finite union of compact representation domains.

By assumption (A5), the output head can approximate this function uniformly to accuracy ϵ\epsilon. Thus, whenever the two successful sampling events occur,

∥Mθ,K(G,q)−Mp⋆(G,q)∥<ϵ.\left\lVert M_{\theta,K}(G,q)-M^\star_p(G,q)\right\rVert< \epsilon.

Since the numbers of walks were chosen uniformly over Gn,m,b\mathcal{G}_{n,m,b} and the two successful events occur jointly with probability at least 1−δ1-\delta, we obtain

Pr⁡[∥Mθ,K(G,q)−Mp⋆(G,q)∥<ϵ]≥1−δ\Pr\left[\left\lVert M_{\theta,K}(G,q)-M^\star_p(G,q)\right\rVert< \epsilon\right] \ge1-\delta

uniformly over all connected G∈Gn,m,bG \in\mathcal{G}_{n,m,b} and all valid queries qq. Thus, for every ϵ,δ>0\epsilon,\delta>0, there exist network parameters θ\theta and a finite sampling budget KK satisfying the definition of a universal graph prior approximator.

Permutation equivariance

Proof of Proposition 4. Let π=(πV,πR,πX,πY)\pi=(\pi_V,\pi_R,\pi_X,\pi_Y) and let (G′,q′)=(π(G),π(q))(G',q')=(\pi(G),\pi(q)). We show inductively over the layers that the joint distribution of the hidden states is equivariant under π\pi: node states are permuted according to πV\pi_V, their feature and label channels according to πX\pi_X and πY\pi_Y, respectively, while relation states are permuted according to πR\pi_R.

The claim holds at initialization by construction: feature and label values are carried along with their corresponding channels, structural states depend only on the node’s role relative to the query, and relation states are independent of relation identities.

Assume now that the claim holds at the beginning of layer ll. By assumption, the intra-node processor μθ\mu_\theta is equivariant in distribution under permutations of feature and label channels. Since the same processor is applied independently to every node, the intra-node update also commutes with πV\pi_V.

The in-context update acts independently on each channel and aggregates over the corresponding context nodes. Since

Vcontext(G′,q′)=πV(Vcontext(G,q)),V_{\mathrm{context}}(G',q')=\pi_V\left(V_{\mathrm{context}}(G,q)\right),

permuting nodes and channels therefore only permutes the corresponding queries, keys, and values, and the update remains equivariant.

For the structural update, permutation invariance of AA implies that the walks sampled on (G′,q′)(G',q') have the same distribution as the images under π\pi of the walks sampled on (G,q)(G,q). The recording protocol consequently produces correspondingly permuted walk recordings. Since the same sequence processor is applied to every recording, corresponding walk positions produce corresponding update proposals. Finally, the consensus protocol is permutation invariant in the collection of proposals associated with each state, so the resulting node and relation states are again equivariant in distribution. This completes the induction.

After the final layer, the shared node head maps permuted label channels to the correspondingly permuted classification outputs. Likewise, the shared link head maps permuted candidate-node and relation states to the correspondingly permuted link-prediction outputs. Hence

Mθ(π(G),π(q))=πout(Mθ(G,q)).M_\theta(\pi(G),\pi(q))=\pi_{\mathrm{out}}\left(M_\theta(G,q)\right).

which proves the claim.

Computational complexity

Let N=∣V∣N=|V|, C=dX+dY+1C=d_X+d_Y+1 be the number of channels, Nctx=∣Vcontext∣N_{\mathrm{ctx}}=|V_{\mathrm{context}}|, KK the number of sampled walks per layer, SS their length, and dd the hidden dimension. For a single WANDER layer, intra-node self-attention costs

O(N(C2d+Cd2)),\mathcal{O}\left(N(C^2d+Cd^2)\right),

since attention is applied independently across the CC tokens of each node. The ICL update uses the NN node tokens as queries and the NctxN_{\mathrm{ctx}} context tokens as keys and values, independently for each channel, and therefore costs

O(CNNctxd+C(N+Nctx)d2).\mathcal{O}\left(CNN_{\mathrm{ctx}}d+C(N+N_{\mathrm{ctx}})d^2\right).

Finally, the stochastic structural update processes KCKC sequences of length S+1S+1. With the bidirectional GRU and feed-forward network used in our implementation, this requires

O(KCSd2)\mathcal{O}(KCSd^{2})

operations. Sampling the walks and aggregating their proposals add only O(KS)\mathcal{O}(KS) and O(KCSd)\mathcal{O}(KCSd), respectively, and are therefore dominated by sequence processing.

Consequently, the overall time complexity of one layer is

O(NC2d+CNNctxd+(NC+CNctx+KCS)d2)\mathcal{O}\left(NC^{2}d+CNN_{\mathrm{ctx}}d+(NC+CN_{\mathrm{ctx}}+KCS)d^{2}\right)

which simplifies to

O(NC2+CNNctx+KCS)\mathcal{O}\left(NC^{2}+CNN_{\mathrm{ctx}}+KCS\right)

for fixed hidden dimension dd. In particular, for a fixed architecture and hidden dimension, the structural update scales linearly in both the number and length of the sampled walks. This makes its computation independent of the total number of edges except for adjacency-list construction and permits the accuracy–cost trade-offs obtained by varying the walk budget at inference time.

Experimental details

Graph prior

The training objective stated in § 4 assumes access to samples from a graph prior pp. Ideally, this prior would capture the distribution of real-world graphs directly. In practice, however, available graph datasets form a comparatively small and heterogeneous collection. We therefore follow the prior-data fitted network paradigm introduced by Müller et al. [44] and construct most of our pretraining distribution synthetically.

A central ingredient of TabPFN (Hollmann et al., [24]) is a prior over structural causal models (SCMs), which generate variables by sampling a causal dependency graph together with functions mapping parent variables and noise to their descendants. Selecting some generated variables as features and another as the target yields a broad synthetic distribution over supervised learning problems.

Synthetic attributed graphs. Recent GFMs extend this idea to attributed graphs, but make different assumptions about how graph structure and node attributes arise. NodePFN (Choi et al., [7]) follows an attribute-first construction: features and labels are first sampled from an MLP-based SCM, after which the graph is generated using either a label-dependent stochastic block model (Holland et al., [22]) or an Erdős–Rényi (Erdős and Rényi, [11]) model. GraphPFN (Eremeev et al., [13]) instead follows a structure-first construction: the topology is sampled from multi-level degree-corrected stochastic block models and preferential-attachment graphs, and features and targets are subsequently generated by a graph-aware SCM.

These constructions capture complementary dependencies: attributes may influence which relations form, while graph structure may itself influence node attributes. We therefore include both generation directions in our prior. We additionally broaden the structural distribution with Watts–Strogatz (Watts and Strogatz, [62]), random geometric (Gilbert, [17]), and kernel-based graph models (Lovász and Szegedy, [38]) to cover structural regimes beyond block-community graphs, including highly clustered and geometry-driven networks. Concretely, each synthetic graph is attribute-first with probability 0.4 and structure-first with probability 0.6. Structure-first topologies are a multi-level degree-corrected stochastic block model with preferential attachment (0.45), a random geometric graph in latent dimension 2–10 (0.30), or a Watts–Strogatz graph with rewiring probability in [0.01, 0.3] (0.25). Attribute-first topologies are a label-ordered Watts–Strogatz graph (0.45), a label stochastic block model (0.35), or an RBF kernel graph (0.20). The label stochastic block model and the RBF kernel use a homophily ratio that is homophilous (centered at 0.8) with probability 0.7 and heterophilous (centered at 0.1) otherwise. Graph size is mixed log-uniform, half in [200, 3000] nodes and half in [3000, 16000], and the average degree is log-uniform on [2.5, 20] with probability 0.9. Homogeneous link-prediction reuse these undirected graphs with labels removed; node features are dropped with probability 0.5, and a fraction of edges drawn from [0.7, 0.9] is kept as context.

The resulting attributed graphs are used for both node-classification and homogeneous link-prediction pretraining.

Comparison with other synthetic priors. To characterize the structural regimes covered by our prior, we sample 1,000 graphs from each of the Wander, NodePFN, and GraphPFN priors and compare their statistics with those of the real-world evaluation graphs. Figure 3 shows that Wander covers a wider range of clustering coefficients than the other synthetic priors, including graphs with substantial clustering at low average degree. It also spans both homophilous and heterophilous regimes, although its samples are concentrated toward homophily. The distributions in Figure 4 provide complementary comparisons of graph size, average degree, clustering, homophily, and number of classes. To test the effect of these differences on the transfer to real world graphs we replace the synthetic prior during pretraining in Appendix § 14.13.

Structural coverage of the synthetic graph priors compared with the real-world evaluation graphs

Figure 3. Structural coverage of the synthetic graph priors compared with the real-world evaluation graphs.

Distributions of graph statistics for 1,000 graphs sampled from each synthetic prior, alongside the real-world evaluation graphs

Figure 4. Distributions of graph statistics for 1,000 graphs sampled from each synthetic prior, alongside the real-world evaluation graphs.

Multi-relational graphs. Extending such synthetic mechanisms to multi-relational graphs is less straightforward, as relation types in knowledge graphs follow different and often domain-specific generative processes. We therefore augment the synthetic attributed-graph prior with three real-world knowledge graphs: FB15k-237 (Toutanova and Chen, [58]), WN18RR (Dettmers et al., [8]), and CoDEx Medium (Safavi and Koutra, [51]). These graphs provide multi-relational link-prediction episodes during pretraining, exposing Wander jointly to synthetic attributed graphs and real-world multi-relational structure. Statistics about these three real-world knowledge graphs are provided in Table 11.

DatasetEntitiesRelsTrainValidTestEntity Task
CoDEx Small2034423288818271828h/t
CoDEx Large77951695511933062230622h/t
NELL995745362001496785432818h/t
YAGO3-1012318237107904050005000h/t
WDsinger102821351614221632203h/t
NELL23k229252002544549614952h/t
AristoV44494916052425672000020000h/t
DBpedia100k996044705975725000050000h/t
ConceptNet100k783343410000012001200h/t
FB15k-237(10)11512237272111562418150t
FB15k-237(20)13166237544231696319776t
FB15k-237(50)141492371360571744920324t
Hetionet45158242025177112510112510h/t
Pretraining
FB15k-237145412372721151753520466h/t
WN18RR40943118683530343134h/t
CoDEx Medium17050511855841031010311h/t

Table 11. Dataset statistics for transductive link prediction datasets. Entity task denotes the entity-prediction task: h/t is predicting both heads and tails, and t is predicting only tails.

Implementation and pretraining details

The model and optimization hyperparameters are summarized in Table 8. We train Wander for 350 epochs using a four-stage curriculum that progressively increases the complexity of the pretraining tasks.

Phase 1Phase 2Phase 3Phase 4
Epoch1–100101–200201–300301–350
Architecture
Hidden dimension dd128(all phases)
Layers LL6(all phases)
Heads (intra-node)4(all phases)
Heads (ICL)4(all phases)
Heads (structural update)4(all phases)
Structural updateoffoffonon
Base walk count KbaseK_{\mathrm{base}} (n<1kn < 1\mathrm{k})——3232
Base walk count KbaseK_{\mathrm{base}} (1k–8k)——6464
Base walk count KbaseK_{\mathrm{base}} (n≥8kn \ge8\mathrm{k})——128128
Walk length SS (n<1kn < 1\mathrm{k})——3232
Walk length SS (1k–8k)——6464
Walk length SS (n≥8kn \ge8\mathrm{k})——128128
Data
Synthetic NC80%80%40%40%
Synthetic LP20%20%10%10%
Real KG0%0%50%50%
Max. size synthetic8,0008,0008,00016,000
Max. features synthetic16326464
Optimizer & training
OptimizerAdamW(all phases)
Learning rate5×10−55 \times10^{-5}(all phases)
Weight decay0.01(all phases)
Batches per epoch2,000(all phases)
Graphs per batch2(all phases)
LP batch size (per graph)4(all phases)
NC batch size (per graph)all testall testall visitedall visited
Negatives (link prediction)512(all phases)

Table 8. Pretraining hyperparameters across the four pretraining stages of Wander.

During the first 200 epochs, we disable the stochastic structural update in every layer and retain only the intra-node and ICL updates. Pretraining during this stage uses exclusively synthetic graphs, with 80% of training steps devoted to node classification and 20% to homogeneous link prediction. This initial stage is intended to encourage the model to learn to exploit node attributes and in-context supervision before introducing the random-walk-based structural signal, thereby reducing the incentive to rely primarily on graph structure or label homophily. We additionally increase the feature dimensionality over the course of this stage: during the first 100 epochs, the maximum feature dimension is 16, while during epochs 101–200 it is increased to 32. Whenever a sampled synthetic task contains more features than the respective limit, we reduce the feature dimension using PCA.

For the remaining 150 epochs, we activate the stochastic structural update and train the complete WANDER architecture. At this stage, 50% of training steps use knowledge-graph link prediction, 40% use synthetic node classification, and 10% use synthetic homogeneous link prediction. The maximum feature dimension is increased to 64. During the final 50 epochs, we additionally increase the maximum size of synthetic graphs from 8,000 to 16,000 nodes.

Each optimization step contains two graphs drawn from the same task family: either two synthetic node-classification tasks, two synthetic homogeneous link-prediction tasks, or two knowledge graphs. In the latter case, the two graphs may correspond to the same underlying knowledge graph.

The pretrained model has approximately 13M parameters.

WANDER is stochastic because of random-walk sampling and the random permutations of feature and label channels applied during inference. We refer to each independently randomized forward pass as an inference sample. Unless stated otherwise, we average the logits from 16 inference samples before applying the task-specific output transformation. For knowledge-graph link prediction, we follow Kim et al. [30] for comparability and use the dataset-specific numbers of inference samples reported in Table 13.

Dataset(s)Base walks KbaseK_{\mathrm{base}}Inference samples
Inductive (e,r)(e,r)
FB-25, FB-501616
FB-75, FB-100816
WK-25, WK-75416
WK-50, WK-1001616
NL-0, NL-25, NL-75216
NL-50, NL-100416
MT1-tax416
MT1-health1616
MT2-org3216
MT2-sci1616
MT3-art3216
MT3-infra3216
MT4-sci1616
MT4-health1616
Metafam, FBNELL1616
Inductive (e)(e)
FB-v1–v41616
WN-v1–v41616
NL-v1–v41616
ILPC Small1616
ILPC Large6416
HM 1k1616
HM 3k3216
HM 5k6416
HM Indigo12816
Transductive
CoDEx Small1616
CoDEx Large5122
NELL-99512816
YAGO3-105128
WDsinger1616
NELL23k3216
FB15k-237(10)3216
FB15k-237(20)6416
FB15k-237(50)6416
Hetionet5122
DBpedia100k5122
AristoV42564
ConceptNet100k12816

Table 13. Random-walk configuration used for knowledge-graph link prediction. We follow the entity-prediction evaluation configuration of Flock (Kim et al., [30]. Each Wander structural update samples 3Kbase3K_{\mathrm{base}} walks. The walk length is S=128S = 128 for all datasets.

Following prior work [30], we add in each knowledge graph for each triple (h,r,t)(h, r, t) the corresponding inverse (t,r−1,h)(t, r^{-1}, h), where r−1r^{-1} is a new relation symbol.

Knowledge graph link prediction

To evaluate zero-shot transfer for knowledge graph link prediction, we consider the entity-prediction setting, where the task is to rank candidate tail entities given a query head entity and relation type.

Datasets. We follow prior work on knowledge graph foundation models [16, 71, 30] and evaluate on the same benchmark suite, comprising 54 knowledge graphs grouped into three transfer settings:

  • Inductive e,re,r. This setting evaluates transfer to knowledge graphs containing both unseen entities and unseen relation types. It comprises the 13 datasets introduced by InGram [32]: FB-25, FB-50, FB-75, FB-100, WK-25, WK-50, WK-75, WK-100, NL-0, NL-25, NL-50, NL-75, and NL-100; as well as 10 datasets from MTDEA [73]: MT1 tax, MT1 health, MT2 org, MT2 sci, MT3 art, MT3 infra, MT4 sci, MT4 health, Metafam, and FBNELL. Dataset statistics are provided in Table 9.

DatasetTraining GraphValidation GraphTest Graph
EntitiesRelsTriplesEntitiesRelsTriplesValidEntitiesRelsTriplesTest
FB-2551901639157140972161714757164097216171475716
FB-5051901538537544452051163638794445205116363879
FB-75465913462809279218693163106279218693163106
FB-1004659134628092624776987232926247769872329
WK-251265947418733228743391113032287433911131
WK-501202272824819328939672322493289396723225
WK-75685352287412722653430114327226534301144
WK-1009784674987512136371348744961213637134874496
NL-0181413477962026112228776320261122287763
NL-254396106175782146120223074321461202230744
NL-504396106175782335119257685923351192576859
NL-75260796110581578116181860615781161818607
NL-100125855783217095323787931709532378793
Metafam1316281382113162813821590656287257184
FBNELL4636100102754636100102751055475218310685597
Wiki MT1 tax1000010171781000010171781908100009165261834
Wiki MT1 health10000714371100007143711596100007141101566
Wiki MT2 org10000102323310000102323325811000011219762441
Wiki MT2 sci10000161647110000161647118301000016148521650
Wiki MT3 art10000452726210000452726230261000045280233113
Wiki MT3 infra10000242199010000242199024431000027216462405
Wiki MT4 sci10000421257610000421257613971000042125161388
Wiki MT4 health10000211553910000211553917251000020153371703

Table 9. Dataset statistics for inductive-ee, rr link prediction datasets. Triples are the number of edges given at training, validation, or test, respectively, whereas Valid and Test denote triples to be predicted in the validation and test graphs.

  • Inductive ee. This setting evaluates transfer to previously unseen entities while the relation vocabulary is shared with the training graph. It includes the 12 GraIL benchmarks [56], consisting of WN-v1 through WN-v4, FB-v1 through FB-v4, and NL-v1 through NL-v4; four INDIGO benchmarks [37]: HM 1k, HM 3k, HM 5k, and HM Indigo; and the two NodePiece benchmarks [15], ILPC Small and ILPC Large. Dataset statistics are provided in Table 10.

DatasetRelsTraining GraphValidation GraphTest Graph
EntitiesTriplesEntitiesTriplesValidEntitiesTriplesTest
FB-v1180159442451594424548910931993411
FB-v22002608973926089739116616604145947
FB-v32153668179863668179862194250174061731
FB-v421947072720347072720333523051117142840
WN-v1927465410274654106309221618373
WN-v210695415262695415262183827574011852
WN-v311120782590112078259013097508463271143
WN-v4938617940386179409347084123342823
NL-v1143103468731034687414225833201
NL-v288256482192564821992220864586935
NL-v31424647163934647163931851356680481620
NL-v4762092754620927546876279570731447
ILPC Small48102307861666532096029086653209602902
ILPC Large6546626202446292467704410179292467704410184
HM 1k11362379336436311933641771989918638476
HM 3k1132118710973225071097120119218382851349
HM 5k112860157601287445760190023792484252124
HM Indigo2291272112160112797121601141211477525019514904

Table 10. Dataset statistics for inductive-ee link prediction datasets. Triples are the number of edges given at training, validation, or test, respectively, whereas Valid and Test denote triples to be predicted in the validation and test graphs.

  • Transductive. In the transductive setting, both entities and relation types are observed during training, and evaluation concerns held-out links over the same entity and relation vocabularies. This group comprises CoDEx Small and CoDEx Large (Safavi and Koutra, [51]), NELL-995 (Xiong et al., [65]), YAGO3-10 (Mahdisoltani et al., [40]), WDsinger, NELL23k, FB15k-237(10), FB15k-237(20), and FB15k-237(50) (Lv et al., [39]), AristoV4 (Chen et al., [5]), DBpedia100k (Ding et al., [9]), ConceptNet100k (Malaviya et al., [41]), and Hetionet (Himmelstein et al., [21]). Dataset statistics are provided in Table 11.

Baselines and evaluation protocol. We compare Wander against the knowledge graph foundation models Ultra (Galkin et al., [16]), Trix (Zhang et al., [71]), and Flock (Kim et al., [30]). All three baselines are designed for zero-shot transfer across knowledge graphs and are evaluated on the benchmark suite described above.

We follow the filtered ranking protocol used in the corresponding prior work. For each query, candidate entities corresponding to other known true facts are removed from the ranking before computing the evaluation metrics. For evaluating head prediction we convert the query into a tail prediction, by using the inverse relation type. We report mean reciprocal rank (MRR) and Hits@10. As the benchmark datasets and evaluation protocol coincide with those used in the respective baseline papers, we directly use their reported results rather than reevaluating the models. Full per-dataset results are reported in Table 12.

For Wander, we use the same link-prediction random-walk sampling protocol as during pretraining (Appendix § 11). Following Flock (Kim et al., [30]), we use walks of length S=128S = 128 and adopt its dataset-specific entity-prediction walk and inference sample budgets, reported in Table 13. Here, KbaseK_{\mathrm{base}} denotes the base walk count, so each structural update samples 3Kbase3K_{\mathrm{base}} walks according to the three starting distributions defined in Appendix § 11.

Homogeneous link prediction

Datasets. We follow the homogeneous link-prediction benchmark introduced by AnyGraph (Xia and Huang, [63]), using the dataset versions and train/validation/test splits released with its official implementation. Our evaluation comprises ten graphs: CiteSeer, Cora, PubMed, Coauthor CS, DDI, Products Home, P2P Gnutella06, Email-Enron, Proteins Spec1, and Soc Epinioms. These datasets cover citation, coauthorship, e-commerce, peer-to-peer, communication, biological, and social networks, and include both attributed and unattributed graphs. Dataset statistics are reported in Table 15.

Dataset#Nodes#EdgesAvg. degreeClustering Coeff.Diameter#Features#Test sources (original)#Test sources (filtered)
CiteSeer3,3274,5522.70.141283,703423175
Cora2,7085,2783.90.241181,433399192
PubMed19,71744,3244.50.060165002,041895
CS18,33381,8948.90.343246,8051,9731,377
DDI4,2671,201,400563.10.5765–1,5871,587
P2P Gnutella068,71731,5257.20.0079–2,1072,107
Email Enron36,692183,83110.00.49711–13,1374,400
Proteins Spec16,568922,980281.10.2675–6,1245,442
SOC Epinions75,888405,74010.70.13812–17,69514,511
Products Home9,79065,91913.50.321221004,1061,681

Table 15. Statistics of the homogeneous link-prediction datasets. Test sources are unique heads of test edges. Original is the AnyGraph split. Remaining drops a test edge when either direction already appears in the training graph, which is stricter than AnyGraph’s directed protocol; a source is kept only if at least one test edge survives.

We adopt a slightly stricter evaluation protocol than the original AnyGraph benchmark. Although the graphs are treated as undirected, we found that for some test edges (u,v)(u,v), the reverse edge (v,u)(v,u) occurs in the training split. Such cases effectively reveal the test edge during training. We therefore remove all test edges whose reverse is present in the training graph. For attributed datasets, we apply the same feature preprocessing as in the node-classification experiments described below.

Baselines and hyperparameter selection. We compare Wander against the end-to-end link-prediction models NBFNet [75] and Buddy [4], as well as the graph foundation model AnyGraph [63]. For NBFNet and Buddy, we perform dataset-specific hyperparameter selection based on validation performance. Both models are trained for at most 40 epochs with early stopping using a patience of five epochs.

For NBFNet, we fix the hidden dimension to 32 following the official implementation and search over learning rates {10−3,5⋅10−3}\{10^{-3},5\cdot10^{-3}\}, network depths {3,5,6}\{3,5,6\}, and numbers of sampled negative examples {1,32,256}\{1,32,256\}. For Buddy, we search over hidden dimensions {128,256}\{128,256\}, learning rates {10−3,5⋅10−3}\{10^{-3},5\cdot10^{-3}\}, and the same set of negative-sampling budgets {1,32,256}\{1,32,256\}. The validation-selected hyperparameters for each dataset are reported in Table 14.

DatasetNBFNetNBFNetNBFNetBuddyBuddyBuddy
Depthlr#Neg.Hiddenlr#Neg.
CiteSeer30.00512560.0051
Cora50.001321280.00532
PubMed50.00512560.001256
CS30.005322560.001256
DDI50.0052562560.001256
P2P Gnutella0660.00512560.0051
Email Enron50.0052562560.001256
Proteins Spec160.005321280.001256
SOC Epinions60.0052562560.00132
Products Home60.005322560.00532

Table 14. Val-selected hyperparameters for the NBFNet and Buddy link-prediction baselines.

Unlike NBFNet and Buddy, AnyGraph is used as a pretrained graph foundation model. Its authors provide two checkpoints pretrained on disjoint collections of real-world graphs. For each evaluation dataset, we use the checkpoint whose pretraining set does not contain that dataset, thereby avoiding overlap between pretraining and evaluation data.

Wander inference. We use the same link-prediction random-walk sampling protocol as during pretraining (Appendix § 11). For attributed graphs, we use a base walk count of Kbase=64K_{\mathrm{base}}=64 and walk length S=64S=64; for

Node classification on simple graphs

graphs without node features, we use Kbase=128K_{\mathrm{base}} = 128 and S=128S = 128. Thus, each structural update samples 3Kbase3K_{\mathrm{base}} walks according to the three starting distributions described in Appendix § 11. Unless stated otherwise, we average predictions over 16 independently sampled forward passes.

Comparison to UniLP. UniLP (Dong et al., [10]) and TFMLinker (Liao et al., [34]) are two recently proposed graph foundation models for homogeneous link prediction. We do not include them in our main comparison for three reasons. First, both models score links conditioned on a specific pair of endpoints, whereas WANDER conditions on a source node and jointly scores candidate targets. Consequently, evaluating source-conditioned Recall@20 over all candidate nodes would require pairwise models to separately evaluate a large number of candidate edges, making our main evaluation protocol computationally impractical. Second, both methods are designed for unattributed graphs and therefore cannot exploit the node features available in several of our benchmarks. Third, for TFMLinker, we were unable to identify an official implementation at the time of evaluation.

To nevertheless provide a direct comparison, we evaluate WANDER and UniLP on the datasets considered by UniLP using a sampled, source-conditioned ranking protocol. UniLP originally reports Hits@50 by comparing positive edges against sampled negative edges whose endpoints may differ. Such comparisons are less natural for WANDER, whose scores are produced jointly for candidate tails conditioned on a fixed source and are therefore primarily meaningful relative to other candidates for the same query. As a middle ground, we use sampled Recall@20: for each source node, we rank all of its held-out positive neighbors together with 100 sampled non-edges and report the fraction of positive neighbors appearing among the top 20 candidates. We evaluate on two random 70/10/20 train/validation/test splits.

Table 16 shows that, without node features, the two models achieve essentially identical average performance (85.4% Recall@20), with WANDER outperforming UniLP on Celegans, USAir, and Cora, and UniLP performing better on the remaining four datasets. At the same time, WANDER is substantially faster (under same hardware, A100 GPU) under this evaluation protocol. For the three datasets with node attributes, we additionally report WANDER with features enabled. This improves performance on Cora, CS, and Facebook, respectively, exceeding the featureless UniLP results on all three datasets.

CelegansCelegansUSAirUSAirNSNSPBPBCoraCoraCSCSFacebookFacebook
R@20minR@20minR@20minR@20minR@20minR@20minR@20min
UniLP70.95785.24594.211283.445075.426993.118795.5438
Wander (w/o feat.)77.2390.6389.4680.71376.41591.34592.252
Wander (w/ feat.)––––––––90.611597.014295.8159

Table 16. Sampled Recall@20 and test-only wall-clock for UniLP vs. Wander on two random 70/10/20 splits. Per source: rank that source’s eval neighbors plus 100 sampled non-edges.

Node classification on simple graphs

Detailed results for the zero-shot node-classification evaluation are reported in Table 19. We report test accuracy averaged over all available data splits. The reported standard deviation reflects variation across these splits and, for stochastic models (NodePFN, GraphPFN, and Wander), additionally across three inference passes with different random seeds.

GroupDatasetGCNTabPFNv3GraphAnyNodePFNGraphPFNWander
WebKBCornell38.9±5.838.9 \pm5.871.4±4.271.4 \pm4.258.6±6.458.6 \pm6.467.3±4.667.3 \pm4.670.3±3.070.3 \pm3.076.9±3.476.9 \pm3.4
Texas54.9±6.454.9 \pm6.471.1±8.471.1 \pm8.467.0±6.067.0 \pm6.076.8±5.376.8 \pm5.370.5±12.170.5 \pm12.177.8±7.177.8 \pm7.1
Wisconsin60.2±6.560.2 \pm6.577.5±2.577.5 \pm2.563.5±4.763.5 \pm4.779.4±5.279.4 \pm5.280.0±5.280.0 \pm5.280.8±5.780.8 \pm5.7
AirportsAir Brazil46.2±18.046.2 \pm18.033.1±9.333.1 \pm9.335.4±15.135.4 \pm15.163.9±7.963.9 \pm7.974.6±6.774.6 \pm6.774.1±4.674.1 \pm4.6
Air Europe47.0±0.747.0 \pm0.739.1±3.039.1 \pm3.041.6±6.441.6 \pm6.452.6±4.352.6 \pm4.358.0±4.358.0 \pm4.355.5±4.155.5 \pm4.1
Air USA47.4±1.647.4 \pm1.623.8±2.323.8 \pm2.343.5±1.943.5 \pm1.960.9±1.460.9 \pm1.463.0±1.763.0 \pm1.762.4±1.862.4 \pm1.8
Wiki filteredChameleon filt.41.6±4.941.6 \pm4.946.9±3.446.9 \pm3.432.6±3.732.6 \pm3.746.0±2.646.0 \pm2.650.9±4.150.9 \pm4.147.9±3.847.9 \pm3.8
Squirrel filt.33.2±2.133.2 \pm2.141.1±2.441.1 \pm2.425.7±1.325.7 \pm1.342.5±0.942.5 \pm0.948.0±2.848.0 \pm2.843.9±1.743.9 \pm1.7
Actor33.1±0.533.1 \pm0.539.0±1.039.0 \pm1.029.1±0.829.1 \pm0.832.7±1.432.7 \pm1.438.7±1.138.7 \pm1.136.4±0.936.4 \pm0.9
PlanetoidCora77.677.666.366.379.479.482.1±0.382.1 \pm0.374.6±0.574.6 \pm0.580.7±1.180.7 \pm1.1
CiteSeer61.061.064.964.968.468.467.9±0.267.9 \pm0.269.2±0.469.2 \pm0.466.7±1.066.7 \pm1.0
PubMed73.973.970.370.376.376.378.6±0.378.6 \pm0.372.0±0.772.0 \pm0.778.9±0.178.9 \pm0.1
AmazonAmz. Photos90.2±0.690.2 \pm0.687.2±0.987.2 \pm0.990.7±0.890.7 \pm0.889.6±0.889.6 \pm0.892.5±0.492.5 \pm0.493.1±0.293.1 \pm0.2
Amz. Computers85.5±1.085.5 \pm1.078.9±1.278.9 \pm1.283.0±1.183.0 \pm1.181.8±0.781.8 \pm0.783.9±1.183.9 \pm1.183.5±1.283.5 \pm1.2
Wiki CS79.4±0.679.4 \pm0.673.8±0.673.8 \pm0.675.4±0.775.4 \pm0.776.0±0.776.0 \pm0.779.1±0.679.1 \pm0.679.3±0.479.3 \pm0.4
Citation fullFull DBLP73.7±0.373.7 \pm0.369.3±1.269.3 \pm1.270.9±0.870.9 \pm0.875.3±1.375.3 \pm1.374.8±0.674.8 \pm0.679.9±1.279.9 \pm1.2
Full Cora58.7±0.758.7 \pm0.749.0±0.749.0 \pm0.757.4±0.457.4 \pm0.4—57.2±0.657.2 \pm0.659.9±0.459.9 \pm0.4
Roman Empire79.6±0.479.6 \pm0.465.7±0.565.7 \pm0.564.2±0.664.2 \pm0.648.8±0.548.8 \pm0.567.8±0.467.8 \pm0.465.4±0.565.4 \pm0.5
Amz. Ratings51.2±0.751.2 \pm0.749.1±0.549.1 \pm0.542.5±0.542.5 \pm0.544.2±0.544.2 \pm0.548.6±0.548.6 \pm0.549.0±0.549.0 \pm0.5
CoauthorCo. CS91.4±0.591.4 \pm0.590.6±0.390.6 \pm0.390.6±0.590.6 \pm0.590.8±0.290.8 \pm0.291.3±0.491.3 \pm0.492.0±0.292.0 \pm0.2
Co. Physics92.6±0.692.6 \pm0.690.9±0.990.9 \pm0.992.7±0.592.7 \pm0.592.5±0.692.5 \pm0.690.9±0.990.9 \pm0.992.9±0.992.9 \pm0.9
HM Categories66.466.442.142.137.137.1—55.2±0.755.2 \pm0.748.7±0.148.7 \pm0.1
Pokec 100k78.478.443.243.244.044.078.1±0.578.1 \pm0.583.8±0.283.8 \pm0.286.1±0.586.1 \pm0.5
CityCity Paris40.640.648.548.520.220.244.844.846.9±0.646.9 \pm0.652.8±0.252.8 \pm0.2
City LA35.935.944.844.817.117.144.344.344.3±0.844.3 \pm0.855.2±0.255.2 \pm0.2
City Shanghai38.138.147.647.619.319.344.744.744.2±0.544.2 \pm0.553.5±0.153.5 \pm0.1
Mean accuracy (%)60.6460.6458.6658.6654.8554.85—66.5566.5568.2068.20
Mean rank3.123.123.693.693.963.96—2.422.421.731.73

Table 19. Table 19 Multiclass node classification results (test accuracy %, mean ±\pm std over all available splits). NodePFN is shown but excluded from mean and mean rank (missing Full Cora and HM Categories). TabPFNv3 uses node features only (ignores the graph).

Datasets. We evaluate on a benchmark suite of 26 multiclass node-classification datasets, using official data splits whenever available. The suite comprises Cornell, Texas, Wisconsin, and Actor from Pei et al. [45]; the Brazil, Europe, and USA airport networks from Ribeiro et al. [49]; Chameleon and Squirrel from Rozemberczki et al. [50]; Cora, CiteSeer, and PubMed from Yang et al. [67]; Photo, Computers, Coauthor CS, and Coauthor Physics from Shchur et al. [53]; Wiki CS from Mernyei and Cangea [42]; Full DBLP and Full Cora from Bojchevski and Günnemann [2]; Roman Empire and Amazon Ratings from Platonov et al. [47]; HM Categories and Pokec Regions from Bazhenov et al. [1]; and Paris, Shanghai and LA from Liang et al. [33].

As Pokec Regions contains approximately 1.6 million nodes, we construct a smaller variant, Pokec 100k, to facilitate evaluation. We randomly select a training node as the root and retain the first 100,000 nodes visited by a breadth-first search. Within the resulting connected subgraph, we retain labels for the ten most frequent classes and treat nodes belonging to all remaining classes as unlabeled. Labeled nodes retain their original GraphLand random-low split assignments, while unlabeled nodes are excluded from all splits.

Following the concerns about duplicate nodes in Chameleon and Squirrel raised by Platonov et al. [47], we use the filtered versions of both datasets proposed by the authors.

Whenever official splits are provided, we evaluate on all available splits and average the resulting test performance. For HM Categories, we use the random-low split provided by GraphLand. The Brazil, Europe, USA, Photo, Computers, Full DBLP, Full Cora, Coauthor CS, and Coauthor Physics datasets do not provide official splits. For these datasets, following Zhao et al. [72]; Finkelshtein et al. [14], we sample 20 training nodes per class and divide the remaining nodes equally between validation and test sets. We repeat this procedure for five random seeds and report results aggregated across the resulting splits.

Table 17 summarizes the main statistics of the evaluation datasets. In addition to standard graph and task statistics, we report unbiased homophily as proposed by Mironov and Prokhorenkova [43].

GroupDataset# nodes# features# classes% trainavg. deg.unbiased homophily# official splits
WebKBCornell1831.7k547.5%3.0-0.4710
WebKBTexas1831.7k547.5%3.0-0.8110
WebKBWisconsin2511.7k547.8%3.6-0.2910
AirportsAir Brazil131131461.1%15.30.00–
AirportsAir Europe399399420.1%30.0-0.12–
AirportsAir USA1.2k1.2k46.7%22.90.43–
Wiki filteredChameleon filt.8902.3k546.0%19.90.0810
Wiki filteredSquirrel filt.2.2k2.1k547.4%42.30.0210
Actor7.6k932548.0%7.00.0110
PlanetoidCora2.7k1.4k75.2%3.90.921
PlanetoidCiteSeer3.3k3.7k63.6%2.70.851
PlanetoidPubMed19.7k50030.3%4.50.771
AmazonAmz. Photos7.7k74582.1%31.10.93–
AmazonAmz. Computers13.8k767101.5%35.80.91–
Wiki CS11.7k300105.0%36.90.8620
Citation fullFull DBLP17.7k1.6k40.5%6.00.82–
Citation fullFull Cora19.8k8.7k707.1%6.40.97–
Roman Empire22.7k3001850.0%2.9-0.4910
Amz. Ratings24.5k300550.0%7.60.2810
CoauthorCo. CS18.3k6.8k151.6%8.90.96–
CoauthorCo. Physics34.5k8.4k50.3%14.40.95–
HM Categories46.6k322110.0%460.90.381
Pokec 100k100k56104.0%20.60.821
City networksParis114.1k371010.0%3.20.871
City networksShanghai183.9k371010.0%2.90.891
City networksLA240.6k371010.0%2.80.891
Synth.Cycles5.0k0410.0%3.00.751
Synth.Grids3.1k050.3%3.81.001

Table 17. Table 17 Statistics of considered node classification datasets. “# official splits” counts train/val/test masks shipped with the dataset. “–” denotes datasets without an official split; we use a custom protocol there (5 seeds, 20 labeled nodes per class).

Baselines. We compare against a strongly tuned three-layer GCN (Kipf and Welling, [31]) with hidden dimension 256, trained for 1000 epochs. For each dataset, we perform a grid search over the learning rate {3⋅10−5,10−4,3⋅10−4,10−3,3⋅10−3}\{3 \cdot10^{-5}, 10^{-4}, 3 \cdot10^{-4}, 10^{-3}, 3 \cdot10^{-3}\}, the use of layer normalization and skip connections, and dropout rates in {0,0.1,0.2}\{0, 0.1, 0.2\}. Hyperparameters are selected based on validation performance on a single split and subsequently

fixed for evaluation on all available splits of the corresponding dataset. The selected hyperparameters are reported in Table 18.

GroupDatasetLearning rateDropout rateLayer normSkip connection
WebKBCornell10−310^{-3}0.1––
WebKBTexas10−310^{-3}0.1––
WebKBWisconsin10−310^{-3}0.0✓✓
AirportsBrazil10−410^{-4}0.1✓–
AirportsEurope3×10−43 \times10^{-4}0.1––
AirportsUSA10−310^{-3}0.2––
Wiki filteredChameleon filt.10−310^{-3}0.0✓✓
Wiki filteredSquirrel filt.3×10−43 \times10^{-4}0.1✓–
Wiki filteredActor3×10−33 \times10^{-3}0.2–✓
PlanetoidCora3×10−33 \times10^{-3}0.1––
PlanetoidCiteSeer3×10−33 \times10^{-3}0.1✓–
PlanetoidPubMed3×10−33 \times10^{-3}0.0––
AmazonAmz. Photos10−310^{-3}0.2✓–
AmazonAmz. Computers3×10−43 \times10^{-4}0.0✓–
AmazonWiki CS10−310^{-3}0.1–✓
Citation fullFull DBLP3×10−33 \times10^{-3}0.1✓–
Citation fullFull Cora3×10−33 \times10^{-3}0.2✓–
Citation fullRoman Empire3×10−33 \times10^{-3}0.2–✓
Citation fullAmz. Ratings3×10−33 \times10^{-3}0.2✓✓
CoauthorCo. CS3×10−33 \times10^{-3}0.1–✓
CoauthorCo. Physics10−310^{-3}0.1✓–
CoauthorHM Categories3×10−33 \times10^{-3}0.2✓–
CoauthorPokec 100k3×10−33 \times10^{-3}0.2––
City networksParis3×10−33 \times10^{-3}0.2✓–
City networksShanghai10−310^{-3}0.2✓–
City networksLA3×10−33 \times10^{-3}0.2✓–

Table 18. GCN grid setting chosen for each dataset. Shared architecture: 3 layers, hidden dimension 256, weight decay 5×10−45 \times10^{-4}.

We further consider the graph foundation models GraphAny [72], NodePFN [7], and GraphPFN [13], as well as the tabular foundation model TabPFNv3 [18]. We reevaluate all models using their official implementations. NodePFN supports at most 20 classes and can therefore not be evaluated on Full Cora (70 classes) or HM Categories (21 classes). GraphPFN is architecturally restricted to 10 output classes, but circumvents this restriction through error-correcting output codes (ECOC); following its default evaluation protocol, we use an ensemble of 10 models. Wander natively supports an arbitrary number of classes.

Preprocessing. For GraphPFN and Wander, we follow the transductive preprocessing pipeline provided with GraphPFN. On the GraphLand datasets HM Categories and Pokec 100k, numerical features are transformed using a quantile-normal transformation, fraction-valued features using a quantile-uniform transformation, and categorical features are retained as ordinal encodings. On all remaining datasets, we remove feature columns that are constant over the training nodes and standardize each remaining feature column. For datasets with more than 64 feature dimensions, we subsequently apply PCA to reduce the representation to 64 dimensions. This dimensionality reduction limits memory consumption and more closely matches the feature dimensionalities encountered by GraphPFN and Wander during pretraining. An evaluation without dimension reduction (PCA) for GraphPFN resulted in a worse mean performance and was not used for the results in Table 4.

For NodePFN and GraphAny, we retain the preprocessing procedures provided by their respective official implementations. NodePFN additionally performs model selection over truncated-SVD feature dimensions {10,15,20,25,30}\{10, 15, 20, 25, 30\} and different numbers of smoothing layers. We also preserve this procedure for datasets that are not included in the original NodePFN evaluation code.

For TabPFNv3 we also apply PCA to reduce feature representations to 64 dimensions. An evaluation without dimension reduction resulted in a worse mean performance and was not used for the results in Table 4.

Inference parameters and scalable evaluation of Wander. In a standard Wander forward pass, predictions can be obtained for nodes that are visited by the sampled random walks. At the same time, the in-context learning mechanism relies on sufficiently broad coverage of labeled context nodes. Obtaining such coverage with a single forward pass becomes computationally expensive on large graphs, as it would require sampling a very large number of walks.

We therefore implement a batch-wise node-classification inference procedure that separates the processing of context and query nodes. First, we perform a forward pass in which random walks are initialized exclusively from training nodes, sampled in a class-stratified manner, and cache the resulting intermediate representations of all visited training nodes. We then partition the test nodes into batches of at most 128 by greedy BFS: starting from the highest-degree remaining test node, we collect nearby test nodes in hop order (paths may go through non-test nodes) until the batch is full. This keeps the query nodes in a batch graph-local, so their random walks share neighborhood coverage. For each batch, random walks are initialized exclusively from its query nodes, while the cached training-node representations are supplied as context during the in-context learning update. This allows test nodes to be processed in batches without repeatedly recomputing representations for the labeled context.

Although this procedure is primarily motivated by scalability on large graphs, we use it consistently for all node-classification experiments. We adjust the random-walk budget according to graph size. For graphs with at most 1,000, 1,001–10,000, 10,001–40,000, and more than 40,000 nodes, we use base walk counts of 32, 64, 128, and 256, respectively. We use a walk length of 32 for graphs with at most 1,000 nodes and 128 otherwise. In both passes, we retain the total budget of 3KB3K_B walks per structural update, only their starting-node distribution differs from the standard sampling scheme of Appendix § 11.

Analysis of dataset-specific performance gaps

While Wander performs strongly on average, its advantage is not uniform across datasets. We investigate two possible contributors to these performance gaps: insufficient random-walk coverage on particularly dense graphs and mismatch between the pretraining prior and the structural regime of the evaluation graph.

Dense graphs. HM Categories and DDI are among the datasets on which Wander trails the strongest task-specific baseline. Both graphs are unusually dense relative to most of the evaluation suite. In such graphs, a fixed number of sampled walks explores only a small fraction of the many possible local transitions, potentially yielding insufficient structural coverage. Consistent with this explanation, increasing the base walk count on HM Categories from 256 to 2048, using walks of length 32, raises node-classification accuracy from 48.7% to 52.1%. Similarly, increasing the base walk count on DDI from 128 to 512 improves Recall@20 from 13.0% to 14.1%. These results indicate that part of the performance gap on dense graphs can be reduced by allocating more inference-time computation. They also suggest that adapting the walk budget not only to graph size, but also to graph density, may provide a better inference policy.

Prior mismatch. A second possible source of weaker performance is mismatch between the synthetic pretraining prior and particular evaluation graphs. As discussed in Appendix § 14.13, samples from the Wander prior span both homophilous and heterophilous regimes but are concentrated toward homophily. Correspondingly, replacing the synthetic component with the GraphPFN prior improves performance on several heterophilous node-classification datasets, despite reducing aggregate accuracy. This suggests that the comparatively weaker results on some heterophilous graphs may partly reflect the relative frequency of these regimes during pretraining. However, this evidence is only suggestive: the priors also differ in their graph structures and attribute-generation mechanisms, so the effect cannot be attributed to homophily alone.

Pretraining on single task

Pretraining on single task

For the single-task variants in Table 5, we follow the same pretraining setup and curriculum as described in Appendix § 14.§ 2, but restrict training to the respective task. In each curriculum stage, we train for exactly the number of optimization steps that this task receives in the joint setting. For example, a task assigned 40% of the steps in a given stage is trained for 40% of that stage’s total number of steps. All other hyperparameters and task-specific data distributions are kept unchanged.

Compositional generalization to attributed knowledge graphs

During pretraining, Wander encounters node features on homogeneous graphs and relation types on knowledge graphs, but never both jointly. We test whether these capabilities compose at inference time by evaluating the same pretrained checkpoint zero-shot on ConceptNet100k, WN18RR, and the four inductive WN-v1–v4 graphs in a 2×22 \times2 design with MiniLM node features and relation types enabled or disabled. Without relation types, all relations, including inverses, are mapped to a single dummy type; without features, entities are attribute-free. We use filtered head and tail ranking and the default knowledge-graph inference settings from Appendix § 14.§ 3 and Table 13. Table 6 reports the unweighted mean MRR across WN-v1–v4.

We encode ConceptNet entity strings and WordNet synsets using all-MiniLM-L6-v2 Wang et al. [61], representing each synset as “lemma: gloss.” The resulting 384-dimensional embeddings are reduced to 32 dimensions using PCA.

As shown in Table 6, node features and relation types each improve MRR individually, while their combination performs best on every benchmark. Relation types contribute most strongly, particularly on WordNet, whereas MiniLM features provide the largest gains on ConceptNet100k and the inductive WN-v1–v4 graphs.

Inference-Time Adaptation

Synthetic Grids experiment. To study how the structural range of Wander can be adapted at inference time, we construct the featureless synthetic benchmark Grids as the disjoint union of five 25×2525 \times25 four-neighbor grids. The resulting graph contains 3,125 nodes and 6,000 undirected edges, with each connected component corresponding to one class and having diameter 48. We sample two training nodes per grid, for 10 labeled nodes in total, and randomly split the remaining nodes into 400 validation and 2,715 test nodes. The nearest labeled node is on average 11 hops from a test node and at most 28 hops away. Since no node features are provided and all five components are structurally identical, prediction requires propagating the sparse supervision available elsewhere in the same connected component.

We evaluate the pretrained Wander checkpoint zero-shot, without any dataset-specific finetuning, using the node-classification inference procedure from Appendix § 14.§ 5. To vary the available structural context without changing the model parameters, we evaluate the same checkpoint with walk lengths 4, 16, and 64, while keeping the remaining inference settings fixed. For the context-aware sampling variant, we use length-64 walks, but retain only walks that visit at least one labeled context node. The visualizations in Figure 2 show the predicted probability of the true class for one of the five grid components.

Featureless real-world graphs. We additionally evaluate on PubMed, Full DBLP, Coauthor CS, and Coauthor Physics, whose training splits provide comparatively sparse supervision (see Table 17). We remove all node features and retain only graph structure and the observed training labels. We compare GraphAny, NodePFN, GraphPFN, and Wander in the zero-shot setting, without dataset-specific finetuning. The baseline GFMs are evaluated using their official implementations and preprocessing procedures, while Wander uses the graph-size-dependent random-walk budget described in Appendix § 14.§ 5. We report test accuracy averaged over all available splits.

GridsPubMedFull DBLPCo. CSCo. Physics
GraphAny20.018.044.7 ± 0.022.6 ± 0.050.5 ± 0.0
NodePFN26.6 ± 0.039.5 ± 0.045.9 ± 1.028.3 ± 0.551.2 ± 0.3
GraphPFN23.3 ± 0.749.9 ± 2.661.8 ± 1.659.2 ± 3.569.4 ± 1.2
Wander96.6 ± 0.573.7 ± 0.765.9 ± 3.984.1 ± 0.682.2 ± 5.0
Wander (filtered)100.0 ± 0.072.8 ± 0.570.0 ± 4.684.6 ± 0.685.8 ± 2.7

Table 20. Test accuracy on the synthetic GRIDS dataset and selected real-world graphs without node features.

Inference-time efficiency and compute–performance trade-offs

Runtime. Table 21 compares the wall-clock cost of zero-shot WANDER inference with that of training and evaluating dataset-specific end-to-end models. We consider Cora link prediction with NBFNet and Full DBLP node classification with a GCN. All measurements were obtained on a single NVIDIA RTX PRO 6000 GPU. For WANDER, we use the default inference configuration: batches of eight source nodes with 64 walks of length 64 for link prediction, and batches of 128 nodes with 128 walks of length 128 for node classification. The reported end-to-end runtimes include hyperparameter selection.

Cora (LP)Full DBLP (NC)
WANDERNBFNetWANDERGCN
Grid search–13 min 36 s–1 min 28 s
Single batch (1 inference sample)1.70 s1.1 ms1.13 s2.0 ms
Single batch (16 inference sample)27.2 s–18.1 s–
Full eval (1 inference sample)37 s13 min 36 s1 min 18 s1 min 28 s
Full eval (16 inference samples)10 min 58 s–21 min 16 s–

Table 21. Wall-clock runtimes on a single NVIDIA RTX PRO 6000 GPU. Times are reported for one seed and, for Full DBLP, one data split.

Scoring an individual batch with WANDER takes only a few seconds. Nevertheless, evaluating an entire graph remains computationally substantial, particularly for node classification. With the default 16 inference samples, a full evaluation takes approximately 11 minutes on Cora and 21 minutes on Full DBLP. The number of inference samples can, however, be reduced without retraining the model. With a single inference sample, the corresponding runtimes decrease to 37 seconds and 78 seconds, respectively, making zero-shot WANDER inference faster than training and selecting the dataset-specific baselines on both datasets.

Compute–performance trade-offs. A useful property of WANDER is that its inference-time computation can be adjusted without retraining: we may vary the number of sampled walks, their length, and the number of inference samples whose logits are averaged. Figure 5 quantifies the resulting trade-off between predictive performance and inference speed. Starting from the default configuration, we independently reduce the number of walks and the walk length to one half and one quarter of their dataset-specific defaults, or reduce the number of inference samples from 16 to 8 or 1. For node classification, changes to the random-walk configuration are applied to both the context and query passes of the scalable inference procedure. All other settings remain fixed. We report performance and wall-clock speedup relative to the default configuration, averaged across the homogeneous link-prediction and node-classification benchmarks, respectively.

Compute–performance trade-offs for homogeneous link prediction and node classification

Figure 5. Compute–performance trade-offs obtained by reducing the number of walks, walk length, or inference samples relative to the default configuration. Results are averaged across the datasets of each benchmark.

Reducing the number of inference samples offers the most favorable trade-off: eight samples roughly halve runtime with little performance loss, while one sample provides a larger speedup at a higher cost in performance. Reducing the number of walks also degrades performance gradually, whereas shorter walks cause the largest drop, particularly for link prediction.

Higher-order structural patterns

To evaluate Wander’s ability to identify higher-order structural motifs that are challenging for GNNs bounded by the expressive power of 1-WL, we construct a synthetic four-class node-classification benchmark, Cycles.

Dataset. The graph is featureless, exactly 3-regular, and contains n=5000n = 5000 nodes. We plant 200 triangles, 150 four-cycles, and 120 five-cycles as pairwise vertex-disjoint motifs, yielding 600 nodes in each motif class. Each motif node is connected by one edge to a distinct node in the remaining 3200-node backbone.

The backbone is completed by matching the remaining degree stubs while rejecting self-loops, duplicate edges, and edges between nodes at graph distance of most three. We further reject graphs containing any C3C_3, C4C_4, or C5C_5 outside the planted motifs, ensuring that all such cycles are known by construction. Nodes are labeled by membership in the backbone, C3C_3, C4C_4, or C5C_5. We use stratified 10%/20%/70% train/validation/test splits.

Evaluation protocol. We compare against GCN (Kipf and Welling, [31]) and GraphPFN (Eremeev et al., [13]). GCN uses the same hyperparameter search as in Appendix § 14.§ 5, while GraphPFN is finetuned using the authors’ official procedure. For Wander, we use walk length 16 and base walk count 32 during finetuning and evaluation, and finetune for 200 epochs with 32 batches per epoch and batch size 16. All other hyperparameters match pretraining, only training nodes contribute to the supervised loss, and checkpoint selection is based on validation performance.

As shown in Table 22, GraphPFN reaches 67.4%, only modestly above the 64.0% majority baseline, whereas Wander reaches 97.5%, almost perfectly separating nodes by their cycle participation.

Cycles
Majority64.0
GCN63.3
GraphPFN67.4
Wander97.5

Table 22. Accuracy on Cycles (finetuned).

Finetuning

We additionally evaluate how much Wander benefits from dataset-specific finetuning on the link-prediction benchmarks.

Knowledge graph link prediction. We finetune using the pretraining learning rate of 5×10−55 \times10^{-5}, no weight decay, and 256 negative samples per query. Random-walk sampling follows the default knowledge-graph evaluation protocol described in Appendix § 14.§ 3. We train on the full training split for up to five epochs and select the checkpoint with the highest validation MRR. The resulting performance is reported in Table 23 and compared to the finetuned performance of Ultra, Trix and Flock as reported in the respective papers.

Table 23. Finetuned knowledge graph link prediction results. Best in each row is bold, second-best is <u>underlined</u>.

DatasetUltra (ft.) MRRUltra (ft.) H@10Trix (ft.) MRRTrix (ft.) H@10Flock (ft.) MRRFlock (ft.) H@10Wander MRRWander H@10Wander (ft.) MRRWander (ft.) H@10
Inductive (entity, relation)
FB-250.3830.6350.3930.650<u>0.405</u>0.6660.4040.6630.406<u>0.665</u>
FB-500.3340.5380.3340.5470.3570.570<u>0.352</u><u>0.568</u>0.3450.562
FB-750.4000.5980.4010.6110.425<u>0.630</u>0.4080.617<u>0.424</u>0.631
FB-1000.4440.6430.4360.6330.4600.668<u>0.458</u><u>0.663</u><u>0.458</u><u>0.666</u>
WK-250.3210.535<u>0.300</u>0.4930.298<u>0.506</u>0.288<u>0.477</u>0.2930.493
WK-500.1400.2800.1660.3130.1270.260<u>0.147</u><u>0.289</u>0.1260.272
WK-750.3800.5300.3680.5130.4050.5560.372<u>0.517</u>0.4010.556
WK-1000.1680.286<u>0.188</u>0.2990.187<u>0.306</u>0.1900.3090.1820.297
NL-00.3290.5510.3850.5490.4180.6190.3510.553<u>0.403</u>0.628
NL-250.407<u>0.596</u>0.3770.589<u>0.405</u>0.6260.3380.5460.390<u>0.596</u>
NL-500.418<u>0.595</u>0.4050.5550.3910.5620.3910.579<u>0.403</u>0.605
NL-750.374<u>0.570</u>0.3510.5250.3440.5440.3570.555<u>0.360</u>0.582
NL-1000.458<u>0.684</u>0.4820.6910.4860.714<u>0.487</u>0.7070.4950.706
MT1 tax0.3300.4590.397<u>0.508</u>0.4130.4970.2810.410<u>0.405</u>0.519
MT1 health0.3800.4670.3760.457<u>0.394</u>0.493<u>0.391</u>0.4830.394<u>0.492</u>
MT2 org0.1040.1700.0980.1620.1070.1740.1020.1670.1080.176
MT2 sci0.3110.4510.331<u>0.526</u>0.3660.5250.359<u>0.526</u>0.3780.542
MT3 art0.3060.4730.2890.4410.330<u>0.483</u>0.3040.466<u>0.329</u>0.491
MT3 infra0.6570.8070.6720.810<u>0.709</u>0.8380.6770.8220.7130.846
MT4 sci0.3030.4780.3050.482<u>0.324</u><u>0.509</u>0.3100.4800.3270.512
MT4 health0.7040.7850.7020.785<u>0.711</u>0.7900.701<u>0.787</u>0.7140.790
Metafam<u>0.997</u>1.000<u>0.997</u>1.0000.9921.0000.504<u>0.941</u>1.0001.000
FBNELL0.4810.6610.4780.6550.5310.714<u>0.526</u><u>0.712</u>0.525<u>0.712</u>
Inductive (entity)
FB-v10.5090.6700.5150.6820.5490.721<u>0.524</u>0.7010.5490.721
FB-v20.5240.7100.5250.730<u>0.553</u>0.7540.5400.7420.5600.755
FB-v30.5040.6630.5010.669<u>0.528</u>0.6960.5140.693<u>0.525</u>0.695
FB-v40.4960.6840.4930.687<u>0.510</u>0.7020.504<u>0.703</u>0.5150.705
WN-v10.6850.7930.7050.798<u>0.715</u>0.8110.6900.807<u>0.713</u>0.814
WN-v20.6790.7790.6820.780<u>0.702</u><u>0.795</u>0.6870.7930.7060.801
WN-v30.4110.5460.4250.5430.4940.627<u>0.478</u>0.6270.496<u>0.625</u>
WN-v40.6140.7200.6500.7220.665<u>0.741</u>0.6500.731<u>0.663</u>0.744
NL-v10.7570.8780.804<u>0.899</u>0.7620.9280.6770.878<u>0.789</u>0.888
NL-v20.5750.7610.5710.764<u>0.612</u>0.8060.5870.7940.6160.812
NL-v30.5630.7550.5710.759<u>0.606</u><u>0.803</u><u>0.610</u>0.7960.6200.809
NL-v40.4690.7330.5510.772<u>0.572</u>0.801<u>0.572</u>0.7950.5870.798
HM 1k0.0420.1000.0720.128<u>0.071</u>0.1530.0620.1190.066<u>0.132</u>
HM 3k0.0300.0900.0690.119<u>0.067</u>0.153<u>0.069</u>0.1260.0780.150
HM 5k0.0250.0680.0740.1180.061<u>0.130</u><u>0.067</u>0.1260.0600.136
HM Indigo<u>0.432</u>0.6390.4360.6450.4180.6330.4160.6360.4110.636
ILPC Small0.3030.4530.3030.455<u>0.305</u>0.4540.310<u>0.459</u>0.3100.462
ILPC Large0.3080.4310.3100.431<u>0.320</u><u>0.441</u>0.3210.4400.3210.442
Transductive
NELL9950.5090.6600.5060.648<u>0.531</u><u>0.665</u>0.5190.6620.5650.681
NELL23k0.2680.450<u>0.306</u><u>0.536</u>0.2800.4650.2490.4130.3270.552
WDsinger0.4170.5260.502<u>0.620</u>0.4350.5430.4020.5210.5020.633
ConceptNet1000.3100.5290.3400.564<u>0.352</u><u>0.580</u>0.2580.4770.3810.614
CoDEx Small0.4900.686<u>0.484</u><u>0.676</u>0.4630.6480.4570.6580.4730.663
CoDEx Large0.343<u>0.478</u>0.3480.4810.3420.4670.3450.475<u>0.347</u>0.477
YAGO310<u>0.557</u>0.7100.5410.7020.5520.7000.4990.6660.5750.718
AristoV40.3430.4960.3450.499<u>0.383</u><u>0.523</u>0.2950.4240.3870.530
DBpedia100k0.4360.6030.4570.619<u>0.470</u><u>0.623</u>0.4360.6250.4720.630
Hetionet0.3990.538<u>0.394</u><u>0.534</u>0.3140.4650.2790.4150.3380.478
FB15k-237(10)<u>0.254</u>0.4110.2530.4080.2600.4200.2480.4040.2600.422
FB15k-237(20)0.2740.4450.2730.4410.2840.4590.2770.451<u>0.282</u><u>0.457</u>
FB15k-237(50)0.3250.5280.3220.5220.3170.5170.3230.5230.3220.523
Mean0.4070.5620.4180.569<u>0.427</u><u>0.583</u>0.3990.5650.4330.590
Mean rank3.7963.8983.4353.657<u>2.380</u><u>2.324</u>3.4633.3701.9261.750

Table 23.

Finetuning increases mean MRR from 0.399 to 0.433 and Hits@10 from 0.565 to 0.590. The finetuned model thereby surpasses the strongest specialized baseline on average, showing that Wander retains its advantage in knowledge-graph reasoning when all methods are adapted to each target graph.

Homogeneous link prediction. We use the same finetuning protocol for homogeneous link prediction, with random-walk sampling following the corresponding default evaluation setup. Since not all datasets provide a validation split, we do not perform dataset-specific checkpoint selection and instead evaluate the checkpoint after five finetuning epochs for every dataset. Results are reported in Table 24.

CiteSeerCoraPubMedCSDDIProducts HomeP2P GnutellaEmail EnronProteins Spec1SOC EpinionsMeanMean rank
Wander65.8856.7831.7364.6212.9871.129.0669.7831.4020.5943.391.90
Wander (ft.)69.2060.9039.7070.0011.9072.609.3071.9036.6021.3046.341.10

Table 24. Finetuned homogeneous link prediction (Recall@20 %).

Finetuning improves mean Recall@20 from 43.39% to 46.34%, with gains on nine of the ten datasets. The largest improvements occur on PubMed, Coauthor CS, and Proteins, whereas performance decreases slightly on DDI. Thus, the pretrained model generally adapts effectively to individual graphs in the homogeneous link-prediction setting, although the benefit depends on the target graph.

Prior ablations

Node classification. We finetune the pretrained Wander checkpoint separately on each dataset using only the official training nodes of split 0. Each epoch comprises five optimizer steps with 16 query nodes each. To provide additional supervision, at every step we also hide the labels of a randomly sampled 25% of the training nodes, capped at 1,024, and compute the loss on those hidden nodes encountered in at least one forward pass. During training, we use 128 walks and the size-dependent walk length specified in Appendix § 14.§ 5. We train for at most 100 epochs, with early stopping after 15 epochs without improvement in validation accuracy. For each dataset, we select the learning rate from 10 logarithmically spaced values between 5×10−65 \times10^{-6} and 5×10−45 \times10^{-4} based on validation accuracy. The selected checkpoint is evaluated on the split-0 test nodes using the same size-tier walk budget as in the zero-shot evaluation. We report the mean and standard deviation over three seeds in Table 25.

GroupDatasetZero-shotFinetuned
WebKBCornell74.77±1.2774.77 \pm1.2772.07±1.2772.07 \pm1.27
Texas75.68±2.2175.68 \pm2.2180.18±1.2780.18 \pm1.27
Wisconsin76.47±0.0076.47 \pm0.0071.24±0.9271.24 \pm0.92
AirportsAir Brazil78.21±1.8178.21 \pm1.8180.77±0.0080.77 \pm0.00
Air Europe57.29±2.0657.29 \pm2.0657.29±0.2957.29 \pm0.29
Air USA61.20±0.0861.20 \pm0.0861.62±0.6761.62 \pm0.67
Wiki filteredChameleon filt.50.52±1.1150.52 \pm1.1149.31±0.6449.31 \pm0.64
Squirrel filt.43.58±0.7943.58 \pm0.7945.80±0.6545.80 \pm0.65
Actor37.61±0.2037.61 \pm0.2039.65±0.3839.65 \pm0.38
PlanetoidCora80.80±1.0280.80 \pm1.0281.90±0.8081.90 \pm0.80
CiteSeer66.50±1.2866.50 \pm1.2867.00±1.0467.00 \pm1.04
PubMed78.87±0.2478.87 \pm0.2482.10±0.9082.10 \pm0.90
AmazonAmz. Photos92.89±0.0992.89 \pm0.0993.20±0.0993.20 \pm0.09
Amz. Computers84.72±0.0784.72 \pm0.0786.87±0.1486.87 \pm0.14
Wiki CS79.32±0.0879.32 \pm0.0880.59±0.0680.59 \pm0.06
Citation fullFull DBLP81.11±0.1781.11 \pm0.1781.58±0.1481.58 \pm0.14
Full Cora59.94±0.1259.94 \pm0.1259.27±0.2259.27 \pm0.22
Roman Empire64.41±0.1164.41 \pm0.1183.18±0.1983.18 \pm0.19
Amz. Ratings49.35±0.1249.35 \pm0.1255.45±0.1155.45 \pm0.11
CoauthorCo. CS92.21±0.0692.21 \pm0.0692.84±0.0892.84 \pm0.08
Co. Physics93.01±0.2493.01 \pm0.2493.62±0.2493.62 \pm0.24
HM Categories48.72±0.1148.72 \pm0.1154.13±0.1254.13 \pm0.12
Pokec 100k86.05±0.4986.05 \pm0.4985.95±0.0785.95 \pm0.07
CityCity Paris52.83±0.2052.83 \pm0.2055.44±0.1255.44 \pm0.12
City LA55.16±0.2055.16 \pm0.2058.30±0.1858.30 \pm0.18
City Shanghai53.47±0.1053.47 \pm0.1060.35±0.0560.35 \pm0.05
Mean accuracy (%)68.2670.37

Table 25. Node classification finetuning versus zero-shot Wander on split 0 only (test accuracy %, mean ±\pm std over 3 seeds).

Finetuning raises mean accuracy from 68.26% to 70.37%, improving performance on 20 of the 26 graphs. Note that zero-shot mean accuracy differs from earlier tables, since we only considered split 0 here. The largest gains occur on Roman Empire and several Amazon, HM Categories, and city-network datasets, indicating that dataset-specific supervision can substantially adapt the pretrained representations when the target graph differs from the pretraining distribution. However, gains are not uniform, with the largest decreases occurring on the two small datasets Cornell and Wisconsin. Overall, finetuning provides useful adaptation from an already strong zero-shot initialization. Future work could investigate protocols that adapt the optimization and sampling budgets to graph size and the amount of available supervision.

Prior ablations

To assess the effect of the synthetic graph distribution, we repeat Wander’s pretraining with either the NodePFN or GraphPFN prior in place of our synthetic attributed-graph prior. In both ablations, we retain the original mixture of synthetic and real-world knowledge-graph training episodes, including the same three knowledge graphs; only the generator of synthetic graphs changes. The architecture and remaining training setup are held fixed.

Table 26 reports the aggregate results. The Wander prior yields the highest mean node classification accuracy and homogeneous link-prediction Recall@20; knowledge graph link-prediction MRR changes only marginally.

Synthetic priorKG LP MRRNode cls. Acc. (%)Hom. LP R@20 (%)
Wander prior0.39968.2043.39
NodePFN prior0.39766.4441.16
GraphPFN prior0.39867.3339.53

Table 26. Ablation of the synthetic attributed-graph pre-training prior.

Figure 6 shows where the differences arise. In homogeneous link prediction, both alternative priors underperform particularly on graphs with high clustering relative to their average degree, consistent with the broader coverage of this structural regime in Figure 3. For node classification, the pattern is less uniform: GraphPFN’s prior improves accuracy on several heterophilous graphs, even though its aggregate accuracy is lower. One possible explanation is that homophilous graphs make up a larger share of the Wander prior, leaving its pretrained model less adapted to heterophily. These interpretations remain tentative, since the priors differ in other aspects of graph and attribute generation as well.

Change in node-classification accuracy versus unbiased homophily and change in link-prediction Recall@20 versus clustering coefficient divided by average degree

Figure 6. (a) Change in node-classification accuracy versus unbiased homophily. (b) Change in link-prediction Recall@20 versus clustering coefficient divided by average degree. Effect of replacing Wander’s synthetic attributed-graph prior with the NodePFN or GraphPFN prior. Points show results on individual real-world datasets; vertical differences are measured relative to the model trained with the Wander prior, in percentage points.

Architecture ablations

We assess the contribution of the three update operations that constitute each Wander layer: the intra-node update, the in-context-learning (ICL) update, and the stochastic structural update. We train three variants in which one of these operations is removed from every layer. Without the intra-node update, information cannot be exchanged between the feature, label, and structure tokens associated with the same node. Without the ICL update, tokens cannot directly attend to the labeled context nodes within their respective channels. Finally, without the stochastic structural update, no graph information can be used, and the model falls back to a tabular model.

The results confirm that all three updates contribute, although their importance depends on the task. Removing the intra-node update has almost no effect on KG link prediction, which is expected because the knowledge graphs contain no node features and prediction is driven primarily by relation-conditioned structural information. In contrast, the same ablation substantially degrades node classification and homogeneous link prediction, where intra-node mixing is needed to combine attributes with label and structural tokens. Removing the ICL update similarly hurts both attributed tasks and causes a smaller reduction on knowledge graphs. The stochastic structural update is essential across all settings: without it, performance drops sharply, and KG link prediction becomes effectively impossible in the absence of node attributes.

ModelKG LP MRRNode cls. Acc. (%)Hom. LP R@20 (%)
Wander0.39968.2043.39
w/o intra-node update0.39860.2338.1
w/o ICL update0.39361.0237.1
w/o stochastic structural update0.00151.1115.6

Table 27. Ablations of the three layer components of WANDER.

References

  1. [1]Gleb Bazhenov, Oleg Platonov, and Liudmila Prokhorenkova. Graphland: Evaluating graph machine learning models on diverse industrial data. Advances in Neural Information Processing Systems, 38, 2025. (page 33)arxiv.org/abs/2409.14500
  2. [2]Aleksandar Bojchevski and Stephan Günnemann. Deep gaussian embedding of graphs: Unsupervised inductive learning via ranking. In International Conference on Learning Representations, 2018. (page 33)
  3. [3]Antoine Bordes, Nicolas Usunier, Alberto Garcia-Duran, Jason Weston, and Oksana Yakhnenko. Translating embeddings for modeling multi-relational data. Advances in neural information processing systems, 26, 2013. (page 8)
  4. [4]Benjamin Paul Chamberlain, Sergey Shirobokov, Emanuele Rossi, Fabrizio Frasca, Thomas Markovich, Nils Hammerla, Michael M. Bronstein, and Max Hansmire. Graph neural networks for link prediction with subgraph sketching. In International Conference on Learning Representations, 2023. (pages 3, 8, 31)arxiv.org/abs/2209.15486
  5. [5]Yihong Chen, Pasquale Minervini, Sebastian Riedel, and Pontus Stenetorp. Relation prediction as an auxiliary training objective for improving multi-relational graph representations. In 3rd Conference on Automated Knowledge Base Construction, 2021. (page 30)
  6. [6]Kyunghyun Cho, Bart Van Merriënboer, Çağlar Gülçehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder–decoder for statistical machine translation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pages 1724–1734, 2014. (page 18)arxiv.org/abs/1406.1078
  7. [7]Jeongwhan Choi, Jongwoo Kim, Woosung Kang, and Noseong Park. Learning posterior predictive distributions for node classification from synthetic graph priors. In International Conference on Learning Representations, 2026. (pages 1, 2, 7, 8, 27, 35)arxiv.org/abs/2604.19028
  8. [8]Tim Dettmers, Pasquale Minervini, Pontus Stenetorp, and Sebastian Riedel. Convolutional 2d knowledge graph embeddings. In Proceedings of the AAAI conference on artificial intelligence, volume 32, 2018. (pages 7, 28)
  9. [9]Boyang Ding, Quan Wang, Bin Wang, and Li Guo. Improving knowledge graph embedding using simple constraints. In Proceedings of the 56th annual meeting of the association for computational linguistics (volume 1: Long papers), pages 110–121, 2018. (page 30)arxiv.org/abs/1805.02408
  10. [10]Kaiwen Dong, Haitao Mao, Zhichun Guo, and Nitesh V Chawla. Universal link predictor by in-context learning on graphs. arXiv preprint arXiv:2402.07738, 2024. (pages 1, 3, 8, 32)arxiv.org/abs/2402.07738
  11. [11]Paul Erdős and Alfréd Rényi. On random graphs i. Publicationes Mathematicae Debrecen, 6:290–297, 1959. (pages 7, 27)
  12. [12]Dmitry Eremeev, Gleb Bazhenov, Oleg Platonov, Artem Babenko, and Liudmila Prokhorenkova. Turning tabular foundation models into graph foundation models. arXiv preprint arXiv:2508.20906, 2025. (page 2)arxiv.org/abs/2508.20906
  13. [13]Dmitry Eremeev, Oleg Platonov, Gleb Bazhenov, Artem Babenko, and Liudmila Prokhorenkova. GraphPFN: A prior-data fitted graph foundation model. In International Conference on Machine Learning, 2026. (pages 1, 2, 7, 8, 19, 27, 35, 43)arxiv.org/abs/2509.21489
  14. [14]Ben Finkelshtein, Ismail Ilkan Ceylan, Michael Bronstein, and Ron Levie. Equivariance everywhere all at once: A recipe for graph foundation models. Advances in Neural Information Processing Systems, 38:30377–30434, 2025. (pages 1, 2, 33)arxiv.org/abs/2506.14291
  15. [15]Mikhail Galkin, Etienne Denis, Jiapeng Wu, and William L. Hamilton. NodePiece: Compositional and parameter-efficient representations of large knowledge graphs. In International Conference on Learning Representations, 2022. (page 29)arxiv.org/abs/2106.12144
  16. [16]Mikhail Galkin, Xinyu Yuan, Hesham Mostafa, Jian Tang, and Zhaocheng Zhu. Towards foundation models for knowledge graph reasoning. In ICLR, 2024. (pages 1, 3, 7, 8, 29, 30)arxiv.org/abs/2310.04562
  17. [17]Edward N. Gilbert. Random plane networks. Journal of the society for industrial and applied mathematics, 9(4): 533–543, 1961. (pages 7, 27)DOI
  18. [18]Léo Grinsztajn, Klemens Flöge, Oscar Key, Felix Birkel, Philipp Jund, Brendan Roof, Mihir Manjum, Shi Bin Hoo, Magnus Bühler, Anurag Garg, et al. Tabpfn-3: Technical report. arXiv preprint arXiv:2605.13986, 2026. (pages 8, 35)arxiv.org/abs/2605.13986
  19. [19]Aditya Grover and Jure Leskovec. Node2vec: Scalable feature learning for networks. In KDD, 2016. (pages 2, 3)arxiv.org/abs/1607.00653
  20. [20]Adrian Hayler, Xingyue Huang, İsmail İlkan Ceylan, Michael Bronstein, and Ben Finkelshtein. Bringing graphs to the table: Zero-shot node classification via tabular foundation models. arXiv preprint arXiv:2509.07143, 2025. doi: 10.48550/arXiv.2509.07143. (pages 1, 2)DOI
  21. [21]Daniel Scott Himmelstein, Antoine Lizee, Christine Hessler, Leo Brueggeman, Sabrina L Chen, Dexter Hadley, Ari Green, Pouya Khankhanian, and Sergio E Baranzini. Systematic integration of biomedical knowledge prioritizes drugs for repurposing. elife, 6:e26726, 2017. (page 30)
  22. [22]Paul W Holland, Kathryn Blackmond Laskey, and Samuel Lein­hardt. Stochastic blockmodels: First steps. Social networks, 5(2):109–137, 1983. (pages 7, 27)DOI
  23. [23]N. Hollmann, S. Müller, L. Purucker, A. Krishnakumar, M. Körfer, S. B. Hoo, R. T. Schirrmeister, and F. Hutter. Accurate predictions on small data with a tabular foundation model. Nature, 2025. (pages 2, 19)DOI
  24. [24]Noah Hollmann, Samuel Müller, Katharina Eggensperger, and Frank Hutter. TabPFN: A transformer that solves small tabular classification problems in a second. In International Conference on Learning Representations, 2023. (pages 2, 7, 27)arxiv.org/abs/2207.01848
  25. [25]Weihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong, Hongyu Ren, Bowen Liu, Michele Catasta, and Jure Leskovec. Open graph benchmark: Datasets for machine learning on graphs. Advances in neural information processing systems, 33:22118–22133, 2020. (page 9)arxiv.org/abs/2005.00687
  26. [26]Qian Huang, Hongyu Ren, Peng Chen, Gregor Kržmanc, Daniel Zeng, Percy Liang, and Jure Leskovec. PRODIGY: Enabling in-context learning over graphs. In NeurIPS, 2023a. (page 3)arxiv.org/abs/2305.12600
  27. [27]Xingyue Huang, Miguel Romero, Ismail Ceylan, and Pablo Barceló. A theory of link prediction via relational weisfeiler-leman on knowledge graphs. Advances in Neural Information Processing Systems, 36:19714–19748, 2023b. (pages 1, 3)arxiv.org/abs/2302.02209
  28. [28]Xingyue Huang, Pablo Barceló, Michael M. Bronstein, İsmail İlkan Ceylan, Mikhail Galkin, Juan L Reutter, and Miguel Romero Orth. How expressive are knowledge graph foundation models? In ICML, 2025. (pages 1, 3)arxiv.org/abs/2502.13339
  29. [29]Jinwoo Kim, Olga Zaghen, Ayhan Suleymanzade, Youngmin Ryou, and Seunghoon Hong. Revisiting random walks for learning on graphs. In International Conference on Learning Representations, volume 2025, pages 82497–82547, 2025. (pages 2, 3, 6)arxiv.org/abs/2407.01214
  30. [30]Jinwoo Kim, Xingyue Huang, Krzysztof Olejniczak, Kyungbin Min, Michael Bronstein, Seunghoon Hong, and İsmail İlkan Ceylan. Flock: A knowledge graph foundation model via learning on random walks. In International Conference on Learning Representations, 2026. (pages 1, 2, 3, 6, 7, 8, 17, 19, 29, 30, 35)arxiv.org/abs/2510.01510
  31. [31]Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations, 2017. (pages 2, 3, 8, 33, 43)arxiv.org/abs/1609.02907
  32. [32]Jaejun Lee, Chanyoung Chung, and Joyce Jiyoung Whang. Ingram: Inductive knowledge graph embedding via relation graphs. In International conference on machine learning, pages 18796–18809. PMLR, 2023. (page 29)arxiv.org/abs/2305.19987
  33. [33]Huidong Liang, Haitz Sáez de Ocáriz Borde, Baskaran Sripathmanathan, Michael Bronstein, and Xiaowen Dong. Towards quantifying long-range interactions in graph machine learning: a large graph dataset and a measurement. In International Conference on Learning Representations, volume 2026, pages 34655–34688, 2026. (page 33)
  34. [34]Tiany​​in Liao, Chunyu Hu, Yicheng Sui, Xingxuan Zhang, Peng Cui, Jianxin Li, and Ziwei Zhang. TfmLinker: Universal link predictor by graph in-context learning with tabular foundation models. arXiv preprint arXiv:2602.08592, 2026. (pages 1, 3, 8, 32)arxiv.org/abs/2602.08592
  35. [35]David Liben-Nowell and Jon Kleinberg. The link prediction problem for social networks. In Proceedings of the twelfth international conference on Information and knowledge management, pages 556–559, 2003. (pages 1, 8)
  36. [36]Hao Liu, Jiarui Feng, Lecheng Kong, Ningyue Liang, Dacheng Tao, Yixin Chen, and Muhan Zhang. One for all: Towards training one graph model for all classification tasks. In International conference on learning representations, volume 2024, pages 20188–20210, 2024. (page 3)arxiv.org/abs/2310.00149
  37. [37]Shuwen Liu, Bernardo Grau, Ian Horrocks, and Egor Kostylev. Indigo: Gnn-based inductive knowledge graph completion using pair-wise encoding. Advances in Neural Information Processing Systems, 34:2034–2045, 2021. (page 29)
  38. [38]László Lovász and Balázs Szegedy. Limits of dense graph sequences. Journal of Combinatorial Theory, Series B, 96(6):933–957, 2006. (pages 7, 27)DOI
  39. [39]Xin Lv, Xu Han, Lei Hou, Juanzi Li, Zhiyuan Liu, Wei Zhang, Yichi Zhang, Hao Kong, and Suhui Wu. Dynamic anticipation and completion for multi-hop reasoning over sparse knowledge graph. In Proceedings of the 2020 conference on empirical methods in natural language processing (EMNLP), pages 5694–5703, 2020. (page 30)
  40. [40]Farzaneh Mahdisoltani, Joanna Biega, and Fabian Suchanek. Yago3: A knowledge base from multilingual wikipedias. In 7th biennial conference on innovative data systems research. CIDR Conference, 2014. (page 30)
  41. [41]Chaitanya Malaviya, Chandra Bhagavatula, Antoine Bosselut, and Yejin Choi. Commonsense knowledge base completion with structural and semantic context. In Proceedings of the AAAI conference on artificial intelligence, volume 34, pages 2925–2933, 2020. (page 30)
  42. [42]Péter Mernyei and Cătălina Cangea. Wiki-cs: A wikipedia-based benchmark for graph neural networks. arXiv preprint arXiv:2007.02901, 2020. (page 33)arxiv.org/abs/2007.02901
  43. [43]Mikhail Mironov and Liudmila Prokhorenkova. Revisiting graph homophily measures. In Guy Wolf and Smita Krishnaswamy, editors, Proceedings of the Third Learning on Graphs Conference, volume 269 of Proceedings of Machine Learning Research, pages 1:1–1:22. PMLR, 26–29 Nov 2025. (page 33)arxiv.org/abs/2412.09663
  44. [44]Samuel Müller, Noah Hollmann, Sebastian Pineda Arango, Josif Grabocka, and Frank Hutter. Transformers can do bayesian inference. In International Conference on Learning Representations, 2022. (pages 7, 27)arxiv.org/abs/2112.10510
  45. [45]Hongbin Pei, Bingzhe Wei, Kevin Chen-Chuan Chang, Yu Lei, and Bo Yang. Geom-GCN: Geometric graph convolutional networks. In International Conference on Learning Representations, 2020. (pages 1, 33)arxiv.org/abs/2002.05287
  46. [46]Bryan Perozzi, Rami Al-Rfou, and Steven Skiena. Deepwalk: online learning of social representations. In KDD, 2014. (pages 2, 3)
  47. [47]Oleg Platonov, Denis Kuznedelev, Michael Diskin, Artem Babenko, and Liudmila Prokhorenkova. A critical look at the evaluation of GNNs under heterophily: Are we really making progress? In International Conference on Learning Representations, 2023. (page 33)
  48. [48]Jingang Qu, David Holzmüller, Gaël Varoquaux, and Marine Le Morvan. TabICL: A tabular foundation model for in-context learning on large data. In Forty-second International Conference on Machine Learning, 2025. (page 2)
  49. [49]Leonardo FR Ribeiro, Pedro HP Saverese, and Daniel R Figueiredo. struc2vec: Learning node representations from structural identity. In Proceedings of the 23rd ACM SIGKDD international conference on knowledge discovery and data mining, pages 385–394, 2017. (page 33)
  50. [50]Benedek Rozemberczki, Carl Allen, and Rik Sarkar. Multi-scale attributed node embedding. Journal of Complex Networks, 9(2):cnab014, 2021. (page 33)arxiv.org/abs/1909.13021
  51. [51]Tara Safavi and Danai Koutra. Codex: A comprehensive knowledge graph completion benchmark. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 8328–8350, 2020. (pages 7, 28, 30) Michael Sejr Schlichtkrull, Thomas N. Kipf, Peter Bloem, Rianne van den Berg, Ivan Titov, and Max Welling. Modeling relational data with graph convolutional networks. In ESWC, 2018. (page 3)
  52. [52]Noam Shazeer. Glu variants improve transformer. arXiv preprint arXiv:2002.05202, 2020. (page 16)arxiv.org/abs/2002.05202
  53. [53]Oleksandr Schur, Maximilian Mumme, Aleksandar Bojchevski, and Stephan Günnemann. Pitfalls of graph neural network evaluation. arXiv preprint arXiv:1811.05868, 2018. (page 33)
  54. [54]Jianlin Su, Murtadha Ahmed, Yu Lu, Shengfeng Pan, Wen Bo, and Yunfeng Liu. Roformer: Enhanced transformer with rotary position embedding. Neurocomputing, 568:127063, 2024. (page 16)arxiv.org/abs/2104.09864
  55. [55]Yanchao Tan, Zihao Zhou, Hang Lv, Weiming Liu, and Carl Yang. Walklm: a uniform language model fine-tuning framework for attributed graph embedding. In NeurIPS, 2023. (pages 2, 3)
  56. [56]Komal Teru, Etienne Denis, and Will Hamilton. Inductive relation prediction by subgraph reasoning. In International conference on machine learning, pages 9448–9457. PMLR, 2020. (page 29)
  57. [57]Jan Tönshoff, Martin Ritzert, Hinrikus Wolf, and Martin Grohe. Walking out of the Weisfeiler leman hierarchy: Graph learning beyond message passing. TMLR, 2021. (pages 2, 3)
  58. [58]Kristina Toutanova and Danqi Chen. Observed versus latent features for knowledge base and text inference. In Proceedings of the 3rd workshop on continuous vector space models and their compositionality, pages 57–66, 2015. (pages 7, 28)
  59. [59]Shikhar Vashishth, Soumya Sanyal, Vikram Nitin, and Partha Talukdar. Composition-based multi-relational graph convolutional networks. In ICLR, 2020. (page 3)arxiv.org/abs/1911.03082
  60. [60]Petar Veličković, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua Bengio. Graph attention networks. In ICLR, 2018. (page 2)arxiv.org/abs/1710.10903
  61. [61]Wenhui Wang, Furu Wei, Li Dong, Hangbo Bao, Nan Yang, and Ming Zhou. Minilm: Deep self-attention distillation for task-agnostic compression of pre-trained transformers. Advances in neural information processing systems, 33:5776–5788, 2020. (pages 9, 41)
  62. [62]Duncan J Watts and Steven H Strogatz. Collective dynamics of ‘small-world’ networks. nature, 393(6684):440–442, 1998. (pages 7, 27)
  63. [63]Lianghao Xia and Chao Huang. AnyGraph: Graph foundation model in the wild. In Findings of the Association for Computational Linguistics: ACL 2026, pages 882–896. Association for Computational Linguistics, 2026. (pages 1, 3, 8, 30, 31)
  64. [64]Lianghao Xia, Ben Kao, and Chao Huang. Opengraph: Towards open graph foundation models. In Findings of the Association for Computational Linguistics: EMNLP 2024, pages 2365–2379, 2024. (page 3)arxiv.org/abs/2403.01121
  65. [65]Wenhan Xiong, Thien Hoang, and William Yang Wang. Deeppath: A reinforcement learning method for knowledge graph reasoning. In Proceedings of the 2017 conference on empirical methods in natural language processing, pages 564–573, 2017. (page 30)
  66. [66]Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In ICLR, 2019. (page 2)
  67. [67]Zhilin Yang, William Cohen, and Ruslan Salakhudinov. Revisiting semi-supervised learning with graph embeddings. In International conference on machine learning, pages 40–48. PMLR, 2016. (page 33)
  68. [68]Biao Zhang and Rico Sennrich. Root mean square layer normalization. Advances in neural information processing systems, 32, 2019. (page 16)arxiv.org/abs/1910.07467
  69. [69]Muhan Zhang and Yixin Chen. Link prediction based on graph neural networks. Advances in neural information processing systems, 31, 2018. (page 3)
  70. [70]Xingxuan Zhang, Gang Ren, Han Yu, Hao Yuan, Hui Wang, Jiansheng Li, Jiayun Wu, Lang Mo, Li Mao, Mingchao Hao, et al. Limix: Unleashing structured-data modeling capability for generalist intelligence. arXiv preprint arXiv:2509.03505, 2025. (page 2)
  71. [71]Yucheng Zhang, Beatrice Bevilacqua, Mikhail Galkin, and Bruno Ribeiro. TRIX: A more expressive model for zero-shot domain transfer in knowledge graphs. In LoG, 2024. (pages 1, 3, 7, 29, 30)arxiv.org/abs/2502.19512
  72. [72]Jianan Zhao, Zhaocheng Zhu, Mikhail Galkin, Hesham Mostafa, Michael M. Bronstein, and Jian Tang. Fully-inductive node classification on arbitrary graphs. In International Conference on Learning Representations, 2025. (pages 1, 2, 8, 33, 35)arxiv.org/abs/2405.20445
  73. [73]Jincheng Zhou, Beatrice Bevilacqua, and Bruno Ribeiro. A multi-task perspective for link prediction with new relation types and nodes. arXiv preprint arXiv:2307.06046, 2023. (page 29)arxiv.org/abs/2307.06046
  74. [74]Tao Zhou, Linyuan Lü, and Yi-Cheng Zhang. Predicting missing links via local information. The European Physical Journal B, 71(4):623–630, 2009. (page 8)DOI
  75. [75]Zhaocheng Zhu, Zuobai Zhang, Louis-Pascal Chon‍neux, and Jian Tang. Neural bellman-ford networks: A general graph neural network framework for link prediction. In NeurIPS, 2021. (pages 3, 8, 31)arxiv.org/abs/2106.06935

Paper details

vlnc:W_372ruwse
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 9

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents