arXiv reaDer
知識蒸留におけるカルバック・ライブラー発散と平均二乗誤差損失の比較
Comparing Kullback-Leibler Divergence and Mean Squared Error Loss in Knowledge Distillation
面倒な教師モデルから軽量の学生モデルに知識を伝達する知識蒸留(KD)が、効率的なニューラルアーキテクチャを設計するために調査されました。一般に、KDの目的関数は、温度スケーリングハイパーパラメータータウを使用した教師モデルと学生モデルの軟化確率分布間のカルバックライブラー(KL)発散損失です。その広範な使用にもかかわらず、一般化に対するそのような軟化の影響を論じた研究はほとんどありません。ここでは、KL発散損失がタウが増加するときのロジットマッチングとタウが0になるときのラベルマッチングに焦点を当てることを理論的に示し、ロジットマッチングが一般にパフォーマンスの向上と正の相関があることを経験的に示します。この観察から、学生モデルが教師モデルのロジットを直接学習できるように、直感的なKD損失関数であるロジットベクトル間の平均二乗誤差(MSE)を検討します。 MSE損失は、KL発散損失を上回ります。これは、2つの損失間の最後から2番目の層の表現の違いによって説明されます。さらに、順次蒸留によって性能が向上し、特に小さなタウでKL発散損失を使用する場合、KDがラベルノイズを軽減することを示します。実験を再現するためのコードは、https://github.com/jhoon-oh/kd_data/からオンラインで公開されています。
Knowledge distillation (KD), transferring knowledge from a cumbersome teacher model to a lightweight student model, has been investigated to design efficient neural architectures. Generally, the objective function of KD is the Kullback-Leibler (KL) divergence loss between the softened probability distributions of the teacher model and the student model with the temperature scaling hyperparameter tau. Despite its widespread use, few studies have discussed the influence of such softening on generalization. Here, we theoretically show that the KL divergence loss focuses on the logit matching when tau increases and the label matching when tau goes to 0 and empirically show that the logit matching is positively correlated to performance improvement in general. From this observation, we consider an intuitive KD loss function, the mean squared error (MSE) between the logit vectors, so that the student model can directly learn the logit of the teacher model. The MSE loss outperforms the KL divergence loss, explained by the difference in the penultimate layer representations between the two losses. Furthermore, we show that sequential distillation can improve performance and that KD, particularly when using the KL divergence loss with small tau, mitigates the label noise. The code to reproduce the experiments is publicly available online at https://github.com/jhoon-oh/kd_data/.
updated: Wed May 19 2021 04:40:53 GMT+0000 (UTC)
published: Wed May 19 2021 04:40:53 GMT+0000 (UTC)
参考文献 (このサイトで利用可能なもの) / References (only if available on this site)
被参照文献 (このサイトで利用可能なものを新しい順に) / Citations (only if available on this site, in order of most recent)
Amazon.co.jpアソシエイト