华东师范大学学报(自然科学版) ›› 2022, Vol. 2022 ›› Issue (2): 67-75.doi: 10.3969/j.issn.1000-5641.2022.02.008

• 计算机科学 • 上一篇    下一篇

基于双向长短记忆网络和门控注意力的文本分类网络

童根梅1, 朱敏2,*()   

  1. 1. 华东师范大学 计算机科学与技术学院, 上海 200062
    2. 华东师范大学 数据科学与工程学院, 上海 200062
  • 收稿日期:2020-11-09 出版日期:2022-03-25 发布日期:2022-03-28
  • 通讯作者: 朱敏 E-mail:mzhu@cc.ecnu.edu.cn

Bi-directional long short-term memory and bi-directional gated attention networks for text classification

Genmei TONG1, Min ZHU2,*()   

  1. 1. School of Computer Science and Technology, East China Normal University, Shanghai 200062, China
    2. School of Data Science and Engineering, East China Normal University, Shanghai 200062, China
  • Received:2020-11-09 Online:2022-03-25 Published:2022-03-28
  • Contact: Min ZHU E-mail:mzhu@cc.ecnu.edu.cn

摘要:

首先, 提出构建双向的全连接结构用于更好提取上下文的信息; 然后, 利用双向的注意力机制将包含丰富文本特征的矩阵压缩成一个向量; 最后, 将双向的全连接结构和门控制结构相结合. 通过实验验证了上述结构对于提升文本分类的准确率具有积极的作用. 将这3种结构和双向的循环网络进行结合, 组成了所提出的文本分类模型. 通过在7个常用的文本分类数据集(AG、DBP、Yelp.P、Yelp.F、Yah.A、Ama.F、Ama.P)上进行的实验, 得到了具有竞争性的结果并且在其中5个数据集(AG、DBP、Yelp.P、Ama.F、Ama.P)上获得了较好的实验效果. 通过实验表明, 所提出的文本分类模型能显著降低分类错误率.

关键词: 文本分类, 注意力机制, 长短记忆网络

Abstract:

In this paper, we propose the construction of a bi-directional fully connected structure for better extraction of context information. We also propose the construction of a bi-directional attention structure for compressing matrices containing rich text features into a vector. The bi-directional fully connected structure and the gated structure are then combined. This research demonstrates that the proposed combined structure has a net positive effect on text classification accuracy. Finally, by combining these three structures and a bi-direction long short-term memory, we propose a new text classification model. Using this model, we obtained competitive results on seven commonly used text classification datasets and achieved state-of-the-art results on five of them. Experiments showed that the combination of these structures can significantly reduce classification errors.

Key words: text classification, attention, long short-term memory

中图分类号: