arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2102.07926cs.CL
收藏

在BERT学习选区语法中有注意头吗?

Have Attention Heads in BERT Learned Constituency Grammar?

Uppsala University(乌普萨拉大学)

Ziyang Luo

摘要:

近年来,随着预训练语言模型的成功,越来越多的研究者开始关注如何打开这些模型的“黑箱”。基于这种兴趣,我们对BERT和RoBERTa的注意中心语中的选区语法进行了定性和定量分析。我们采用句法距离的方法来提取隐含的选区语法的注意力权重的每个头。我们的研究结果表明,存在的头,可以诱导一些语法类型比基线好得多,这表明,一些头作为选民语法的代理。我们还分析了在句子语义相似性(SMS)和自然语言推理(NLI)两种任务下,注意中心成分语法诱导(CGI)能力在微调后的变化。我们的结果表明SMS任务降低了上层的平均CGI能力,而NLI任务提高了上层的平均CGI能力。最后,我们考察了QQP和MNLI任务中CGI能力与自然语言理解能力之间的关系。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑