Abstract
GraphPrompt is a novel framework designed to bridge the gap between pre-training and downstream tasks in Graph Neural Networks (GNNs). By introducing a unified "subgraph similarity" template, GraphPrompt aligns the objectives of self-supervised pre-training with those of node and graph classification. This alignment, coupled with a lightweight learnable prompt, enables superior performance in few-shot learning scenarios while maintaining extreme parameter efficiency compared to traditional fine-tuning methods.
Introduction
Graph Neural Networks (GNNs) have demonstrated remarkable success across various domains, yet their performance often hinges on the availability of large-scale task-specific labeled data. To address this, the "pre-train, fine-tune" paradigm has emerged, where a GNN is first trained on unlabeled data via tasks like link prediction before being adapted to downstream applications. However, a significant "objective discrepancy" exists between these phases: the structural focus of link prediction often fails to translate directly to the semantic requirements of classification. This discrepancy is particularly detrimental in few-shot settings where labeled data is scarce.
Methodology
The core innovation of GraphPrompt lies in its ability to treat disparate graph tasks through a single lens: subgraph similarity.
A Unified Task Template
GraphPrompt reformulates both pre-training and downstream tasks into a common template based on the similarity of subgraphs.
- Pre-training: Link prediction is modeled as the similarity between the contextual subgraphs of two nodes.
- Downstream Tasks: Node and graph classification are reframed as finding the similarity between a target instance (a node's neighborhood or an entire graph) and "class prototype" subgraphs, which represent the average features of labeled examples within a class.
Learnable Graph Prompts
Instead of fine-tuning the entire GNN, which is prone to overfitting in low-data regimes, GraphPrompt freezes the pre-trained GNN weights. It introduces a small, learnable prompt vector ($p_t$) that performs dimension-wise reweighting of node features during the ReadOut (aggregation) phase. This prompt acts as a task-specific filter, "cueing" the model to emphasize features relevant to the specific classification goal.
Experimental Evaluation
The framework was evaluated on five diverse datasets: Flickr (social network), PROTEINS and ENZYMES (bioinformatics), and COX2 and BZR (chemical compounds). These datasets represent a wide variety of graph topologies and task types.
Key Results
GraphPrompt consistently outperformed state-of-the-art baselines across both node and graph classification tasks.
- Accuracy: In 1-shot node classification on the ENZYMES dataset, GraphPrompt achieved 67.04% accuracy, significantly higher than DGI (63.33%) and the previous prompting method GPPT (53.79%).
- Few-Shot Robustness: GraphPrompt maintains a performance lead in low-shot scenarios, demonstrating its effectiveness when labeled data is extremely limited.
- Efficiency: The method is remarkably parameter-efficient. For instance, on the Flickr dataset, GraphPrompt requires tuning only 96 parameters to achieve better results than a standard GIN model requiring over 22,000 parameter updates.
Discussion and Conclusion
By unifying the "language" of graph tasks through subgraphs, GraphPrompt effectively mitigates the objective discrepancy inherent in traditional GNN pre-training. The use of lightweight prompts further ensures robustness and efficiency. Future research may explore more complex prompt structures, such as attention-based mechanisms, and investigate the framework's compatibility with a broader range of self-supervised pre-training objectives beyond link prediction.
Summary updated