Rainbow Memory: Continual Learning with a Memory of Diverse Samples

Jihwan Bang, Heesu Kim, Young Joon Yoo, Jung-Woo Ha, Jonghyun Choi

Introduction: The Reality of Blurry Continual Learning

In the field of Class Incremental Learning (CIL), models are typically trained on disjoint tasks—learning cats and dogs in Task 1, then cars and planes in Task 2. However, real-world data streams are rarely so clean. The authors identify a more realistic scenario called "Blurry-CIL," where class distributions overlap and shift over time rather than appearing in isolated blocks.

Real-world example of shifting class distributions over time, illustrating the "blurry" nature of tasks.

For instance, seasonal products like "swimming suits" or "padding jumpers" see peaks and troughs in popularity but remain present in the data stream. Existing CIL methods often struggle in these settings, either overfitting to small memory buffers or failing to adapt to subtle boundary shifts. The core challenge is managing a limited memory buffer to maintain a diverse and representative "sketch" of the entire data stream.

The Rainbow Memory (RM) Framework

To address these challenges, the authors propose Rainbow Memory (RM), a management strategy for episodic memory that prioritizes sample diversity. RM is built on two pillars: diversity-aware sampling and aggressive data augmentation.

Diversity-Aware Sampling via Uncertainty

Instead of selecting only the most "representative" samples (the class centroids), RM seeks a "rainbow" of samples across the entire spectrum of model confidence. This is achieved through perturbation-induced uncertainty.

The process of measuring uncertainty by applying various perturbations to an input image and observing prediction fluctuations.

For each incoming sample, the model generates multiple perturbed versions (e.g., color jitter, shearing). By measuring how much the model's predictions fluctuate across these versions, RM identifies both "robust" samples (low uncertainty) and "fragile" samples (high uncertainty). By sampling at fixed intervals across this uncertainty spectrum, RM ensures the memory contains both core class representations and samples near decision boundaries, which are crucial for distinguishing similar classes.

Enhancing Memory with Data Augmentation

To maximize the utility of a limited memory buffer, RM employs advanced data augmentation (DA) techniques such as CutMix (patching pieces of one image onto another) and AutoAugment. This effectively increases the diversity of stored samples without increasing the physical storage requirements, allowing a tiny memory to represent a wide distribution.

Experimental Results

The researchers evaluated RM against standard benchmarks (MNIST, CIFAR-10, CIFAR-100, and ImageNet) adapted for Blurry-CIL.

  • ImageNet Performance: In a 10-task blurry setup, RM achieved 50.11% accuracy, nearly doubling the performance of GDumb (21.52%) and significantly outperforming iCaRL (17.52%).
  • CIFAR-10 Consistency: On the Blurry10 setup, RM reached approximately 71% accuracy, while traditional baselines like EWC or Rwalk hovered between 53% and 55%.
  • Efficiency in Online Settings: RM proved particularly effective in online scenarios where the model sees the data stream only once. Its ability to quickly identify and store a diverse set of samples makes it highly resilient to catastrophic forgetting.

Conclusion and Future Directions

Rainbow Memory demonstrates that in realistic, blurry environments, diversity is more valuable than accuracy when selecting samples for episodic memory. By maintaining a "wide spectrum" of class distributions, models can better navigate shifting boundaries. While the uncertainty measurement adds some computational overhead, the significant gains in accuracy—especially in high-pressure online settings—make it a compelling strategy for non-stop learning systems. Future work may explore the theoretical links between specific augmentations and classification uncertainty to further refine the "rainbow" selection process.

Summary updated

BibTeX
@inproceedings{bang2021rainbow,
  author = {Jihwan Bang and Heesu Kim and Young Joon Yoo and Jung-Woo Ha and Jonghyun Choi},
  title = {{Rainbow Memory: Continual Learning with a Memory of Diverse Samples}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.00812},
}
Figure