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.
GNN prompting aims to adapt models across tasks and graphs without requiring extensive retraining. However, most existing graph prompt methods still require task-specific parameter updates and face the issue of generalizing across graphs, limiting their performance and undermining the core promise of prompting. In this work, we introduce a Cross-graph Tuning-free Prompting Framework (CTP), which supports both homogeneous and heterogeneous graphs, can be directly deployed to unseen graphs without further parameter tuning, and thus enables a plug-and-play GNN inference engine. Extensive experiments on few-shot prediction tasks show that, compared to SOTAs, CTP achieves an average accuracy gain of 30.8% and a maximum gain of 54%, confirming its effectiveness and offering a new perspective on graph prompt learning.
Yaqi Chen, Shixun Huang, Ryan Twemlow +6
University of Wollongong, Northfields Avenue, Gwynneville, 2500, NSW, Australia · Wuhan University, No. 299, Luojia Hill, Wuhan, 430072, Hubei, China
Graph Data Prompt (GDP), which introduces specific prompts in graph data for efficiently adapting pre-trained GNNs, has become a mainstream approach to graph fine-tuning learning problem. However, existing GDPs have been respectively designed for distinct graph component (e.g., node features, edge features, edge weights) and thus operate within limited prompt spaces for graph data. To the best of our knowledge, it still lacks a unified prompter suitable for targeting all graph components simultaneously. To address this challenge, in this paper, we first propose to reinterpret a wide range of existing GDPs from an aspect of Graph Message Prompt (GMP) paradigm. Based on GMP, we then introduce a novel graph prompt learning approach, termed Low-Rank GMP (LR-GMP), which leverages low-rank prompt representation to achieve an effective and compact graph prompt learning. Unlike traditional GDPs that target distinct graph components separately, LR-GMP concurrently performs prompting on all graph components in a unified manner, thereby achieving significantly superior generalization and robustness on diverse downstream tasks. Extensive experiments on several graph benchmark datasets demonstrate the effectiveness and advantages of our proposed LR-GMP.
Beibei Wang, Bo Jiang, Ziyan Zhang +1
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.
Graph prompt tuning has shown great potential in graph learning by introducing trainable prompts to enhance the model performance in conventional single-domain scenarios. Recent research has extended graph prompts to improve Graph Foundation Models (GFMs) by few-shot tuning auxiliary prompts. Despite their progress, most existing methods embed source-domain information into prompts, which serve either as input to GFMs or encoded during model pre-training. Such prompt entanglement with specific source domains and GFM pre-training strategy restricts their generalisability to other domains and different GFMs. Furthermore, existing GFM prompts merely rely on few-shot tuning for adaptation, neglecting the rich information in unlabelled target domain test data. Motivated by these insights, this paper aims to empower GFMs with pre-training-agnostic test-time graph prompt tuning, named GFMate. GFMate introduces centroid and layer prompts applied after pre-training on target domains, avoiding entanglement with specific source domains and model pre-training. In addition, a test-time complementary learning objective is devised to exploit both labelled and unlabelled target domain data for effective test-time prompt tuning. Extensive experiments on 12 benchmark datasets demonstrate the superior performance and efficiency of GFMate, achieving improvements of up to 30.63%. Code is available at https://github.com/YanJiangJerry/GFMate.
Yan Jiang, Ruihong Qiu, Zi Huang
School of Electrical Engineering and Computer Science, The University of Queensland, Brisbane, Queensland, Australia