计算机应用 ›› 2019, Vol. 39 ›› Issue (10): 2841-2846.DOI: 10.11772/j.issn.1001-9081.2019030579

• 人工智能 • 上一篇    下一篇

CNN-BiGRU网络中引入注意力机制的中文文本情感分析

王丽亚, 刘昌辉, 蔡敦波, 卢涛   

  1. 武汉工程大学 计算机科学与工程学院, 武汉 430205
  • 收稿日期:2019-04-09 修回日期:2019-05-19 出版日期:2019-10-10 发布日期:2019-06-03
  • 通讯作者: 王丽亚
  • 作者简介:王丽亚(1994-),女,安徽安庆人,硕士研究生,主要研究方向:文本挖掘;刘昌辉(1965-),男,湖北武汉人,教授,博士,主要研究方向:机器人控制、软件系统、智能计算、信息处理;蔡敦波(1981-),男,湖北武汉人,教授,博士,CCF会员,主要研究方向:人工智能的智能规划、自动推理、约束优化、文本挖掘;卢涛(1980-),男,湖北武汉人,教授,博士,CCF会员,主要研究方向:模式识别、计算机视觉。
  • 基金资助:
    国家自然科学基金资助项目(61103136,61502354);武汉工程大学教育创新计划项目(CX2018196)。

Chinese text sentiment analysis based on CNN-BiGRU network with attention mechanism

WANG Liya, LIU Changhui, CAI Dunbo, LU Tao   

  1. College of Computer Science and Engineering, Wuhan Institute of Technology, Wuhan Hubei 430205, China
  • Received:2019-04-09 Revised:2019-05-19 Online:2019-10-10 Published:2019-06-03
  • Supported by:
    This work is partially supported by the National Natural Science Foundation of China (61103136, 61502354), the Wuhan Institute of Technology Education Innovation Program Funding Project (CX2018196).

摘要: 传统卷积神经网络(CNN)中同层神经元之间信息不能互传,无法充分利用同一层次上的特征信息,缺乏句子体系特征的表示,从而限制了模型的特征学习能力,影响文本分类效果。针对这个问题,提出基于CNN-BiGRU联合网络引入注意力机制的模型,采用CNN-BiGRU联合网络进行特征学习。首先利用CNN提取深层次短语特征,然后利用双向门限循环神经网络(BiGRU)进行序列化信息学习以得到句子体系的特征和加强CNN池化层特征的联系,最后通过增加注意力机制对隐藏状态加权计算以完成有效特征筛选。在数据集上进行的多组对比实验结果表明,该方法取得了91.93%的F1值,有效地提高了文本分类的准确率,时间代价小,具有很好的应用能力。

关键词: 卷积神经网络, 双向门限循环神经网络, 注意力机制, 中文文本情感分析

Abstract: In the traditional Convolutional Neural Network (CNN), the information cannot be transmitted to each other between the neurons of the same layer, the feature information at the same layer cannot be fully utilized, making the lack of the representation of the characteristics of the sentence system. As the result, the feature learning ability of model is limited and the text classification effect is influenced. Aiming at the problem, a model based on joint network CNN-BiGRU and attention mechanism was proposed. In the model, the CNN-BiGRU joint network was used for feature learning. Firstly, deep-level phrase features were extracted by CNN. Then, the Bidirectional Gated Recurrent Unit (BiGRU) was used for the serialized information learning to obtain the characteristics of the sentence system and strengthen the association of CNN pooling layer features. Finally, the effective feature filtering was completed by adding attention mechanism to the hidden state weighted calculation. Comparative experiments show that the method achieves 91.93% F1 value and effectively improves the accuracy of text classification with small time cost and good application ability.

Key words: Convolutional Neural Network (CNN), Bidirectional Gated Recurrent Unit (BiGRU), attention mechanism, Chinese text sentiment analysis

中图分类号: