arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2501.07040cs.CV
收藏

重新思考蒸馏中的知识:一种上下文内样本检索视角

Rethinking Knowledge in Distillation: An In-context Sample Retrieval Perspective

The Hong Kong University of Science and Technology (HKUST)(香港科技大学);Southeast University(东南大学);Nanyang Technological University(南洋理工大学)

Jinjing Zhu, Songze Li, Lin Wang

AI总结:

该研究从上下文内样本检索视角重新定义蒸馏知识,提出IC-KD框架,通过正负样本上下文内蒸馏优化学生训练,在多KD范式及CIFAR-100、ImageNet上达SOTA。

摘要:

传统知识蒸馏(KD)方法旨在让学生模型对每个样本预测出与教师模型相似的输出。遗憾的是,同类样本之间的关联往往被忽略。本文探索重新定义蒸馏中的知识,捕捉每个样本与其对应上下文内样本(一组同类或不同类的相似样本)之间的关联,并从上下文内样本检索的视角执行知识蒸馏。由于知识蒸馏是一种习得的标签平滑正则化(LSR),我们首先开展理论分析,证明来自上下文内样本的教师知识是利用对应样本正则化学生训练的关键因素。在该分析的支撑下,我们提出了一种新颖的上下文内知识蒸馏(IC-KD)框架,在多种知识蒸馏范式(离线、在线和无教师KD)中均展现出优越性。首先,我们基于教师模型构建特征记忆库,并通过基于检索的学习为每个对应样本检索上下文内样本。随后,我们引入正样本上下文内蒸馏(PICD),以在logit空间中减小学生模型的样本与教师模型中聚合的同类上下文内样本之间的差异。此外,我们还引入负样本上下文内蒸馏(NICD),以在logit空间中将学生模型的样本与教师模型中不同类的上下文内样本区分开。大量实验表明,IC-KD在各类知识蒸馏中均有效,且在CIFAR-100和ImageNet数据集上持续取得了当前最优性能。

英文摘要:

Conventional knowledge distillation (KD) approaches are designed for the student model to predict similar output as the teacher model for each sample. Unfortunately, the relationship across samples with same class is often neglected. In this paper, we explore to redefine the knowledge in distillation, capturing the relationship between each sample and its corresponding in-context samples (a group of similar samples with the same or different classes), and perform KD from an in-context sample retrieval perspective. As KD is a type of learned label smoothing regularization (LSR), we first conduct a theoretical analysis showing that the teacher's knowledge from the in-context samples is a crucial contributor to regularize the student training with the corresponding samples. Buttressed by the analysis, we propose a novel in-context knowledge distillation (IC-KD) framework that shows its superiority across diverse KD paradigms (offline, online, and teacher-free KD). Firstly, we construct a feature memory bank from the teacher model and retrieve in-context samples for each corresponding sample through retrieval-based learning. We then introduce Positive In-Context Distillation (PICD) to reduce the discrepancy between a sample from the student and the aggregated in-context samples with the same class from the teacher in the logit space. Moreover, Negative In-Context Distillation (NICD) is introduced to separate a sample from the student and the in-context samples with different classes from the teacher in the logit space. Extensive experiments demonstrate that IC-KD is effective across various types of KD, and consistently achieves state-of-the-art performance on CIFAR-100 and ImageNet datasets.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑