Forgetting Order of Continual Learning: What is Learned First is Forgotten Last

Guy Hacohen, Tinne TuytelaarsSubmission to ICLR 2025 · Rejected

TL;DR

Neural networks forget what they learn in reverse order: examples learned quickly are remembered longest, while late-learned, complex examples are forgotten almost immediately. Leveraging this finding, the authors introduce Goldilocks, a simple and computationally cheap sampling method that populates replay buffers with mid-difficulty examples—filtering out both the trivial and the overly difficult samples to achieve state-of-the-art continual learning performance.

What Problem Does This Paper Address?

In continual learning, deep neural networks must learn sequential tasks without overwriting past knowledge. In practice, they suffer from catastrophic forgetting, experiencing sharp drops in performance on earlier tasks once trained on new data.

While replay-based methods counter this by saving a tiny fraction of past examples into a fixed-size memory buffer, most research has concentrated on how to use the buffer (e.g., distillation, gradient projection). The buffer itself is almost always populated via uniform random sampling. This paper investigates catastrophic forgetting from a data-centric perspective: Which specific examples does a network actually forget, and how can understanding this pattern help us select a better replay buffer?

Methods

The paper introduces a straightforward metric to track how quickly a model acquires each example during training, called Learning Speed: $$\text{learning\_speed}(x, y) = \frac{1}{E} \sum_{e=1}^{E} \mathbf{1}[f_t^e(x) = y]$$ where $E$ is the total number of epochs for task $t$, and $f_t^e$ is the model after epoch $e$. Computing this requires maintaining only a single scalar float per sample updated during standard forward passes.

Using this metric, the authors propose Goldilocks sampling:

  1. Train task $D_t$ while tracking each sample's learning speed.
  2. At the end of the task, discard the top $q\%$ fastest-learned examples and the bottom $s\%$ slowest-learned examples.
  3. Uniformly draw the replay buffer budget from the remaining "mid-learned" examples.

Datasets

The authors evaluate their findings on standard split-dataset classification benchmarks:

  • Split CIFAR-10 (partitioned into 2 or 5 tasks)
  • Split CIFAR-100 (partitioned into 2, 5, or 20 tasks)
  • Split TinyImageNet (partitioned into 2 or 10 tasks)

No new datasets were introduced, but the authors constructed synthetic distribution shifts—including rotated image tasks (RotNet) and random-label memorization tasks—to study whether downstream task identity alters buffer preferences.

Key Insights and Ideas

  • Last-In, First-Out (Reverse Simplicity Bias): Neural networks exhibit simplicity bias by learning simpler patterns first. Symmetrically, they exhibit a "reverse simplicity bias" in catastrophic forgetting: samples learned earliest in training show near-zero forgetting, while harder samples learned late are forgotten almost immediately after switching tasks ($r = 0.995$).
  • The "Goldilocks" Sweet Spot:
  • Trivial examples (learned quickly) waste memory buffer capacity because the network retains them anyway.
  • Slow-to-learn examples are often noise or outliers; the network barely grasped them initially and struggles when rehearsing them.
  • The model gains the most from examples learned at an intermediate pace.
  • Future-Task Independence: The optimal buffer composition for task $A$ remains remarkably consistent regardless of whether the subsequent task $B$ contains natural classes, rotated images, or entirely random labels. This means buffer selection can be tuned proactively without predicting what task will arrive next.

Key Results

  • Consistently Outperforms Existing Buffer Sampling Methods: Across multiple datasets and buffer capacities (1k and 10k), Goldilocks beats uniform random sampling and dedicated samplers like Herding, GSS, IPM, and Max Entropy:
  • On CIFAR-100-20 (1k buffer), Goldilocks attains 55.43% mean test accuracy vs. 51.75% (random) and 54.00% (Herding).
  • On CIFAR-10-5 (1k buffer), Goldilocks achieves 83.59% vs. 79.48% (random).
  • On TinyImageNet-2 (1k buffer), Goldilocks achieves 52.15% vs. 49.81% (random).
  • Plug-and-Play Compatibility: When integrated into various continual learning algorithms (ER, DER, DER++, GEM, A-GEM, RPC, X-DER), replacing random buffer sampling with Goldilocks systematically improves final accuracy across benchmarks without altering the core optimization frameworks.

Limitations and Future Work

  • Reliance on Multi-Epoch Training: Learning speed relies on monitoring predictions across several epochs ($E$). In true online/streaming continual learning—where data is processed in a single pass—this metric becomes too coarse to separate sample difficulties accurately.
  • Hyperparameter Sensitivity across Buffer Sizes: While a default (e.g., $q = s = 20\%$) works well broadly, very small buffers benefit more from removing hard examples, whereas larger buffers benefit more from pruning trivial examples.
  • Future Directions: Developing single-pass or gradient-based proxies for learning speed to enable Goldilocks-style selection in strictly single-epoch, streaming continual learning settings.

Summary updated

Abstract

Catastrophic forgetting poses a significant challenge in continual learning, where models often forget previous tasks when trained on new data. Our empirical analysis reveals a strong correlation between catastrophic forgetting and the learning speed of examples: examples learned early are rarely forgotten, while those learned later are more susceptible to forgetting. We demonstrate that replay-based continual learning methods can leverage this phenomenon by focusing on mid-learned examples for rehearsal. We introduce Goldilocks, a novel replay buffer sampling method that filters out examples learned too quickly or too slowly, keeping those learned at an intermediate speed. Goldilocks improves existing continual learning algorithms, leading to state-of-the-art performance across several image classification tasks.
BibTeX
@misc{hacohen2024forgetting,
  author = {Guy Hacohen and Tinne Tuytelaars},
  title = {{Forgetting Order of Continual Learning: What is Learned First is Forgotten Last}},
  year = {2024},
  eprint = {2406.09935},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.09935},
}

Loading related content...

Figure