Organizations: School of Computer Science and Cyber Engineering, Guangzhou University, Guang Zhou, 510006, Guangdong, China · Hunan University of Technology and Business, Changsha, 410205, Hunan, China
Graph prompt learning is an effective paradigm to adapt pre-trained graph models to downstream tasks in low-resource scenarios. However, existing multi-task graph pre-training frameworks generally use randomly initialized prompts, leading to poor alignment between the prompt space, pretext objectives and graph structural characteristics. This greatly weakens the task relevance, structural awareness and transferability of prompt representations. To address this challenge, we propose TPGC, a dual-prior prompt initialization solution that explicitly models the synergy between task prior and structural prior. Specifically, the Task-Prior Injection Module first conducts a short homologous multi-task pre-training on an auxiliary graph, enabling prompt initialization to inherit optimization preferences associated with multiple pretext tasks. Built on the task-aware representations, the Structure-Prior Injection Module further extracts transferable global structural context from the auxiliary graph, converting it into layer-wise prompt vectors by aggregating structurally informative node embeddings. Extensive experiments on 6 mainstream benchmarks covering node and graph classification show that TPGC achieves consistently better performance under few-shot settings than state-of-the-art baselines, with fewer downstream tunable parameters and lower runtime. The code is available at https://github.com/Virgilqiu/TPGC
Figures & tables
Figure 1: Visualization of prompt initialization quality in the representation space. (a): The left illustrates that random initialization places prompt vectors in arbitrary low-density regions, far from informative node clusters. (b): The right shows that TPGC initialization aligns prompt vectors with high-density and semantically meaningful regions of the node embedding space, providing a more informative and structurally aligned starting point for subsequent pre-training.
Figure 2: The overall architecture of our proposed TPGC consists of three successive stages, namely prompt initialization, target-domain multi-task pre-training, and downstream prompt-based adaptation. Note that the ”fire” means the corresponding modules/parameters are learnable, while the ”snow” means those are frozen.
Methods
Cora
Citeseer
PROTEINS
ENZYMES
1-shot
GCN [ 17 ] (ICLR 2017)
28.57 ± 5.07
31.27 ± 4.53
43.31 ± 9.35
48.08 ± 4.71
GAT [ 32 ] (ICLR 2018)
28.40 ± 6.25
30.76 ± 5.40
31.79 ± 20.11
35.32 ± 18.72
DGI/InfoGraph [ 34 ] (ICLR 2019)
54.11 ± 9.60
45.00 ± 9.19
45.22 ± 11.09
48.05 ± 14.83
GraphCL [ 44 ] (NeurIPS 2020)
51.96 ± 9.43
43.21 ± 9.61
46.15 ± 10.94
48.88 ± 15.98
GPPT [ 27 ] (KDD 2022)
15.37 ± 4.51
21.45 ± 3.45
35.15 ± 11.40
35.37 ± 9.37
Table 1: Performance (%) comparisons (mean accuracy ± standard deviation) on node classification datasets under 1-shot and 5-shot settings. Note that for each dataset in each shot setting, we mark the best result in bold , and the second-best result in underline .
Methods
BZR
COX2
PROTEINS
ENZYMES
1-shot
GCN [ 17 ] (ICLR 2017)
45.06 ± 16.30
43.84 ± 13.94
51.66 ± 10.87
19.30 ± 6.36
GAT [ 32 ] (ICLR 2018)
46.28 ± 15.26
51.72 ± 13.70
51.33 ± 11.02
20.24 ± 6.39
DGI/InfoGraph [ 34 ] (ICLR 2019)
49.07 ± 20.34
53.14 ± 14.38
50.32 ± 13.47
17.73 ± 7.89
GraphCL [ 44 ] (NeurIPS 2020)
50.07 ± 21.38
50.94 ± 13.78
50.69 ± 10.92
19.73 ± 7.30
GraphPrompt [ 21 ] (WWW 2023)
52.20 ± 19.27
54.54 ± 16.32
53.61 ± 8.90
21.43 ± 6.60
Table 2: Performance (%) comparisons (mean accuracy ± standard deviation) on graph classification datasets under 1-shot and 5-shot settings. Note that for each dataset in each shot setting, we mark the best result in bold , and the second-best result in underline .
Figure 3: Performance change under different shot settings on node classification and graph classification.
Methods
Total Runtime (ms)
Tunable Parameters
MultiGPrompt [ 47 ] (WWW 2024)
2859.65
522
ProNoG [ 46 ] (KDD 2025)
5358.24
2564
TPGC (Ours)
2885.47
522
Table 3: Comparison of downstream-stage runtime and tunable parameter count on ENZYMES under the 1-shot setting with 50 downstream training epochs. Runtime is reported in milliseconds (ms).
Figure 4: Performance comparison before and after removing downstream-task-specific prompts (abbreviated as D-prompt) on Cora node classification and COX2 graph classification. Solid lines denote the original methods, while dashed lines denote the variants that discard D-prompt and only use pre-trained prompt vectors for downstream classification.
Methods
SPIM
TPIM
Cora
Citeseer
PROTEINS
ENZYMES
1-shot
Random Init.
57.73
53.89
48.23
53.95
TPGC w/o T
√
57.95
53.73
46.92
53.54
TPGC w/o S
√
57.09
53.28
47.30
53.90
TPGC (Ours)
√
√
58.57
54.77
49.10
55.45
5-shot
Table 4: Effectiveness of key component in prompt initialization on node classification datasets.
Methods
SPIM
TPIM
BZR
COX2
PROTEINS
ENZYMES
1-shot
Random Init.
56.49
54.63
55.11
21.73
TPGC w/o T
√
56.18
53.67
54.56
21.53
TPGC w/o S
√
55.17
53.15
54.13
21.03
TPGC (Ours)
√
√
56.87
55.05
55.73
22.10
5-shot
Table 5: Effectiveness of key component in prompt initialization on graph classification datasets.
Figure 5: Visualization (t-SNE) of initialized prompt vectors and graph node embeddings. DGI, GraphCL, and LP correspond to the three default pretext tasks adopted in the pre-training stage, and the plotted prompt vectors illustrate how task-specific prompt initialization is positioned in the graph representation space.
Figure 6: Visualization of pre-training loss convergence under random initialization and TPGC initialization.
School of Computer Science and Technology, Anhui University, Hefei 230601, China. · State Key Laboratory of Opto-Electronic Information Acquisition and Protection Technology, School of Computer Science and Technology, Anhui University, Hefei 230601, China.