Skip to main content
QUICK REVIEW

[论文解读] Supervised Contrastive Replay: Revisiting the Nearest Class Mean Classifier in Online Class-Incremental Continual Learning

Zheda Mai, Ruiwen Li|arXiv (Cornell University)|Mar 22, 2021
Domain Adaptation and Few-Shot Learning参考文献 60被引用 10
一句话总结

本文提出了一种新型在线类增量持续学习方法——监督对比回放(Supervised Contrastive Replay, SCR),该方法用最近类均值(Nearest Class Mean, NCM)分类器替代标准的Softmax分类器,并在回放过程中使用监督对比损失以改善嵌入特征的聚类效果。SCR显著减少了灾难性遗忘,在CIFAR-100和Mini-ImageNet上的准确率相较最先进方法最高提升了15.4%。

ABSTRACT

Online class-incremental continual learning (CL) studies the problem of learning new classes continually from an online non-stationary data stream, intending to adapt to new data while mitigating catastrophic forgetting. While memory replay has shown promising results, the recency bias in online learning caused by the commonly used Softmax classifier remains an unsolved challenge. Although the Nearest-Class-Mean (NCM) classifier is significantly undervalued in the CL community, we demonstrate that it is a simple yet effective substitute for the Softmax classifier. It addresses the recency bias and avoids structural changes in the fully-connected layer for new classes. Moreover, we observe considerable and consistent performance gains when replacing the Softmax classifier with the NCM classifier for several state-of-the-art replay methods. To leverage the NCM classifier more effectively, data embeddings belonging to the same class should be clustered and well-separated from those with a different class label. To this end, we contribute Supervised Contrastive Replay (SCR), which explicitly encourages samples from the same class to cluster tightly in embedding space while pushing those of different classes further apart during replay-based training. Overall, we observe that our proposed SCR substantially reduces catastrophic forgetting and outperforms state-of-the-art CL methods by a significant margin on a variety of datasets.

研究动机与目标

  • 解决由于Softmax分类器对类别不平衡敏感而引发的在线类增量持续学习中的新近偏差问题。
  • 重新评估未被充分利用的最近类均值(Nearest Class Mean, NCM)分类器,作为Softmax在持续学习中结构简单且鲁棒的替代方案。
  • 通过在回放过程中显式学习类间可分性,改善嵌入空间的聚类质量,从而提升泛化能力和分类器性能。
  • 开发一种内存高效、计算轻量的方法,在新增类别时无需网络结构改动即可保持高准确率。

提出的方法

  • 用最近类均值(Nearest Class Mean, NCM)分类器替代标准Softmax分类器,以消除在类增量学习过程中全连接层的结构变化。
  • 在回放过程中应用监督对比损失,以促进嵌入空间中类内紧凑性和类间分离性。
  • 使用共享编码器和投影头,从新输入的数据批次和缓存的记忆样本中生成表示特征。
  • 推理时丢弃投影头,从缓存样本中计算类均值,以实现基于NCM的分类。
  • 采用随机记忆回放策略,从数据流和记忆缓冲区中均衡采样小批量数据,以维持训练稳定性。
  • 通过温度超参数τ优化对比损失,并评估不同投影头设计(MLP、线性、无)的影响。
Figure 1: An overview of SCR. During training, an input batch is created by concatenating the minibatch $B_{n}$ from the data stream with another minibatch $B_{\mathcal{M}}$ from the memory buffer $\mathcal{M}$ . The input batch and its augmented view are encoded by a shared encoder and projection h
Figure 1: An overview of SCR. During training, an input batch is created by concatenating the minibatch $B_{n}$ from the data stream with another minibatch $B_{\mathcal{M}}$ from the memory buffer $\mathcal{M}$ . The input batch and its augmented view are encoded by a shared encoder and projection h

实验结果

研究问题

  • RQ1在在线类增量持续学习中,最近类均值(NCM)分类器是否能优于Softmax分类器,特别是在缓解新近偏差方面?
  • RQ2当与NCM分类器结合使用时,监督对比学习如何提升所学嵌入的质量?
  • RQ3记忆缓冲区大小和采样策略对所提出的SCR框架性能有何影响?
  • RQ4NCM与对比回放的结合是否能在多种数据集和记忆设置下持续带来性能提升?
  • RQ5与最先进基于回放的持续学习方法相比,SCR在效率和准确率方面表现如何?

主要发现

  • 在Mini-ImageNet上,SCR取得了35.4%的准确率,较最佳基线方法(MIR-NCM)提升了13.3%,显示出显著的性能增益。
  • 在CIFAR-100上,SCR达到65.7%的准确率,相较最强基线方法实现了15.4%的相对提升,证实了其在多种数据集上的有效性。
  • SCR显著降低了任务新近偏差,即使在类别不平衡情况下也仅表现出极小的偏差,而标准回放方法则存在明显偏差。
  • 该方法保持了计算效率,总训练和推理时间短于ASER,仅略长于MIR。
  • 在不同记忆缓冲区大小下性能增益保持一致,更大的缓冲区(如M=5k)可实现高达60.2%的相对提升。
  • 消融实验表明,对比学习在记忆小批量大小达到200时收益最大,而当大小过高(如500或1000)时因过拟合导致性能下降。
(a) ER
(a) ER

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。