Journal of Computer Applications ›› 2024, Vol. 44 ›› Issue (6): 1796-1806.DOI: 10.11772/j.issn.1001-9081.2023060733

Special Issue: 人工智能

• Artificial intelligence • Previous Articles     Next Articles

Dual-channel sentiment analysis model based on improved prompt learning method

Junfeng SHEN(), Xingchen ZHOU, Can TANG   

  1. School of Artificial Intelligence,Hubei Univerity,Wuhan Hubei 430062,China
  • Received:2023-06-09 Revised:2023-08-13 Accepted:2023-08-15 Online:2023-09-14 Published:2024-06-10
  • Contact: Junfeng SHEN
  • About author:ZHOU Xingchen, born in 1998, M. S. candidate. His research interests include text classification, text sentiment analysis.
    TANG Can, born in 1998, M. S. candidate. His research interests include natural language processing, text sentiment analysis.
  • Supported by:
    Innovation and Entrepreneurship Training Program for College Students of Hubei University(X202110512067)

基于改进的提示学习方法的双通道情感分析模型

沈君凤(), 周星辰, 汤灿   

  1. 湖北大学 人工智能学院,武汉 430062
  • 通讯作者: 沈君凤
  • 作者简介:周星辰(1998—),男,湖北襄阳人,硕士研究生,主要研究方向:文本分类、文本情感分析
    汤灿(1998—),男,湖北黄石人,硕士研究生,主要研究方向:自然语言处理、文本情感分析。
  • 基金资助:
    湖北大学大学生创新创业训练项目(X202110512067)

Abstract:

Aiming at the problems of long template iterative update cycle and poor generalization ability in the previous prompt learning method, a dual-channel sentiment analysis model was proposed based on the improved prompt learning method.First, The serialized prompt templates and the input word vectors were introduced into the attention mechanism structure, and meanwhile, the templates were iteratively updated as the input word vectors were updated in the multi-layer attention mechanism. Then, the semantic information was extracted by the ALBERT (A Lite BERT (Bidirectional Encoder Representations from Transformers)) model in another channel. Finally, the extracted semantic features were integrated to improve the generalization ability of the overall model. The model was tested on the Laptop and Restaurants datasets in SemEval2014, the ACL’s (Association for Computational Linguistics) Twitter dataset, and the SST-2 dataset created by Stanford University. The proposed model achieved the classification accuracy of 80.88%, 91.78%, 76.78% and 95.53%, respectively; compared with the baseline model BERT_Large, it increased the classification accuracy by 0.99%, 1.13%, 3.39% and 2.84% respectively; compared with P-tuning v2, the proposed model had 2.88%, 3.60% and 2.06% improvements in classification accuracy on Restaurants, Twitter, and SST-2 datasets respectively, and it reached the convergence state earlier than the original method.

Key words: prompt learning, Bidirectional Encoder Representations from Transformers (BERT), A Lite BERT (ALBERT), adversarial training, Graph Convolutional neural Network (GCN)

摘要:

针对先前提示学习方法中存在的模板迭代更新周期长、泛化能力差等问题,基于改进的提示学习方法提出一种双通道的情感分析模型。首先,将序列化后的提示模板与输入词向量一起引入注意力机制结构,在输入词向量在多层注意力机制中更新的同时迭代更新提示模板;其次,在另一通道采用ALBERT(A Lite BERT (Bidirectional Encoder Representations from Transformers))模型提取语义信息;最后,输出用集成方式提取的语义特征,提升整体模型的泛化能力。所提模型在SemEval2014的Laptop和Restaurants数据集、ACL(Association for Computational Linguistics)的Twitter数据集和斯坦福大学创建的SST-2数据集上进行实验,分类准确率达到80.88%、91.78%、76.78%和95.53%,与基线模型BERT_Large相比,分别提升0.99%、1.13%、3.39%和2.84%;与P-tuning v2相比,所提模型的分类准确率在Restaurants数据集、Twitter数据集以及SST-2数据集上分别有2.88%、3.60%和2.06%的提升,且比原方法更早达到收敛状态。

关键词: 提示学习, BERT, ALBERT, 对抗训练, 图卷积神经网络

CLC Number: