Reinforced Continual Learning for Graphs

Appan Rakaraddi, Siew Kei Lam, Mahardhika Pratama, Marcus De Carvalho

TL;DR

This paper introduces Graph Continual Learning (GCL), a novel framework that allows Graph Neural Networks (GNNs) to learn a sequence of tasks without succumbing to "catastrophic forgetting." By combining a reinforcement learning-based controller that dynamically resizes the network with a "dark experience replay" strategy to preserve past knowledge, GCL sets a new state-of-the-art for both task-aware and task-blind continual learning on graphs.

What Problem Does This Paper Address?

Most Graph Neural Networks are trained on a single, static dataset. However, real-world data often arrives in a stream—think of a social network where new communities form or a citation index that grows over time. When a standard GNN is trained on a new task, it often "forgets" how to perform previous tasks, a phenomenon known as catastrophic forgetting.

While continual learning (CL) is well-studied for images (grid-based data), it is much harder for graphs because of their irregular topological structure. Existing graph CL methods are often limited to "task-incremental" settings, where the model is told exactly which task it is performing at test time. They struggle with the more realistic "class-incremental" setting, where the model must identify classes without knowing the task ID. Furthermore, most existing methods use static network architectures, which either lack the capacity to learn new things or become inefficiently large.

Methods

The authors propose a hybrid approach that merges architecture-based and memory-based continual learning:

  1. Reinforcement Learning based Controller (RLC): Instead of manually deciding how much to grow a network, the authors use an LSTM-based RL agent. For every new task, this controller observes the current state of the GNN and decides on an optimal number of hidden features to ADD or DEL (prune). This ensures the network has enough capacity for new knowledge without becoming a "bloated" computational burden.
  2. Child Network (CN): This is the actual GNN (like a GCN or GAT) that performs the classification. Its hidden layers are dynamically evolved based on the RLC's commands.
  3. Dark Experience Replay (DER++): To prevent forgetting, the model maintains a small "memory buffer" of samples from previous tasks. Crucially, it doesn't just store the labels; it stores the logits (the raw output values before the final decision). During new training, the model is penalized if its current outputs for old samples deviate from these stored "dark experiences," effectively preserving the "logic" the model used in the past.
Figure 1: The outputs of each task, raw data and task-id t are stored in the fixed-length buffer and retrieved in the subsequent tasks via reservoir sampling for Experience Replay. RLC network comprehends the current GNN state for structural learning to dynamically expand it by selecting the optimal actions from the search space for the next task-id t+1.

Datasets

The framework was evaluated on four standard graph benchmarks, split into sequential tasks (typically 2 to 5 classes per task):

  • Cora: A citation network (7 classes, 3 tasks).
  • Citeseer: Another citation network (6 classes, 3 tasks).
  • Amazon Computers: A product co-purchase graph (10 classes, 5 tasks).
  • Corafull: A larger version of Cora (70 classes, 9 tasks).

Key Insights and Ideas

  • Dynamic vs. Static: The authors argue that a static network is a fundamental bottleneck for continual learning. By allowing the network to grow and shrink via RL, they achieve a "compact yet sufficient" structure.
  • The Power of Pruning: Unlike previous "expandable" networks that only add nodes, GCL can delete them. This flexibility helps the model stay efficient over long sequences of tasks.
  • Logits over Labels: Replaying raw model outputs (logits) is more effective than replaying hard labels. It captures the underlying distribution and relationships between classes that the model had previously mastered.
  • Scalability: A major "aha moment" in the results is that GCL’s performance advantage actually increases as the datasets get larger and the number of tasks grows (e.g., on Corafull and Amazon Computers).

Key Results

The authors compared GCL against several baselines, including standard GNNs and established CL methods like EWC, GEM, and TWP.

  • Higher Accuracy: GCL consistently achieved the highest Average Accuracy (AA) across all datasets. For example, on the Corafull dataset in a task-incremental setting, GCL-GCN reached ~92.8% accuracy, significantly outperforming the next best baseline (EWC at ~85.1%).
  • Lower Forgetting: The Average Forgetting (AF) metric, which measures how much performance drops on old tasks, was remarkably low for GCL. In many cases, it was near zero or even negative (indicating "backward transfer," where learning new tasks actually helped performance on old ones).
Figure 3: Accuracy on each task of Corafull dataset after training on 9 tasks with Task-incremental setting. The ac- curacy values of our models are in solid lines and rest of the baselines are in dashed lines. Our models have low fluctua- tions in accuracy values from task-to-task which indicates lowered forgetting problem.
  • RL Efficiency: As shown in the ablation studies, increasing the number of "controller steps" (the RL agent's training) generally leads to higher accuracy, proving that the automated architecture search is working.
Figure 2: Variation in Average Accuracy in GCL-GCN with different number of RLC steps in Task-incremental setting on different datasets.

Limitations and Future Work

While GCL is powerful, the authors note a few areas for improvement:

  • RL Overhead: Training an RL controller adds a layer of complexity and computational time to the training process, though the authors argue this is offset by the resulting network efficiency.
  • Buffer Management: The current system uses a fixed-size buffer (1000 units). Future work could explore more sophisticated ways to select which "representative" nodes to keep in memory as the graph grows to millions of nodes.
  • Flavour of GNN: While the framework is "universal" across GNN variants (GCN, GAT, etc.), the performance varies depending on the base architecture chosen. Finding a way to let the RL controller also choose the type of GNN layer could be a promising next step.

Summary updated

BibTeX
@inproceedings{rakaraddi2022reinforced,
  author = {Appan Rakaraddi and Siew Kei Lam and Mahardhika Pratama and Marcus De Carvalho},
  title = {{Reinforced Continual Learning for Graphs}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2022},
  url = {https://openreview.net/forum?id=tzc5ZNL6Kb},
}
Figure