通过对比学习增强教师模型的类内多样性,提升知识蒸馏效果
Enriching Knowledge Distillation with Intra-Class Contrastive Learning
- 在教师训练中加入类内对比损失,挖掘同类别样本间的多样性
- 引入边界损失提升训练稳定性,收敛速度更快且性能更优
- 适合希望提升蒸馏效果的视觉分类任务研究者使用
自知识蒸馏提出以来,研究多聚焦于如何有效利用教师模型生成的软标签。现有研究表明,软标签中的隐含知识源于数据的多视角结构:同一类样本间的特征差异有助于学生模型学习多样化表示,从而提升泛化能力。然而,现有蒸馏方法中教师模型主要以真实标签为目标,未充分考虑类内多样性。为此,本文在教师训练中引入类内对比损失,以丰富软标签中的类内信息。实践中发现,类内损失会导致训练不稳定、收敛变慢,因此我们结合边界损失,显著改善训练稳定性和收敛速度。同时,理论分析表明该损失可有效拉大类间距离并缩小类内距离。实验结果验证了方法的有效性。
原文摘要 · Abstract (English)
Since the advent of knowledge distillation, much research has focused on how the soft labels generated by the teacher model can be utilized effectively. Existing studies points out that the implicit knowledge within soft labels originates from the multi-view structure present in the data. Feature variations within samples of the same class allow the student model to generalize better by learning diverse representations. However, in existing distillation methods, teacher models predominantly adhere to ground-truth labels as targets, without considering the diverse representations within the same class. Therefore, we propose incorporating an intra-class contrastive loss during teacher training to enrich the intra-class information contained in soft labels. In practice, we find that intra-class loss causes instability in training and slows convergence. To mitigate these issues, margin loss is integrated into intra-class contrastive learning to improve the training stability and convergence speed. Simultaneously, we theoretically analyze the impact of this loss on the intra-class distances and inter-class distances. It has been proved that the intra-class contrastive loss can enrich the intra-class diversity. Experimental results demonstrate the effectiveness of the proposed method.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。