Please wait a minute...
Advanced Search
数据分析与知识发现  2022, Vol. 6 Issue (1): 101-112     https://doi.org/10.11925/infotech.2096-3467.2021.0503
     研究论文 本期目录 | 过刊浏览 | 高级检索 |
基于MFFMB的电商评论文本分类研究*
谢星雨1,余本功1,2()
1合肥工业大学管理学院 合肥 230009
2过程优化与智能决策教育部重点实验室 合肥 230009
Automatic Classification of E-commerce Comments with Multi-Feature Fusion Model
Xie Xingyu1,Yu Bengong1,2()
1School of Management, Hefei University of Technology, Hefei 230009, China
2Key Laboratory of Process Optimization & Intelligent Decision-making of Ministry of Education, Hefei University of Technology, Hefei 230009, China
全文: PDF (1362 KB)   HTML ( 48
输出: BibTeX | EndNote (RIS)      
摘要 

【目的】 为缓解在公开论坛、企业后台数据仓库的数据自动化分类及存储过程中,由于电商评论文本具有一词多义、信息分布稀疏等特点而造成的处理困难,本文设计基于BERT语言模型和多通道特征抽取的文本分类模型,实现评论文本的自动化分类。【方法】 考虑到中文文本的最小表达单元是字,通过BERT的字向量编码联动TextCNN缓解一词多义的问题。为捕获长距离上下文语义信息,模型设计了BERT联动Bi-LSTM的通道。充分利用BERT的微调机制,使字向量编码根据两个通道的特征抽取方式进行调整,从而得到适配局部和长距离特征抽取的字向量编码结果。模型最终融合两个通道的特征向量,完成文本分类任务。【结果】 本文提出的MFFMB(Multi-Features Fusion Model BERT-based)模型在公开的电子商务评论多分类数据集上的准确率高达0.9007,相对于基线模型BERT+TextCNN、BERT+BiLSTM、BERT+LSTM+MaxPooling、BERT+LSTM+Attention分别提升2.36、8.55、4.61、5.11个百分点。同时,实验结果说明BERT和注意力机制的引入,相对于基线模型中的较优者,准确率分别提升约1.48和4.81个百分点。【局限】 注意力机制仅在BiLSTM通道引入,没有在全局设计;本文模型未在更多数据集上验证效果。【结论】 本文模型能够更好地结合多维度信息,更加充分地挖掘BERT预训练模型在文本分类任务上的作用,提高了分类的准确性。

服务
把本文推荐给朋友
加入引用管理器
E-mail Alert
RSS
作者相关文章
谢星雨
余本功
关键词 BERT多粒度特征融合长短时记忆网络注意力机制文本分类    
Abstract

[Objective] This paper designs a text classification method based on the BERT model and multi-channel feature extraction, aiming to accurately conduct automatic classification for e-commence comments. The new model will also address the issues of polysemy and sparse information of comments from public online forums and enterprise data warehouses. [Methods] First, we used BERT's TextCNN to reduce the polysemy of Chinese words. Then, our model utilized the BERT linkage Bi-LSTM channel to capture the long-distance context semantics. Third, we used BERT's fine-tuning mechanism to adjust the word vector coding with the extracted features. Finally, the model fused the feature vectors and finished the text classification. [Results] The accuracy of the MFFMB (Multi-Features Fusion Model BERT-based) reached 90.07% on the public data sets of e-commerce comments. Compared with the popular baseline models, the accuracy of the proposed one was improved by 2.36, 8.55, 4.61 and 5.11 percentage points. Meanwhile, combining the BERT and attention mechanism improved our models' accuracy by 1.48 and 4.81 percentage points than their best baseline counterparts. [Limitations] The attention mechanism was only used with the BiLSTM channel. Future research is needed to examine our model with more data sets. [Conclusions] The proposed model could effectively improve the accuracy of text classification.

Key wordsBERT    Multi-granularity Feature Fusion Model    LSTM    Attention    Text Classification
收稿日期: 2021-05-19      出版日期: 2022-02-22
ZTFLH:  TP391  
基金资助:*本文系国家自然科学基金项目的研究成果之一(71671057)
通讯作者: 余本功,ORCID:0000-0003-4170-2335     E-mail: bgyu19@163.com
引用本文:   
谢星雨, 余本功. 基于MFFMB的电商评论文本分类研究*[J]. 数据分析与知识发现, 2022, 6(1): 101-112.
Xie Xingyu, Yu Bengong. Automatic Classification of E-commerce Comments with Multi-Feature Fusion Model. Data Analysis and Knowledge Discovery, 2022, 6(1): 101-112.
链接本文:  
https://manu44.magtech.com.cn/Jwk_infotech_wk3/CN/10.11925/infotech.2096-3467.2021.0503      或      https://manu44.magtech.com.cn/Jwk_infotech_wk3/CN/Y2022/V6/I1/101
Fig.1  MFFMB电商评论文本分类模型
Fig.2  BERT模型结构
Fig.3  TextCNN网络结构
Fig.4  含有注意力的双向长短时记忆网络
实验环境 环境配置
操作系统 Windows10
IDLE Jupyter Notebook 6.0.1 + PyCharm2019
TensorFlow tensorflow_gpu-1.14.0
Keras 2.3.1
GPU GTX1660Ti(6G)
Python 3.7.4
Table 1  实验环境参数
Fig.5  类别数据统计
Fig.6  数据文本长度统计
模型 准确率 损失值
BERT+BiLSTM[29] 0.815 2 0.844 7
BERT+BiLSTM+MixPooling 0.854 6 0.684 7
BERT+BiLSTM+Attention[25] 0.849 6 0.722 3
BERT+TextCNN[22] 0.877 1 0.355 8
MFFMB 0.900 7 0.278 4
Table 2  基线模型对比实验
Fig.7  细分结果混淆矩阵
模型 书籍 平板 手机 水果 洗发水 热水器 计算机 牛奶 衣服 酒店
BERT+BiLSTM 0.972 1 0.741 3 0.852 1 0.911 6 0.700 2 0.883 2 0.997 1 0.892 1 0.912 6 0.962 4
BERT+BiLSTM+MixPooling 0.943 4 0.832 7 0.911 7 0.932 7 0.792 4 0.872 7 0.996 1 0.854 2 0.942 3 0.991 7
BERT+BiLSTM+Attention 0.982 1 0.764 2 0.916 2 0.951 0 0.831 1 0.861 0 0.992 1 0.851 2 0.921 1 0.973 1
BERT+TextCNN 0.972 2 0.843 4 0.892 3 0.942 1 0.822 1 0.864 2 0.990 8 0.883 1 0.943 2 0.992 7
MFFMB 0.974 7 0.853 1 0.910 7 0.971 3 0.833 1 0.921 7 0.997 1 0.923 7 0.937 7 0.997 1
Table 3  细分实验准确率结果
模型 书籍 平板 手机 水果 洗发水 热水器 计算机 牛奶 衣服 酒店
BERT+BiLSTM 0.912 1 0.742 2 0.702 1 0.884 2 0.901 7 0.353 2 0.972 1 0.862 3 0.741 5 0.974 1
BERT+BiLSTM+MixPooling 0.964 2 0.723 4 0.722 1 0.872 6 0.892 5 0.362 1 0.997 4 0.902 3 0.782 1 0.981 7
BERT+BiLSTM+Attention 0.932 1 0.854 2 0.756 2 0.871 0 0.897 1 0.392 1 0.962 3 0.912 0 0.862 4 0.982 3
BERT+TextCNN 0.970 5 0.823 1 0.884 1 0.892 3 0.882 7 0.602 9 0.983 7 0.913 8 0.892 4 0.982 7
MFFMB 0.982 7 0.847 1 0.882 3 0.911 7 0.894 1 0.637 7 0.990 7 0.914 2 0.942 1 0.994 1
Table 4  细分实验召回率结果
模型 书籍 平板 手机 水果 洗发水 热水器 计算机 牛奶 衣服 酒店
BERT+BiLSTM 0.941 1 0.741 7 0.769 9 0.897 7 0.788 2 0.504 6 0.984 4 0.876 9 0.818 2 0.968 2
BERT+BiLSTM+MixPooling 0.953 7 0.774 2 0.805 9 0.901 6 0.839 5 0.511 8 0.996 7 0.877 6 0.854 8 0.986 7
BERT+BiLSTM+Attention 0.956 4 0.806 6 0.828 5 0.909 2 0.862 8 0.538 8 0.977 0 0.880 6 0.890 8 0.977 7
BERT+TextCNN 0.971 3 0.833 1 0.888 2 0.916 5 0.851 3 0.710 3 0.986 7 0.898 2 0.917 1 0.987 7
MFFMB 0.973 8 0.850 1 0.896 3 0.940 6 0.862 5 0.732 5 0.993 9 0.918 9 0.939 9 0.995 6
Table 5  细分实验F1结果
模型 准确率 F1值 召回率
Word2Vec+BiLSTM[30] 0.753 8 0.718 9 0.687 1
Doc2Vec+BiLSTM[31] 0.800 4 0.774 2 0.749 7
BERT+BiLSTM 0.815 2 0.799 2 0.783 8
Table 6  BERT模型效果实验
准确率 准确率 F1值 召回率
Word2Vec+BiLSTM 0.753 8 0.718 9 0.687 1
Word2Vec+BiLSTM+Attention[25] 0.815 5 0.767 9 0.725 6
BERT+BiLSTM 0.815 2 0.799 2 0.783 8
BERT+BiLSTM+Attention 0.849 6 0.820 7 0.793 7
Table 7  注意力机制效果实验
[1] 王婷, 杨文忠. 文本情感分析方法研究综述[J]. 计算机工程与应用, 2021, 57(12):11-24.
[1] ( Wang Ting, Yang Wenzhong. Review of Text Sentiment Analysis Methods[J]. Computer Engineering and Applications, 2021, 57(12):11-24.)
[2] 孙毅, 裘杭萍, 郑雨, 等. 自然语言预训练模型知识增强方法综述[J]. 中文信息学报, 2021, 35(7):10-29.
[2] ( Sun Yi, Qiu Hangping, Zheng Yu, et al. Knowledge Enhancement for Pre-trained Language Models: A Survey[J]. Journal of Chinese Information Processing, 2021, 35(7):10-29.)
[3] 黄金杰, 蔺江全, 何勇军, 等. 局部语义与上下文关系的中文短文本分类算法[J]. 计算机工程与应用, 2021, 57(6):94-100.
[3] ( Huang Jinjie, Lin Jiangquan, He Yongjun, et al. Chinese Short Text Classification Algorithm Based on Local Semantics and Context[J]. Computer Engineering and Applications, 2021, 57(6):94-100.)
[4] 郑飞, 韦德壕, 黄胜. 基于LDA和深度学习的文本分类方法[J]. 计算机工程与设计, 2020, 41(8):2184-2189.
[4] ( Zheng Fei, Wei Dehao, Huang Sheng. Text Classification Method Based on LDA and Deep Learning[J]. Computer Engineering and Design, 2020, 41(8):2184-2189.)
[5] 朱晓亮, 石昀东. 基于TextRank和字符级卷积神经网络的小学作文素材自动分类模型研究[J]. 计算机应用与软件, 2019, 36(1):220-226.
[5] ( Zhu Xiaoliang, Shi Yundong. Automatic Classification Model of Composition Material in Primary School Based on Textrank and Char-level CNN[J]. Computer Applications and Software, 2019, 36(1):220-226.)
[6] 张谦, 高章敏, 刘嘉勇. 基于Word2vec的微博短文本分类研究[J]. 信息网络安全, 2017(1):57-62.
[6] ( Zhang Qian, Gao Zhangmin, Liu Jiayong. Research of Weibo Short Text Classification Based on Word2vec[J]. Netinfo Security, 2017(1):57-62.)
[7] 杨宇婷, 王名扬, 田宪允, 等. 基于文档分布式表达的新浪微博情感分类研究[J]. 情报杂志, 2016, 35(2):151-156.
[7] ( Yang Yuting, Wang Mingyang, Tian Xianyun, et al. Sina Microblog Sentiment Classification Based on Distributed Representation of Documents[J]. Journal of Intelligence, 2016, 35(2):151-156.)
[8] 邵云飞, 刘东苏. 基于类别特征扩展的短文本分类方法研究[J]. 数据分析与知识发现, 2019, 3(9):60-67.
[8] ( Shao Yunfei, Liu Dongsu. Classifying Short-texts with Class Feature Extension[J]. Data Analysis and Knowledge Discovery, 2019, 3(9):60-67.)
[9] 陶志勇, 李小兵, 刘影, 等. 基于双向长短时记忆网络的改进注意力短文本分类方法[J]. 数据分析与知识发现, 2019, 3(12):21-29.
[9] ( Tao Zhiyong, Li Xiaobing, Liu Ying, et al. Classifying Short Texts with Improved-Attention Based Bidirectional Long Memory Network[J]. Data Analysis and Knowledge Discovery, 2019, 3(12):21-29.)
[10] 段丹丹, 唐加山, 温勇, 等. 基于BERT模型的中文短文本分类算法[J]. 计算机工程, 2021, 47(1):79-86.
[10] ( Duan Dandan, Tang Jiashan, Wen Yong, et al. Chinese Short Text Classification Algorithm Based on BERT Model[J]. Computer Engineering, 2021, 47(1):79-86.)
[11] 杜琳, 曹东, 林树元, 等. 基于BERT与Bi-LSTM融合注意力机制的中医病历文本的提取与自动分类[J]. 计算机科学, 2020, 47(S2):416-420.
[11] ( Du Lin, Cao Dong, Lin Shuyuan, et al. Extraction and Automatic Classification of TCM Medical Records Based on Attention Mechanism of BERT and Bi-LSTM[J]. Computer Science, 2020, 47(S2):416-420.)
[12] 谢润忠, 李烨. 基于BERT和双通道注意力的文本情感分类模型[J]. 数据采集与处理, 2020, 35(4):642-652.
[12] ( Xie Runzhong, Li Ye. Text Sentiment Classification Model Based on BERT and Dual Channel Attention[J]. Journal of Data Acquisition and Processing, 2020, 35(4):642-652.)
[13] 温超东, 曾诚, 任俊伟, 等. 结合ALBERT和双向门控循环单元的专利文本分类[J]. 计算机应用, 2021, 41(2):407-412.
[13] ( Weng Chaodong, Zeng Cheng, Ren Junwei, et al. Patent Text Classification Based on ALBERT and Bidirectional Gated Recurrent Unit[J]. Journal of Computer Applications, 2021, 41(2):407-412.)
[14] 余同瑞, 金冉, 韩晓臻, 等. 自然语言处理预训练模型的研究综述[J]. 计算机工程与应用, 2020, 56(23):12-22.
[14] ( Yu Tongrui, Jin Ran, Han Xiaozhen, et al. Review of Pre-training Models for Natural Language Processing[J]. Computer Engineering and Applications, 2020, 56(23):12-22.)
[15] 余本功, 陈杨楠, 杨颖. 基于nBD-SVM模型的投诉短文本分类[J]. 数据分析与知识发现, 2019, 3(5):77-85.
[15] ( Yu Bengong, Chen Yangnan, Yang Ying. Classifying Short Text Complaints with nBD-SVM Model[J]. Data Analysis and Knowledge Discovery, 2019, 3(5):77-85.)
[16] 葛晓伟, 李凯霞, 程铭. 基于CNN-SVM的护理不良事件文本分类研究[J]. 计算机工程与科学, 2020, 42(1):161-166.
[16] ( Ge Xiaowei, Li Kaixia, Cheng Ming. Text Classification of Nursing Adverse Events Based on CNN-SVM[J]. Computer Engineering & Science, 2020, 42(1):161-166.)
[17] 王海涛, 宋文, 王辉. 一种基于LSTM和CNN混合模型的文本分类方法[J]. 小型微型计算机系统, 2020, 41(6):1163-1168.
[17] ( Wang Haitao, Song Wen, Wang Hui. Text Classification Method Based on Hybrid Model of LSTM and CNN[J]. Journal of Chinese Computer Systems, 2020, 41(6):1163-1168.)
[18] 田梓函, 李欣. 基于BERT-CRF模型的中文事件检测方法研究[J]. 计算机工程与应用, 2021, 57(11):135-139.
[18] ( Tian Zihan, Li Xin. Research on Chinese Event Detection Method Based on BERT-CRF Model[J]. Computer Engineering and Applications, 2021, 57(11):135-139.)
[19] 李心蕾, 王昊, 刘小敏, 等. 面向微博短文本分类的文本向量化方法比较研究[J]. 数据分析与知识发现, 2018, 2(8):41-50.
[19] ( Li Xinlei, Wang Hao, Liu Xiaomin, et al. Comparing Text Vector Generators for Weibo Short Text Classification[J]. Data Analysis and Knowledge Discovery, 2018, 2(8):41-50.)
[20] 宋明, 刘彦隆. Bert在微博短文本情感分类中的应用与优化[J]. 小型微型计算机系统, 2021, 42(4):714-718.
[20] ( Song Ming, Liu Yanlong. Application and Optimization of Bert in Sentiment Classification of Weibo Short Text[J]. Journal of Chinese Computer Systems, 2021, 42(4):714-718.)
[21] Kim Y. Convolutional Neural Networks for Sentence Classification[C]//Proceedings of the Conference on Empirical Methods in Natural Language Processing. Palo Alto,USA: AAAI Press, 2014: 1746-1751.
[22] Guo B, Zhang C, Liu J, et al. Improving Text Classification with Weighted Word Embeddings via a Multi-channel TextCNN Model[J]. Neurocomputing, 2019, 363:366-374.
doi: 10.1016/j.neucom.2019.07.052
[23] Li H. Deep Learning for Natural Language Processing: Advantages and Challenges[J]. National Science Review, 2018, 5(1):24-26.
doi: 10.1093/nsr/nwx110
[24] Lai S W, Xu L H, Liu K, et al. Recurrent Convolutional Neural Networks for Text Classification[C]//Proceedings of the 29th AAAI Conference on Artificial Intelligence. Palo Alto,USA: AAAI Press, 2015: 2267-2273.
[25] 田园, 马文. 基于Attention-BiLSTM的电网设备故障文本分类[J]. 计算机应用, 2020, 40(S2):24-29.
[25] ( Tian Yuan, Ma Wen. Attention-BiLSTM-based Fault Text Classification for Power Grid Equipment[J]. Journal of Computer Applications, 2020, 40(S2):24-29.)
[26] 姚苗, 杨文忠, 袁婷婷, 等. 自注意力机制的短文本分类算法[J]. 计算机工程与设计, 2020, 41(6):1592-1598.
[26] ( Yao Miao, Yang Wenzhong, Yuan Tingting, et al. Short Text Classification Algorithm of Self-attention Mechanism[J]. Computer Engineering and Design, 2020, 41(6):1592-1598.)
[27] 邓钰, 李晓瑜, 崔建, 等. 用于短文本情感分类的多头注意力记忆网络[J]. 计算机应用, 2021, 41(11):3132-3138.
[27] ( Deng Yu, Li Xiaoyu, Cui Jian, et al. Multi-head Attention Memory Network for Short Text Sentiment Classification[J]. Journal of Computer Applications, 2021, 41(11):3132-3138.)
[28] 陆敬筠, 龚玉. 基于自注意力的扩展卷积神经网络情感分类[J]. 计算机工程与设计, 2020, 41(6):1645-1651.
[28] ( Lu Jingyun, Gong Yu. Text Sentiment Classification Model Based on Self-attention and Expanded Convolutional Neural Network[J]. Computer Engineering and Design, 2020, 41(6):1645-1651.)
[29] Zhou P, Shi W, Tian J, et al. Attention-Based Bidirectional Long Short-Term Memory Networks for Relation Classification[C]// Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics. 2016: 207-212.
[30] Cho K, Van Merrienboer B, Gulcehre C, et al. Learning Phrase Representations Using RNN Encoder-Decoder for Statistical Machine Translation[C]//Proceedings of the Conference on Empirical Methods in Natural Language Processing. Palo Alto, USA: AAAI Press, 2014: 1724-1734.
[31] 李启行, 廖薇, 孟静雯 基于注意力机制的双通道DAC-RNN文本分类模型[J/OL]. 计算机工程与应用, 2021-04-21.
[31] ( Li Qihang, Liao Wei, Meng Jingwen. Dual-channel DAC-RNN Text Categorization Model Based on Attention Mechanism[J/OL]. Computer Engineering and Application, 2021-04-21.
[1] 陈杰,马静,李晓峰. 融合预训练模型文本特征的短文本分类方法*[J]. 数据分析与知识发现, 2021, 5(9): 21-30.
[2] 周泽聿,王昊,赵梓博,李跃艳,张小琴. 融合关联信息的GCN文本分类模型构建及其应用研究*[J]. 数据分析与知识发现, 2021, 5(9): 31-41.
[3] 范涛,王昊,吴鹏. 基于图卷积神经网络和依存句法分析的网民负面情感分析研究*[J]. 数据分析与知识发现, 2021, 5(9): 97-106.
[4] 马江微, 吕学强, 游新冬, 肖刚, 韩君妹. 融合BERT与关系位置特征的军事领域关系抽取方法*[J]. 数据分析与知识发现, 2021, 5(8): 1-12.
[5] 李文娜, 张智雄. 基于联合语义表示的不同知识库中的实体对齐方法研究*[J]. 数据分析与知识发现, 2021, 5(7): 1-9.
[6] 王昊, 林克柔, 孟镇, 李心蕾. 文本表示及其特征生成对法律判决书中多类型实体识别的影响分析[J]. 数据分析与知识发现, 2021, 5(7): 10-25.
[7] 喻雪寒, 何琳, 徐健. 基于RoBERTa-CRF的古文历史事件抽取方法研究*[J]. 数据分析与知识发现, 2021, 5(7): 26-35.
[8] 陆泉, 何超, 陈静, 田敏, 刘婷. 基于两阶段迁移学习的多标签分类模型研究*[J]. 数据分析与知识发现, 2021, 5(7): 91-100.
[9] 刘文斌, 何彦青, 吴振峰, 董诚. 基于BERT和多相似度融合的句子对齐方法研究*[J]. 数据分析与知识发现, 2021, 5(7): 48-58.
[10] 杨晗迅, 周德群, 马静, 罗永聪. 基于不确定性损失函数和任务层级注意力机制的多任务谣言检测研究*[J]. 数据分析与知识发现, 2021, 5(7): 101-110.
[11] 谢豪,毛进,李纲. 基于多层语义融合的图文信息情感分类研究*[J]. 数据分析与知识发现, 2021, 5(6): 103-114.
[12] 尹鹏博,潘伟民,张海军,陈德刚. 基于BERT-BiGA模型的标题党新闻识别研究*[J]. 数据分析与知识发现, 2021, 5(6): 126-134.
[13] 余本功,朱晓洁,张子薇. 基于多层次特征提取的胶囊网络文本分类研究*[J]. 数据分析与知识发现, 2021, 5(6): 93-102.
[14] 宋若璇,钱力,杜宇. 基于科技论文中未来工作句集的学术创新构想话题自动生成方法研究*[J]. 数据分析与知识发现, 2021, 5(5): 10-20.
[15] 韩普,张展鹏,张明淘,顾亮. 基于多特征融合的中文疾病名称归一化研究*[J]. 数据分析与知识发现, 2021, 5(5): 83-94.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
版权所有 © 2015 《数据分析与知识发现》编辑部
地址:北京市海淀区中关村北四环西路33号 邮编:100190
电话/传真:(010)82626611-6626,82624938
E-mail:jishu@mail.las.ac.cn