SMART: Robust and Efficient Fine-Tuning for Pre-trained Natural Language Models

近年来,随着Transformer的出现,NLP领域的重心逐渐向迁移学习转变,也出现了BERT、GPT2等基于非监督学习的大型模型,有很多文章关注如何对其进行有效的预训练,但如何针对下游任务进行微调也是很值得研究的问题。本文介绍一篇2019年底的文章,《SMART: Robust and Efficient Fine-Tuning for Pre-trained Natural Language Models through Principled Regularized Optimization》。

文章针对现有微调方法中存在的在下游任务中过拟合以及遗忘预训练知识的问题,提出了两种微调方法:

  • SMoothness-inducing Adversarial Regularization
  • Bregman proximal poinT optimization

Smoothness-inducing Adversarial Regularization

这里用到的思想很简单,就是加入一个正则化项嘛,只不过这个正则化项是由对抗训练引出的。
min ⁡ θ F ( θ ) = L ( θ ) + λ s R s ( θ ) , \min \limits_{\theta}F(\theta)=L(\theta)+\lambda_sR_s(\theta), θminF(θ)=L(θ)+λsRs(θ),其中 L ( θ ) L(\theta) L(θ)是损失函数(对于分类模型来说通常为KL散度或者交叉熵,对于回归模型通常为均方误差), R s ( θ ) R_s(\theta) Rs(θ)有两种形式:

  • [ A ] : R s ( θ ) = 1 n ∑ i = 1 n max ⁡ ∥ x i − x ~ i ∥ p ≤ ϵ l s ( f ( x i ; θ ) , f ( x ~ i ; θ ) ) \mathrm{[A]}: R_s(\theta)=\frac{1}{n}\sum \limits_{i=1}^n\max\limits_{\Vert x_i-\tilde{x}_i \Vert_p\leq \epsilon}l_s(f(x_i;\theta),f(\tilde{x}_i;\theta)) [A]:Rs(θ)=n1
  • 6
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值