With the success of pre-trained language models in recent years, more and more researchers focus on opening the "black box" of these models. Following this interest, we carry out a qualitative and quantitative analysis of constituency grammar in attention heads of BERT and RoBERTa. We employ the syntactic distance method to extract implicit constituency grammar from the attention weights of each head. Our results show that there exist heads that can induce some grammar types much better than baselines, suggesting that some heads act as a proxy for constituency grammar. We also analyze how attention heads' constituency grammar inducing (CGI) ability changes after fine-tuning with two kinds of tasks, including sentence meaning similarity (SMS) tasks and natural language inference (NLI) tasks. Our results suggest that SMS tasks decrease the average CGI ability of upper layers, while NLI tasks increase it. Lastly, we investigate the connections between CGI ability and natural language understanding ability on QQP and MNLI tasks.


翻译:随着近年来经过培训的语文模式的成功,越来越多的研究人员注重于打开这些模式的“黑盒”。根据这种兴趣,我们对BERT和ROBERTA的负责人关注的选区语法进行了定性和定量分析。我们采用了合成距离方法,从每个头部的注意力重量中提取隐含的选区语法。我们的结果表明,有些语法类型比基线更能诱发某些语法类型,表明有些领导人充当了选区语法的代言人。我们还分析了在对两种任务进行微调后,包括判决含义相似的任务和自然语言推断任务,关注对象语法能力的变化。我们的结果表明,SMS的任务会降低上层的平均语法语言法能力,而国家语言法则会增加这种能力。最后,我们调查了CGI能力和自然语言理解能力在 %P 和 MNLI 任务上的联系。

0
下载
关闭预览

相关内容

国际计算机图形学(CGI)是世界上最古老的计算机图形学年度国际会议之一。邀请全世界的研究人员分享他们在计算机图形学和人机交互等各个领域的经验和新成就。 官网地址:http://dblp.uni-trier.de/db/conf/cgi/
最新《Transformers模型》教程,64页ppt
专知会员服务
276+阅读 · 2020年11月26日
【ICLR 2019】双曲注意力网络,Hyperbolic  Attention Network
专知会员服务
82+阅读 · 2020年6月21日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
57+阅读 · 2019年10月17日
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
spinningup.openai 强化学习资源完整
CreateAMind
6+阅读 · 2018年12月17日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
Talking-Heads Attention
Arxiv
15+阅读 · 2020年3月5日
How to Fine-Tune BERT for Text Classification?
Arxiv
13+阅读 · 2019年5月14日
Arxiv
19+阅读 · 2018年3月28日
Arxiv
25+阅读 · 2017年12月6日
VIP会员
相关资讯
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
spinningup.openai 强化学习资源完整
CreateAMind
6+阅读 · 2018年12月17日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
相关论文
Top
微信扫码咨询专知VIP会员