All in One: Multi-task Prompting for Graph Neural Networks, KDD 2023.
Big News! We are so happy to announce that we have finished most updating works from ProG to ProG++!
From v0.2, ProG means ProG++
🌟ProG++🌟: A Unified Python Library for Graph Prompting
ProG++ is an extended library with ProG, which supports more graph prompt models. Some implemented models are as follows:
[All in One] X. Sun, H. Cheng, J. Li, B. Liu, and J. Guan, “All in One: Multi-Task Prompting for Graph Neural Networks,” KDD, 2023 [GPF Plus] T. Fang, Y. Zhang, Y. Yang, C. Wang, and L. Chen, “Universal Prompt Tuning for Graph Neural Networks,” NeurIPS, 2023. [GraphPrompt] Liu Z, Yu X, Fang Y, et al. Graphprompt: Unifying pre-training and downstream tasks for graph neural networks. The Web Conference, 2023. [GPPT] M. Sun, K. Zhou, X. He, Y. Wang, and X. Wang, “GPPT: Graph Pre-Training and Prompt Tuning to Generalize Graph Neural Networks,” KDD, 2022 [GPF] T. Fang, Y. Zhang, Y. Yang, and C. Wang, “Prompt tuning for graph neural networks,” arXiv preprint, 2022.
ProG (Prompt Graph) is a library built upon PyTorch to easily conduct single or multi-task prompting for pre-trained Graph Neural Networks (GNNs). The idea is derived from the paper: Xiangguo Sun, Hong Cheng, Jia Li, etc. All in One: Multi-task Prompting for Graph Neural Networks. KDD2023 (🔥 Best Research Paper Award, which is the first time for Hong Kong and Mainland China), in which they released their raw codes. This repository is a redesigned and enhanced version of the raw codes with extremely huge changes and updates
support GPU device
Pipeline
in ProG.prompt with new class FrontAndHead
so that the maml.clone
can be more memory-saving.totally replace sklearn.metrics
with more advanced torchmetrics
in ProG.eva
and update in no_meta_demo.py
, which can better support batch computing for f1 score and other metrics.
implement batch training and testing for prompt_w_o_h
in no_meta_demo.py
try to implement GPU support (but not tested and not fully finished)
implemented acc_f1_over_batches
in ProG.eva
for the function prompt_w_h()
in no_meta_demo.py
Compared with the raw project released in the paper (code), 0.1.1 has EXTREMELY HUGE CHANGES, including but not limited to:
sklearn.metrics
in the original versionmeta_test_adam
Explore this version to find more surprising things!
Evaluated results from this version:
Multi-class node classification (100-shots)
| CiteSeer |
| ACC | Macro-F1 |
==========================================|
reported in the paper | 80.50 | 80.05 |
(Prompt) | |
------------------------------------------|
this version code | 81.00 | -- |
(Prompt) | (run one time) |
==========================================|
reported in the paper | 80.00 | 80.05 |
(Prompt w/o h) | |
------------------------------------------|
this version code | 79.78 | 80.01 |
(Prompt w/o h) | (run one time) |
==========================================|
--: hasn't implemented batch F1 in this version
Full Changelog: https://github.com/sheldonresearch/ProG/commits/latest
This is the polished version of the raw code in the paper. (raw code)