Balanced Gradient Sample Retrieval for Enhanced Knowledge Retention in Proxy-based Continual Learning

Hongye Xu, Jan Wasilewski, Bartosz KrawczykarXiv 2024 · DOI

TL;DR

This paper tackles catastrophic forgetting in continual learning, a major hurdle for AI systems that need to learn sequentially. They introduce a novel memory buffer sampling strategy that balances "gradient-conflicting" and "gradient-aligned" samples to retain past knowledge while adapting to new tasks, achieving state-of-the-art results.

What Problem Does This Paper Address?

Continual learning aims to enable AI models to learn new tasks sequentially without forgetting previously acquired knowledge. However, a phenomenon called "catastrophic forgetting" causes models to rapidly lose performance on older tasks as they learn new ones. This is particularly challenging in contrastive learning settings, where the goal is to align feature representations, as existing memory-based methods, often designed for cross-entropy loss, struggle to maintain this relational stability and can suffer from "proxy drift" – the shifting of class representations over time. This paper addresses the need for a more effective memory retrieval strategy specifically for contrastive continual learning to mitigate both forgetting and proxy drift.

Methods

The core contribution is a novel Balanced Gradient Sample Retrieval strategy for memory buffers in contrastive continual learning. Instead of relying on random sampling or methods that prioritize either forgetting mitigation (like Maximum Interference Retrieval - MIR) or plasticity, this approach strategically selects samples from the memory buffer based on their gradient alignment with the current task's gradients.

Specifically, it combines:

  • Gradient-Conflicting Samples: These samples are identified as those whose gradients are most misaligned with the current task's gradients. Including them helps to re-align gradients and preserve past task knowledge, preventing catastrophic forgetting.
  • Gradient-Aligned Samples: These samples have gradients that are more aligned with the current task's gradients. Incorporating them reinforces stable, shared representations across tasks, promoting plasticity and adaptation.

By balancing these two types of samples, the method aims to achieve a better trade-off between knowledge retention and adaptation, leading to increased diversity in retrieved instances and improved parameter space alignment.

Datasets

The authors evaluated their method on six standard computer vision datasets:

  • CIFAR100
  • Core50
  • Food100 (a subset of Food-101)
  • Mini-ImageNet
  • Places100
  • Tiny-ImageNet

These datasets were structured into task streams with varying numbers of classes and tasks to thoroughly test the continual learning capabilities.

Key Insights and Ideas

  • The duality of gradients: The paper highlights that both gradient-aligned and gradient-conflicting samples are crucial for effective continual learning. One group helps retain knowledge, while the other aids adaptation.
  • Beyond MIR/IMIR: While MIR and its inverse (IMIR) are effective for specific goals (interference vs. plasticity), a balanced approach combining aspects of both proves superior for overall performance in contrastive settings.
  • Proxy drift is a key challenge: The paper emphasizes that proxy drift is a significant issue in contrastive continual learning, and their balanced retrieval strategy demonstrably mitigates it.
  • Diversity is key: The proposed method leads to more diverse retrieved samples, which in turn helps maintain more stable and representative class proxies.

Key Results

  • State-of-the-art performance: The proposed "Balanced Gradient Sample Retrieval" method, when integrated with existing contrastive learning frameworks like PCR, achieved state-of-the-art results on multiple benchmark datasets.
  • Improved accuracy and reduced forgetting: Compared to baseline methods, the approach significantly improved average end accuracy and reduced forgetting. For example, on CIFAR100, PCR+Ours achieved 49.96% accuracy and 12.83% forgetting, outperforming the baseline PCR (47.63% accuracy, 13.21% forgetting).
  • Robustness to proxy drift: The method demonstrated superior robustness to proxy drift compared to random retrieval and even targeted methods like MIR/IMIR, especially over long task sequences.
  • Enhanced diversity: The retrieval strategy led to increased diversity of retrieved instances from the memory buffer.
  • Statistical significance: Wilcoxon signed-rank tests and McNemar's tests confirmed that the improvements were statistically significant across various comparisons.

Limitations and Future Work

  • Limitations: The paper acknowledges that while their method improves upon existing techniques, continual learning remains a challenging problem. The analysis of class-based performance showed that sometimes the balanced sampling might lead to slight underfitting at the early stages of training for certain tasks, which is then compensated for in later phases.
  • Future Work: The authors plan to:
  • Further analyze the factors contributing to drift occurrence in contrastive learning.
  • Develop more explicit drift prevention mechanisms.
  • Extend the framework to continual learning scenarios with extremely limited access to ground truth.

Summary updated

BibTeX
@misc{xu2024balanced,
  author = {Hongye Xu and Jan Wasilewski and Bartosz Krawczyk},
  title = {{Balanced Gradient Sample Retrieval for Enhanced Knowledge Retention in Proxy-based Continual Learning}},
  year = {2024},
  eprint = {2412.14430},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.14430},
}
Figure