Attention Transfer

Paying More Attention to Attention: Improving the Performance of Convolutional Neural Networks via Attention Transfer

Motivation

大量的论文已经证明Attention在CV、NLP中都发挥着巨大的作用,因为本文利用Attention做KD,即让student学习teacher的attention maps
在这里插入图片描述

Activation-based attention transfer

如果定义是spatial attention map

  • 各个channel相同位置绝对值求和
  • 各个channel相同位置p次方求和:对比1,会更加注重于响应高的地方
  • 各个channel相同位置p次方求最大值
    在这里插入图片描述
    在这里插入图片描述
    3种方式得到的attention map各有侧重,后两种更加侧重一些响应更突出的位置
    在这里插入图片描述
    最终的Loss:
    在这里插入图片描述
    Qs Qt为第j对student和teacher的attention map

beta取1000,式子后半部会在所有位置取平均,整体来说后半部的权重在0.1左右

Gradient-based attention transfer

网络对某些位置输入的敏感性,比如调整某些位置的像素然后观察网络输出的变化,如果某些位置调整后网络输出变化大即说明网络更加paying attention to这个位置
在这里插入图片描述

Experiments

activation-based AT, F-AcT(类似FitNets,1x1做feature adaptation后做L2 loss)
在这里插入图片描述
平方和效果最好
在这里插入图片描述

activation-based好于gradient-based
在这里插入图片描述
其他在Scenes这个数据集上AT做的比传统的KD要好很多,猜测是因为we speculate is due to importance of intermediate attention for fine-grained recognition

好像作者写错了吧,这里明明CUB才是fine-grained的数据集
在这里插入图片描述
重要

KD struggles to work if teacher and student have different architecture/depth (we observe the same on CIFAR), so we tried using the same architecture and depth for attention transfer.

We also could not find applications of FitNets, KD or similar methods on ImageNet in the literature. Given that, we can assume that proposed activation-based AT is the first knowledge transfer method to be successfully applied on ImageNet.
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值