A Benchmark and Empirical Analysis for Replay Strategies in Continual Learning

Qihan Yang, Fan Feng, Rosa H. M. ChanCssl 2021

Abstract

With the capacity of continual learning, humans can continuously acquire knowledge throughout their lifespan. However, computational systems are not, in general, capable of learning tasks sequentially. This long-standing challenge for deep neural networks (DNNs) is called catastrophic forgetting. Multiple solutions have been proposed to overcome this limitation. This paper makes an in-depth evaluation of the memory replay methods, exploring the efficiency, performance, and scalability of various sampling strategies when selecting replay data. All experiments are conducted on multiple datasets under various domains. Finally, a practical solution for selecting replay methods for various data distributions is provided.

Introduction: The Challenge of Catastrophic Forgetting

Deep Neural Networks (DNNs) excel at learning from static datasets but struggle significantly with sequential learning. When a model is trained on a new task, it often abruptly loses the ability to perform previously learned tasks—a phenomenon known as catastrophic forgetting. While various architectural and regularization-based solutions exist, memory replay has proven to be one of the most robust defenses. Replay strategies involve either storing a subset of real past data (Experience Replay) or using a generative model to produce synthetic past data (Generative Replay) to be interleaved with new training samples.

Replay Methodologies and Sampling Strategies

The core of this research is a comprehensive "stress test" of eight distinct sampling strategies used to select data for replay. These strategies are categorized into three primary groups:

  1. Model Prediction-based: These methods utilize the classifier’s own uncertainty to select samples. Techniques include Entropy, Confidence, Margin, and Bayesian Disagreement (BALD). The goal is often to identify "difficult" samples where the model is most uncertain.
  2. Feature Embedding-based: These rely on the network's internal representations to find representative data points, using algorithms like K-means clustering or Core-set (Max-Min distance) selection.
  3. Interference-based: The Maximal Interfered Retrieval (MIR) method identifies samples whose loss increases the most after a "virtual update" with new data, targeting the specific knowledge most at risk of being forgotten.
The mechanism of Experience Replay, highlighting the selection of subsamples from a memory buffer based on specific criteria.

Experimental Setup

The benchmark evaluates these strategies across four datasets that represent varying levels of complexity and learning scenarios:

  • MNIST: A simple baseline for digit recognition.
  • CIFAR-10: A more complex set of natural images split into five sequential tasks.
  • MiniImagenet: A high-complexity dataset with 100 classes to test scalability.
  • OpenLORIS-Object: A robotic vision dataset focused on domain-incremental learning, where objects are encountered under changing environmental conditions.

Empirical Analysis and Key Insights

The study reveals several critical insights into the behavior of replay strategies:

  • The "Difficulty" Paradox: Contrary to intuition, replaying "difficult" data (high entropy/low confidence) typically yields better performance and lower forgetting rates than replaying "simple" data.
  • Scalability Constraints: While Bayesian methods like BALD perform well on low-dimensional label spaces (CIFAR-10), they struggle to scale to datasets with many classes, such as OpenLORIS.
  • Computational Trade-offs: MIR, while theoretically sophisticated in identifying interference, is computationally expensive due to the required virtual updates. In contrast, prediction-based methods like Entropy are significantly faster while remaining stable.
  • Experience vs. Generative Replay: Experience Replay (ER) consistently outperforms Generative Replay (GR). Generative models often fail to capture the high-fidelity details necessary to maintain classifier performance on complex tasks.

Results and Performance Metrics

The benchmarking results highlight a clear trade-off between accuracy, forgetting, and computational time. For instance, on CIFAR-10, MIR achieved the highest accuracy (0.409), whereas Bayesian Disagreement was most effective at minimizing forgetting (0.221).

Summary of performance and efficiency metrics across the four benchmark datasets.

On the MNIST dataset, the performance gap between replay types was stark: Experience Replay reached 87.6% accuracy, while Generative Replay lagged significantly at 56.3%. In domain-incremental scenarios like OpenLORIS, all replay methods showed high efficacy, with accuracies exceeding 96%.

Conclusion

While Experience Replay remains the superior method in terms of accuracy, its reliance on a memory buffer presents challenges for privacy and storage-constrained environments. Future work should focus on narrowing the "generative gap" by improving the fidelity of synthetic data and optimizing interference-based sampling to reduce its computational overhead.

Summary updated

BibTeX
@inproceedings{yang2021benchmark,
  author = {Qihan Yang and Fan Feng and Rosa H. M. Chan},
  title = {{A Benchmark and Empirical Analysis for Replay Strategies in Continual Learning}},
  booktitle = {Cssl},
  year = {2021},
}
Figure