Tuned Compositional Feature Replays for Efficient Stream Learning

Morgan Bruce Talbot, Rushikesh Zawar, Rohil Badkundri, Mengmi Zhang, Gabriel Kreiman

TL;DR

This paper introduces CRUMB, a novel continual learning algorithm that tackles catastrophic forgetting in stream learning by reconstructing feature maps using "memory blocks." CRUMB significantly outperforms existing methods in terms of accuracy, memory efficiency, and runtime, while also introducing new benchmarks for this challenging task.

What Problem Does This Paper Address?

Artificial neural networks struggle with "catastrophic forgetting" when learning sequentially from new data without access to old data. This is particularly problematic in "online stream learning," where models encounter temporally correlated data (like video frames) and can only see each example once. Unlike humans who retain knowledge while learning new things, current models tend to forget previously learned information when exposed to new stimuli. Existing solutions like replaying all old data are memory-prohibitive, and other methods often fall short in performance. This paper aims to bridge this gap by developing a more efficient and effective method for continual learning in stream settings.

Methods

The core of CRUMB is its Compositional Replay Using Memory Blocks (CRUMB) mechanism. Here's how it works:

  • Feature Extraction and Reconstruction: A standard CNN's early layers (feature extractor) process incoming images to produce feature maps. CRUMB then decomposes these feature maps into smaller vectors.
  • Memory Blocks and Codebook: A trainable "codebook matrix" (B) contains "memory blocks" (vectors). For each feature vector from an input image, CRUMB finds the most similar memory block in its codebook using cosine similarity. This memory block then replaces the original feature vector, effectively reconstructing the feature map using a composition of generic parts.
  • Efficient Replay: Instead of storing entire images or raw feature maps, CRUMB only stores the indices of the memory blocks used to reconstruct the feature maps, along with the class label. This drastically reduces memory requirements.
  • Tuned Training: During training, CRUMB uses a loss function that incorporates both the original feature map and the reconstructed one. Crucially, during stream learning, it primarily relies on the reconstructed feature map, which biases the network towards learning shape information over texture and stabilizes learning.
  • Differentiable Codebook: The memory blocks and the codebook matrix are trained end-to-end via backpropagation, allowing them to adapt and improve alongside the CNN.

Datasets

The authors evaluated CRUMB on several datasets:

  • Video Datasets: CORe50, Toybox, iLab, iCub, iLab+CORe50.
  • Image Datasets: Online-CIFAR100, Online-ImageNet.
  • New Benchmarks: The authors adapted the Toybox and iLab datasets to create new benchmarks specifically for online stream learning.

Key Insights and Ideas

  • Compositional Replay is Key: Reconstructing feature maps from generic "memory blocks" is significantly more effective and memory-efficient than replaying raw images or feature maps.
  • Shape Bias for Stability: Pretraining CRUMB with its reconstruction mechanism induces a bias towards learning object shapes over textures. This bias persists through stream learning and helps mitigate catastrophic forgetting by flattening the loss landscape.
  • Memory Blocks as a Shared Basis: The memory blocks act as a shared, discretized feature space, stabilizing the CNN during stream learning by providing a consistent basis for both new and replayed examples.
  • Efficiency is Paramount: CRUMB achieves state-of-the-art performance with a fraction of the memory and runtime compared to its closest competitors, making it suitable for resource-constrained environments.
  • Pretraining Matters: Pretraining the CNN with CRUMB's mechanism, especially on large datasets like ImageNet, significantly boosts performance, suggesting the benefits stem more from CNN weight tuning than memory block initialization.

Key Results

  • Superior Accuracy: CRUMB consistently outperforms 13 competing methods on 7 challenging datasets, often by large margins, especially in the class-instance setting. For example, on CORe50 (class-instance), CRUMB's accuracy exceeds REMIND by 1.5% and iCARL by 51.5%.
  • Memory Efficiency: CRUMB uses only 3.6% of the memory footprint of an algorithm that stores and replays raw images. Compared to REMIND, CRUMB uses only 3.7-4.1% of its peak RAM usage.
  • Runtime Efficiency: CRUMB's runtime is approximately 15-43% of REMIND's.
  • Approaching Upper Bound: CRUMB gets remarkably close to the "upper bound" performance (achieved by offline training on all data) on several datasets, demonstrating effective mitigation of catastrophic forgetting.
  • Robustness to Memory Block Size: CRUMB performs well even with a small number of memory blocks (as few as 16), suggesting a saturation effect and further enhancing efficiency.

Limitations and Future Work

  • Pretraining Dependency: While CRUMB's performance is significantly boosted by pretraining, the paper notes that the benefits are more from CNN weight tuning than memory block initialization. Future work could explore more efficient pretraining strategies.
  • Domain Adaptation: The current study focuses on stream learning with fixed domains. The authors suggest future work could explore applying CRUMB to tasks with shifting domains or in reinforcement learning settings.
  • Early Layer Freezing: The early "feature extractor" layers of the CNN were frozen during stream learning. The paper speculates that training these layers with a direct prediction loss might enable further flexibility for domain adaptation.
  • Interpretability: While some memory blocks show interpretable responses, the authors acknowledge that this doesn't necessarily imply learned representations within the blocks themselves, but rather associations learned by the CNN. Further investigation into the interpretability of these blocks could be valuable.
  • Broader CNN Architectures: CRUMB was implemented for SqueezeNet and MobileNetV2. The authors suggest it could be applied to other architectures, including transformers, for more generalizable continual learning.

Summary updated

BibTeX
@article{talbot2021tuned,
  author = {Morgan Bruce Talbot and Rushikesh Zawar and Rohil Badkundri and Mengmi Zhang and Gabriel Kreiman},
  title = {{Tuned Compositional Feature Replays for Efficient Stream Learning}},
  journal = {Transactions on Neural Networks and Learning Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=dgsSXlFMQ4},
}
Figure