作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2022, Vol. 48 ›› Issue (5): 59-66,73. doi: 10.19678/j.issn.1000-3428.0061176

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

基于改进BiGRU-CNN的中文文本分类方法

陈可嘉, 刘惠   

  1. 福州大学 经济与管理学院, 福州 350116
  • 收稿日期:2021-03-17 修回日期:2021-05-21 发布日期:2022-05-10
  • 作者简介:陈可嘉(1978—),男,教授、博士,主研方向为数据挖掘;刘惠,硕士研究生。
  • 基金资助:
    国家自然科学基金(71701019)。

Chinese Text Classification Method Based on Improved BiGRU-CNN

CHEN Kejia, LIU Hui   

  1. School of Economics and Management, Fuzhou University, Fuzhou 350116, China
  • Received:2021-03-17 Revised:2021-05-21 Published:2022-05-10

摘要: 传统的自注意力机制可以在保留原始特征的基础上突出文本的关键特征,得到更准确的文本特征向量表示,但忽视了输入序列中各位置的文本向量对输出结果的贡献度不同,导致在权重分配上存在偏离实际的情况,而双向门控循环单元(BiGRU)网络在对全局信息的捕捉上具有优势,但未考虑到文本间存在的局部依赖关系。针对上述问题,提出一种基于改进自注意力机制的BiGRU和多通道卷积神经网络(CNN)文本分类模型SAttBiGRU-MCNN。通过BiGRU对文本序列的全局信息进行捕捉,得到文本的上下文语义信息,利用优化的多通道CNN提取局部特征,弥补BiGRU忽视局部特征的不足,在此基础上对传统的自注意力机制进行改进,引入位置权重参数,根据文本向量训练的位置,对计算得到的自注意力权重概率值进行重新分配,并采用softmax得到样本标签的分类结果。在两个标准数据集上的实验结果表明,该模型准确率分别达到98.95%和88.1%,相比FastText、CNN、RCNN等分类模型,最高提升了8.99、7.31个百分点,同时精确率、召回率和F1值都有较好表现,取得了更好的文本分类效果。

关键词: 自注意力机制, 双向门控循环单元, 多通道卷积神经网络, 文本分类, 深度学习

Abstract: The conventional self-attention mechanism can highlight the key features of text while retaining the original features to obtain a more accurate representation of the text feature vector.However, it does not focus on the different contributions of the text vector at each position in the input sequence to the output result, resulting in deviation from the actual situation in weight allocation.The Bidirectional Gated Recurrent Unit(BiGRU) network can capture global information but disregards local features.Hence, a multi-channel Convolutional Neural Network(CNN) with improved self-attention mechanism(SAttBiGRU-MCNN) is proposed herein.The BiGRU is used to capture global information regarding the text sequence to obtain the context semantic information of the text.An optimized multi-channel CNN is used to extract the local features, thereby compensating for the deficiency of the BiGRU, which disregards the local features.Subsequently, the conventional self-attention mechanism is improved, the position weight parameter is introduced, and the calculated self-attention weight probability value is redistributed based on the position of text vector training;subsequently, the classification results of sample labels are obtained using softmax.Experimental results on two standard datasets show that the accuracy of the model reaches 98.95% and 88.1%, separately, which are up to 8.99 and 7.31 percentage points higher, respectively, than those of classification models such as FastText, CNN, and RCNN. Finally, the proposed model performs better in terms of accuracy, recall, and F1 value, as well asoffers better text classification.

Key words: self-attention mechanism, Bidirectional Gated Recurrent Unit(BiGRU), multi-channel Convolutional Neural Network(CNN), text classification, deep learning

中图分类号: