Abstract
Graph Neural Networks (GNNs) have demonstrated significant potential in modeling complex relational data. However, their performance is often constrained by the scarcity of labeled data in specific domains. While the pre-train and fine-tune paradigm offers a solution, a fundamental optimization gap exists between generic pre-training objectives and the specific requirements of downstream fine-tuning. This paper introduces L2P-GNN (Learning to Pre-train GNNs), a novel framework that treats pre-training as a meta-learning problem. By simulating the fine-tuning process during the pre-training phase, L2P-GNN learns a model prior that is inherently optimized for rapid adaptation. Experimental results on large-scale biological and bibliographic datasets demonstrate that L2P-GNN consistently outperforms state-of-the-art self-supervised baselines across multiple GNN architectures.
Introduction
The success of Graph Neural Networks (GNNs) typically relies on large volumes of task-specific labeled data. In many real-world scenarios, such labels are expensive or unavailable. To mitigate this, researchers have adopted a two-step paradigm: pre-training on massive unlabeled datasets to capture general graph properties, followed by fine-tuning on a small set of labeled data for a specific task.
Despite its popularity, this approach suffers from a significant "optimization gap." Conventional pre-training aims for a generic optimal point on unlabeled data, ignoring the model's eventual need to adapt to different objectives. This divergence limits the effectiveness of knowledge transfer. L2P-GNN addresses this by reformulating pre-training to explicitly account for the fine-tuning stage, essentially training the model how to adapt.
Methodology: The L2P-GNN Framework
L2P-GNN utilizes a meta-learning framework, inspired by Model-Agnostic Meta-Learning (MAML), to bridge the gap between pre-training and fine-tuning. Instead of learning static features, the model learns a prior designed for easy adaptation to new tasks.
Dual Adaptation Mechanism
Central to L2P-GNN is a dual adaptation strategy that operates at two scales to capture both local and global graph properties:
- Node-level Adaptation: To capture local structural information, the model simulates fine-tuning by performing link prediction. It samples "support sets" (edges) to perform an inner-loop update and evaluates the resulting parameters on a "query set" of different edges. This ensures the model learns local connectivity patterns that are easily transferable.
- Graph-level Adaptation: To capture global topology, the model employs a self-supervised objective where representations of sub-structures are encouraged to be similar to the representation of the entire graph, while remaining distinct from corrupted versions.
By nesting these adaptation steps within the outer-loop pre-training process, the model repeatedly practices the transition from general features to task-specific knowledge.
Experimental Setup
The authors evaluated L2P-GNN across two diverse, large-scale domains:
- Biology: A collection of nearly 400,000 protein ego-networks, with the downstream task of predicting 40 distinct biological functions.
- PreDBLP: A new bibliographic dataset containing over 1 million paper subgraphs across 31 research fields. The downstream task involves research field prediction.
The framework was tested using four popular GNN architectures—GCN, GraphSAGE, GAT, and GIN—ensuring the findings are architecture-agnostic.
Key Insights and Results
Bridging the Optimization Gap
A critical insight of this work is that pre-training should mimic the "quick adaptation" nature of fine-tuning. Centered Kernel Alignment (CKA) analysis revealed that L2P-GNN parameters undergo more significant and meaningful changes during fine-tuning compared to standard pre-training methods. This suggests that L2P-GNN effectively "primes" the model for the downstream transition.
Performance Gains
L2P-GNN consistently outperformed state-of-the-art baselines, including EdgePred, DGI, and ContextPred. On the Biology dataset, it achieved up to an 8.19% improvement over models trained from scratch, while on the PreDBLP dataset, it saw gains of up to 7.88%. The model also demonstrated robustness to various hyperparameters, such as embedding dimensions and the number of adaptation steps, highlighting its reliability as a general-purpose pre-training strategy.
Conclusion and Future Work
L2P-GNN represents a significant step forward in graph representation learning by aligning the pre-training objective with the requirements of downstream tasks. By learning to adapt, GNNs can more effectively leverage unlabeled data for few-shot learning scenarios. Future research directions include exploring more sophisticated self-supervised tasks, addressing the computational overhead of meta-learning, and extending the dual adaptation logic to Heterogeneous Information Networks (HINs).
Summary updated