高效单程自蒸馏与Zipf标记平滑
Efficient One Pass Self-distillation with Zipf's Label Smoothing
摘要:
自蒸馏在训练过程中利用了自身的非统一软监督,并在没有任何运行时成本的情况下提高了性能。然而,训练过程中的开销往往被忽视,然而在巨型模型时代,减少训练过程中的时间和内存开销变得越来越重要。提出了一种有效的自蒸馏方法Zipf's Label Smoothing(Zipf's LS),该方法利用网络的动态预测生成符合Zipf分布的软监督,无需使用任何对比样本或辅助参数。我们的想法来自于一个经验观察,即当网络经过适当的训练时,网络最终softmax层的输出值,在按大小排序并在样本之间取平均值后,应该遵循一个分布,让人想起自然语言词频统计中的齐普夫定律。通过在样本水平和整个训练期间强制执行此属性,我们发现可以大大提高预测精度。在INAT 21细粒度分类数据集上使用ResNet50,与vanilla基线相比,我们的技术实现了+3.61%的准确率增益,与之前的标签平滑或自蒸馏策略相比,增益增加了0.88%。该实现可在https://github.com/megvii-research/zipfls上公开获得。
英文摘要:
Self-distillation exploits non-uniform soft supervision from itself during training and improves performance without any runtime cost. However, the overhead during training is often overlooked, and yet reducing time and memory overhead during training is increasingly important in the giant models' era. This paper proposes an efficient self-distillation method named Zipf's Label Smoothing (Zipf's LS), which uses the on-the-fly prediction of a network to generate soft supervision that conforms to Zipf distribution without using any contrastive samples or auxiliary parameters. Our idea comes from an empirical observation that when the network is duly trained the output values of a network's final softmax layer, after sorting by the magnitude and averaged across samples, should follow a distribution reminiscent to Zipf's Law in the word frequency statistics of natural languages. By enforcing this property on the sample level and throughout the whole training period, we find that the prediction accuracy can be greatly improved. Using ResNet50 on the INAT21 fine-grained classification dataset, our technique achieves +3.61% accuracy gain compared to the vanilla baseline, and 0.88% more gain against the previous label smoothing or self-distillation strategies. The implementation is publicly available at https://github.com/megvii-research/zipfls.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。