betaFeedback

WorksComputer Science

THETA: Heat Diffusion as a Structural Prior for Cross-Domain Transfer in Graph Foundation Models

Abstract

Graph foundation models (GFMs) aim to learn transferable representations across domains with heterogeneous node attributes and graph structures. However, relations inferred from node attributes can rely on domain-specific feature semantics, limiting their transferability to unseen graphs, particularly in low-label regimes. We propose THETA (Topology-aware HEat-based TrAnsfer), a graph foundation model that leverages Heat Kernel Signatures (HKS) as a topology-based structural prior for cross-domain transfer. By characterizing nodes' heat-return behavior across diffusion scales, HKS provides a common structural descriptor across graphs without requiring aligned attribute semantics, complementing feature-based relations with information about local and multiscale connectivity. THETA incorporates this prior into both pre-training and few-shot adaptation. During pre-training, it combines HKS with node attributes to construct refined graph views and trains a shared encoder via contrastive learning. During adaptation, it uses HKS to guide edge-weight adjustment and prototype refinement while keeping the encoder frozen and retaining the contribution of labeled support nodes. Through HKS, THETA uses structural information from heat diffusion to guide both representation learning and few-shot adaptation with unlabeled target-domain data. Extensive experiments across diverse graph domains demonstrate that THETA consistently outperforms existing baselines on downstream tasks, highlighting the value of heat diffusion as a structural prior for transferable graph representations.

Introduction

Graphs support many Web applications, representing hyperlinks between pages, interactions among users, and associations among products [1, 31]. These graphs differ in their node attributes, topology, and prediction tasks [30]. Training a separate model for each domain requires repeated effort and task-specific annotations, which may be scarce in a new domain [15]. Graph foundation models (GFMs) seek to address this challenge by learning knowledge that transfers across graph domains and tasks [21, 33].

Recent work pursues transfer through several complementary strategies. UniGraph uses language-based representations to accommodate heterogeneous graph attributes [9]. GCOPE connects source graphs through learnable coordinator nodes, while SAMGPT introduces structure tokens and prompts for multi-domain pre-training and target adaptation [33, 34]. These approaches broaden the range of graphs that a shared model can process. However, language-based interfaces require usable textual descriptions [9], and aligning feature dimensions alone cannot establish shared attribute meanings [8, 15].

Structural modeling offers another basis for cross-domain learning [7, 8]. MDGFM combines feature and topology information to refine graph relations [29]. RiemannGFM learns structural knowledge through tree and cycle vocabularies in Riemannian spaces, while R-GFM combines multiscale subgraphs with Riemannian Graph-of-Graphs modeling [12, 24]. SCGFM uses learnable geometric bases and Gromov–Wasserstein alignment to construct shared structural coordinates [8]. These advances enrich structural representations and cross-graph alignment. They also motivate a further question: how can information computed directly from graph topology provide explicit guidance for both relation learning and adaptation to an unseen domain?

This challenge arises at two stages of cross-domain learning: constructing relations for message passing [7, 10] and selecting unlabeled target nodes to refine class prototypes [17, 22]. Both decisions require evidence about which nodes are useful to one another. When these decisions rely on attributes or learned representation similarities, they can remain sensitive to domain-specific feature semantics [3]. For example, MDGFM estimates structural relations using neighborhood-aggregated attributes, so this source of structure evidence still depends on the input features [29]. Structural vocabularies, geometric alignment, and multiscale encoding enrich representations, but do not by themselves ensure that the resulting similarities identify useful relations for a new task. Under few-shot scenarios, there is limited supervision to correct unsuitable propagation relations or assess retrieved unlabeled examples [17].

Keywords

Graph Foundation Models, Heat Diffusion, Cross-Domain Transfer, Few-Shot Learning

ACM Reference Format: Haonan Liu, Shuo Wang, and Zhao Kang. 2018. THETA: Heat Diffusion as a Structural Prior for Cross-Domain Transfer in Graph Foundation Models. In Proceedings of Make sure to enter the correct conference title from your rights confirmation email (Conference acronym ’XX). ACM, New York, NY, USA, 12 pages. https://doi.org/XXXXXXX.XXXXXXX

Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Conference acronym ’XX, Woodstock, NY

© 2018 Copyright held by the owner/author(s). Publication rights licensed to ACM. ACM ISBN 978-1-4503-XXXX-X/2018/06 https://doi.org/XXXXXXX.XXXXXXX This motivates an additional structural reference that can be computed without aligned attribute semantics and remain available throughout pre-training and adaptation.

Heat diffusion provides such a reference. The heat response at a node over time reflects return patterns induced by the surrounding connectivity [4]. Heat Kernel Signatures (HKS) summarize this behavior across diffusion times, providing multiscale node descriptions computed solely from topology [23]. Their common form allows structural comparisons without requiring attributes to have the same meaning across domains [4, 26]. To account for differences in graph spectra, we select graph-specific diffusion times using shared normalized heat-trace targets, providing a common reference for scale selection. Exact HKS descriptors are equivariant to node relabeling and admit perturbation bounds at fixed diffusion times. These properties motivate its use as an explicit structural prior: it supplies evidence about connectivity that complements feature-based relations. Structural similarity does not necessarily imply a shared class, so we combine this prior with node attributes, learned representations, and labeled support examples.

Building on this idea, we propose THETA (Topology-aware HEat-based TrAnsfer), a graph foundation model that uses HKS as a topology-derived structural prior. During pre-training, HKS and node attributes jointly guide the construction of refined graph views, from which a shared encoder learns through contrastive learning [32]. During few-shot adaptation, the encoder remains frozen, while HKS guides edge-weight adjustment and complements embedding similarity when retrieving unlabeled nodes for prototype refinement. Labeled support nodes remain explicit contributors to the class prototypes. By using the same topology-derived prior across both stages, THETA connects relation construction during pre-training with propagation adjustment and support-based prediction in unseen domains.

Our main contributions are summarized as follows:

  • We propose THETA, a cross-domain graph foundation model built around heat diffusion as an explicit structural prior. Multiscale HKS provides topology-based node descriptions that complement attributes without requiring shared feature semantics.

  • We incorporate this prior into both multi-domain pre-training and few-shot adaptation. HKS guides graph-view construction upstream and edge-weight adjustment and unlabeled-node retrieval downstream, connecting relation learning with target-specific adaptation.

  • We evaluate THETA on cross-domain few-shot node classification and supervised link prediction. Ablations examine the prior’s contribution in both learning stages, while further analyses characterize cross-scale HKS variation and the balance between graph propagation and node attributes.

Related Work

Graph Foundation Models

Existing GFMs support cross-domain transfer through shared attribute interfaces, multi-domain pre-training, and lightweight adaptation. UniGraph uses language-based representations to accommodate heterogeneous graph attributes [9]. GCOPE connects source graphs through learnable coordinator nodes [34], while SAMGPT uses structure tokens and prompts for multi-domain learning and target adaptation [33]. Another line of work emphasizes transferable structural knowledge. MDGFM, which directly informs our learning framework, combines graph structure learning with multi-domain pre-training and prompt-based adaptation [29]. Its relation estimation uses attributes and neighborhood-aggregated features. THETA builds on this framework by introducing an additional structural reference computed independently of node attributes. Other methods organize structural knowledge through geometric representations: RiemannGFM models tree and cycle structures in Riemannian spaces [24]; SCGFM learns geometric bases and aligns graphs through Gromov–Wasserstein distances [8]; and R-GFM constructs a multi-scale Graph-of-Graphs from subgraphs at different hop distances [12]. These methods highlight the importance of structural alignment and scale in cross-domain learning, motivating our investigation of heat diffusion as a source of explicit structural guidance.

Heat Diffusion and Structural Descriptors

Heat diffusion captures graph connectivity at multiple scales. Originally developed for shape analysis, HKS summarizes heat-return behavior across diffusion times [23]. GraphWave [5] characterizes node structural roles through distributions of heat diffusion wavelet coefficients, while NetLSD [26] constructs graph-level signatures from heat-kernel traces. These methods demonstrate how diffusion yields structural descriptors independently of node attributes. Building on this foundation, THETA calibrates diffusion times for each graph and incorporates the resulting HKS into cross-domain learning as an explicit structural prior. This prior guides relation learning during pre-training, as well as edge adaptation and prototype refinement in the target domain.

Preliminaries

Problem Formulation

Let Gd=(Vd,Ed,Xd)G_d = (V_d, E_d, X_d) be a graph from domain dd, with node set VdV_d, edge set EdE_d, node attributes Xd∈Rnd×pdX_d \in\mathbb{R}^{n_d \times p_d}, and adjacency Ad∈Rnd×ndA_d \in\mathbb{R}^{n_d \times n_d}, where nd=∣Vd∣n_d = |V_d|. Attribute dimensions, feature semantics, and label spaces may differ across domains.

Given source graphs Gsrc={Gd∣d∈Dsrc}\mathcal{G}_{\mathrm{src}} = \{G_d \mid d \in\mathcal{D}_{\mathrm{src}}\}, we pre-train a shared encoder fθf_\theta for node labels, then adapt the model with target-domain supervision for few-shot node classification or link prediction on an unseen graph GtG_t from domain dt∉Dsrcd_t \notin\mathcal{D}_{\mathrm{src}}. Notation is summarized in Appendix A.

Heat Diffusion and Heat Kernel Signatures

For clarity, we omit the domain subscript and write G=(V,E,X)G = (V, E, X) with n=∣V∣n = |V|. For heat diffusion, we use a symmetric, nonnegative adjacency matrix AA, obtained by symmetrizing the observed adjacency when necessary. Let DD be the diagonal degree matrix, with Dvv=∑uAvuD_{vv} = \sum_u A_{vu}. The symmetric normalized graph Laplacian is

L=I−D−1/2AD−1/2,(1)L = I - D^{-1/2} A D^{-1/2}, \tag*{(1)}

where Dvv−1/2=0D_{vv}^{-1/2} = 0 for zero-degree nodes.

Heat diffusion follows ∂z(t)/∂t=−Lz(t)\partial z(t)/\partial t = -Lz(t), where z(t)z(t) denotes the heat signal at time tt. Its solution is z(t)=Ktz(0)z(t) = K_t z(0), with the heat kernel

Kt=exp⁡(−tL)=∑i=1ne−tλiuiui⊤,(2)K_t = \exp(-tL) = \sum_{i=1}^{n} e^{-t\lambda_i} \mathbf{u}_i\mathbf{u}_i^{\top}, \tag*{(2)}

where (λi,ui)(\lambda_i, \mathbf{u}_i) are the eigenpairs of LL and the eigenvectors are orthonormal.

The Heat Kernel Signature (HKS) characterizes a node through the diagonal entries of the heat kernel [23]. At diffusion time tt, the signature of node vv is

hv(t)=[Kt]vv=∑i=1ne−tλiui(v)2,(3)h_v(t) = [K_t]_{vv} = \sum_{i=1}^{n} e^{-t\lambda_i}u_i(v)^2, \tag*{(3)}

where ui(v)u_i(v) is the component of ui\mathbf{u}_i at node vv. Starting from a unit heat impulse at vv, this quantity measures the heat response at the same node after time tt.

The structural meaning of HKS can also be seen through a walk expansion. Let S=D−1/2AD−1/2S = D^{-1/2}AD^{-1/2}, so that L=I−SL = I - S. Then

hv(t)=e−t∑k=0∞tkk![Sk]vv.(4)h_v(t) = e^{-t}\sum_{k=0}^{\infty}\frac{t^k}{k!}[S^k]_{vv}. \tag*{(4)}

Here, [Sk]vv[S^k]_{vv} sums the weights of length-kk walks that start and end at vv, with each step weighted by the corresponding entry of SS. HKS therefore summarizes return patterns determined by the surrounding connectivity. The diffusion time controls the weights assigned to different walk lengths, providing structural information that does not depend on node attributes.

Given an ordered sequence of diffusion times T=(t1,…,tM)\mathcal{T} = (t_1,\ldots,t_M) with 0≤t1≤⋯≤tM0 \leq t_1 \leq\cdots\leq t_M, we form the multiscale descriptor

hv=[hv(t1),…,hv(tM)]⊤∈RM.(5)\mathbf{h}_v = [h_v(t_1),\ldots,h_v(t_M)]^{\top}\in\mathbb{R}^{M}. \tag*{(5)}

Stacking these descriptors gives H∈Rn×MH \in\mathbb{R}^{n\times M}. As tt increases, spectral components with larger eigenvalues decay more rapidly. Evaluating HKS at multiple times therefore captures node connectivity through different spectral weightings.

HKS depends only on graph topology and is equivariant to node relabeling: at the same diffusion times, a permutation of the nodes produces the same permutation of the rows of HH. It thus provides a structural description without requiring aligned attribute semantics across domains. THETA uses this description as a prior alongside node attributes and task-specific supervision. § 3.2 describes how we select diffusion times for each graph and construct the structural inputs used by the model.

Methodology

Overview of THETA

Figure 1 illustrates the overall framework of THETA. We use multiscale HKS computed from graph topology as an explicit structural prior for multi-domain pre-training and target-domain adaptation. During pre-training, HKS complements node attributes in constructing refined graph views, from which a shared encoder learns through contrastive learning. During few-shot adaptation, the encoder remains frozen, while HKS guides edge-weight adjustment and the retrieval of unlabeled nodes for prototype refinement. For link prediction, HKS supplements node representations used for edge scoring. The following sections detail prior construction, pre-training, and target-domain adaptation.

Figure 1. The overall framework of the proposed THETA

Constructing the Heat-Diffusion Structural Prior

THETA constructs a structural prior from each graph’s observed topology. Since the same diffusion time can correspond to different stages on graphs with different spectra, we select graph-specific times using shared heat-trace targets. The resulting HKS descriptors provide structural inputs at shorter and longer diffusion scales.

Selecting diffusion scales. Let mm be the multiplicity of the zero eigenvalue of the symmetric normalized Laplacian L\mathbf{L}. For a graph with n>mn > m nodes, we define

rG(t)=tr⁡(exp⁡(−tL))−mn−m.(6)r_G(t) = \frac{\operatorname{tr}(\exp(-t\mathbf{L})) - m}{n-m}. \tag*{(6)}

Subtracting mm removes the stationary contribution, while dividing by n−mn-m averages over the decaying spectral modes. Thus, rG(t)r_G(t) decreases from 1 toward 0 and provides a graph-level measure of diffusion progress.

We choose M≥2M \ge2 geometrically spaced targets between shared bounds 0<ρmin⁡<ρmax⁡<10 < \rho_{\min} < \rho_{\max} < 1, where the upper and lower bounds correspond to earlier and later diffusion stages, respectively:

ρj=ρmax⁡(ρmin⁡ρmax⁡)j−1M−1,j=1,…,M,(7)\rho_j = \rho_{\max}\left(\frac{\rho_{\min}}{\rho_{\max}}\right)^{\frac{j-1}{M-1}}, \qquad j=1,\ldots,M, \tag*{(7)}
tG,j=min⁡{rG−1(ρj), tmax⁡}.(8)t_{G,j} = \min\left\{r_G^{-1}(\rho_j),\,t_{\max}\right\}. \tag*{(8)}

Here, tmax⁡>0t_{\max} > 0 caps diffusion times, yielding a nondecreasing sequence TG=(tG,1,…,tG,M)\mathcal{T}_G = (t_{G,1},\ldots,t_{G,M}). For uncapped coordinates, graphs share the same normalized heat-trace target but may use different numerical times. This supplies a common reference for scale selection without assuming node correspondences across domains. Truncation and degenerate cases are detailed in Appendix § 8.§ 0.1.

Forming multiscale node descriptors. Using hv(t)h_v(t) from Eq. (3), we divide the ordered scales into two groups:

hv(s)=[hv(tG,1),…,hv(tG,Ms)]⊤,hv(l)=[hv(tG,Ms+1),…,hv(tG,M)]⊤,(9)\begin{aligned} \mathbf{h}_v^{(s)} &= [h_v(t_{G,1}),\ldots,h_v(t_{G,M_s})]^\top,\\ \mathbf{h}_v^{(l)} &= [h_v(t_{G,M_s+1}),\ldots,h_v(t_{G,M})]^\top, \tag*{(9)} \end{aligned}

where MsM_s and Ml=M−MsM_l = M-M_s are the numbers of shorter- and longer-time coordinates, with 1≤Ms<M1 \le M_s < M. Longer times place greater relative weight on slowly decaying spectral modes, allowing the two groups to describe connectivity through different spectral weightings. Stacking over nodes gives H(s)∈Rn×Ms\mathbf{H}^{(s)} \in\mathbb{R}^{n\times M_s} and H(l)∈Rn×Ml\mathbf{H}^{(l)} \in\mathbb{R}^{n\times M_l}.

These priors require neither attributes nor labels and remain fixed during learning. Their prompt-modulated forms, H~(s)\widetilde{\mathbf{H}}^{(s)} and H~(l)\widetilde{\mathbf{H}}^{(l)}, adapt how structural coordinates contribute to relation estimation. We use eigendecomposition for small graphs and polynomial approximation with stochastic estimation for larger graphs; numerical details are given in Appendix § 8.§ 4.

Stability of the structural prior. The following property bounds the sensitivity of exact HKS descriptors to changes in graph structure at fixed diffusion times.

Proposition (Fixed-time stability). Let L\mathbf{L} and L~\widetilde{\mathbf{L}} be symmetric positive semidefinite graph Laplacians on the same ordered node set, with ∥L−L~∥2≤ϵ\|\mathbf{L}-\widetilde{\mathbf{L}}\|_2 \le\epsilon. For any common nonnegative time sequence T=(t1,…,tM)\mathcal{T}=(t_1,\ldots,t_M),

∥hv(L;T)−hv(L~;T)∥2≤ϵ(∑j=1Mtj2)1/2.(10)\|\mathbf{h}_v(\mathbf{L};\mathcal{T})-\mathbf{h}_v(\widetilde{\mathbf{L}};\mathcal{T})\|_2 \le\epsilon\left(\sum_{j=1}^{M}t_j^2\right)^{1/2}. \tag*{(10)}

where matrix and vector norms are spectral and Euclidean norms, respectively.

At fixed scales, small Laplacian perturbations therefore produce bounded changes in the structural descriptors, supporting their use as a stable reference for relation learning. Graph-specific time recalibration introduces an additional variation term. The proof, the recalibration analysis, and equivariance under node relabeling are provided in Appendix § 8.

HKS-Guided Multi-Domain Pre-training

THETA combines the structural prior from § 3.2 with node attributes to learn node relations. THETA uses it to construct two graph views, allowing structural similarity to influence which nodes exchange information during pre-training. A shared encoder then learns representations from the original graph and these refined views.

Preparing attribute and structural inputs. We first project each domain’s node attributes to a common dimension using PCA. For each branch b∈{s,l}b \in\{s,l\}, separate prompts modulate the projected attributes and the corresponding HKS descriptors. Let q\mathbf{q} denote either a node’s PCA-projected attribute vector or its HKS descriptor in branch bb. Omitting branch and input-type indices, the prompt takes the form

Pd(q)=ωq+(1−ω)(psh⊙q),(11)\mathcal{P}_d(\mathbf{q})=\omega\mathbf{q}+(1-\omega)(\mathbf{p}_{\mathrm{sh}}\odot\mathbf{q}), \tag*{(11)}

where psh\mathbf{p}_{\mathrm{sh}} is shared across source domains, pd\mathbf{p}_d is domain-specific, ⊙\odot denotes elementwise multiplication, and ω∈(0,1)\omega\in(0,1) is a learned scalar parameterized by a sigmoid. The prompt tokens have the same dimension as the corresponding input q\mathbf{q}. Each branch and input type has its own prompt parameters. We denote the resulting attribute and structural matrices by X‾(b)\overline{\mathbf{X}}^{(b)} and H~(b)\widetilde{\mathbf{H}}^{(b)}, respectively. PCA provides dimensional consistency, while the prompts allow the model to adjust the contribution of individual attribute and diffusion coordinates.

Learning relations with HKS. For each source graph, we construct a candidate set Ecand(b)=E∪Ex(b)∪Eh(b)\mathcal{E}^{(b)}_{\mathrm{cand}} = E \cup\mathcal{E}^{(b)}_x \cup\mathcal{E}^{(b)}_h, where Ex(b)\mathcal{E}^{(b)}_x and Eh(b)\mathcal{E}^{(b)}_h contain nearest-neighbor relations under attribute cosine similarity and HKS Gaussian similarity, respectively. Including HKS neighbors allows nodes with similar heat-return patterns to become candidates even when they are not close in attribute space. For each candidate pair (u,v)(u,v), we compute

suvx,b=cos⁡(x~u(b),x~v(b)),s_{uv}^{x,b}=\cos(\widetilde{\mathbf{x}}_u^{(b)},\widetilde{\mathbf{x}}_v^{(b)}),
suvh,b=exp⁡(−∥h~u(b)−h~v(b)∥22τh),(12)s_{uv}^{h,b}=\exp\left(-\frac{\|\widetilde{\mathbf{h}}_u^{(b)}-\widetilde{\mathbf{h}}_v^{(b)}\|_2^2}{\tau_h}\right), \tag*{(12)}

where τh>0\tau_h > 0 controls the HKS similarity scale. A gate guv(b)=σ(MLP⁡ψb(cuv(b)))g_{uv}^{(b)}=\sigma(\operatorname{MLP}_{\psi_b}(c_{uv}^{(b)})) combines the two signals. Its input cuv(b)c_{uv}^{(b)} contains the attributes and HKS of both endpoints, their mean neighborhood descriptors, and normalized node degrees. Neighborhood descriptors are computed from the observed graph. The fused relation and its residual combination with the observed edge weight are

suv(b)=guv(b)suvx,b+(1−guv(b))suvh,b,(13)s_{uv}^{(b)}=g_{uv}^{(b)}s_{uv}^{x,b}+(1-g_{uv}^{(b)})s_{uv}^{h,b}, \tag*{(13)}
wuv(b)=(1−ζ)Auv+ζsuv(b),w_{uv}^{(b)}=(1-\zeta)A_{uv}+\zeta s_{uv}^{(b)},

where ζ∈(0,1)\zeta\in(0,1) controls the contribution of learned relations and Auv=0A_{uv}=0 for candidate pairs outside the observed edge set. This makes the influence of HKS depend on the node pair and its context, while retaining a strong prior from the observed topology.

Structural views and contrastive learning. We retain the top-kk candidate weights for each node, add reverse edges, and average reciprocal weights. Self-loops and degree normalization produce the refined adjacency A(b)A^{(b)}; edge dropout is applied during training. The shorter- and longer-time HKS branches give two refined views. Writing A(o)=Norm⁡(A)A^{(o)}=\operatorname{Norm}(A) for the original adjacency with self-loops and degree normalization, the shared encoder produces

Z(o)=fθ(X~(o),A(o)),Z(b)=fθ(X~(b),A(b)),b∈{s,l}.(14)\begin{aligned} Z^{(o)} &= f_\theta(\widetilde{X}^{(o)}, A^{(o)}),\\ Z^{(b)} &= f_\theta(\widetilde{X}^{(b)}, A^{(b)}), \quad b \in\{s,l\}. \tag*{(14)} \end{aligned}

HKS thus enters pre-training through relation construction, while the encoder processes the prompted node attributes on each view.

For two distinct views ν,ν′∈{o,s,l}\nu,\nu' \in\{o,s,l\}, the same node forms a positive pair and other nodes in the comparison set B\mathcal{B} form negative pairs. Let cvuν,ν′=cos⁡(zv(ν),zu(ν′))c_{vu}^{\nu,\nu'}=\cos(z_v^{(\nu)},z_u^{(\nu')}). The directional contrastive loss is

ℓν→ν′=−1∣B∣∑v∈Blog⁡exp⁡(cvvν,ν′/τctr)∑u∈Bexp⁡(cvuν,ν′/τctr),(15)\ell_{\nu\to\nu'}=-\frac{1}{|\mathcal{B}|}\sum_{v\in\mathcal{B}}\log\frac{\exp(c_{vv}^{\nu,\nu'}/\tau_{\mathrm{ctr}})}{\sum_{u\in\mathcal{B}}\exp(c_{vu}^{\nu,\nu'}/\tau_{\mathrm{ctr}})}, \tag*{(15)}

where τctr>0\tau_{\mathrm{ctr}}>0 is the contrastive temperature. We use the symmetric loss

Lctr(Z(ν),Z(ν′))=ℓν→ν′+ℓν′→ν2.(16)\mathcal{L}_{\mathrm{ctr}}(Z^{(\nu)},Z^{(\nu')})=\frac{\ell_{\nu\to\nu'}+\ell_{\nu'\to\nu}}{2}. \tag*{(16)}

The pre-training objective is

Lpre=∑d∈Dsrc∑b∈{s,l}λbLctr(Zd(o),Zd(b)),(17)\mathcal{L}_{\mathrm{pre}}=\sum_{d\in\mathcal{D}_{\mathrm{src}}}\sum_{b\in\{s,l\}}\lambda_b\mathcal{L}_{\mathrm{ctr}}(Z_d^{(o)},Z_d^{(b)}), \tag*{(17)}

with nonnegative weights λb\lambda_b. Contrastive pairs are formed within each source graph. The encoder, branch-specific relation estimators, and shared prompt tokens are trained jointly across domains, while domain-specific tokens provide separate modulation. Through this objective, HKS-guided relations shape the views from which the shared encoder learns.

HKS-Guided Target-Domain Adaptation

On an unseen target graph, THETA computes HKS from the observed topology and learns target-specific prompts while keeping the source prompt tokens fixed. These prompts combine source knowledge with target-specific modulation of attributes and HKS (Appendix C). We average the prompted attribute branches to obtain xˉv\bar{x}_v and concatenate the prompted HKS branches to obtain hˉv\bar{h}_v. The underlying HKS descriptors remain fixed.

HKS-guided structural adaptation. For few-shot node classification, we freeze the pre-trained encoder and adapt its propagation using the structural prior. For each observed edge (u,v)(u,v), a relation vector duvd_{uv} summarizes attribute and HKS similarities between the endpoints and their neighborhoods. A lightweight modifier adjusts the edge weight:

δuv=tanh⁡(MLP⁡ψt(duv)),\delta_{uv}=\tanh(\operatorname{MLP}_{\psi_t}(d_{uv})),
Auvadapt=Auv(1+δuv).(18)A_{uv}^{\mathrm{adapt}}=A_{uv}(1+\delta_{uv}). \tag*{(18)}

Attribute-nearest-neighbor edges supplement the observed topology. The frozen GCN processes the adapted graph, while a trainable MLP independently processes the prompted attributes. Their outputs are combined as

zv=(1−α)zvGCN+αzvMLP,α∈[0,1].(19)z_v=(1-\alpha)z_v^{\mathrm{GCN}}+\alpha z_v^{\mathrm{MLP}},\quad\alpha\in[0,1]. \tag*{(19)}

Here, α\alpha controls the balance between graph propagation and node attributes. HKS guides propagation through edge-weight adjustment, while the MLP provides a complementary representation without neighborhood aggregation.

HKS-guided prototype refinement. Let Sc\mathcal{S}_c denote the labeled support nodes of class cc and U\mathcal{U} the unlabeled target nodes. To enrich support-based prototypes, we retrieve unlabeled nodes using both heat-diffusion structure and learned representations. For a support node ss and candidate u∈Uu\in\mathcal{U}, the retrieval score is

susaug=λaugcos⁡(hˉu,hˉs)+(1−λaug)cos⁡(zu,zs),(20)s_{us}^{\mathrm{aug}}=\lambda_{\mathrm{aug}}\cos(\bar{h}_u,\bar{h}_s)+(1-\lambda_{\mathrm{aug}})\cos(z_u,z_s), \tag*{(20)}

where λaug∈[0,1]\lambda_{\mathrm{aug}}\in[0,1]. HKS thus complements representation similarity with evidence about surrounding connectivity.

For each support node we select up to NN highest-scoring candidates. Let Rc\mathcal{R}_c collect the resulting support–candidate pairs (s,u)(s,u) for class cc, with weights wus=exp⁡(susaug/τaug)w_{us}=\exp(s_{us}^{\mathrm{aug}}/\tau_{\mathrm{aug}}). The refined prototype is

pc=wcsup∑s∈Sczs+∑(s,u)∈Rcwuszuwcsup∣Sc∣+∑(s,u)∈Rcwus,(21)p_c=\frac{w_c^{\mathrm{sup}}\sum_{s\in\mathcal{S}_c}z_s+\sum_{(s,u)\in\mathcal{R}_c}w_{us}z_u}{w_c^{\mathrm{sup}}|\mathcal{S}_c|+\sum_{(s,u)\in\mathcal{R}_c}w_{us}}, \tag*{(21)}

where wcsup=2max⁡(s,u)∈Rcwusw_c^{\mathrm{sup}}=2\max_{(s,u)\in\mathcal{R}_c}w_{us} preserves each support node’s contribution with a larger individual weight than any retrieved candidate. Retrieval and weighting use only HKS descriptors and node representations, without accessing candidate labels. Only labeled support nodes provide class supervision. When refinement is disabled or no candidates are available, we use the support-only mean prototype.

Task objectives and prediction. For node classification, we optimize the target prompts, edge modifier, and MLP using cross-entropy over support-node cosine scores cos⁡(zv,pc)\cos(z_v,p_c), with the encoder frozen. Query nodes are assigned to the most similar prototype. For link prediction, a task-specific projection combines node attributes, encoder representations, and HKS descriptors; cosine similarity between projected endpoints provides the edge score. We train with binary cross-entropy on positive and negative node pairs, updating the encoder, target prompts, and projection while keeping source prompt tokens fixed.

Experiments

We evaluate THETA on unseen graph domains, focusing on both downstream performance and the role of heat diffusion as a structural prior. Our experiments address five research questions: RQ1: How does THETA compare with existing methods on cross-domain few-shot node classification? RQ2: Can THETA transfer to supervised link prediction on unseen target graphs? RQ3: How do graph structure learning and the heat-based prior contribute to pre-training and target-domain adaptation? RQ4: How do redundancy and variation across calibrated HKS scales differ between graphs? RQ5: How does the balance between graph propagation and feature-based adaptation affect performance across target domains?

Experimental Setup

Datasets. We use ten graphs from four domains: citation networks (Cora, CiteSeer [19], and PubMed [14]), Webpage networks (Cornell, Texas, and Wisconsin) [2], Wikipedia networks (Chameleon and Squirrel) [16, 18], and product co-purchase networks (Computers and Photo) [20]. Following the benchmark of R-GFM [12], we adopt leave-one-dataset-out transfer, pre-training on the remaining graphs without node labels and evaluating on the held-out target. Dataset statistics are provided in Appendix § 10.§ 0.1.

MethodWisconsinCornellCiteSeerCoraPubMedComputersPhotoTexas
GNN Baselines
GCN17.46 ± 3.3519.53 ± 5.7726.89 ± 3.0131.98 ± 4.1144.29 ± 2.2239.43 ± 5.6850.39 ± 1.1918.48 ± 4.08
GAT16.86 ± 3.1616.51 ± 8.4125.27 ± 2.1026.81 ± 4.4245.11 ± 5.5238.05 ± 4.4756.51 ± 2.3518.36 ± 4.63
Self-Supervised Pre-training with Fine-tuning
DGI28.24 ± 5.3029.73 ± 10.1134.52 ± 8.8139.88 ± 5.5347.10 ± 4.9534.59 ± 5.9450.66 ± 6.9329.73 ± 6.34
GraphCL32.16 ± 8.8331.35 ± 12.4727.56 ± 5.0135.26 ± 8.6243.66 ± 3.1234.40 ± 6.9348.86 ± 5.5331.35 ± 22.66
Prompt-based Adaptation
GPPT23.53 ± 15.9325.41 ± 5.2733.24 ± 8.7340.60 ± 6.0041.64 ± 9.2944.57 ± 13.3853.94 ± 11.9318.38 ± 12.00
GPF23.53 ± 9.3636.22 ± 9.4627.16 ± 4.1034.74 ± 3.4826.62 ± 10.1842.15 ± 8.7559.13 ± 6.0528.65 ± 17.31
GraphPrompt20.39 ± 7.9228.65 ± 5.9219.80 ± 2.7933.68 ± 9.8342.94 ± 1.9833.34 ± 6.0942.60 ± 6.7524.32 ± 9.17
Graph Foundation Models
GCOPE28.69 ± 7.0025.00 ± 6.5838.62 ± 2.5839.05 ± 2.5344.52 ± 2.5128.50 ± 4.9159.17 ± 2.4519.50 ± 12.18
SAMGPT21.57 ± 12.0936.22 ± 5.3028.78 ± 8.9943.08 ± 10.4037.95 ± 9.5845.80 ± 4.5449.80 ± 11.8931.89 ± 11.26
MDGFM17.65 ± 7.3426.49 ± 10.7323.32 ± 15.3242.88 ± 9.1238.42 ± 7.9242.68 ± 2.5357.78 ± 9.0731.54 ± 11.78
RiemannGFM31.20 ± 9.3531.35 ± 7.7631.86 ± 6.4543.48 ± 5.2844.10 ± 5.0546.20 ± 8.7957.20 ± 16.8429.12 ± 7.44
R-GFM35.41 ± 7.2936.71 ± 9.9257.54 ± 9.4949.50 ± 3.9749.80 ± 5.3852.30 ± 3.3361.08 ± 5.2632.36 ± 12.10
THETA42.18 ± 9.9140.26 ± 7.2945.00 ± 9.6752.22 ± 7.5653.18 ± 7.5253.10 ± 8.0562.45 ± 8.7333.84 ± 6.03

Table 1. Accuracy (%) on cross-domain 1-shot node classification, reported as mean ± standard deviation. The best results are highlighted in bold, and the runner-up with an underline.

Baselines. We compare THETA with four groups of methods: supervised GNNs (GCN [11] and GAT [27]), self-supervised methods (DGI [28] and GraphCL [32]), prompt-based methods (GPPT [25], GPF [6], and GraphPrompt [13]), and GFMs (GCOPE [34], SAMGPT [33], MDGFM [29], RiemannGFM [24], and R-GFM [12]). Brief descriptions of these groups are provided in Appendix § 10.§ 1.

Tasks and metrics. Our main task is cross-domain few-shot node classification with K∈{1,3,5}K \in\{1, 3, 5\} labels per class on eight target graphs. We additionally evaluate supervised link prediction on Wisconsin, Cora, PubMed, and Photo. We report mean accuracy for node classification and mean ROC-AUC for link prediction, together with standard deviations. Evaluation protocols are detailed in Appendix § 10.§ 2.

Implementation. THETA uses a three-layer GCN, PCA-based attribute alignment, and 16 HKS coordinates covering short and long diffusion scales. The encoder is frozen during few-shot node classification and updated during supervised link prediction. Hyperparameters and training details are provided in Appendix § 10.§ 3. Our code is available at https://anonymous.4open.science/r/THETA.

Few-Shot Node Classification (RQ1)

Tables 1 and 2 summarize the results. THETA achieves the highest mean accuracy on seven of eight target datasets in both settings, with gains across citation, Webpage, and product co-purchase networks. Compared with R-GFM, it improves accuracy on Wisconsin by 6.77 and 9.89 percentage points under 1-shot and 5-shot evaluation, respectively, and on Computers by 7.87 points under 5-shot evaluation. The strong Webpage results are notable given their heterophilous connectivity, suggesting that THETA’s overall adaptation procedure can accommodate targets where neighboring nodes frequently belong to different classes.

Increasing the support budget from one to five labels per class improves THETA’s accuracy on all eight targets, demonstrating its ability to benefit from additional target-domain supervision. The advantages persist under 5-shot evaluation, where prototypes use only labeled support nodes, indicating that the gains extend beyond the 1-shot prototype-refinement configuration. CiteSeer remains an exception, with THETA ranking second behind R-GFM, suggesting that transfer effectiveness remains target-dependent. Overall, these results support THETA’s cross-domain effectiveness; the contribution of heat as a structural prior is examined separately in § 4.4.

Supervised Transferability (RQ2)

Table 3 reports the supervised link prediction results. THETA achieves the highest mean ROC-AUC on all four evaluated datasets. Compared with the strongest reported baseline, R-GFM, it improves ROC-AUC by 1.91, 4.75, 8.29, and 15.69 percentage points on Wisconsin, Cora, PubMed, and Photo, respectively. The gains cover Webpage, citation, and product co-purchase networks, extending THETA’s strong performance beyond node classification.

MethodWisconsinCoraPubMedPhoto
GCOPE83.12 ± 1.5188.71 ± 0.5784.99 ± 0.0678.45 ± 5.51
SAMGPT65.32 ± 7.2788.62 ± 3.5184.92 ± 0.4080.59 ± 0.33
MDGFM67.46 ± 6.8288.41 ± 2.1284.78 ± 2.0981.24 ± 5.80
RiemannGFM78.19 ± 2.0888.54 ± 0.1186.37 ± 0.3381.44 ± 0.95
R-GFM84.15 ± 0.7189.27 ± 0.6488.62 ± 0.4181.53 ± 0.83
THETA86.06 ± 3.1494.02 ± 0.7396.91 ± 0.2597.22 ± 0.10

Table 3. Link prediction ROC-AUC (mean ± standard deviation, %). The best results are highlighted in bold, and the runner-up with an underline.

For link prediction, THETA incorporates HKS into the node representations used for link scoring, together with node attributes and encoder outputs. Heat diffusion thus provides a topology-based structural prior that describes connectivity across diffusion scales without relying on attribute semantics. Unlike few-shot node classification, this task does not use prototype refinement; the prior instead supplies structural context for predicting node relationships. These results support the applicability of THETA’s heat-based design to supervised edge prediction across graph domains.

MethodWisconsinCornellCiteSeerCoraPubMedComputersPhotoTexas
Task-Supervised GNNs
GCN27.00 ± 6.6020.92 ± 6.0231.61 ± 6.0539.48 ± 6.0838.82 ± 2.9830.06 ± 10.7266.96 ± 9.2138.08 ± 13.65
GAT28.85 ± 8.9118.30 ± 7.4923.99 ± 4.1029.82 ± 2.3134.92 ± 12.2737.12 ± 8.2154.37 ± 4.9028.21 ± 11.78
Self-Supervised Pre-training with Fine-tuning
DGI39.61 ± 3.7738.92 ± 6.7853.66 ± 6.2163.72 ± 2.2357.02 ± 3.4752.03 ± 5.2969.74 ± 4.9542.70 ± 9.04
GraphCL39.61 ± 8.2542.70 ± 5.5439.26 ± 3.6349.34 ± 4.9444.88 ± 2.4057.78 ± 3.9669.39 ± 6.4647.03 ± 13.05
Prompt-based Adaptation
GPPT35.29 ± 7.7244.86 ± 4.5245.98 ± 5.9748.78 ± 5.4948.88 ± 8.2530.14 ± 12.7764.89 ± 2.3848.11 ± 10.71
GPF33.73 ± 3.3733.51 ± 6.9638.34 ± 6.3549.98 ± 5.9843.00 ± 3.4847.46 ± 6.5470.89 ± 3.8130.81 ± 12.86
GraphPrompt31.37 ± 3.1035.14 ± 8.5535.96 ± 1.9748.24 ± 3.4358.56 ± 2.4048.43 ± 4.5064.34 ± 3.9927.03 ± 3.82
Graph Foundation Models
GCOPE34.38 ± 3.9335.92 ± 9.3047.32 ± 1.5957.33 ± 2.0860.17 ± 1.8155.76 ± 3.8668.28 ± 2.4526.34 ± 10.63
SAMGPT39.22 ± 9.2041.08 ± 11.1359.44 ± 5.7062.76 ± 3.9347.08 ± 9.1058.81 ± 7.1472.08 ± 4.2031.35 ± 6.07
MDGFM36.08 ± 7.4041.08 ± 7.7257.08 ± 3.7161.86 ± 4.4048.84 ± 9.8649.68 ± 4.9370.37 ± 7.3621.08 ± 5.77
RiemannGFM40.40 ± 8.7144.86 ± 4.0554.68 ± 3.6762.92 ± 5.6761.48 ± 6.5448.93 ± 5.7573.47 ± 6.4241.08 ± 12.01
R-GFM47.75 ± 4.9747.97 ± 2.8274.59 ± 1.8763.77 ± 2.4763.39 ± 1.8559.55 ± 4.1773.62 ± 1.1551.64 ± 6.31
THETA57.64 ± 6.2956.11 ± 4.9064.97 ± 3.3466.96 ± 3.8164.21 ± 5.4267.42 ± 3.2578.23 ± 3.9855.48 ± 5.84

Table 2. Accuracy (%) on cross-domain 5-shot node classification, reported as mean ± standard deviation. The best results are highlighted in bold, and the runner-up with an underline.

Ablation Study (RQ3)

We conduct ablations on Cora, CiteSeer, and PubMed under 1-shot node classification. We separately remove graph structure learning (GSL), upstream HKS, either the local (shorter-time) or global (longer-time) HKS prior, and downstream HKS. The scale-specific variants retain their attribute branches, while the downstream variant retains attribute-based adaptation and embedding-based retrieval.

As shown in Figure 2, removing GSL causes the largest accuracy decrease of 11.46–13.79 percentage points, demonstrating the importance of learned graph relations. Removing upstream HKS while retaining attribute-based GSL reduces accuracy by 3.88–6.21 points. Thus, heat diffusion provides useful structural guidance beyond relations inferred from attributes, even when HKS remains available during downstream adaptation.

Figure 2. Ablation results for 1-shot node classification.

Removing local HKS causes larger decreases than removing global HKS on all three datasets, indicating a greater predictive contribution from shorter diffusion scales in this setting. Together with the cross-scale correlations examined in § 4.5, this suggests that the two scale groups share substantial structural information, while shorter-time descriptors provide more useful guidance for these tasks. Nevertheless, removing global HKS also consistently reduces accuracy, supporting its complementary role rather than treating it as dispensable.

Removing downstream HKS reduces accuracy by 1.43–2.61 points despite retaining the full pre-trained model and attribute-based adaptation. This shows that structural guidance during pre-training does not fully replace the value of explicitly using target-domain HKS. Together, these results support heat diffusion as a structural prior for both learning transferable relations and adapting them with limited target labels.

Cross-Scale Structure of the Heat Prior (RQ4)

We characterize the calibrated HKS prior using 100(1−r2)100(1-r^2), where rr is the Pearson correlation between two HKS scales across nodes. Figure 3 shows that the median unexplained variance between short- and long-time scales is only 1.60% on Cora and 1.15% on Computers, but reaches 21.69% on Wisconsin. Thus, under the same calibration rule, cross-scale variation remains graph-dependent: the two scale groups describe largely shared structure on some graphs and more distinct variation on others. This characterizes the topology-derived, multiscale prior used by THETA; its contribution to prediction is assessed separately in § 4.4. Additional PCA analysis of cross-scale variation across all ten graphs is provided in Figure 6 in the appendix.

Figure 3. Cross-scale HKS differences with a shared logarithmic color scale.

Figure 6. Residual cross-scale variation after per-scale standardization across nodes.

Graph–Feature Balance in Target Adaptation (RQ5)

We vary α\alpha in Eq. (19) under 1-shot node classification, independently adapting each setting with matched support/query splits and initializations. HKS-guided prototype refinement remains enabled. Figure 4 shows that increasing the MLP contribution benefits Cornell, Wisconsin, and Texas, with most gains achieved by α=0.5\alpha= 0.5, but reduces accuracy on Cora and CiteSeer.

Figure 4. One-shot node classification accuracy versus the attribute-MLP mixing weight α\alpha.

The class-ordered similarities in Figure 5 provide a complementary view: increasing α\alpha strengthens within-class structure on Wisconsin but weakens it on Cora. These patterns suggest that the heterophilous Webpage targets rely more on direct attribute evidence, consistent with neighborhood aggregation mixing features across class boundaries. The MLP pathway can preserve discriminative attribute information that such aggregation obscures. Conversely, the citation graphs benefit more from propagation, consistent with informative same-class neighborhoods. Thus, effective adaptation combines the heat-based structural prior with a target-dependent balance between propagation and attribute evidence. Further prediction-level analysis appears in Figure 7 in the appendix.

Figure 5. Class-ordered representation similarities on Cora (left) and Wisconsin (right) at α=0\alpha= 0, 0.50.5, and 11.

Figure 7. Prediction changes relative to α=0\alpha= 0 on Cora and Wisconsin.

Conclusion

We proposed THETA, a graph foundation model centered on heat diffusion as an explicit structural prior for cross-domain transfer. By describing multiscale heat-return behavior through HKS, THETA derives structural evidence directly from graph topology without requiring aligned attribute semantics. This prior complements node attributes in learning graph relations during pre-training and remains available to guide edge-weight adjustment and prototype refinement during few-shot adaptation. With the encoder frozen, THETA combines target-domain structural information with learned representations and limited support labels to adapt its propagation and use of unlabeled nodes. Our work offers a perspective on GFMs in which topology-derived knowledge serves as an explicit reference throughout learning and transfer. It highlights heat diffusion as a concrete way to connect structural descriptions with the decisions underlying representation learning and target-domain adaptation.

References

Notation

Table 4 lists the main symbols, with domain indices omitted when unambiguous.

Properties of the Heat-Diffusion Structural Prior

This appendix gives calibration details, proves the fixed-time stability proposition in § 3.2, and analyzes equivariance, time recalibration, and numerical approximation. The graph Laplacians in the exact analysis are real and symmetric, and all diffusion times are nonnegative. Matrix norms are spectral norms and vector norms are Euclidean norms.

Diffusion-Time Calibration

For n>mn > m, (6) can be written as an average over the positive Laplacian eigenvalues:

rG(t)=1n−m∑λi>0e−tλi,rG′(t)=−1n−m∑λi>0λie−tλi<0.(22)\begin{aligned} r_G(t) &= \frac{1}{n-m}\sum_{\lambda_i>0}e^{-t\lambda_i}, \\ r'_G(t) &= -\frac{1}{n-m}\sum_{\lambda_i>0}\lambda_i e^{-t\lambda_i}<0. \tag*{(22)} \end{aligned}

Thus, rG(t)r_G(t) decreases continuously from 1 toward 0, and each target in (0,1)(0,1) determines a unique diffusion time before truncation. The decreasing targets in Eq. (7) produce nondecreasing times. For targets reached within tmax⁡t_{\max}, the same coordinate corresponds to the same average decay level of the nonzero spectral modes across graphs, although the actual time is graph-specific. This calibration does not impose node correspondences or shared class meanings. If multiple targets require times beyond tmax⁡t_{\max}, they yield identical capped HKS coordinates, reducing the number of distinct diffusion scales.

SymbolDescription
Gd,GtG_d, G_tSource and target graphs
Xd,AdX_d, A_dAttributes and adjacency
Dsrc,GsrcD_{\mathrm{src}}, G_{\mathrm{src}}Source domains and graphs
LLNormalized Laplacian
KtK_tHeat kernel at time tt
hv(t),hvh_v(t), h_vHKS value and node descriptor
H(b)\mathbf{H}^{(b)}Branch-specific HKS matrix
M,Ms,MlM, M_s, M_lTotal, short-, long-time dimensions
b∈{s,l}b \in\{s,l\}Short-/long-time branch
tG,jt_{G,j}Calibrated diffusion time
m,rG(t)m, r_G(t)Nullity and normalized active trace
ρj,tmax⁡\rho_j, t_{\max}Heat-trace target and time cap
fθf_\thetaShared graph encoder
Pd,Pt\mathcal{P}_d, \mathcal{P}_tSource and target prompts
psh,pdp_{\mathrm{sh}}, p_dShared and source-domain tokens
X(b),H(b)\mathbf{X}^{(b)}, \mathbf{H}^{(b)}Prompted attributes and HKS
suvx,b,suvh,bs_{uv}^{x,b}, s_{uv}^{h,b}Attribute and HKS similarities
guv(b)g_{uv}^{(b)}Relation fusion gate
ζ\zetaLearned-relation mixing weight
A(o),A(b)\mathbf{A}^{(o)}, \mathbf{A}^{(b)}Original and refined graph views
Lpre\mathcal{L}_{\mathrm{pre}}Pre-training objective
τh,τctr\tau_h, \tau_{\mathrm{ctr}}Kernel/contrastive temperatures
xˉv,hˉv\bar{x}_v, \bar{h}_vFused target attributes and HKS
δuv\delta_{uv}Relative edge-weight adjustment
zvz_vTarget node embedding
α\alphaAttribute-branch mixing weight
Sc,U\mathcal{S}_c, \mathcal{U}Support and unlabeled node sets
N,RcN, \mathcal{R}_cRetrieval count and selected pairs
λaug,τaug\lambda_{\mathrm{aug}}, \tau_{\mathrm{aug}}HKS retrieval weight/temperature
pc\mathbf{p}_cClass prototype

Table 4. Main notation.

If n=mn=m, positive semidefiniteness implies L=0L=0. There are no decaying modes, so the normalized heat trace in Eq. (6) is undefined. We set all diffusion times to zero and all HKS entries to one, matching the implementation. This convention also preserves equivariance, although the descriptors contain no variation across nodes or scales.

Equivariance under Node Relabeling

Proposition (Equivariance under node relabeling). Let H(G)H(G) be the exact HKS matrix evaluated at the calibrated times TGT_G. If GPG^P relabels GG by a permutation matrix PP, then

H(GP)=PH(G).(23)H(G^P) = P H(G). \tag*{(23)}

Thus, node relabeling only reorders the calibrated descriptors.

Proof. Let GPG^P have adjacency A′=PAPTA' = P A P^{\mathsf{T}}. Its degree matrix is D′=PDPTD' = P D P^{\mathsf{T}}, including the convention for zero-degree nodes. Thus

L′=PLPT,e−tL′=Pe−tLPT.(24)L' = P L P^{\mathsf{T}}, \qquad e^{-tL'} = P e^{-tL} P^{\mathsf{T}}. \tag*{(24)}

The number of nodes, nullity, and heat trace are unchanged, so rGP(t)=rG(t)r_{G^P}(t)=r_G(t). Using the same targets and time cap therefore gives tGP,j=tG,jt_{G^P,j}=t_{G,j} for every jj. Taking diagonals of the heat kernels at these times proves Eq. (23).

Stability at Fixed Diffusion Times

We prove Eq. (10) from Section 4.2, using the same Laplacians, perturbation bound, and common time sequence.

Proof. For symmetric positive semidefinite LL and L~\widetilde{L}, their heat operators are contractions: ∥e−sL∥2≤1\lVert e^{-sL}\rVert_2 \le1 and ∥e−sL~∥2≤1\lVert e^{-s\widetilde{L}}\rVert_2 \le1 for s≥0s \ge0. The matrix exponential identity gives

e−tL−e−tL~=∫0te−(t−s)L(L~−L)e−sL~ ds.(25)e^{-tL} - e^{-t\widetilde{L}} = \int_0^t e^{-(t-s)L}(\widetilde{L}-L)e^{-s\widetilde{L}}\,\mathrm{d}s. \tag*{(25)}

Applying submultiplicativity and the contraction bounds yields

∥e−tL−e−tL~∥2≤∫0tϵ ds=tϵ.(26)\lVert e^{-tL} - e^{-t\widetilde{L}}\rVert_2 \le\int_0^t \epsilon\,\mathrm{d}s = t\epsilon. \tag*{(26)}

For the coordinate vector eve_v, the difference between the two diagonal entries is

∣hv(t)−h~v(t)∣=∣evT(e−tL−e−tL~)ev∣≤tϵ.(27)\lvert h_v(t)-\widetilde{h}_v(t)\rvert = \lvert e_v^{\mathsf{T}}(e^{-tL}-e^{-t\widetilde{L}})e_v\rvert \le t\epsilon. \tag*{(27)}

Squaring this inequality at each tjt_j, summing over jj, and taking the square root proves Eq. (10). This bound compares corresponding nodes under a Laplacian perturbation; it does not require a shared attribute space.

Effect of Graph-Specific Diffusion Times

For symmetric normalized Laplacians, ∥L∥2≤2\lVert L\rVert_2 \le2. Consequently, for any nonnegative s,ts,t,

∥e−tL−e−sL∥2≤2∣t−s∣.(28)\lVert e^{-tL}-e^{-sL}\rVert_2 \le2\lvert t-s\rvert. \tag*{(28)}

obtained by integrating the derivative −Le−uL-Le^{-uL} between the two times. Let tG=(tG,1,…,tG,M)Tt_G=(t_{G,1},\ldots,t_{G,M})^{\mathsf{T}} and let hG,v=hv(L;TG)h_{G,v}=h_v(L;T_G) denote the exact calibrated descriptor. Applying Eqs. (26) and (28), followed by the triangle inequality, gives

∥hG,v−h~G,v∥2≤ϵ∥tG∥2+2∥tG−t~G∥2.(29)\lVert h_{G,v}-\widetilde{h}_{G,v}\rVert_2 \le\epsilon\lVert t_G\rVert_2 +2\lVert t_G-\widetilde{t}_G\rVert_2. \tag*{(29)}

This separates changes in the heat operator from changes in the selected times. The second term requires control of the calibration procedure.

To make that dependence explicit, suppose GG and G~\widetilde{G} have the same number of nodes and the same nullity m<nm<n. Assume that, throughout [0,tmax⁡][0,t_{\max}], both normalized heat traces satisfy

−rG′(t)≥γ,−rG~′(t)≥γ,γ>0.(30)-r_G'(t)\ge\gamma,\qquad-r_{\widetilde{G}}'(t)\ge\gamma,\qquad\gamma>0. \tag*{(30)}

Using ∣tr⁡(B)∣≤n∥B∥2\lvert\operatorname{tr}(B)\rvert\le n\lVert B\rVert_2 and Eq. (26), we obtain

∣rG(t)−rG~(t)∣≤ntϵn−m≤ntmax⁡ϵn−m.(31)\lvert r_G(t)-r_{\widetilde{G}}(t)\rvert \le\frac{nt\epsilon}{n-m} \le\frac{nt_{\max}\epsilon}{n-m}. \tag*{(31)}

The slope condition bounds the sensitivity of the inverse heat traces, including their capped values. To see this, suppose tG,j<tG~,jt_{G,j}<t_{\widetilde{G},j} The smaller time is uncapped and satisfies rG(tG,j)=ρjr_G(t_{G,j})=\rho_j. Since r~G(t~G,j)≥ρj\widetilde{r}_G(\widetilde{t}_{G,j})\geq\rho_j, Eq. (30) gives

γ(t~G,j−tG,j)≤r~G(tG,j)−ρj≤ntmax⁡ϵn−m.(32)\gamma(\widetilde{t}_{G,j}-t_{G,j})\leq\widetilde{r}_G(t_{G,j})-\rho_j \leq\frac{n t_{\max}\epsilon}{n-m}. \tag*{(32)}

The reverse ordering is handled by exchanging the graphs. Therefore,

∥tG−t~G∥2≤M ntmax⁡(n−m)γϵ.(33)\lVert t_G-\widetilde{t}_G\rVert_2\leq\frac{\sqrt{M}\,n t_{\max}}{(n-m)\gamma}\epsilon. \tag*{(33)}

Together with ∥tG∥2≤M tmax⁡\lVert t_G\rVert_2\leq\sqrt{M}\,t_{\max}, this supplies a conditional bound for Eq. (29). A nearly flat heat trace can make γ\gamma small and the bound loose. The argument also requires unchanged nullity, so it does not establish uniform stability under arbitrary changes in graph connectivity.

Numerical Approximation

The preceding results concern exact heat operators and exact calibration. For large graphs, polynomial approximation and stochastic estimation affect both the selected times and the HKS values. Let t^G\widehat{t}_G be the computed time vector, and let h^G,v\widehat{h}_{G,v} be the computed descriptor. Write

ηG,v=∥h^G,v−hv(L;T^G)∥2(34)\eta_{G,v}=\lVert\widehat{h}_{G,v}-h_v(L;\widehat{T}_G)\rVert_2 \tag*{(34)}

for the error relative to the exact HKS at the computed times. (28) then implies

∥h^G,v−hG,v∥2≤ηG,v+2∥t^G−tG∥2.(35)\lVert\widehat{h}_{G,v}-h_{G,v}\rVert_2\leq\eta_{G,v}+2\lVert\widehat{t}_G-t_G\rVert_2. \tag*{(35)}

Polynomial truncation and stochastic diagonal estimation both contribute to ηG,v\eta_{G,v}; a truncation tolerance alone does not bound the stochastic error. Approximate permutation equivariance also depends on the probes: relabeling the probes together with the graph preserves the correspondence in exact arithmetic, whereas independently sampled probes introduce estimation differences. These numerical effects are separate from the exact structural properties and do not provide a guarantee of downstream prediction accuracy.

Target-Domain Prompting

We specify the target prompts used in Section 4.4. Each branch b∈{s,l}b\in\{s,l\} has independent prompts for attributes and HKS. As in Eq. (11), let qq denote an input vector and temporarily omit branch and input-type indices. The shared token pshp_{\mathrm{sh}} and source-domain tokens {pd}d∈Dsrc\{p_d\}_{d\in D_{\mathrm{src}}} are inherited from pre-training and remain frozen. We form a source-derived modulation vector

pmix=psh⊙(∑d∈Dsrcadpd).(36)p_{\mathrm{mix}}=p_{\mathrm{sh}}\odot\left(\sum_{d\in D_{\mathrm{src}}}a_d p_d\right). \tag*{(36)}

where the coefficients ad∈Ra_d\in\mathbb{R} are learned on the target graph. A trainable target-specific token ptp_t provides an additional modulation. The target prompt is

Pt(q)=ωtq+(1−ωt)[(βsrcpmix+βtgtpt)⊙q].(37)P_t(q)=\omega_tq+(1-\omega_t)\left[(\beta_{\mathrm{src}}p_{\mathrm{mix}}+\beta_{\mathrm{tgt}}p_t)\odot q\right]. \tag*{(37)}

where βsrc,βtgt∈R\beta_{\mathrm{src}},\beta_{\mathrm{tgt}}\in\mathbb{R} are trainable fusion coefficients and ωt=σ(κt)∈(0,1)\omega_t=\sigma(\kappa_t)\in(0,1) is controlled by a trainable scalar κt\kappa_t. All tokens have the same dimension as qq. The coefficients ada_d and βsrc,βtgt\beta_{\mathrm{src}},\beta_{\mathrm{tgt}} are unconstrained; they are not softmax-normalized or required to sum

to one. Disabling the residual connection corresponds to fixing ωt=0\omega_t=0. All target prompt parameters are separate across branches and input types.

Let xvPCAx_v^{\mathrm{PCA}} be the target node’s PCA-projected attributes. Restoring the branch and input-type indices, the inputs used by downstream adaptation are

x‾v=12∑b∈{s,l}Pt(b,x)(xvPCA),\overline{x}_v=\frac{1}{2}\sum_{b\in\{s,l\}}\mathcal{P}_t^{(b,x)}(x_v^{\mathrm{PCA}}),
h‾v=[Pt(s,h)(hv(s))Pt(l,h)(hv(l))].(38)\overline{h}_v= \begin{bmatrix} \mathcal{P}_t^{(s,h)}(h_v^{(s)})\\ \mathcal{P}_t^{(l,h)}(h_v^{(l)}) \end{bmatrix}. \tag*{(38)}

Here, xx and hh identify attribute and HKS prompts, respectively. Target prompting changes the modulation of the structural coordinates, while the underlying HKS descriptors remain fixed.

Additional Experimental Details

Datasets

Table 5 summarizes the ten datasets. Edges count distinct undirected pairs excluding self-loops; Features denotes the attribute dimension before PCA.

DatasetNodesEdgesFeaturesClasses
Cora2,7085,2781,4337
CiteSeer3,3274,5523,7036
PubMed19,71744,3245003
Cornell1832771,7035
Texas1832791,7035
Wisconsin2514501,7035
Chameleon2,27731,3712,3255
Squirrel5,201198,3532,0895
Computers13,752245,86176710
Photo7,650119,0817458

Table 5. Dataset statistics.

Baselines

Supervised GNNs. GCN and GAT learn node representations through normalized aggregation and attention, respectively.

Self-supervised methods. DGI and GraphCL learn representations without labels through local–global information maximization and contrast between augmented graph views, respectively.

Prompt-based methods. GPPT, GPF, and GraphPrompt adapt pre-trained graph models through task-specific prompts.

Graph foundation models. GCOPE, SAMGPT, MDGFM, Rieman-nGFM, and R-GFM transfer knowledge across domains using graph coordination, prompting, topology learning, or Riemannian representations.

Evaluation Protocols

We adopt leave-one-dataset-out transfer, pre-training on the nine non-target graphs without node labels. Node classification covers all datasets except Chameleon and Squirrel; link prediction covers Wisconsin, Cora, PubMed, and Photo.

HyperparameterValue
GCN layers3
Hidden/output dimension256
PCA dimension50
Short-/long-time HKS dimensions8 / 8
Heat-trace targets (ρmax⁡,ρmin⁡)(\rho_{\max}, \rho_{\min})(0.9, 0.1)
Maximum diffusion time tmax⁡t_{\max}32
HKS kernel temperature τh\tau_h0.01
Contrastive temperature τctr\tau_{\mathrm{ctr}}0.2
Edge-dropout rate0.3
Pre-training learning rate3×10−33 \times10^{-3}
Pre-training weight decay10−510^{-5}
Adaptation learning rate10−310^{-3}
Retrieval count NN10
Retrieval balance λaug\lambda_{\mathrm{aug}}0.5
Retrieval temperature τaug\tau_{\mathrm{aug}}0.5

Table 6. Reference implementation settings. Run-specific overrides should be reported separately.

Few-shot node classification. Each episode samples K∈{1,3,5}K \in\{1, 3, 5\} support nodes per class and uses the remaining labeled nodes as queries. Target topology and attributes are available during adaptation, while query labels are reserved for evaluation. The encoder and source prompts remain frozen; target prompts, the edge modifier, and the attribute MLP are optimized on support labels. HKS-guided prototype refinement is used for 1-shot evaluation, whereas 3-shot and 5-shot evaluation use support-only prototypes. Each episode reloads the pre-trained checkpoint and reinitializes target modules. We report the mean and standard deviation of final query accuracy.

Supervised link prediction. Positive edges are split into training, validation, and test sets at an 80%/10%/10% ratio, each paired with an equal number of negatives sampled from nonedges of the original graph. HKS is computed on the training observation graph. We optimize the encoder, target prompts, and prediction head with binary cross-entropy, keeping source prompts frozen. The checkpoint maximizing validation ROC-AUC is evaluated on the test set. We report mean and standard deviation of test ROC-AUC over repeated splits and initializations.

Implementation Details

Architecture and heat prior. We use a three-layer GCN with hidden and output dimensions of 256 and graph-specific PCA with 50 output dimensions. The HKS descriptor has 16 coordinates, equally divided between short- and long-time branches. Heat-trace targets decrease geometrically from 0.9 to 0.1, with tmax⁡=32t_{\max} = 32. HKS computation uses eigendecomposition for graphs with at most 4,096 nodes and stochastic polynomial approximation for larger graphs.

Optimization and adaptation. We use Adam with a pre-training learning rate of 3×10−33 \times10^{-3} and weight decay of 10−510^{-5}; target adaptation uses a learning rate of 10−310^{-3}. The HKS kernel temperature, contrastive temperature, and edge-dropout rate are 0.01, 0.2, and 0.3, respectively. Prototype refinement retrieves up to N=10N = 10 candidates per support node, with λaug=τaug=0.5\lambda_{\mathrm{aug}} = \tau_{\mathrm{aug}} = 0.5. Each support node receives twice the largest individual candidate weight.

Received 20 February 2007; revised 12 March 2009; accepted 5 June 2009

References

  1. [1]Sergey Brin and Lawrence Page. 1998. The Anatomy of a Large-Scale Hypertextual Web Search Engine. Computer Networks and ISDN Systems 30, 1–7 (1998), 107–117.
  2. [2]Mark Craven, Dan DiPasquo, Dayne Freitag, Andrew McCallum, Tom M. Mitchell, Kamal Nigam, and Sean Slattery. 1998. Learning to Extract Symbolic Knowledge from the World Wide Web. In Proceedings of the Fifteenth National Conference on Artificial Intelligence and Tenth Innovative Applications of Artificial Intelligence Conference, AAAI 98, IAAI 98, July 26-30, 1998, Madison, Wisconsin, USA, Jack Mostow and Chuk Kich (Eds.). AAAI Press / The MIT Press, 509–516. http: //www.aaai.org/Library/AAAI/1998/aaai98-072.php
  3. [3]Quanyu Dai, Xiao-Ming Wu, Jiaren Xiao, Xiao Shen, and Dan Wang. 2023. Graph Transfer Learning via Adversarial Domain Adaptation with Graph Convolution. IEEE Transactions on Knowledge and Data Engineering 35, 5 (2023), 4908–4922.arxiv.org/abs/1909.01541
  4. [4]Claire Donnat, Federico Locatello, Daniel H. G. Hünnemann, and Michael M. Bronstein. 2018. Learning Structural Node Embeddings via Diffusion Wavelets. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. 1320–1329.DOI
  5. [5]Claire Donnat, Marinka Zitnik, David Hallac, and Jure Leskovec. 2018. Learning Structural Node Embeddings via Diffusion Wavelets. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. 1320–1329.DOI
  6. [6]Taoran Fang, Yunchao Zhang, Yang Yang, Chunping Wang, and Lei Chen. 2023. Universal prompt tuning for graph neural networks. Advances in Neural Information Processing Systems 36 (2023), 52464–52489.arxiv.org/abs/2209.15240
  7. [7]Luca Franceschi, Mathias Niepert, Massimiliano Pontil, and Xiao He. 2019. Learning Discrete Structures for Graph Neural Networks. In Proceedings of the 36th International Conference on Machine Learning, Vol. 97. PMLR, 1972–1982.arxiv.org/abs/1903.11960
  8. [8]Xiaodong He, Haolan He, Ruiyi Fang, Ying Sun, and zhaokang. 2026. Structure-Centric Graph Foundation Model via Geometric Bases. In Forty-third International Conference on Machine Learning.arxiv.org/abs/2605.08689
  9. [9]Yufei He, Yuan Sui, Xiaoxin He, and Bryan Hooi. 2025. UniGraph: Learning a Unified Cross-Domain Foundation Model for Text-Attributed Graphs. In Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining. 448–459.arxiv.org/abs/2402.13630
  10. [10]Thomas N Kipf and Max Welling. 2017. Semi-Supervised Classification with Graph Convolutional Networks. In International Conference on Learning Representations.arxiv.org/abs/1609.02907
  11. [11]Thomas N Kipf and Max Welling. 2017. Semi-Supervised Classification with Graph Convolutional Networks. In International Conference on Learning Representations.arxiv.org/abs/1609.02907
  12. [12]Haokun Liu, Zezhong Ding, and Xike Xie. 2026. Learning Graph Foundation Models on Riemannian Graph-of-Graphs. In Proceedings of the Forty-third International Conference on Machine Learning.arxiv.org/abs/2605.09993
  13. [13]Zemin Liu, Xingtong Yu, Yuan Fang, and Xinming Zhang. 2023. GraphPrompt: Unifying Pre-Training and Downstream Tasks for Graph Neural Networks. In Proceedings of the ACM Web Conference 2023, WWW 2023, Austin, TX, USA, 30 April 2023 – 4 May 2023, Ying Ding, Jie Tang, Juan F. Quelada, Jora Aroyo, Carlos Castillo, and Geert-Jan Houben (Eds.). ACM, 417–428.arxiv.org/abs/2302.08043
  14. [14]Galileo Namata, Ben London, Lise Getoor, Bert Huang, and U Edu. 2012. Query-driven active surveying for collective classification. In 10th international workshop on mining and learning with graphs, Vol. 8, 1.
  15. [15]Sinno Jialin Pan and Qiang Yang. 2010. A Survey on Transfer Learning. IEEE Transactions on Knowledge and Data Engineering 22, 10 (2010), 1345–1359.DOI
  16. [16]Hongbin Pei, Bingzhe Wei, Kevin Chen Chuan Goh, Yulei, and Bo Yang. 2020. GEOMETRIC GRAPH CONVOLUTIONAL NETWORKS. In 8th International Conference on Learning Representations, ICLR 2020.arxiv.org/abs/2002.05287
  17. [17]Mengye Ren, Eleni Triantafillou, Sachin Ravi, Jake Snell, Kevin Swersky, Joshua B. Tenenbaum, Hugo Larochelle, and Richard S. Zemel. 2018. Meta-Learning for Semi-Supervised Few-Shot Classification. In International Conference on Learning Representations.
  18. [18]Benedek Rozemberczki, Carl Allen, and Rik Sarkar. 2021. Multi-scale attributed node embedding. Journal of Complex Networks 9, 2 (2021), cnab014.arxiv.org/abs/1909.13021
  19. [19]Prithviraj Sen, Galileo Namata, Mustafa Bilgic, Lise Getoor, Brian Gallagher, and Tina Eliassi-Rad. 2008. Collective classification in network data. AI magazine 29, 3 (2008), 93–93.DOI
  20. [20]Oleksandr Schur, Maximilian Mumme, Aleksandar Bochevski, and Stephan Günnemann. 2018. Pitfalls of Graph Neural Network Evaluation. Relational Representation Learning Workshop, NeurIPS 2018.
  21. [21]Chuan Shi, Junze Chen, Jiawei Liu, and Cheng Yang. 2024. Graph Foundation Model. Frontiers of Computer Science 18, 6 (2024).DOI
  22. [22]Jake Snell, Kevin Swersky, and Richard S. Zemel. 2017. Prototypical Networks for Few-shot Learning. In Advances in Neural Information Processing Systems, Vol. 30.arxiv.org/abs/1703.05175
  23. [23]Jian Sun, Maks Ovsjanikov, and Leonidas Guibas. 2009. A concise and provably informative multi-scale signature based on heat diffusion. In Computer graphics forum, Vol. 28. Wiley Online Library, 1383–1392.DOI
  24. [24]Li Sun, Zhenhao Huang, Suyang Zhou, Qiqi Wan, Hao Peng, and Philip Yu. 2025. Remainmgfm: Learning a graph foundation model from remianning geometry. In Proceedings of the ACM on Web Conference 2025. 1154–1165.
  25. [25]Mingchen Sun, Kaixiong Zhou, Xin He, Ying Wang, and Xin Wang. 2022. Gppt: Graph pre-training and prompt tuning to generalize graph neural networks. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining. 1717–1727.DOI
  26. [26]Anton Tsitsulin, Davide Mottin, Panos K ten, Emile C. M. van der Maaten, and Stephan G"unnemann. 2018. NetLSD: Hearing the Shape of a Graph. In 2018 IEEE International Conference on Data Mining. 234–243.
  27. [27]Petar Velicković, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua Bengio. 2018. Graph Attention Networks. In International Conference on Learning Representations.arxiv.org/abs/1710.10903
  28. [28]Petar Velickovic, William Fedus, William L. Hamilton, Pietro Liò, Yoshua Bengio, and R. Devon Hjelm. 2019. Deep Graph Infomax. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net.
  29. [29]Shuo Wang, Bokui Wang, Zhixiang Shen, Boyan Deng, and Zhao Kang. 2025. Multi-Domain Graph Foundation Models: Robust Knowledge Transfer via Topology Alignment. In International Conference on Machine Learning. PMLR, 64806–64821.arxiv.org/abs/2502.02017
  30. [30]Zonghan Wu, Shirui Pan, Fengwen Chen, Guodong Long, Chengqi Zhang, and Philip S. Yu. 2021. A Comprehensive Survey on Graph Neural Networks. IEEE Transactions on Neural Networks and Learning Systems 32, 1 (2021), 4–24.DOI
  31. [31]Rex Ying, Ruining He, Kaifeng Chen, Peng V. Eksombatchai, William L. Hamilton, and Jure Leskovec. 2018. Graph Convolutional Neural Networks for Web-Scale Recommender Systems. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. 974–983.DOI
  32. [32]Yuning You, Tianlong Chen, Yongduo Sui, Ting Chen, Zhangyang Wang, and Yang Shen. 2020. Graph Contrastive Learning with Augmentations. In Advances in Neural Information Processing Systems, Vol. 33. 5812–5823.
  33. [33]Xingtong Yu, Zechuan Gong, Chang Zhou, Yuan Fang, and Hui Zhang. 2025. Samgpt: Text-free graph foundation model for multi-domain pre-training and cross-domain adaptation. In Proceedings of the ACM on Web Conference 2025. 1142–1153.arxiv.org/abs/2502.05424
  34. [34]Haihong Zhao, Aochuan Chen, Xiangguo Sun, Hong Cheng, and Jia Li. 2024. All in One and One for All: A Simple yet Effective Method towards Cross-domain Graph Pretraining. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining.DOI

Paper details

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

views · 0

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