Computer Engineering and Applications ›› 2023, Vol. 59 ›› Issue (9): 190-197.DOI: 10.3778/j.issn.1002-8331.2201-0454

• Pattern Recognition and Artificial Intelligence • Previous Articles     Next Articles

Aspect-Based Sentiment Analysis with Cross-Heads Attention

ZHOU Runmin, HU Xuyao, WU Kewei, YU Lei, XIE Zhao, JIANG Long   

  1. 1.School of Computer Science and Information Engineering, Hefei University of Technology, Hefei 230009, China
    2.Anhui Province Key Laboratory of Industry Safety and Emergency Technology, Hefei University of Technology, Hefei 230009, China
  • Online:2023-05-01 Published:2023-05-01

基于交叉注意力的方面级情感分析

周润民,胡旭耀,吴克伟,于磊,谢昭,江龙   

  1. 1.合肥工业大学 计算机与信息学院,合肥  230009
    2.合肥工业大学 工业安全与应急技术安徽省重点实验室,合肥 230009

Abstract: Aspect level affective analysis aims to identify the positive, negative and neutral emotions of aspect words in sentences. The key is to learn the relationship between aspect words and words in sentences. When learning the relationship between words, the existing convolution gated network uses the time convolution method, and its local time window can not describe the relationship between any words. At the same time, the attention of the existing temporal attention model is independent of each other when analyzing the relationship between words. In order to analyze the complex relationship between aspect words and other words in sentences, an emotion analysis model based on cross attention and convolution gated network is proposed in this paper. Firstly, for a given word vector feature, this paper designs a cross attention module. The module adds crossed linear mapping to the matching scores of query vector and keyword vector in multiple attention, so as to integrate the matching scores in multiple attention, which is used to describe the context word relationship of more complex aspect words. Secondly, this paper uses the gated convolution network to encode the local word relationship, and designs the word position coding module to provide the position coding characteristics of words, so as to analyze the effect of position coding on the analysis of word relationship. Finally, for the above encoded word features, this paper uses time pooling to obtain sentence description, and uses full connection classifier to predict emotion classification markers. The experimental analysis on Rest14 and Laptop14 data sets shows that this method can effectively estimate the score relationship between aspect words and other words.

Key words: aspected-based sentiment analysis, gating mechanism, cross-heads attention, position information

摘要: 方面级情感分析旨在识别句子中方面词的积极、消极和中性情绪。其关键在于方面词和句子中单词之间关系的学习。在学习单词之间关系时,现有卷积门控网络使用时间卷积方法,其局部时间窗口无法描述任意单词之间的关系。同时,现有时间注意力模型在分析单词之间的关系时,其注意力是相互独立的。为了分析句子中方面词与其他单词的复杂关联,提出一种基于交叉注意力和卷积门控网络的情感分析模型。对于给定的词向量特征,设计了一种交叉注意力模块。该模块对多头注意力中查询向量与关键字向量的匹配得分,添加交叉的线性映射,以融合多个注意力中的匹配得分,用于描述更复杂的方面词的上下文单词关系。使用卷积门控网络对局部单词关系进行编码,并设计了单词的位置编码模块,用于提供单词的位置编码特征,以分析位置编码对单词关系分析的作用。对上述编码的单词特征,使用时间池化获得句子描述,并使用全连接分类器进行情感分类标记预测。在Rest14和Laptop14数据集上的实验分析表明,提出的方法能有效估计方面级单词与其他单词之间得分关系。

关键词: 方面级情感分析, 门控机制, 交叉注意力, 位置信息