Journal of Computer Applications ›› 0, Vol. ›› Issue (): 35-43.DOI: 10.11772/j.issn.1001-9081.2024050594

• Artificial intelligence • Previous Articles     Next Articles

Aspect-based sentiment analysis with syntactic prompt

Wei ZHANG1, Zhuyu CHU1, Xueqi CHEN1, Xuehui FU1, Chenchen WANG2(), Chen LI2, Haiyan WU2   

  1. 1.Zhejiang Zheneng Linhai Offshore Wind Power Company Limited,Taizhou Zhejiang 317000,China
    2.School of Information Management and Artificial Intelligence,Zhejiang University of Finance and Economics,Hangzhou Zhejiang 310018,China
  • Received:2024-05-06 Revised:2024-07-10 Accepted:2024-07-11 Online:2025-01-24 Published:2024-12-31
  • Contact: Chenchen WANG

基于句法提示的细粒度情感分析

章巍1, 储著宇1, 陈学奇1, 傅学辉1, 王晨晨2(), 李晨2, 吴海燕2   

  1. 1.浙江浙能临海海上风力发电有限公司,浙江 台州 317000
    2.浙江财经大学 信息管理与人工智能学院,杭州 310018
  • 通讯作者: 王晨晨
  • 作者简介:章巍(1973—),男,浙江宁波人,高级工程师,硕士,主要研究方向:发电系统规划与建设、电力系统与人工智能
    储著宇(1981—),男,安徽潜山人,高级工程师,硕士,主要研究方向:发电厂继电保护、调度数据网自动化
    陈学奇(1980—),男,浙江临海人,工程师,主要研究方向:发电厂智能检测与智能控制
    傅学辉(1985—),男,浙江台州人,工程师,主要研究方向:发电厂继电保护、调度数据网自动化
    王晨晨(2003—),男,浙江杭州人,主要研究方向:自然语言处理、情感计算
    李晨(1999—),男,内蒙古乌海人,硕士,主要研究方向:情感计算
    吴海燕(1985—),女,陕西延安人,讲师,博士,CCF会员,主要研究方向:自然语言处理。
  • 基金资助:
    国家自然科学基金资助项目(62306267);浙江省自然科学基金资助项目(LY22F020027)

Abstract:

The core idea of prompt tuning is to insert a prompt template into the original input text and convert the classification problem into a language model containing mask code to predict the occurrence probability of the mask code in a sentence. In Aspect-Based Sentiment Analysis (ABSA) tasks, determining appropriate prompt templates requires corresponding syntactic knowledge, and constructing effective sentiment labels is very time-consuming. Furthermore, the semantic information and priori knowledge contained in complex implicit sentimental opinions cannot be ignored. Therefore, a syntactic prompt template was introduced, which incorporated syntactic knowledge (such as phrase structure and dependency relations) into the prompt templates for sentimental opinion mining related to sentiment aspect words to enhance the capture of explicit or implicit sentiment relation pairs. Experimental results on four publicly available datasets show that the proposed syntactic knowledge fused prompt model, SynPrompt (Syntax aware Prompt-tuning), is effective; and compared to dotGCN (discrete opinion tree Graph Convolutional Network),DualGCN (Dual Graph Convolutional Network), and dotGCN models, it has improvements of 0.81%, 0.27%, and 0.09% in accuracy, respectively. In addition, results of ablation experiments and case studies demonstrate that syntactic knowledge is effective on both explicit and implicit sentimental prompts. With 8-shot, by means of data augmentation, the F1 scores of SynPrompt model are improved by 31.62%, 42.02%, 121.04%, and 35.01% on the four datasets, respectively. However, with 16 and 32-shot, the accuracies of SynPrompt model are not improved significantly, indicating that the data augmentation approach is effective on few-shot datasets and enhances the ability of SynPrompt model to capture information.

Key words: syntactic information, prompt fine-tuning, few-shot learning, knowledge base enhancement, sentiment analysis

摘要:

提示微调的核心思想是在原输入文本中插入提示模板,并将分类问题转换为含有遮掩码的语言模型预测遮掩码在句子中出现的概率。细粒度情感分析(ABSA)任务中,确定一个合适的提示模板需要相应的句法知识,而构建有效的情感标签非常耗时,而且不能忽略复杂的隐式情感观点中蕴含的语义信息和先验知识。因此,介绍一个句法提示模板,该模板将句法知识(如短语结构、依存关系)融合到情感方面词相关的情感观点挖掘的提示模板中,以增强显式或隐式情感关系对的捕获。在4个公开数据集上的实验结果表明,所提融合句法知识的提示模型SynPrompt (Syntax aware Prompt-tuning)是有效的,它在Restaurant、Laptop和MAMS数据集上分别与dotGCN (Discrete Opinion Tree Graph Convolutional Network)、DualGCN (Dual Graph Convolutional Network)和dotGCN模型相比准确率分别提升了0.81%、0.27%和0.09%。此外,消融实验和案例分析的结果表明了句法知识在显式和隐式情感提示上都是有效的。在8-Shot时,通过数据增强的方式使SynPrompt模型在4个数据集上的F1分数分别提升了31.62%、42.02%、121.04%和35.01%;然而在16、32-shot时,SynPrompt模型的准确率并没有显著提升。这说明数据增强的方式在小样本数据集上是有效的,并增强了句法提示SynPrompt模型捕获信息的能力。

关键词: 句法信息, 提示微调, 小样本学习, 知识库增强, 情感分析

CLC Number: