Table of Contents
Fetching ...

HPCR: Holistic Proxy-based Contrastive Replay for Online Continual Learning

Huiwei Lin, Shanshan Feng, Baoquan Zhang, Xutao Li, Yunming Ye

TL;DR

HPCR tackles catastrophic forgetting in Online Continual Learning by extending proxy-based contrastive replay (PCR) with three dedicated components: a contrastive component that brings anchor-to-sample relations via a step function, a decoupled temperature strategy that splits gradient and probability effects, and distillation losses (PCD and SCD) to preserve historical knowledge. The approach achieves superior final accuracy and robust learning dynamics across four datasets, supported by extensive ablations and analyses demonstrating each component’s contribution. The work provides practical insights into gradient propagation, dynamic hyperparameter design, and memory-efficient knowledge transfer, showing HPCR’s potential for real-time continual learning in vision tasks. The authors also release open-source code and validate HPCR under pre-trained backbones and various memory budgets, highlighting its scalability and applicability.

Abstract

Online continual learning, aimed at developing a neural network that continuously learns new data from a single pass over an online data stream, generally suffers from catastrophic forgetting. Existing replay-based methods alleviate forgetting by replaying partial old data in a proxy-based or contrastive-based replay manner, each with its own shortcomings. Our previous work proposes a novel replay-based method called proxy-based contrastive replay (PCR), which handles the shortcomings by achieving complementary advantages of both replay manners. In this work, we further conduct gradient and limitation analysis of PCR. The analysis results show that PCR still can be further improved in feature extraction, generalization, and anti-forgetting capabilities of the model. Hence, we develop a more advanced method named holistic proxy-based contrastive replay (HPCR). HPCR consists of three components, each tackling one of the limitations of PCR. The contrastive component conditionally incorporates anchor-to-sample pairs to PCR, improving the feature extraction ability. The second is a temperature component that decouples the temperature coefficient into two parts based on their gradient impacts and sets different values for them to enhance the generalization ability. The third is a distillation component that constrains the learning process with additional loss terms to improve the anti-forgetting ability. Experiments on four datasets consistently demonstrate the superiority of HPCR over various state-of-the-art methods.

HPCR: Holistic Proxy-based Contrastive Replay for Online Continual Learning

TL;DR

HPCR tackles catastrophic forgetting in Online Continual Learning by extending proxy-based contrastive replay (PCR) with three dedicated components: a contrastive component that brings anchor-to-sample relations via a step function, a decoupled temperature strategy that splits gradient and probability effects, and distillation losses (PCD and SCD) to preserve historical knowledge. The approach achieves superior final accuracy and robust learning dynamics across four datasets, supported by extensive ablations and analyses demonstrating each component’s contribution. The work provides practical insights into gradient propagation, dynamic hyperparameter design, and memory-efficient knowledge transfer, showing HPCR’s potential for real-time continual learning in vision tasks. The authors also release open-source code and validate HPCR under pre-trained backbones and various memory budgets, highlighting its scalability and applicability.

Abstract

Online continual learning, aimed at developing a neural network that continuously learns new data from a single pass over an online data stream, generally suffers from catastrophic forgetting. Existing replay-based methods alleviate forgetting by replaying partial old data in a proxy-based or contrastive-based replay manner, each with its own shortcomings. Our previous work proposes a novel replay-based method called proxy-based contrastive replay (PCR), which handles the shortcomings by achieving complementary advantages of both replay manners. In this work, we further conduct gradient and limitation analysis of PCR. The analysis results show that PCR still can be further improved in feature extraction, generalization, and anti-forgetting capabilities of the model. Hence, we develop a more advanced method named holistic proxy-based contrastive replay (HPCR). HPCR consists of three components, each tackling one of the limitations of PCR. The contrastive component conditionally incorporates anchor-to-sample pairs to PCR, improving the feature extraction ability. The second is a temperature component that decouples the temperature coefficient into two parts based on their gradient impacts and sets different values for them to enhance the generalization ability. The third is a distillation component that constrains the learning process with additional loss terms to improve the anti-forgetting ability. Experiments on four datasets consistently demonstrate the superiority of HPCR over various state-of-the-art methods.
Paper Structure (32 sections, 29 equations, 10 figures, 13 tables, 1 algorithm)

This paper contains 32 sections, 29 equations, 10 figures, 13 tables, 1 algorithm.

Figures (10)

  • Figure 1: Illustration of our work. (a) The example of existing replay manners. For each anchor sample $\bm{x}_a$, the proxy-based replay manner calculates similarities of all anchor-to-proxy pairs; the contrastive-based replay manner calculates similarities of all anchor-to-sample pairs in the same training batch; PCR only calculates similarities of selective anchor-to-proxy pairs in the same training batch. (b) The example of the proposed HPCR. The contrastive component conditionally produces anchor-to-sample pairs to PCR; the temperature component decouples the temperature coefficient into two parts based on their impacts on gradients and sets them differently; the distillation component constrains new anchor-to-sample pairs using the old ones (SCD), and distills old anchor-to-proxy pairs to the new ones (PCD).
  • Figure 2: The performance of PCR on Split CIFAR100 (buffer size=1000) with different value of $\tau$.
  • Figure 3: Average accuracy rate on observed learning tasks on all datasets.
  • Figure 4: Average accuracy rate on observed learning tasks Split MiniImageNet while the buffer size is 5000.
  • Figure 5: Final Accuracy Rate on Split CIFAR100 (buffer size=5000) with different batch sizes of previous samples.
  • ...and 5 more figures