计算机工程 ›› 2020, Vol. 46 ›› Issue (11): 53-60.doi: 10.19678/j.issn.1000-3428.0055950

• 人工智能与模式识别 • 上一篇    下一篇

基于AT-DPCNN模型的情感分析研究

高玮军, 杨杰, 张春霞, 师阳   

  1. 兰州理工大学 计算机与通信学院, 兰州 730050
  • 收稿日期:2019-09-08 修回日期:2019-10-29 发布日期:2019-11-19
  • 作者简介:高玮军(1973-),男,副教授,主研方向为高性能计算、自然语言处理;杨杰、张春霞、师阳,硕士研究生。
  • 基金项目:
    国家自然科学基金(61762059);甘肃省引导创新发展项目(052004)。

Sentiment Analysis Research Based on AT-DPCNN Model

GAO Weijun, YANG Jie, ZHANG Chunxia, SHI Yang   

  1. School of Computer and Communication, Lanzhou University of Technology, Lanzhou 730050, China
  • Received:2019-09-08 Revised:2019-10-29 Published:2019-11-19

摘要: 情感分析是自然语言处理领域的一个重要分支,卷积神经网络(CNN)在文本情感分析方面取得了较好的效果,但其未充分提取文本信息中的关键情感信息。为此,建立一种基于注意力机制的深度学习模型AT-DPCNN。利用注意力矩阵重点关注文本序列中对情感走向影响较大的部分,通过对提取到的注意力特征矩阵与原文本词向量进行运算得到注意力输入矩阵,并利用CNN再次提取文本特征。同时为了更好地提取转折等复杂句式的特征,在池化层进行分池操作。在多个不同类型数据集上的测试结果表明,该模型具有较高的泛化性能,处理转折等复杂句式时其分类准确率和F1值相对WACNN、HAN等模型均有明显提升。

关键词: 深度学习, 卷积神经网络, 情感分析, 注意力机制, 损失函数

Abstract: Sentiment analysis is a fundamental field of Natural Language Processing(NLP).Convolutional Neural Network(CNN) performs well when applied to this field,but fails to fully extract the key sentiment information in the text information.To address the problem,this paper proposes a deep learning model,AT-DPCNN,which is based on attention mechanism.The model uses the attention matrix to highly focus on the part of the text sequence that has significant influence on emotion tendency,and operates on the extracted attention feature matrix and the word vector of the original text to get the attention input matrix.Then the CNN is used to re-extract text features.Also,in order to better extract the features of complex sentence patterns such as transition,the divide pooling is performed at the pooling layer.The proposed model is tested on different types of datasets,and the experimental results show that the model has good generalization performance,and significantly improves the classification accuracy and F1 score compared with WACNN,HAN and other models when processing complex sentence patterns such as transition.

Key words: deep learning, Convolutional Neural Network(CNN), sentiment analysis, attention mechanism, loss function

中图分类号: