Few-Shot Self Reminder to Overcome Catastrophic Forgetting

Junfeng Wen, Yanshuai Cao, Ruitong HuangarXiv 2018 · OpenReview

Abstract

Deep neural networks suffer from catastrophic forgetting when learning tasks sequentially, where new knowledge overwrites the weights necessary for previous tasks. We present Few-shot Self Reminder (FSR), a simple yet effective method that prevents forgetting by regularizing the model's output behavior. By storing a tiny subset of previous data in an episodic memory and matching the model's original raw logits, FSR maintains high performance across sequential tasks with minimal memory overhead.

The Challenge of Continual Learning

Continual learning is a major hurdle for deep learning systems. Standard optimization for a new task typically destroys the model's ability to perform on earlier ones. Existing solutions generally fall into two categories: parameter regularization (like Elastic Weight Consolidation, or EWC) and generative replay. However, weight-based regularization often fails when tasks are highly dissimilar, and generative replay adds significant computational complexity.

FSR challenges the status quo by focusing on protecting the function mapping (the behavior) rather than the internal weights. It also demonstrates that storing a very small amount of historical data is far more effective than previously assumed.

Methodology: Few-Shot Self Reminder (FSR)

The core of FSR is the "reminder" term added to the standard loss function. The model maintains a small "episodic memory" of samples from previous tasks along with the logits (raw, unnormalized outputs) produced when the model was at peak performance for those tasks.

Why Logit Matching?

While many methods use probability distillation, FSR uses an $L_2$ distance penalty to match raw logits. Logits preserve "dark knowledge"—the subtle relationships between non-predicted classes—which is often lost when probabilities are squashed by a softmax function. This provides a stronger, more informative constraint on the model's evolution.

Retention of first task accuracy (test0_acc) during the sequential training of new tasks. FSR (Logit) shows superior stability compared to baselines.

Efficient Sample Selection

Surprisingly, complex selection methods like influence functions are not required. The authors found that class-stratified random sampling (picking a few random images from each category) works exceptionally well. FSR can significantly reduce forgetting with as little as one data point per class.

Key Results and Insights

FSR was evaluated on benchmarks including Permuted MNIST, Incremental CIFAR100, and a new, difficult "Nonlinearly Transformed MNIST" where tasks are highly dissimilar.

  • Robustness to Dissimilarity: In tests with high distribution shifts (Nonlinear MNIST), weight-based methods like EWC failed completely. FSR maintained high performance, proving it handles distinct tasks much better than parameter-space methods.
  • Memory Efficiency: On Permuted MNIST, FSR achieved accuracy comparable to EWC while using only 5% of the memory overhead.
  • Superiority over iCaRL and LwF: FSR consistently outperformed other functional regularization methods because it uses actual historical data points as "anchors" rather than trying to infer old behavior from new task data.
Comparison of FSR (Logit) against baselines in maintaining performance as the number of subsequent tasks increases.

Conclusion

Few-Shot Self Reminder proves that a "frustratingly simple" approach—logit matching on a tiny episodic memory—is a powerful tool against catastrophic forgetting. By regularizing behavior in the function space rather than the parameter space, FSR offers a flexible, memory-efficient, and robust solution for building vision systems that can learn continually.

Summary updated

Abstract

Deep neural networks are known to suffer the catastrophic forgetting problem, where they tend to forget the knowledge from the previous tasks when sequentially learning new tasks. Such failure hinders the application of deep learning based vision system in continual learning settings. In this work, we present a simple yet surprisingly effective way of preventing catastrophic forgetting. Our method, called Few-shot Self Reminder (FSR), regularizes the neural net from changing its learned behaviour by performing logit matching on selected samples kept in episodic memory from the old tasks. Surprisingly, this simplistic approach only requires to retrain a small amount of data in order to outperform previous methods in knowledge retention. We demonstrate the superiority of our method to the previous ones in two different continual learning settings on popular benchmarks, as well as a new continual learning problem where tasks are designed to be more dissimilar.
BibTeX
@misc{wen2018few,
  author = {Junfeng Wen and Yanshuai Cao and Ruitong Huang},
  title = {{Few-Shot Self Reminder to Overcome Catastrophic Forgetting}},
  year = {2018},
  eprint = {1812.00543},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1812.00543},
}
Figure