Learning Fast, Learning Slow: A General Continual Learning Method based on Complementary Learning System

Elahe Arani, Fahad Sarfraz, Bahram Zonooz

TL;DR

CLS-ER is a novel continual learning method that mimics the human brain's dual-memory system to prevent "catastrophic forgetting" in neural networks. By maintaining both "fast" (plastic) and "slow" (stable) semantic memories, the model can acquire new knowledge while effectively consolidating the old, achieving state-of-the-art performance in realistic scenarios where task boundaries are unknown.

The Challenge: Catastrophic Forgetting

Deep neural networks are notoriously brittle when learning new things over time. If you train a model on Task A and then Task B, it usually "forgets" Task A entirely—a phenomenon known as catastrophic forgetting.

Most existing solutions rely on explicit "task boundaries"—signals telling the model exactly when one task ends and another begins. However, real-world environments are messy; data distributions shift gradually, and classes might reappear. The authors tackle General Continual Learning (GCL), where the model must learn from a continuous stream of data without relying on artificial task labels or boundaries.

Methods: The CLS-ER Architecture

The authors introduce CLS-ER (Complementary Learning System - Experience Replay), inspired by the biological theory that the human brain uses the hippocampus for rapid, instance-based learning and the neocortex for slow, structured consolidation.

CLS-ER Architecture

The architecture consists of three main components:

  1. Working Model: The primary network being trained on the current data stream.
  2. Dual Semantic Memories: Two additional models maintained via an Exponential Moving Average (EMA) of the working model's weights.
  3. Plastic Model: Updated frequently (fast EMA) to capture recent experiences.
  4. Stable Model: Updated infrequently (slow EMA) to retain long-term structural knowledge.
  5. Episodic Memory: A small buffer that stores a subset of past samples using reservoir sampling to maintain a representative sample of an unknown stream.

The Secret Sauce: During training, the model replays samples from the episodic memory. To decide which "past self" to trust, it compares the Plastic and Stable models. It selects the "replay logits" (soft targets) from whichever semantic memory is more confident about the ground-truth class. A consistency loss then forces the working model to align its current predictions with these consolidated memories, preventing it from drifting too far into "forgetting" territory.

Key Insights and Ideas

  • Trusting the "Best" Past Self: Instead of using a hard threshold to decide when to use which memory, CLS-ER uses a simple, task-agnostic selection criterion: whichever semantic model has the highest softmax score for the correct class is used as the teacher.
  • Flatter Minima: One of the most interesting findings is that CLS-ER leads the model toward "flatter minima" in the loss landscape. In deep learning, flatter regions are generally associated with better generalization and robustness to weight changes—exactly what you want in a model that is constantly being updated.
Robustness to Perturbation (Flatter Minima)
  • Natural Calibration: Unlike many deep models that are "overconfident" even when wrong, CLS-ER produces remarkably well-calibrated models. It "knows what it knows," which is a critical safety feature for real-world deployment.
  • Beyond Task Boundaries: By mimicking the brain's consolidation process, the method naturally handles "blurry" transitions between tasks without needing to be told a change occurred.

Key Results

The researchers evaluated CLS-ER on a wide variety of benchmarks, including Class-Incremental (S-MNIST, S-CIFAR-10, S-Tiny-ImageNet), Domain-Incremental (R-MNIST, P-MNIST), and General Continual Learning (MNIST-360, GCIL-CIFAR-100).

CLS-ER consistently outperformed existing state-of-the-art methods like DER++ and ER across almost all settings:

  • Massive Gains on Complex Data: On S-Tiny-ImageNet with a tiny buffer (200 samples), CLS-ER achieved 23.47% accuracy, more than doubling the performance of the previous best method, DER++ (10.96%).
  • Robustness to Imbalance: In the "Longtail" (imbalanced) version of GCIL-CIFAR-100, CLS-ER maintained a significant lead, showing it can handle the "noisy" distributions typical of real-world data.
  • Reduced Bias: The model showed a much more uniform prediction probability across all tasks, whereas baseline models were heavily biased toward the most recently seen task.

Limitations and Future Work

  • Computational Overhead: Maintaining three versions of the model (Working, Plastic, Stable) increases the memory and computational footprint during the training phase. However, for inference, only the Stable model is needed.
  • Hyperparameter Tuning: While the method isn't overly sensitive, there are several new hyperparameters (update rates and decay parameters) that require careful setting.
  • Future Directions: The authors suggest further exploring more sophisticated biological mechanisms of memory consolidation and potentially integrating generative models to further enhance the replay buffer.

Summary updated

BibTeX
@inproceedings{arani2022learning,
  author = {Elahe Arani and Fahad Sarfraz and Bahram Zonooz},
  title = {{Learning Fast, Learning Slow: A General Continual Learning Method based on Complementary Learning System}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=uxxFrDwrE7Y},
}
Figure