[ACL 2022] BERT Learns to Teach: Knowledge Distillation with Meta Learning

[ACL 2022] BERT Learns to Teach: Knowledge Distillation with Meta Learning

Motivation

之前的工作通常训练一个大模型作为teacher,然后保持teacher不动训练student模型来完成teacher模型知识的迁移。然而这种做法有以下缺点:1)teacher不了解student的能力。近来有一些工作通过联合训练teacher和student来引入student-aware的蒸馏,但是这种方法也有提升的空间,因为2)teacher不是为了蒸馏优化的。之前的工作中,teacher通常都是为了自己的推理性能而优化的。然而,teacher不能感知到将其知识迁移给student的需求,这样不是最优的。为了解决这两个问题,我们提出了MetaDistil,一个新的使用meta-learning的蒸馏框架来利用学习过程中student的反馈来提升teacher的知识迁移能力。

Approach (Knowledge Distillation with Meta Learning)

Background

Knowledge Distillation

给定teacher T T T 和student S S S,以及有标注的训练数据集 D = { ( x 1 , y 1 ) , . . . , ( x N , y N ) } \mathcal{D} = \{(x_1,y_1), ..., (x_N, y_N)\} D={(x1,y1),...,(xN,yN)},student的损失函数可以写成下面形式:
L S ( D ; θ S ; θ T ) = 1 N ∑ i = 1 N [ α L τ ( y i , S ( x i ; θ S ) ) + ( 1 − α ) L K D ( T ( x i ; θ T ) , S ( x i ; θ S ) ) ] \begin{equation} \mathcal{L}_S(\mathcal{D};\theta_S;\theta_{T}) =\frac{1}{N}\sum_{i=1}^N[\alpha\mathcal{L}_{\tau}(y_i,S(x_i;\theta_S))\\ +(1-\alpha)\mathcal{L}_{KD}(T(x_i;\theta_T),S(x_i;\theta_S))] \end{equation} LS(D;θS;θT)=N1i=1N[αLτ(y

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值