简单总结模型蒸馏算法
1、基于输出的蒸馏(Output-based Distillation)
核心思想:直接对齐教师模型和学生模型的预测输出(Logits)
典型方法:Distilling the Knowledge in a Neural Network(KD)
解释:通过KL散度匹配教师和学生的软标签分布,利用温度参数控制输出平滑度。
paper地址:arXiv:1503.02531
2、基于特征对齐的蒸馏(FeatureAlignment Distillation)
核心思想:强制学生模型的中间层特征与教师模型对齐,直接匹配特征图或注意力图。
典型方法1:Fitnets: hints for thin deep nets(FitNet)
解释:通过MSE损失对齐指定中间层的特征图
paper地址:arXiv:1412.6550
典型方法2:Paying More Attention to Attention: Improving the Performance of Convolutional Neural Networks via Attention Transfer(AT)
解释:迁移注意力图Feature Maps(通过特征图的L2范数生成)
paper地址:arXiv:1612.03928
3、基于特征关系的蒸馏(Feature Relation Distillation)
核心思想:捕捉特征之间的统计关系或结构,而非直接匹配特征值。
典型方法1:A Gift from Knowledge Distillation: Fast Optimization, Network Minimization and Transfer Learning(FSP)
解释:通过Gram矩阵(特征图内积)匹配特征流
paper地址:there
典型方法2:Correlation Congruence for Knowledge Distillation(CC)
解释:对齐特征通道的协方差矩阵。
paper地址:arXiv:1904.01802
典型方法3:Paraphrasing Complex Network: Network Compression via Factor Transfer(FT)
解释:分解特征为因子并匹配其分布。
paper地址:arXiv:1802.04977
4、基于样本关系的蒸馏(Sample Relation Distillation)
核心思想:保持样本之间的相似性关系或分布特性。
典型方法1:Similarity-Preserving Knowledge Distillation(SP)
解释:对齐样本对的余弦相似度矩阵
paper地址:arXiv:1907.09682
典型方法2:Probabilistic Knowledge Transfer for deep representation learning(PKT)
解释:通过概率分布匹配样本对的相似性
paper地址:arXiv:1803.10837
典型方法3:Relational Knowledge Distillation(RKD)
解释:对齐样本间的距离和角度关系。
paper地址:arXiv:1904.05068
5、基于分布匹配的蒸馏(Distribution Matching Distillation)
核心思想:对齐特征或输出的整体分布,而非逐点匹配。
典型方法:Like what you like: knowledge distill via neuron selectivity transfer(NST)
解释:通过最大均值差异(MMD)匹配特征分布。
paper地址:arXiv:1707.01219
其它
代码实现以及Benchmark可参考这里(大神发布的)。