Training data-efficient image transformers & distillation through attention 链接到标题

* Authors: [[Hugo Touvron]], [[Matthieu Cord]], [[Matthijs Douze]], [[Francisco Massa]], [[Alexandre Sablayrolles]], [[Hervé Jégou]]


初读印象 链接到标题

DeiT 提出了一种适合 ViT 的蒸馏方法, 即除了 [CLS] token 之外增加了一个类似的用于蒸馏的 distillation token, 他们的区别是 CLS token 的监督信号的 groundtruth, 而 distillation token

文章骨架 链接到标题

%%创新点到底是什么?%% novelty:: 即除了 [CLS] token 之外增加了一个类似的用于蒸馏的 distillation token, 他们的区别是 CLS token 的监督信号的 groundtruth, 而 distillation token 的监督信号是 teacher 的 logits 或预测标签。

%%有什么意义?%% significance:: 提出了一种适合 ViT 的蒸馏方法

%%有什么潜力?%% potential:: 减小了 ViT 的训练难度, 提高了 ViT 小模型的性能

title

文章的实验有几个有趣的发现:

  1. 使用卷积网络作为 teacher 效果好于其他 vit 模型作为 teacher

  2. 使用 hard-label 效果要优于 soft-label

    • soft-label $$ \mathcal{L}{\text {global }}=(1-\lambda) \mathcal{L}{\mathrm{CE}}\left(\psi\left(Z_{\mathrm{s}}\right), y\right)+\lambda \tau^{2} \mathrm{KL}\left(\psi\left(Z_{\mathrm{s}} / \tau\right), \psi\left(Z_{\mathrm{t}} / \tau\right)\right) $$ 其中 $\psi$ 为 softmax, $Z_s$ 和 $Z_t$ 为 student 和 teacher 的 logits, $\tau$ 为温度系数
    • hard-label $$ \mathcal{L}{\text {global }}^{\text {hardDistill }}=\frac{1}{2} \mathcal{L}{\mathrm{CE}}\left(\psi\left(Z_{s}\right), y\right)+\frac{1}{2} \mathcal{L}{\mathrm{CE}}\left(\psi\left(Z{s}\right), y_{\mathrm{t}}\right) $$ 其中 $y_t$ 为 teacher 预测的标签