Rainbow Memory: Continual Learning With a Memory of Diverse Samples

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

Introduction: The Reality of Blurry-CIL

In the field of Class Incremental Learning (CIL), standard research typically assumes a "disjoint" setup: a model learns a set of classes in one task and a completely different set in the next. However, real-world data streams are rarely so neatly partitioned. Data often arrives in a "blurry" fashion, where classes appear across multiple tasks with fluctuating frequencies. For example, an e-commerce platform might see high volumes of swimsuit data in the summer and lower volumes in the winter, while masks or other items might spike unexpectedly.

Illustration of real-world data drift where class frequencies (e.g., seasonal items) overlap across time, necessitating 'blurry' continual learning.

This scenario, termed Blurry-CIL, presents a significant challenge: models suffer from catastrophic forgetting, losing the ability to recognize older classes as they overfit to the current task's distribution. Rainbow Memory (RM) is proposed to address this by managing a small episodic memory of diverse samples that represent the full spectrum of the data distribution, rather than just the most "representative" or "difficult" ones.

The Rainbow Memory (RM) Framework

Rainbow Memory rests on two primary pillars designed to maintain and enhance the diversity of the episodic memory:

1. Diversity-Aware Memory Update (Spectrum Sampling)

Instead of selecting samples based on a single metric (like proximity to a class mean), RM aims for a "rainbow" of samples across the classification uncertainty spectrum.

  • Uncertainty Estimation: For each sample, the model generates multiple perturbed versions (using techniques like color jitter or shearing). It then measures the consistency of its predictions across these versions.
  • Spectrum Sampling: Samples are sorted by this uncertainty score. RM then selects exemplars at regular intervals across the entire sorted list. This ensures the memory contains both "robust" samples (low uncertainty) that define the core of a class and "fragile" samples (high uncertainty) that define the decision boundaries between classes.

2. Diversity Enhancement via Augmentation

To prevent the model from overfitting to the limited number of stored samples, RM employs aggressive data augmentation during training. Specifically, it uses CutMix—which mixes patches of two images and their corresponding labels—and AutoAugment. This acts as a force multiplier, effectively increasing the diversity of the limited memory without requiring additional storage.

Experimental Evaluation and Results

The authors evaluated RM using the BlurryM protocol, where M represents the percentage of samples in a task belonging to "minor" classes (classes primarily assigned to other tasks). This protocol was applied to standard benchmarks including MNIST, CIFAR-10, CIFAR-100, and ImageNet (ILSVRC2012).

Quantitative comparison of RM against baselines (EWC, Rwalk, iCaRL, GDumb, BiC) on CIFAR and ImageNet datasets under various Blurry-CIL settings.

As shown in the results, RM consistently outperforms state-of-the-art baselines such as iCaRL, GDumb, and BiC. In the "Blurry10-Online" setup for CIFAR-100, RM achieved an accuracy of 41.35%, significantly higher than GDumb's 27.19%. The gains were even more pronounced as the number of classes increased, suggesting that RM scales effectively to complex, large-scale problems like ImageNet.

Key Insights and Conclusion

Rainbow Memory demonstrates that maintaining a diverse "spectrum" of samples is more effective for continual learning than focusing on a single type of exemplar. While disjoint-CIL setups often exaggerate forgetting, Blurry-CIL provides a more natural, albeit complex, signal for maintaining knowledge.

Despite its success, RM does introduce computational overhead due to the multiple forward passes required for Monte Carlo-based uncertainty estimation. Future work may focus on optimizing this process or exploring the relationship between uncertainty-based sampling and training time across different architectures. Nevertheless, the synergy between spectrum sampling and data augmentation establishes RM as a robust solution for realistic, non-disjoint incremental learning.

Summary updated

BibTeX
@inproceedings{bang2021rainbow,
  author = {Jihwan Bang and Heesu Kim and Youngjoon 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