StructBERT解读

介绍

StructBERT是阿里巴巴达摩院提出的NLP预训练模型,在传统BERT的基础上作出了相关改进,本文具体介绍StructBERT在BERT上的变化,论文参考《StructBERT: Incorporating Languages structures into pre-training for deep language understading》

StructBERT VS BERT

主要区别在于除了增加了两个预训练任务和目标

Word Structural Objective

在这里插入图片描述
该任务的启发是,一个良好的语言模型,应该有把打乱的句子重构的能力。改任务具体做法是,如上图所示,除了和BERT一样将15%的TOKEN进行MASK外,对未MASK的词,随机抽选一个trigram,打乱顺序后重构该顺序,相应被打乱的节点接softmax后预测需要重构之前的顺序,目标函数如下:
在这里插入图片描述
这里的K是打乱的训练长度(论文中K=3),目标函数最大化输出序列为打乱顺序前的原有序列的概率。

Sentence Structural Objective

在这里插入图片描述
Next Sentence Prediction,即NSP任务是预测下一个句子是不是在原有句子之后,本质是个二分类任务。该任务对于BERT而言,NSP任务过于简单,通常有97%-98%的准确率,因此structBERT对NSP进行扩展,这里具体做法如上图所示改成三分类问题,即预测下一个句子是在当前句子之前,或者之后,后者任意抽取的句子。实际构造训练数据的时候上述各取三分之一。

总结

这篇论文的主要贡献在于以下两点

• We propose novel structural pre-training that extends BERT by incorporating the word structural objective and the sentence structural objective to leverage language structures in contextualized representation. This enables the StructBERT to explicitly model language structures by forcing it to reconstruct the right order of words and sentences for correct prediction.
• StructBERT significantly outperforms all published state-of-the-art models on a wide range of NLU tasks. This model extends the superiority of BERT, and boosts the performance in many language understanding applications such as semantic textual similarity, sentiment analysis, textual entailment, and question answering.

  1. 训练增加了两个新的目标Word Structural Objective和Sentence Structural Objective,使得新的模型能显式对语言的顺序进行正确重构,并对正确顺序的句子作出预测
  2. 该模型超越了BERT,在现有大部分NLU任务取得了state-of-the-art的效果
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值