Instance-Aware Graph Prompt Learning

Jiazheng Li, Jundong Li, Chuxu Zhang · Submission to ICLR 2025 · Withdrawn

TL;DR

Instance-Aware Graph Prompt Learning (IA-GPL) moves beyond "one-size-fits-all" prompting by generating unique, instance-specific prompts for every graph or node in a dataset. By combining parameter-efficient hypercomplex layers with vector quantization, it bridges the gap between pre-training and downstream tasks more effectively than static methods, especially in low-data and out-of-distribution scenarios.

The Challenge: Negative Transfer and Static Prompts

Graph Neural Networks (GNNs) are the standard for graph representation learning, but their performance relies heavily on large amounts of labeled data. To mitigate label costs, the field has adopted a "pre-train and fine-tune" paradigm. However, this approach often suffers from negative transfer because the objectives used during pre-training (like predicting missing edges) can be fundamentally different from downstream tasks (like classifying a molecule’s toxicity).

To solve this, researchers recently turned to graph prompt learning. This technique keeps the pre-trained GNN frozen and adds a small set of learnable "prompts" to the input data to align it with the downstream task.

Diverse molecular structures require tailored prompts rather than a one-size-fits-all approach.

Despite its promise, existing methods rely on static prompts—applying the exact same prompt to every instance in a task. This is a major limitation. As illustrated above, a simple carbon chain and a complex heterocyclic molecule possess vastly different structural semantics; they shouldn't be "nudged" by the identical prompt. They require prompts tailored to their specific structures.

Introducing IA-GPL

To tackle this challenge, the authors introduce Instance-Aware Graph Prompt Learning (IA-GPL). This framework generates distinct prompts tailored to different input instances using three main components:

The IA-GPL framework featuring the Prompt Generator and Vector Quantization modules.
  1. Lightweight Bottleneck Architecture: To generate instance-specific prompts without exploding the parameter count, the model uses Parameterized Hypercomplex Multiplication (PHM) layers. These layers use Kronecker products to achieve the same representational power as standard fully connected layers but with roughly $1/n$ the parameters.
  2. Vector Quantization (VQ): Instead of using the raw continuous output of the prompt generator, IA-GPL maps these outputs to a set of learnable codebook vectors. This discretization acts as a powerful regularizer. It prevents the model from overfitting to specific training instances and forces it to group "semantically similar" graph structures together, effectively creating a "vocabulary" of graph prompts.
  3. Exponential Moving Average (EMA): To ensure the codebook remains stable and avoids "representation collapse" (where all prompts look the same), the authors use an EMA strategy to update the codebook vectors rather than standard backpropagation.

The final prompt applied to the graph is a fusion of this instance-aware quantized vector and a global, instance-agnostic prompt that captures general task information.

Key Insights and Performance

The model was evaluated across a comprehensive suite of benchmarks, including 8 molecular graph datasets from MoleculeNet, citation networks (Cora, CiteSeer, PubMed), and large-scale biology datasets (PPI).

Superiority in Few-Shot Learning: In 50-shot experiments, IA-GPL consistently outperformed state-of-the-art prompting methods like GPF and GPF-plus. On the BACE dataset (scaffold split), it achieved 61.95% ROC-AUC, significantly higher than the 55.87% of its closest prompting competitor.

Out-of-Distribution Robustness: The performance gains were most pronounced in scaffold splits, where the test molecules are structurally different from the training set. This suggests that instance-aware prompts help the model adapt more flexibly to novel structures. The Vector Quantization step is crucial here; by clustering similar structures into discrete codebook vectors, it improves generalization to unseen data.

Efficiency vs. Expressivity: By using PHM layers, the model adds only about 20k tunable parameters (roughly 1% of the size of a standard GNN). This makes it a highly efficient form of Parameter-Efficient Fine-Tuning (PEFT), maintaining scalability even on large datasets like PPI (88k graphs).

Limitations and Future Directions

While IA-GPL is relatively stable, it introduces new hyperparameters—such as codebook size and the "temperature" for sampling—which may require tuning for new domains. Additionally, although much smaller than full fine-tuning, IA-GPL has a slightly larger parameter footprint than the simplest static prompt methods. Future work may explore more complex prompt generation architectures and apply the instance-aware concept to emerging large-scale "Graph Foundation Models."

Summary updated

BibTeX
@article{li2024instance,
  author = {Jiazheng Li and Jundong Li and Chuxu Zhang},
  title = {{Instance-Aware Graph Prompt Learning}},
  journal = {Accepted by TMLR},
  year = {2024},
  url = {https://openreview.net/forum?id=W50i7r3DHE},
}
Figure