Inductive Graph Alignment Prompt: Bridging the Gap between Graph Pre-training and Inductive Fine-tuning From Spectral Perspective.

Yuchen Yan, Peiyan Zhang, Zheng Fang, QingqingLong · DOI

TL;DR

This paper introduces Inductive Graph Alignment Prompt (IGAP), a novel method to bridge the performance gap between graph pre-training and inductive fine-tuning. IGAP leverages spectral graph theory to align graph signals and structures, enabling effective knowledge transfer even when fine-tuning graphs differ significantly from pre-training ones.

What Problem Does This Paper Address?

The "pre-train and fine-tune" paradigm has revolutionized Graph Neural Networks (GNNs) by allowing them to learn general patterns from unlabeled data, reducing the need for extensive manual annotations. However, a significant performance bottleneck arises when applying these pre-trained models to new, unseen graphs in an inductive setting. This inductive setting is crucial for real-world applications where data distributions and structures can vary greatly. The core challenge is the "data gap" between pre-training and fine-tuning, which manifests in two ways:

  1. Graph Signal Gap: Differences in the distribution of node features (graph signals) between the pre-training and fine-tuning datasets.
  2. Graph Structure Gap: Discrepancies in the topological structure of the graphs, leading to misaligned spectral representations.

Existing "prompt-based" methods, inspired by NLP, often assume compatibility between pre-training and fine-tuning graphs, making them primarily effective in transductive settings (where pre-training and fine-tuning use the same graph). They struggle when the inductive fine-tuning graphs are substantially different.

Methods

IGAP tackles the inductive fine-tuning challenge by introducing learnable "prompts" that align the pre-trained model with the target fine-tuning graph. The approach is built on a spectral analysis of graph pre-training:

  • Spectral Analysis of Pre-training: The authors first unify various graph pre-training frameworks and reveal a key insight: pre-training predominantly aligns graph signals with low-frequency components of the graph's spectral representation, rather than high-frequency ones. This is crucial because low-frequency components capture more generalizable, smooth patterns.
  • Addressing the Graph Signal Gap: A learnable graph signal prompt is introduced. This prompt acts as an adaptive compensation mechanism for perturbations in node features, allowing the model to adjust to differing signal distributions. Instead of a unique prompt for each node, a set of learnable prompts is used, reducing complexity.
  • Addressing the Graph Structure Gap: A spectral space alignment prompt is proposed. This prompt learns a transformation matrix to align the low-dimensional spectral subspaces (specifically, the K-smallest spectral components) of the pre-training and fine-tuning graphs. This ensures that the learned low-frequency spectral patterns are compatible.
  • Task Type Alignment: A task-specific prompt is used to reformulate the fine-tuning task (e.g., node classification, graph classification) into a contrastive objective, mirroring the pre-training objective. This helps preserve the generalization ability of the pre-trained GNNs.

The overall framework involves aligning graph signals and spectral spaces using these prompts, allowing the pre-trained GNN model to be applied effectively in inductive settings.

Datasets

The paper evaluates IGAP on several standard graph datasets for both node classification and graph classification tasks across three settings:

  • Node Classification:
    • Transductive: Citeseer, Amazon-Photo
    • Semi-Inductive: CoraFull-F, Arxiv-F (paired with CoraFull, Arxiv-P for pre-training)
    • Inductive: Paper100M-F, Reddit-F (paired with Paper100M-P, Reddit-P for pre-training)
  • Graph Classification:
    • Transductive: Molhiv, Moltox21
    • Semi-Inductive: Molbace, Molbbbp (as subgraphs of Molhiv for pre-training)
    • Inductive: Molbace, Molbbbp (pre-trained on Molmuv, with no overlap)

Key Insights and Ideas

  • Pre-training's Spectral Bias: The core insight is that graph pre-training inherently focuses on low-frequency spectral components. This is a critical observation because low-frequency components are more robust to structural variations and thus more transferable to new graphs.
  • Spectral Alignment for Inductive Transfer: The paper argues that aligning the low-frequency spectral components is key to bridging the structural gap in inductive settings. This is more effective than trying to align all spectral components, which could introduce noise.
  • Dual Gap Problem: Identifying the "graph signal gap" and "graph structure gap" as distinct but related challenges in inductive fine-tuning provides a clear framework for developing solutions.
  • Prompting as a Unifying Mechanism: The use of learnable prompts for both signal compensation and spectral alignment offers a flexible and effective way to adapt pre-trained models without requiring access to the original pre-training data.

Key Results

IGAP consistently outperforms existing baselines across various settings, particularly in the challenging inductive scenarios:

  • Node Classification: IGAP achieves state-of-the-art performance in inductive node classification, significantly outperforming supervised learning, standard pre-training methods, and other prompt-based approaches. For instance, on Reddit-F, IGAP achieves 90.35% accuracy, while GraphCL+GraphSAGE reaches only 86.33%.
  • Graph Classification: Similar improvements are observed in graph classification tasks, with IGAP demonstrating strong performance, especially in inductive settings. For example, on Molbbbp (inductive), IGAP achieves 0.6629 ROC-AUC, outperforming methods like All-in-One+GraphSAGE (0.6562).
  • Ablation Studies: The results highlight the critical importance of spectral space alignment, showing a significant performance drop when it's removed. Signal alignment also contributes positively, and end-to-end fine-tuning has a minor impact, suggesting the prompts effectively bridge the gap.

Limitations and Future Work

  • Hyperparameter Sensitivity: While IGAP shows robustness, the paper notes that the choice of hyperparameters (like the dimension L for signal prompts and K for spectral alignment) can influence performance. Finding optimal values is important, though the paper suggests that overly large values don't necessarily yield better results and can increase costs.
  • Molecular Graph Patterns: For graph classification, the paper observes that molecular graphs have relatively simple patterns, making transfer easier. The effectiveness of IGAP on more complex graph structures (like large social networks) might warrant further investigation.
  • Future Work: The authors suggest that their method's success in bridging the data gap in inductive settings opens avenues for further research into more robust and generalizable graph pre-training and fine-tuning strategies. The theoretical analysis of spectral alignment also provides a foundation for future theoretical explorations.

Summary updated

BibTeX
@inproceedings{yan2023inductive,
  author = {Yuchen Yan and Peiyan Zhang and Zheng Fang and QingqingLong},
  title = {{Inductive Graph Alignment Prompt: Bridging the Gap between Graph Pre-training and Inductive Fine-tuning From Spectral Perspective.}},
  booktitle = {TheWebConf24},
  year = {2023},
  doi = {10.1145/3589334.3645620},
}
Figure