BiGRU结合注意力机制的文本分类研究
2021-08-23黄忠祥李明
黄忠祥 李明



[摘 要] 随着信息时代的发展,文本包含的信息量越来越多,而同一段文本可以隶属于不同的类别,为了提升多标签文本分类任务的准确率,提出了一种基于ALBERT预训练、双向GRU并结合注意力机制的改进的多标签文本分类模型——BiGRU-Att模型。在百度发布的中文事件抽取数据集上进行实验,该模型的识别准确率达到了99.68%,相对比较组的BiLSTM-Att、LSTM-Att、BiGRU、BiLSTM、LSTM等模型的测试结果,准确率更高,性能更优。实验结果表明,改进的BiGRU-Att模型能有效提升多标签文本分类任务的准确率。
[关键词] 多标签;预训练;双向门控循环单元(BiGRU);注意力机制
[中图分类号] TP 391.1 [文献标志码] A [文章编号] 1005-0310(2021)03-0047-06
Abstract: With the development of information age, the amount of information contained in texts is increasing. It is often the case that the same text can belong to different categories. In order to improve the accuracy of multi-label text classification, BiGRU-Att model, an improved multi-label text classification model,is proposed based on ALBERT pre-training, BiGRU combined with attention mechanism. Experiments on Chinese event extraction data set published by Baidu show that the recognition accuracy of the model reaches 99.68%. Compared with the test results of BiLSTM-Att, LSTM-Att, BiGRU, BiLSTM, LSTM and other models of the comparison group, the model has higher accuracy and better performance. Experimental results show that the improved BiGRU-Att model can effectively improve the accuracy of multi-label text classification.
Keywords: Multi-label;Pre-training;Bi-direction Gate Recurrent Unit (BiGRU);Attention mechanism
0 引言
文本分类是自然语言处理中比较经典的任务,以往的文本分类任务通常属于较为简单的单标签文本分类任务,并且各标签之间是独立的。随着互联网的发展,文本的分类精细化要求越来越高,一段文本常常可以对应多个标签,例如,对于同一篇文章,其所属类别可以同时是军事类和科技类。对于多标签分类问题,还没有很成熟的处理方案,这就对多标签文本分类技术提出了更高的要求。
文本分類方法一般分为两类:传统的机器学习的方法和基于深度学习的分类方法。由于深度学习技术的发展较为迅猛,所以,目前大多数研究采用基于深度学习的模型去处理多标签文本分类任务。例如,Kim[1]首先提出的TextCNN模型,首次将常用于图像处理领域的CNN结构引入到文本分类任务中,开辟了这一领域新……
