AdapterGNN: Parameter-Efficient Fine-Tuning Improves Generalization in GNNs

Shengrui Li, Xueting Han, Jing Bai

TL;DR

This paper introduces AdapterGNN, a novel parameter-efficient fine-tuning (PEFT) method specifically designed for Graph Neural Networks (GNNs). AdapterGNN significantly improves generalization on downstream tasks by leveraging task-specific adapters while keeping the pre-trained GNN backbone frozen, outperforming full fine-tuning and other PEFT methods. The authors also provide a theoretical justification for why PEFT enhances GNN generalization, particularly in the classical regime where larger models can underperform.

What Problem Does This Paper Address?

Graph Neural Networks (GNNs) have shown great success in analyzing graph-structured data, but they face challenges like limited labeled data and poor out-of-distribution generalization. While pre-training GNNs on large unlabeled datasets has become a common practice to improve performance, fine-tuning the entire pre-trained model can lead to overfitting, especially in low-data scenarios. This is analogous to issues seen in large language models, where parameter-efficient fine-tuning (PEFT) techniques have emerged as a solution. However, directly applying existing PEFT methods (like adapter tuning, LoRA, etc.) to GNNs has proven less effective due to fundamental differences between GNN architectures and transformer-based models. This paper aims to bridge this gap by proposing a GNN-specific PEFT method and providing a theoretical understanding of its benefits.

Methods

The core contribution is AdapterGNN, a PEFT framework for GNNs. Unlike traditional PEFT methods that might be adapted from NLP, AdapterGNN is designed with GNNs' unique characteristics in mind. Key novelties include:

  • Dual Adapter Modules: Adapters are inserted both before and after the message passing (MP) stage within each GNN layer. This allows the model to capture complementary information from node embeddings at different stages of the GNN's processing.
  • Batch Normalization (BN): Tunable BN layers are incorporated within the adapters. This is crucial for handling potential shifts in data distribution within GNNs and maintaining consistency with the backbone.
  • Learnable Scaling: Instead of fixed scaling factors, AdapterGNN uses learnable scaling parameters ($\delta_1, \delta_2$) to combine the adapter outputs with the original GNN layer's output. This allows for dynamic adjustment during training, preventing catastrophic forgetting and improving efficiency.
  • Bottleneck Architecture: The adapters employ a bottleneck structure (down-projection, ReLU, up-projection) with a significantly reduced intermediate dimension. This drastically shrinks the number of tunable parameters, mitigating overfitting.

The paper also provides a theoretical justification for PEFT's effectiveness in GNNs by analyzing generalization error bounds. They posit that GNNs often operate in the "classical regime" where larger models can generalize worse, and PEFT, by reducing the parameter space, can lead to tighter generalization bounds and improved performance.

Datasets

The paper evaluates AdapterGNN on:

  • Six small molecular datasets: BACE, BBBP, ClinTox, HIV, SIDER, and Tox21.
  • One biology dataset: PPI (Protein-Protein Interaction).

These datasets are used for graph-level classification tasks. The authors mention that their implementations are based on GIN (Graph Isomorphism Network) backbones, which were pre-trained using methods like AttrMasking, ContextPred, EdgePred, GraphCL, and SimGRACE.

Key Insights and Ideas

  • GNNs are different: Directly porting NLP PEFT techniques to GNNs is suboptimal due to architectural differences. A GNN-specific approach is necessary.
  • Dual adapters capture more: Inserting adapters both before and after message passing allows for a richer representation of information, leading to better adaptation.
  • Learnable scaling is key: Dynamically adjusting how adapter outputs are combined with the backbone is crucial for preventing catastrophic forgetting and achieving stable performance.
  • GNNs might follow the "classical regime": Unlike large language models that often improve with size, GNNs can exhibit worse generalization with increased model size, making PEFT particularly beneficial.
  • PEFT can theoretically improve generalization: The paper provides a theoretical framework using generalization bounds to explain why PEFT can lead to tighter bounds and better performance in GNNs.

Key Results

  • AdapterGNN outperforms full fine-tuning: On molecular benchmarks, AdapterGNN achieved a 1.6% higher average ROC-AUC than full fine-tuning. On the PPI benchmark, it outperformed full fine-tuning by 5.7%.
  • Parameter efficiency: AdapterGNN achieves these gains with a remarkably small fraction of tunable parameters (around 5% of the total).
  • Superior to other PEFT methods: AdapterGNN consistently outperformed other PEFT methods, including adapted versions of LoRA and parallel adapters, as well as existing GNN-specific PEFT methods like GPF and MolCPT.
  • Robustness to data scarcity: AdapterGNN shows slower performance degradation than full fine-tuning when training data is scarce.
  • Model size impact: The paper empirically validates that larger GNN models can indeed generalize worse, and AdapterGNN maintains its advantage across various model sizes.

Limitations and Future Work

  • Focus on GIN: The proposed AdapterGNN architecture is specifically designed for GINs but is suggested to be transferable to other GNN architectures like GAT and GraphSAGE.
  • Graph-level classification: The current evaluation focuses on graph-level classification tasks.
  • Future Exploration: The authors suggest exploring AdapterGNN on other tasks and GNN models for future work.

Summary updated

BibTeX
@inproceedings{li2024adaptergnn,
  author = {Shengrui Li and Xueting Han and Jing Bai},
  title = {{AdapterGNN: Parameter-Efficient Fine-Tuning Improves Generalization in GNNs}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i12.29264},
}
Figure