TL;DR
This paper introduces HetGPT, a novel prompt-tuning framework designed to enhance the performance of pre-trained Heterogeneous Graph Neural Networks (HGNNs) for node classification. By reformulating downstream tasks to align with pre-training objectives and incorporating a unique virtual class prompt and heterogeneous feature prompt, HetGPT effectively addresses the challenges of negative transfer and data scarcity in complex web-scale graphs.
What Problem Does This Paper Address?
The "pre-train, fine-tune" paradigm is a cornerstone of graph machine learning, especially when labeled data is scarce. However, this approach often suffers from a misalignment between the objectives of pre-training (e.g., link prediction) and downstream tasks (e.g., node classification). This mismatch can lead to "negative transfer," where pre-training knowledge actually hinders performance. Furthermore, existing prompt-tuning methods, inspired by Natural Language Processing (NLP), are primarily designed for homogeneous graphs and fail to capture the intricate, multi-relational structure of heterogeneous graphs, which are prevalent in real-world scenarios like the web. This paper tackles these issues by proposing a prompt-tuning framework specifically for HGNNs.
Methods
HetGPT introduces a "pre-train, prompt" paradigm for HGNNs, building upon contrastive pre-training. The core innovation lies in its prompting function, which reformulates downstream tasks to align with contrastive objectives. Key components include:
- Virtual Class Prompt: Instead of relying on direct class labels, HetGPT uses trainable "class tokens" that act as proxies for each class. These tokens are initialized by averaging embeddings of labeled nodes belonging to that class, providing a richer semantic representation.
- Heterogeneous Feature Prompt: This component injects trainable, type-specific prompts into the feature space of the heterogeneous graph. This allows for task-specific augmentation of node features without altering the pre-trained HGNN parameters, addressing the challenge of limited trainable parameters.
- Multi-View Neighborhood Aggregation: To capture the complex neighborhood structure in heterogeneous graphs, HetGPT employs a mechanism that aggregates information from both type-based neighbors (using attention) and metapath-based neighbors (also using attention). This combined view generates a robust "node token."
The prompted node features are then fed into the frozen pre-trained HGNN. The final node token is compared against the virtual class tokens using the same contrastive loss function used during pre-training, effectively bridging the gap between pre-training and downstream tasks.
Datasets
The paper evaluates HetGPT on three benchmark heterogeneous graph datasets:
- ACM: A citation network.
- DBLP: A co-authorship network.
- IMDB: A movie collaboration network.
The target nodes for classification are "Paper" in ACM, "Author" in DBLP, and "Movie" in IMDB. The authors use standard semi-supervised node classification settings, varying the number of labeled nodes per class from 1 to 60.
Key Insights and Ideas
- Prompting for Heterogeneity is Crucial: The success of prompt tuning in NLP doesn't directly translate to heterogeneous graphs. HetGPT's design explicitly accounts for the multi-relational nature of these graphs, which is a significant step beyond prior work.
- Virtual Class Tokens Bridge the Gap: Using trainable class tokens instead of hard labels is a clever way to align downstream classification with contrastive pre-training objectives, mitigating negative transfer and improving generalization, especially in low-data regimes.
- Type-Specific Prompts are Efficient: Injecting prompts directly into the feature space, tailored to node types, allows for effective task adaptation without the computational burden of fine-tuning the entire HGNN.
- Multi-View Aggregation Captures Richness: Simply aggregating neighbors isn't enough for heterogeneous graphs. The combination of type-based and metapath-based aggregation provides a more comprehensive representation of a node's context.
Key Results
HetGPT consistently improves the performance of state-of-the-art pre-trained HGNNs (DMGI, HeCo, HDMI) on semi-supervised node classification across all three benchmark datasets.
- Significant Improvements: HetGPT achieved an average improvement of 3.00% in Macro-F1 and 2.62% in Micro-F1 over baseline models.
- Low-Data Regimes: The performance gains are particularly pronounced in few-shot settings (e.g., 1-shot), where HetGPT achieved up to 6.60% Macro-F1 and 6.88% Micro-F1 improvement, demonstrating its effectiveness in combating overfitting and negative transfer.
- Efficiency: HetGPT converges much faster than traditional "pre-train, fine-tune" methods, requiring fewer epochs due to its prompt-tuning approach.
- Robustness: The improvements are robust across different numbers of labeled nodes and are attributed to the effective contributions of its core modules (Virtual Class Prompt, Heterogeneous Feature Prompt, and Multi-View Neighborhood Aggregation).
Limitations and Future Work
- Limitations: The paper acknowledges that while HetGPT shows significant improvements, the "pre-train, fine-tune" paradigm itself can still be limited by the inherent gap between pretext and downstream tasks. The effectiveness of the prompt tuning is also dependent on the quality of the initial pre-training.
- Future Work: The authors suggest exploring the application of HetGPT to address class-imbalance problems on graphs. They also aim to broaden the applicability of their framework to other graph tasks, such as link prediction and graph classification.
Summary updated