Adaptive Transfer Learning on Graph Neural Networks

Xueting Han, Zhenhuan Huang, Bang An, Jing Bai

Introduction

Transfer learning has become a cornerstone of Graph Neural Network (GNN) research, leveraging self-supervised pre-training on tasks like edge prediction or node attribute generation to improve downstream performance. However, a significant "gap" often exists between these auxiliary pre-training objectives and the specific target tasks (e.g., node classification). Standard fine-tuning typically discards auxiliary tasks, leading to catastrophic forgetting, or uses them with fixed weights, which can cause negative transfer if the tasks conflict with the primary goal.

The AUX-TS Framework

To bridge this gap, this paper introduces AUX-TS (Adaptive Auxiliary loss Weighting using Task Similarity), a meta-learning framework designed to adaptively weight auxiliary tasks during the fine-tuning phase.

The AUX-TS framework transitions from pre-training to fine-tuning by adaptively weighting auxiliary tasks based on their alignment with the target task.

The core innovation lies in its dynamic weighting mechanism:

  1. Joint Fine-Tuning: The model continues training on both auxiliary and target tasks simultaneously rather than abandoning pre-trained objectives.
  2. Gradient Similarity: A 2-layer MLP calculates weights for each auxiliary task based on the cosine similarity between its gradient and the target task's gradient. This ensures that only "consistent" tasks contribute significantly to training.
  3. Meta-Learning Optimization: The weighting model is optimized to minimize the target task's validation loss, effectively "looking ahead" to determine which auxiliary tasks are truly beneficial at any given training step.

Experimental Evaluation

The framework was evaluated across four diverse datasets: OAG_CS (academic field prediction), Reddit (community classification), Last-FM, and Book-Crossing (link prediction). The experiments utilized various GNN architectures, including GCN, GAT, GIN, and the Heterogeneous Graph Transformer (HGT), proving the method's versatility.

Key Results and Insights

AUX-TS consistently outperforms state-of-the-art baselines, including fixed-weight methods and previous adaptive approaches like SELAR. On the OAG_CS dataset, it achieved relative performance gains of up to 5.61% in multi-task learning scenarios.

Performance comparison (MRR vs. Epochs) for GCN and HGT architectures, demonstrating the superior convergence and final performance of AUX-TS compared to baselines.

Key findings include:

  • Dynamic Task Importance: The utility of an auxiliary task changes over time. AUX-TS captures this fluidity, preventing tasks that were helpful early on from becoming detrimental later.
  • Architecture Robustness: As shown in the results for HGT, standard auxiliary training can sometimes degrade performance due to negative transfer. AUX-TS identifies these conflicts and adjusts weights to maintain positive gains.
  • Scale Invariance: Unlike some prior methods, AUX-TS is robust to the varying scales of different loss functions, as the meta-learning step focuses on actual task contribution rather than raw loss magnitude.

Conclusion

AUX-TS provides a robust solution to the pre-train/fine-tune gap in GNNs by intelligently managing auxiliary tasks. While it introduces some computational overhead due to its meta-learning loops, the gains in performance and stability across diverse graph structures make it a powerful tool for transfer learning. Future work may explore extending this adaptive weighting paradigm to other domains such as Natural Language Processing and Computer Vision.

Summary updated

BibTeX
@inproceedings{han2021adaptive,
  author = {Xueting Han and Zhenhuan Huang and Bang An and Jing Bai},
  title = {{Adaptive Transfer Learning on Graph Neural Networks}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2021},
  url = {https://openreview.net/forum?id=1mWLGr4xIS0},
}
Figure