GraphKeeper: Graph Domain-Incremental Learning via Knowledge Disentanglement and Preservation

Zihao Guo, Qingyun Sun, Ziwei Zhang, Haonan Yuan, Huiping Zhuang, Xingcheng Fu, Jianxin Li

Introduction

In the evolving landscape of Graph Neural Networks (GNNs), the focus is shifting from static, single-domain tasks toward more dynamic and versatile systems. As we move toward the development of Graph Foundation Models (GFMs), a critical requirement has emerged: the ability to learn from a sequence of diverse graph domains—such as transitioning from social networks to citation webs—without losing previously acquired knowledge. This challenge is known as Domain-Incremental Learning (Domain-IL).

Unlike standard incremental learning, which often deals with new classes within a single domain, Domain-IL involves massive structural and semantic gaps. Existing models typically struggle with "catastrophic forgetting," where learning a new domain causes the model's internal representations to drift and its decision boundaries to distort. To address these issues, GraphKeeper introduces a framework designed to isolate domain-specific knowledge and preserve classification stability through mathematical optimization rather than iterative gradient descent.

The Challenges of Domain-IL on Graphs

Domain-IL is significantly more complex than traditional incremental learning due to two primary phenomena:

  1. Embedding Shifts: When a model is updated to accommodate a new graph domain, the shared parameters are modified via backpropagation. This causes the internal embeddings of previous domains to shift in the latent space, leading to representation confusion.
  2. Decision Boundary Deviations: As the model weights update to fit new data, the "boundaries" used to classify nodes in older domains are inadvertently altered. This distortion makes the model less accurate on historical tasks even if the embeddings remain relatively stable.

The GraphKeeper Framework

GraphKeeper addresses these challenges by decomposing the learning process into three specialized modules: disentanglement, preservation, and discrimination.

1. Multi-domain Graph Disentanglement

To prevent embedding shifts, GraphKeeper utilizes Parameter-Efficient Fine-Tuning (PEFT) via LoRA (Low-Rank Adaptation). Instead of updating the entire GNN for every new domain, the framework freezes the base GNN and only trains small, domain-specific adapter layers. To ensure these domains remain distinct in the embedding space, the authors employ a dual contrastive loss strategy:

  • Intra-domain Contrastive Loss: Separates different classes within a single domain.
  • Inter-domain Contrastive Loss: Pushes the prototypes of different domains apart, ensuring that the latent space is clearly partitioned.

2. Deviation-Free Knowledge Preservation

To solve the problem of decision boundary deviation, GraphKeeper decouples the classifier head from the embedding model. Rather than using standard backpropagation—which is prone to drift—the framework employs a recursive ridge regression solver. This closed-form mathematical approach allows the model to calculate the optimal decision boundary for all domains encountered so far. By storing only a small set of intermediate matrices, the model can update its global classifier as if it had simultaneous access to all historical data, effectively eliminating forgetting in the classification layer.

3. Domain-aware Distribution Discrimination

At inference time, the model must determine which domain a graph belongs to in order to select the correct LoRA adapter. GraphKeeper achieves this using a frozen, randomly initialized GNN. This GNN acts as a stable, unbiased "fingerprinter" that maps graphs into a high-dimensional space. By matching the input graph to the nearest "domain prototype" in this space, the model can accurately identify the domain and deploy the appropriate parameters without requiring explicit domain labels at test time.

Experimental Evaluation

The framework was evaluated across 15 real-world datasets, including academic networks (Cora, PubMed), social networks (Facebook, GitHub), and co-purchase networks (Photo, Computer). These were organized into sequences of 6-8 groups to simulate long-term incremental learning.

Key Results

  • Superior Performance: GraphKeeper achieved a performance boost of 6.5% to 16.6% in Average Accuracy compared to state-of-the-art Graph Incremental Learning (GIL) methods like SSM and TPP.
  • Zero Forgetting: While traditional methods saw accuracy on early domains plummet as the sequence progressed, GraphKeeper maintained "negligible forgetting," with performance on old domains remaining nearly identical to their initial training state.
  • Foundation Model Synergy: The authors successfully integrated GraphKeeper as a "plugin" for existing Graph Foundation Models (such as GCOPE and MDGPT). In few-shot scenarios, this integration provided a continuous memory, significantly enhancing the models' ability to retain cross-domain knowledge.

Conclusion and Future Directions

GraphKeeper demonstrates that isolating domain knowledge into specific parameters (LoRA) and utilizing closed-form solutions for classification is a highly effective strategy for long-term knowledge retention. By bypassing the pitfalls of iterative gradient descent for the classifier, it provides a stable foundation for incremental learning.

Future work may explore scenarios where domains have overlapping classes (e.g., "User" nodes across different social platforms) and investigate how to extend the framework's capabilities to handle completely unseen domains that were not part of the initial training sequence.

Summary updated

BibTeX
@inproceedings{guo2025graphkeeper,
  author = {Zihao Guo and Qingyun Sun and Ziwei Zhang and Haonan Yuan and Huiping Zhuang and Xingcheng Fu and Jianxin Li},
  title = {{GraphKeeper: Graph Domain-Incremental Learning via Knowledge Disentanglement and Preservation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=AIlaBrwwJO},
}
Figure