论文标题

结构化的自我发场权重编码语义分析中的语义

Structured Self-Attention Weights Encode Semantics in Sentiment Analysis

论文作者

Wu, Zhengxuan, Nguyen, Thanh-Son, Ong, Desmond C.

论文摘要

神经关注,尤其是由变压器引起的自我注意力,已成为最先进的自然语言处理(NLP)模型的主力。最近的工作表明,变压器中的自我注意力编码句法信息。在这里,我们表明,通过考虑情感分析任务来编码语义分数。与基于基于梯度的特征归因方法相反,我们提出了一种简单有效的层次注意跟踪(LAT)方法来分析结构化注意力的权重。我们将我们的方法应用于对两个具有表面差异但共同语义的任务训练的变压器模型 - 对电影评论和时间序列的卖空预测的情感分析。在这两项任务中,注意力较高的单词都充满了情感语义,这是由人类注释者标记的情感词典来定量验证的。我们的结果表明,结构化的注意力重量在情感分析中编码丰富的语义,并匹配人类对语义的解释。

Neural attention, especially the self-attention made popular by the Transformer, has become the workhorse of state-of-the-art natural language processing (NLP) models. Very recent work suggests that the self-attention in the Transformer encodes syntactic information; Here, we show that self-attention scores encode semantics by considering sentiment analysis tasks. In contrast to gradient-based feature attribution methods, we propose a simple and effective Layer-wise Attention Tracing (LAT) method to analyze structured attention weights. We apply our method to Transformer models trained on two tasks that have surface dissimilarities, but share common semantics---sentiment analysis of movie reviews and time-series valence prediction in life story narratives. Across both tasks, words with high aggregated attention weights were rich in emotional semantics, as quantitatively validated by an emotion lexicon labeled by human annotators. Our results show that structured attention weights encode rich semantics in sentiment analysis, and match human interpretations of semantics.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源