arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.12342cs.CVcs.AI
收藏

迁移前融合:面向异构蒸馏的知识融合

Fuse Before Transfer: Knowledge Fusion for Heterogeneous Distillation

School of Computer Science, 2 School of Artificial Intelligence, Wuhan University 3 Tencent YouTu Lab(1 计算机科学学院,2 人工智能学院,武汉大学 3 腾讯优图实验室)

Guopeng Li, Qiang Wang, Ke Yan, Shouhong Ding, Yuan Gao, Gui-Song Xia

AI总结:

针对跨架构知识蒸馏中异构模型特征差距大、传统损失效果受限的问题,提出融合卷积与注意力模块的辅助模型桥接方法,搭配空间无关InfoNCE损失,在多类异构组合上取得SOTA蒸馏性能。

摘要:

大多数知识蒸馏(KD)方法主要聚焦于架构相似的师生对,例如二者均为卷积神经网络(CNN)。然而,将KD拓展至新型跨架构知识蒸馏(Cross-Architecture KD, CAKD)可大幅提升其潜力与灵活性,在该场景下,同构与异构教师的知识可灵活迁移至给定学生模型。CAKD的核心挑战在于异构模型间存在显著的特征差距,这源于二者固有归纳偏置与模块功能的差异。为此,我们引入一个辅助模型作为桥梁,以促进异构师生间顺畅的特征知识迁移。更重要的是,在我们提出的设计原则下,该辅助模型融合了源自师生模块功能的卷积模块与注意力模块,兼具跨架构归纳偏置与模块功能的优势。此外,我们观察到CAKD中异构特征呈现出多样化的空间分布,这会削弱传统逐像素均方误差(MSE)损失的有效性。因此,我们采用空间无关的InfoNCE损失,在空间平滑后对特征进行对齐,从而提升CAKD中的特征对齐效果。我们在若干同构模型对以及CNN、ViT、MLP的任意异构组合上对所提方法进行了评估,蒸馏后的模型取得了当前最优性能,在CIFAR-100上最高提升11.47%,在ImageNet-1K上最高提升3.67%。我们的代码与模型将公开发布。

英文摘要:

Most knowledge distillation (KD) methodologies predominantly focus on teacher-student pairs with similar architectures, such as both being convolutional neural networks (CNNs). However, the potential and flexibility of KD can be greatly improved by expanding it to novel Cross-Architecture KD (CAKD), where the knowledge of homogeneous and heterogeneous teachers can be transferred flexibly to a given student. The primary challenge in CAKD lies in the substantial feature gaps between heterogeneous models, originating from the distinction of their inherent inductive biases and module functions. To this end, we introduce an assistant model as a bridge to facilitate smooth feature knowledge transfer between heterogeneous teachers and students. More importantly, within our proposed design principle, the assistant model combines the advantages of cross-architecture inductive biases and module functions by merging convolution and attention modules derived from both student and teacher module functions. Furthermore, we observe that heterogeneous features exhibit diverse spatial distributions in CAKD, hindering the effectiveness of conventional pixel-wise mean squared error (MSE) loss. Therefore, we leverage a spatial-agnostic InfoNCE loss to align features after spatial smoothing, thereby improving the feature alignments in CAKD. Our proposed method is evaluated across some homogeneous model pairs and arbitrary heterogeneous combinations of CNNs, ViTs, and MLPs, achieving state-of-the-art performance for distilled models with a maximum gain of 11.47% on CIFAR-100 and 3.67% on ImageNet-1K. Our code and models will be released.

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

↑