《计算机应用》唯一官方网站 ›› 2022, Vol. 42 ›› Issue (9): 2674-2679.DOI: 10.11772/j.issn.1001-9081.2021081448

• 人工智能 • 上一篇    

基于多尺度卷积和门控机制的注意力情感分析模型

衡红军, 徐天宝()   

  1. 中国民航大学 计算机科学与技术学院,天津 300300
  • 收稿日期:2021-08-13 修回日期:2021-12-09 接受日期:2021-12-09 发布日期:2022-01-07 出版日期:2022-09-10
  • 通讯作者: 徐天宝
  • 作者简介:衡红军(1968—),男,河南太康人,副教授,博士,主要研究方向:智能信息处理、自然语言处理、知识图谱;

Attention sentiment analysis model based on multi-scale convolution and gating mechanism

Hongjun HENG, Tianbao XU()   

  1. College of Computer Science and Technology,Civil Aviation University of China,Tianjin 300300,China
  • Received:2021-08-13 Revised:2021-12-09 Accepted:2021-12-09 Online:2022-01-07 Published:2022-09-10
  • Contact: Tianbao XU
  • About author:HENG Hongjun, born in 1968, Ph. D., associate professor. His research interests include intelligent information processing, natural language processing, knowledge graph.

摘要:

针对现有的文档级情感分析模型大多只是考虑从词级对文本进行编码的问题,提出了一种基于多尺度卷积和门控机制的注意力情感分析模型。首先,使用多尺度卷积捕获不同粒度的局部相关性,从而得到更多不同层次的文本语义信息并形成更丰富的文本表示;其次,考虑到用户个性及产品信息对文本情感分类的影响,将全局用户产品信息融合到注意力中捕捉与用户和产品相关度较高的关键语义成分来生成文档表示;然后,引入门控机制来控制情感信息流向汇集层的路径;最后,通过全连接层和argmax函数实现情感分类。实验结果表明,与基准模型中性能最好的相比,所提模型在IMDB和Yelp2014两个数据集上的情感分类准确率分别提高了1.2个百分点和0.7个百分点,并且在IMDB和Yelp2013数据集上获得了最小的均方根误差(RMSE)。

关键词: 情感分析, 卷积神经网络, 注意力机制, 多尺度卷积, 门控机制

Abstract:

Aiming at the problem that most of existing models for document-level sentiment analysis only consider encoding text at word level, an attention sentiment analysis model based on multi-scale convolution and gating mechanism was proposed. Firstly, in order to obtain more different levels of text semantic information and form a richer text representation, the multi-scale convolution was used to capture local correlations of different granularities. Secondly, considering the influence of user personality and product information on text sentiment classification, the global information of users and products was integrated into attention to capture key semantic components which were highly related to users and products to form the document representation. Thirdly, a gating mechanism was introduced to control the path of emotional information flowing to collection layer. Finally, the sentiment classification was realized through the fully connected layer and argmax function. The experimental results show that, compared with the baseline model with the most advanced performance, the proposed algorithm has the sentiment classification accuracy on IMDB and Yelp2014 datasets improved by 1.2 percentage points and 0.7 percentage points respectively, and obtains the smallest Root Mean Squared Error (RMSE) on IMDB and Yelp2013 datasets.

Key words: sentiment analysis, Convolutional Neural Network (CNN), attention mechanism, multi-scale convolution, gating mechanism

中图分类号: