Overcoming Catastrophic Forgetting in Graph Neural Networks with Experience Replay

Fan Zhou, Chengtai Cao

Introduction

Graph Neural Networks (GNNs) have become the standard for learning on graph-structured data. However, most GNN architectures are designed for static environments. In real-world applications like social media or citation networks, graphs evolve continuously. When a model is trained on a sequence of new tasks, it often suffers from catastrophic forgetting—the abrupt loss of knowledge about previously learned tasks.

Conceptual overview of catastrophic forgetting in evolving graph tasks. As the network grows and new tasks are learned, performance on previous tasks significantly degrades.

This phenomenon stems from the stability-plasticity dilemma: a model must be plastic enough to acquire new knowledge but stable enough to prevent the overwriting of existing representations. This paper introduces ER-GNN, a framework that leverages Experience Replay to enable Continual Graph Learning (CGL).

The ER-GNN Framework

The core of ER-GNN is the maintenance of a small "experience buffer" that stores a tiny subset of representative nodes from past tasks. During the training of a new task, the model "replays" these stored nodes alongside the new data. This allows the model to periodically revisit critical information from previous tasks, reinforcing the weights necessary for their performance.

To balance the learning process, the authors introduce a dynamic weight factor ($\beta$) that automatically adjusts the relative importance of the replay buffer versus the current task's data.

Node Selection Strategies

The effectiveness of Experience Replay depends heavily on which nodes are chosen for the buffer. The paper evaluates three distinct strategies:

  1. Mean of Feature (MF): Selects nodes closest to the class prototype (average feature vector), representing the "typical" member of a category.
  2. Coverage Maximization (CM): Selects a diverse set of nodes that are distant from each other in the feature space to ensure broad coverage.
  3. Influence Maximization (IM): The most sophisticated approach, which uses Influence Functions to identify nodes that have the greatest impact on the model's parameters. By saving these "load-bearing" nodes, the model preserves the most critical structural information.

Experimental Evaluation

The framework was tested on three benchmarks: Cora, Citeseer, and Reddit, adapted for task-incremental node classification.

Key Results

The experiments demonstrated that even a very small buffer can drastically reduce forgetting. As shown in the Forgetting Mean (FM) analysis, increasing the number of stored nodes per class ($e$) leads to a sharp decline in the forgetting rate across all datasets.

Forgetting Mean (FM) across different buffer sizes ($e$). Increasing the buffer size consistently reduces forgetting, with Influence Maximization (IM) often yielding the best results.
  • Influence of Buffer Size: Even with $e=1$ (one node per class), the model retains significantly more knowledge than a vanilla GAT.
  • Strategy Performance: The Influence Maximization (IM) strategy generally outperformed MF and CM, particularly on the large-scale Reddit dataset, indicating that "importance" is a more effective selection criterion than "typicality."
  • Maintaining Plasticity: Unlike regularization-based methods that can hinder the learning of new tasks, ER-GNN maintains high accuracy on incoming tasks, effectively solving the stability-plasticity dilemma.

Conclusion

ER-GNN provides a modular and effective solution for continual learning on graphs. By intelligently selecting and replaying a small set of influential nodes, GNNs can evolve alongside dynamic data without losing their "memory." While calculating influence functions adds some computational overhead, the significant gains in long-term performance make it a compelling approach for real-world, evolving graph systems.

Summary updated

BibTeX
@inproceedings{zhou2021overcoming,
  author = {Fan Zhou and Chengtai Cao},
  title = {{Overcoming Catastrophic Forgetting in Graph Neural Networks with Experience Replay}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i5.16602},
}
Figure