Computer Engineering and Applications ›› 2022, Vol. 58 ›› Issue (16): 157-163.DOI: 10.3778/j.issn.1002-8331.2101-0196

• Pattern Recognition and Artificial Intelligence • Previous Articles     Next Articles

Dual-Channel DAC-RNN Text Classification Model Based on Attention Mechanism

LI Qihang, LIAO Wei, MENG Jingwen   

  1. College of Electronic & Electrical Engineering, Shanghai University of Engineering Science, Shanghai 201620, China
  • Online:2022-08-15 Published:2022-08-15

基于注意力机制的双通道DAC-RNN文本分类模型

李启行,廖薇,孟静雯   

  1. 上海工程技术大学 电子电气工程学院,上海 201620

Abstract: In the process of classifying Chinese text, because the key features are unevenly distributed throughout the text, the problem of key feature loss is prone to occur, which reduces the accuracy of the classification. To solve this problem, a dual-channel text classification model based on attention mechanism is proposed. Firstly, the input text is represented by word embedding for vector representation, the Bi-LSTM channel is used to extract the contextual information in the text, and the CNN channel is used to extract the local features between consecutive words in the text. Secondly, the attention mechanism is introduced in both channels for global weight distribution, so that the model further pays attention to the keywords in the text. In addition, in the CNN channel, the original input vector and the output vector of each layer of CNN are selectively fused to realize feature reuse. The performance evaluation is conducted on two public datasets of Toutiao and THUCNews. The experimental results show that compared with other classification models, the classification accuracy of the proposed model is 97.59% and 90.09% respectively, which has better classification performance.

Key words: text classification, convolutional neural network(CNN), attention mechanism, dual-channel, feature reuse

摘要: 在对中文文本进行分类的过程中,由于关键特征在整个文本中具有分布不均匀的特点,容易出现关键特征丢失的问题,降低了分类的准确性。针对这一问题,提出一种基于注意力机制的双通道文本分类模型。将输入文本通过词嵌入进行向量表示,利用Bi-LSTM通道提取文本中的上下文关联信息,利用CNN通道提取文本中连续词间的局部特征。在两个通道中均引入注意力机制进行全局权重分配,使模型能够进一步关注到文本中的关键词。在CNN通道中,将原始输入向量与各层CNN的输出向量进行选择性融合,从而实现特征重利用。在今日头条和THUCNews两个公开数据集上进行性能评估,实验结果表明,与其他分类模型相比,所提模型的分类准确率分别为97.59%、90.09%,具有更好的分类性能。

关键词: 文本分类, 卷积神经网络(CNN), 注意力机制, 双通道, 特征重利用