Organizations: Xuanze Chen and Yadong Li are with the Institute of Cyberspace Security, Zhejiang University of Technology, Hangzhou 310023, China, and also with the Binjiang Cyberspace Security Institute of ZJUT, Hangzhou, 310056, China · Jiajun Zhou, Shanqing Yu and Qi Xuan are with the Institute of Cyberspace Security, Zhejiang University of Technology, Hangzhou 310023, China, with the Binjiang Cyberspace Security Institute of ZJUT, Hangzhou, 310056, China, and with the Soovar Technologies Co., Ltd., Hangzhou 310056, China
Heterogeneous graph representation learning (HGRL) is essential for modeling complex systems with diverse node and edge types. However, most existing methods are limited to closed-world settings with shared schemas and feature spaces, hindering cross-domain generalization. While recent graph foundation models improve transferability, they often target homogeneous graphs, rely on domain-specific schemas, or require rich textual attributes. Consequently, text-free and few-shot cross-domain HGRL remains underexplored. To address this, we propose CrossHGL, a foundation framework that preserves and transfers multi-relational structural semantics without external textual supervision. Specifically, a semantic-preserving transformation strategy homogenizes heterogeneous graphs while encoding interaction semantics into edge features. Based on this, a prompt-aware multi-domain pre-training framework with a Tri-Prompt mechanism captures transferable knowledge across feature, edge, and structure perspectives via self-supervised contrastive learning. For target-domain adaptation, we develop a parameter-efficient fine-tuning strategy that freezes the pre-trained backbone and performs few-shot classification via prompt composition and prototypical learning. Experiments on node-level and graph-level tasks show that CrossHGL consistently outperforms state-of-the-art baselines, yielding average relative improvements of 25.1% and 7.6% in Micro-F1 for node and graph classification, respectively, while remaining competitive in challenging feature-degenerated settings.
Figures & tables
Fig. 1: Challenges in cross-domain heterogeneous pre-training.
Fig. 2: Overview of the CrossHGL framework. The workflow consists of three phases: 1) Semantic-preserving graph transformation : each source and target heterogeneous graph is converted into a unified homogeneous graph through SVD-based feature alignment and meta-pattern mining, while heterogeneous semantics are preserved in semantics-enriched edge features; 2) Multi-domain semantic graph pre-training : a Tri-Prompt mechanism with feature, edge, and structure prompts is integrated with a shared GNN backbone to capture transferable knowledge from feature, relation, and topology perspectives through self-supervised contrastive learning; 3) Cross-domain semantic fine-tuning : the pre-trained backbone is frozen, source-domain prompts are composed with target-specific open prompts for few-shot adaptation, and the adapted representations are used for prototype-based prediction on target-domain instances.
Dataset
#Nodes
#Node
#Edges
#Edge
#Classes
Types
Types
ACM
10,942
4
547,872
8
3
DBLP
26,128
4
239,566
6
4
IMDB
11,616
3
34,212
4
3
Freebase
180,098
8
1,057,688
36
7
TABLE I: Summary of the heterogeneous graph datasets used in our cross-domain evaluation.
Paradigm
Category
Method
ACM
DBLP
IMDB
Freebase
Micro-F1
Macro-F1
Micro-F1
Macro-F1
Micro-F1
Macro-F1
Micro-F1
Macro-F1
Supervised Learning
Heterogeneous
HAN
52.66 ± 3.90
49.20 ± 6.99
41.72 ± 5.52
36.68 ± 6.84
37.25 ± 2.15
27.68 ± 5.49
40.12 ± 7.39
8.01 ± 1.29
Simple-HGN
48.15 ± 5.44
45.15 ± 3.67
37.53 ± 2.16
33.26 ± 4.16
35.14 ± 2.42
24.15 ± 4.31
37.73 ± 4.27
7.52 ± 2.32
Homogeneous
GCN
61.02 ± 10.23
56.19 ± 12.92
37.95 ± 4.98
34.84 ± 6.16
37.09 ± 2.06
27.20 ± 4.92
22.42 ± 0.19
4.02 ± 0.21
SAGE
47.83 ± 5.38
46.56 ± 6.10
44.01 ± 5.34
41.42 ± 5.82
37.67 ± 1.60
30.36 ± 4.15
29.21 ± 0.15
7.45 ± 0.03
GAT
54.10 ± 6.96
46.75 ± 8.28
38.50 ± 4.47
33.91 ± 5.20
37.24 ± 2.05
31.49 ± 3.81
25.95 ± 0.14
5.30 ± 0.02
TABLE II: Few-shot node classification results: average Micro-F1 and Macro-F1 (%) ± standard deviation across four cross-domain tasks. Boldface letters mark the best performance, while underlined letters indicate the second best.
Paradigm
Category
Method
ACM
DBLP
IMDB
Freebase
Micro-F1
Macro-F1
Micro-F1
Macro-F1
Micro-F1
Macro-F1
Micro-F1
Macro-F1
Supervised Learning
Heterogeneous
HAN
47.47 ± 8.42
43.02 ± 10.98
49.13 ± 8.66
45.68 ± 9.38
34.20 ± 2.99
26.48 ± 6.38
34.13 ± 7.39
7.67 ± 2.48
Simple-HGN
44.26 ± 5.16
40.02 ± 7.54
46.12 ± 6.26
43.15 ± 5.21
35.16 ± 3.15
27.34 ± 6.26
31.73 ± 4.27
5.32 ± 1.29
Homogeneous
GCN
54.68 ± 9.08
48.26 ± 11.79
43.38 ± 6.28
37.64 ± 7.06
35.02 ± 2.85
27.36 ± 4.89
20.04 ± 0.41
9.40 ± 0.05
SAGE
42.63 ± 5.59
36.44 ± 8.02
47.14 ± 8.32
43.64 ± 9.28
35.24 ± 2.52
28.80 ± 5.35
26.94 ± 4.41
9.87 ± 2.60
GAT
42.61 ± 4.17
34.01 ± 5.57
44.67 ± 7.53
40.61 ± 8.80
34.89 ± 2.63
26.89 ± 5.65
21.19 ± 5.75
8.78 ± 0.94
TABLE III: Few-shot graph classification results. Average Micro-F1 and Macro-F1 (%) ± standard deviation are reported. Boldface letters mark the best performance, while underlined letters indicate the second best.
Fig. 3: Impact of sample size ( k ) on ACM classification performance
Fig. 4: Performance comparison under different pre-training source settings. The full multi-source setting consistently achieves the best overall performance, while reducing the number of source domains leads to clear performance degradation on several target datasets.
TABLE IV: Ablation study results of Tri-Prompt components on four target datasets. Boldface denotes the best performance.
Fig. 5: Comparison between direct flattening and our semantic-preserving graph transformation on GCN, GraphSAGE, and GAT under the 1-shot supervised setting, where the remaining nodes are split into validation and test sets following the protocol used in the main results.
School of Computer Science and Technology, Tianjin University, Tianjin, China · Department of Health Technology and Informatics, and Department of Data Science and Artificial Intelligence, The Hong Kong Polytechnic University, Kowloon, Hong Kong