Prompt-Driven Continual Graph Learning

Qi Wang, Tianfei Zhou, Ye Yuan, Rui MaoarXiv 2025 · DOI

Introduction

Graphs in the real world—such as social networks, citation indices, and e-commerce platforms—are dynamic entities that evolve constantly. Continual Graph Learning (CGL) is the field dedicated to helping models adapt to these new data streams without suffering from "catastrophic forgetting," where the model loses the ability to handle previously learned tasks.

Historically, the dominant solution has been memory replay, which involves saving a subset of historical graph data to "remind" the model during new training sessions. However, this approach faces two major hurdles:

  1. Scalability: As graphs grow to millions of nodes, storing even a small percentage of history becomes prohibitively expensive.
  2. Privacy: Storing historical data (like sensitive purchase records or private messages) is often a legal or ethical non-starter.

The PROMPTCGL Framework

To address these limitations, we introduce PROMPTCGL, a novel framework that shifts the focus from retraining model weights to "instructing" a frozen model using prompts. By learning task-specific "prompts" while keeping the underlying Graph Neural Network (GNN) frozen, PROMPTCGL achieves state-of-the-art performance without the massive memory overhead or privacy risks associated with traditional data-replay methods.

Conceptual comparison of replay-based methods (left) versus PROMPTCGL (right), alongside performance benchmarks on the Reddit and Products datasets.

Technical Innovations

  • Hierarchical Prompting: Unlike text prompts, graph prompts must handle both node-level features and the overall graph topology. PROMPTCGL uses a two-layered approach to instruct the model at both levels, ensuring structural changes are captured.
  • Personalized Prompt Generator (PG): Instead of a one-size-fits-all prompt, the PG uses a small "Prompt Bank" to generate tailored prompts for each individual node based on its unique features. This keeps the memory footprint constant regardless of the graph's scale.
  • Parameter-Efficient Tuning: The GNN backbone is pre-trained once and then frozen. Only the prompts and a small final prediction layer are updated for new tasks, which drastically reduces training time and prevents the backbone's weights from drifting away from old knowledge.

Experimental Evaluation

The framework was evaluated on four diverse, large-scale benchmarks: CoraFull (citation network), OGB-Arxiv (massive citation dataset), Reddit (social interaction graph), and OGB-Products (Amazon co-purchasing network with over 2.4 million nodes).

Key Results

PROMPTCGL consistently outperformed existing state-of-the-art CGL methods (like CaT and SSM) across all datasets:

  • Superior Accuracy: On the Reddit dataset, PROMPTCGL achieved an Average Performance (AP) of 99.3%, nearly matching the "Joint" training upper bound (which has access to all data at once).
  • Robustness to Buffer Size: While replay methods see their performance decline sharply as their memory buffer shrinks, PROMPTCGL remains stable because it does not rely on a data buffer.
  • Efficiency: PROMPTCGL maintains a constant space complexity of $O(k \cdot d)$, whereas replay methods scale linearly $O(N \cdot d)$ with the number of nodes. Furthermore, it is significantly faster than condensation-based replay methods that require expensive graph processing steps.

Conclusion and Future Work

PROMPTCGL demonstrates that prompt learning is a highly effective alternative to data replay for continual learning on graphs. By storing only a few prompt vectors per task, the model effectively "remembers" how to solve old tasks without needing original data. While performance is tied to the quality of the pre-trained backbone, future research into more sophisticated prompt generation or larger "foundation" graph models could further expand the capabilities of this framework.

Summary updated

BibTeX
@misc{wang2025prompt,
  author = {Qi Wang and Tianfei Zhou and Ye Yuan and Rui Mao},
  title = {{Prompt-Driven Continual Graph Learning}},
  year = {2025},
  eprint = {2502.06327},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.06327},
}
Figure