Please wait a minute...
浙江大学学报(工学版)  2024, Vol. 58 Issue (4): 737-747    DOI: 10.3785/j.issn.1008-973X.2024.04.009
计算机与控制工程     
基于多依赖图和知识融合的方面级情感分析模型
何勇禧(),韩虎*(),孔博
1. 兰州交通大学 电子与信息工程学院,甘肃 兰州 730070
Aspect-based sentiment analysis model based on multi-dependency graph and knowledge fusion
Yongxi HE(),Hu HAN*(),Bo KONG
1. School of Electronics and Information Engineering, Lanzhou Jiaotong University, Lanzhou 730070, China
 全文: PDF(1258 KB)   HTML
摘要:

方面级情感分析存在以下问题:句法依赖解析方式单一,语法信息的提取和利用不完善;外部知识库使用有限,无法提供足以判断情感的背景知识与信息;引入的知识过多,导致结论出现偏差. 为此提出新的方面级情感分析模型,使用2种不同的句法解析方式对句子构建2种句法依赖图. 依据外部情感知识构建情感关系图,引入概念知识图谱增强句子中的方面词本体,构建与经过概念知识图谱增强的句子对应的可见矩阵. 使用双通道图卷积神经网络处理依赖图、情感关系图与可视矩阵,融合依赖图与情感关系图,对特定方面的特征表示进行语义、句法双交互. 实验结果表明,所提模型在多个数据集上的准确率和宏F1值均显著优于主流模型.

关键词: 方面级情感分析多依赖图知识图谱图卷积网络情感知识概念知识    
Abstract:

The problems existing in aspect-based sentiment analysis include: a singular approach to syntactic dependency parsing, incomplete extraction and utilization of grammatical information; limited use of external knowledge bases, which failed to provide sufficient background knowledge and information for judging sentiment; and an excess of introduced knowledge, leading to biased conclusions. A new aspect-based sentiment analysis model was proposed, and two different syntactic parsing methods were utilized to construct two types of syntactic dependency graphs for sentences. Emotional dependency graphs were built based on external emotional knowledge, incorporating conceptual knowledge graphs to enhance aspect terms in sentences, constructing visible matrices corresponding to the sentences enhanced through conceptual knowledge graphs. A dual-channel graph convolutional neural network was employed to process the dependency graphs, the emotional dependency graphs and the visible matrices, integrating the dependency graphs with the emotional dependency graphs to perform semantic and syntactic dual interactions on specific aspect feature representations. Experimental results showed that the proposed model significantly outperformed the mainstream models in terms of accuracy and macro F1 score on multiple datasets.

Key words: aspect-based sentiment analysis    multi-dependency graph    knowledge graph    graph convolution network    affective knowledge    conceptual knowledge
收稿日期: 2023-04-13 出版日期: 2024-03-27
CLC:  TP 391.1  
基金资助: 国家自然科学基金资助项目(62166024).
通讯作者: 韩虎     E-mail: kuyuweixun@163.com;hanhu_lzjtu@mail.lzjtu.cn
作者简介: 何勇禧(1996—),男,硕士生,从事自然语言处理研究. orcid.org/0009-0009-2367-4650. E-mail:kuyuweixun@163.com
服务  
把本文推荐给朋友
加入引用管理器
E-mail Alert
作者相关文章  
何勇禧
韩虎
孔博

引用本文:

何勇禧,韩虎,孔博. 基于多依赖图和知识融合的方面级情感分析模型[J]. 浙江大学学报(工学版), 2024, 58(4): 737-747.

Yongxi HE,Hu HAN,Bo KONG. Aspect-based sentiment analysis model based on multi-dependency graph and knowledge fusion. Journal of ZheJiang University (Engineering Science), 2024, 58(4): 737-747.

链接本文:

https://www.zjujournals.com/eng/CN/10.3785/j.issn.1008-973X.2024.04.009        https://www.zjujournals.com/eng/CN/Y2024/V58/I4/737

图 1  基于多依赖图和知识融合的方面级情感分析模型的框架图
图 2  引入概念知识的例句与对应的可见矩阵
图 3  双通道图卷积网络层
数据集NposNneuNneg
训练测试训练测试训练测试
Twitter1 5611733 1273461 560173
Laptop14994341464169870128
Restaurant142 164728637196807196
Restaurant159123263634256182
Restaurant161 2604696930439117
表 1  数据集的样本标签分布
超参数数值
GloVeBERT
批量训练样本数3216
训练迭代次数100100
学习率10?310?5
丢失率0.30.2
L2正则化系数10?510?3
表 2  所提模型基于2种词嵌入的实验参数设置
%
类别模型TwitterLaptop14Restaurant14Restaurant15Restaurant16
AccMF1AccMF1AccMF1AccMF1AccMF1
GloVeLSTM69.5667.7069.2863.0978.1367.4777.3755.1786.8063.88
IAN72.5070.8172.0567.3879.2670.0978.5452.6584.7455.21
ASGCN72.1570.4075.5571.0580.7772.0279.8961.8988.9967.48
kumaGCN72.4570.7776.1272.4281.4373.6480.6965.9989.3973.19
SKGCN71.9770.2273.2069.1880.3670.4380.1260.7085.1768.08
CDT72.8771.4075.8971.8481.4673.5980.2561.9286.6570.18
MI-GCN73.3172.1276.5972.4482.3274.3180.8164.2189.5071.97
DGAT73.9972.5376.4972.7582.6875.53
MDKGCN74.2872.6878.0674.6182.4174.3481.9266.8590.2675.52
BERTBERT-BASE73.7071.5077.7473.3082.6873.5481.3463.5788.8968.19
SK-GCN-BERT75.0073.0179.0075.5783.4875.1983.2066.7887.1972.02
WGAT-BERT76.2574.5680.4977.2185.7180.23
SSEMGAT-BERT76.8176.1080.0676.7886.4279.70
MFSGC-BERT75.4172.9878.5374.9185.7179.5583.5868.3791.0776.09
MDKGCN-BERT76.3075.3180.4177.6086.7080.9385.6172.5491.0776.70
表 3  不同模型在5个数据集上的分类准确率和宏观F1 分数对比
%
模型TwitterLaptop14Restaurant14Restaurant15Restaurant16
AccMF1AccMF1AccMF1AccMF1AccMF1
W/O Concept73.5571.7976.6572.7282.3273.9481.7364.3889.7773.34
W/O MS_Matrix73.8471.8276.4972.6082.2373.7780.0765.0089.9472.86
W/O Stanza72.9871.6176.4971.7781.9673.3980.4463.8089.4572.96
W/O spaCy73.2771.7576.1872.5481.1673.5979.7064.1988.8070.50
W/O Sentic72.9871.0876.6572.9981.7073.2379.7064.4189.2973.26
MDKGCN74.2872.6878.0674.6182.4174.5181.9266.8590.2675.52
表 4  所提模型在5个数据集上的消融实验结果
%
模型TwitterLaptop14Restaurant14Restaurant15Restaurant16
AccMF1AccMF1AccMF1AccMF1AccMF1
BERT-BASE(S)73.7071.5077.7473.3082.6873.5481.3463.5788.8968.19
+GCN75.7274.3979.0074.8283.5775.5981.9268.6788.9671.97
+MDKGCN76.1674.5779.3174.9685.4578.3083.3971.6890.2675.82
BERT-BASE (D)75.0072.5378.6874.6484.5577.3483.4065.2889.5470.47
+GCN75.1473.8379.1575.5684.2977.6884.1369.4989.7776.64
+MDKGCN76.3075.3180.4177.6086.7080.9385.6172.5491.0776.70
表 5  所提模型使用BERT时在5个数据集上的消融实验结果
%
类别模型Acc
Laptop14Restaurant14
GPT-3Davinci79.0010.00
Text-Davinci-00183.9189.73
Code-Davinci-00290.7293.00
Text-Davinci-00286.4891.26
Text-Davinci-00384.1288.78
GPT-3.5-Turbo85.1191.02
BERTBERT-BASE77.7482.68
MDKGCN-BERT80.4186.70
表 6  所提模型与大型语言模型的对比实验结果
图 4  图卷积网络层数对准确率和宏F1值的影响
图 5  外部知识对准确率和宏F1值的影响
图 6  概念知识融合方式对准确率和宏F1值的影响
图 7  方面词“food”注意力权重对比
图 8  方面词“sitting space”注意力权重对比
1 余传明 基于深度循环神经网络的跨领域文本情感分析[J]. 图书情报工作, 2018, 62 (11): 23- 34
YU Chuanming A cross-domain text sentiment analysis based on deep recurrent neural network[J]. Library and Information Service, 2018, 62 (11): 23- 34
2 KIPF T, WELLING M. Semi-supervised classification with graph convolutional networks [C]// The 5th International Conference on Learning Representations . Toulon: ICLR, 2017.
3 程艳芬, 吴家俊, 何凡 基于关系门控图卷积网络的方面级情感分析[J]. 浙江大学学报: 工学版, 2023, 57 (3): 437- 445
CHENG Yanfen, WU Jiajun, HE Fan Aspect level sentiment analysis based on relation gated graph convolutional network[J]. Journal of Zhejiang University: Engineering Science, 2023, 57 (3): 437- 445
4 王婷, 朱小飞, 唐顾 基于知识增强的图卷积神经网络的文本分类[J]. 浙江大学学报: 工学版, 2022, 56 (2): 322- 328
WANG Ting, ZHU Xiaofei, TANG Gu Knowledge-enhanced graph convolutional neural networks for text classification[J]. Journal of Zhejiang University: Engineering Science, 2022, 56 (2): 322- 328
5 夏鸿斌, 顾艳, 刘渊 面向特定方面情感分析的图卷积过度注意(ASGCN-AOA)模型[J]. 中文信息学报, 2022, 36 (3): 146- 153
XIA Hongbin, GU Yan, LIU Yuan Graph convolution overattention (ASGCN-AOA) model for specific aspects of sentiment analysis[J]. Journal of Chinese Information Processing, 2022, 36 (3): 146- 153
6 ZHANG Y, QI P, MANNING C D. Graph convolution over pruned dependency trees improves relation extraction [C]// Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing . Brussels: Association for Computational Linguistics, 2018: 2205–2215.
7 王汝言, 陶中原, 赵容剑 多交互图卷积网络用于方面情感分析[J]. 电子与信息学报, 2022, 44 (3): 1111- 1118
WANG Ruyan, TAO Zhongyuan, ZHAO Rongjian Multi-interaction graph convolutional networks for aspect-level sentiment analysis[J]. Journal of Electronics and Information Technology, 2022, 44 (3): 1111- 1118
8 ZHANG C, LI Q, SONG D. Aspect-based sentiment classification with aspect-specific graph convolutional networks [C]// Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing . Hong Kong: Association for Computational Linguistics, 2019: 4568–4578.
9 SUN K, ZHANG R, MENSAH S, et al. Aspect-level sentiment analysis via convolution over dependency tree [C]// Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing . Hong Kong: Association for Computational Linguistics, 2019: 5679–5688.
10 WANG K, SHEN W, YANG Y, et al. Relational graph attention network for aspect-based sentiment analysis [C]// Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics . [S.l.]: Association for Computational Linguistics, 2020: 3229–3238.
11 HE L, LEE K, LEWIS M, et al. Deep semantic role labeling: what works and what’s next [C]// Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) . Vancouver : Association for Computational Linguistics, 2017: 473−483.
12 SACHAN D S, ZHANG Y, QI P, et al. Do syntax trees help pre-trained transformers extract information? [C]// Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume . [S.l.]: Association for Computational Linguistics, 2021: 2647–2661.
13 LIU W, ZHOU P, ZHAO Z, et al. K-BERT: enabling language representation with knowledge graph [C]// Proceedings of the AAAI Conference on Artificial Intelligence . [S.l.]: AAAI, 2020: 2901−2908.
14 孙佳慧, 韩萍, 程争 基于知识迁移和注意力融合的方面级文本情感分析[J]. 信号处理, 2021, 37 (8): 1384- 1391
SUN Jiahui, HAN Ping, CHENG Zheng Aspect-level sentiment analysis based on knowledge transfer and attention fusion[J]. Journal of Signal Processing, 2021, 37 (8): 1384- 1391
15 REN Z, ZENG G, CHEN L, et al A lexicon-enhanced attention network for aspect-level sentiment analysis[J]. IEEE Access, 2020, 8: 93464- 93471
doi: 10.1109/ACCESS.2020.2995211
16 VALLE-CRUZ D, FERNANDEZ-CORTEZ V, LÓPEZ-CHAU A, et al Does Twitter affect stock market decisions? Financial sentiment analysis during pandemics: a comparative study of the h1n1 and the covid-19 periods[J]. Cognitive Computation, 2022, 14: 372- 378
doi: 10.1007/s12559-021-09819-8
17 DISTANTE D, FARALLI S, RITTINGHAUS S, et al DomainSenticNet: an ontology and a methodology enabling domain-aware sentic computing[J]. Cognitive Computation, 2022, 14: 62- 77
doi: 10.1007/s12559-021-09825-w
18 BIAN X, FENG C, AHMAD A, et al. Targeted sentiment classification with knowledge powered attention network [C]// 2019 IEEE 31st International Conference on Tools with Artificial Intelligence . Portland: IEEE, 2019: 1073−1080.
19 CAMBRIA E, LI Y, XING F Z, et al. SenticNet 6: ensemble application of symbolic and subsymbolic ai for sentiment analysis [C]// Proceedings of the 29th ACM international conference on information and knowledge management . [S.l.]: ACM, 2020: 105−114.
20 LIANG B, SU H, GUI L, et al Aspect-based sentiment analysis via affective knowledge enhanced graph convolutional networks[J]. Knowledge-Based Systems, 2022, 235: 107643
doi: 10.1016/j.knosys.2021.107643
21 WANG Z, WANG H, WEN J R, et al. An inference approach to basic level of categorization [C]// Proceedings of the 24th ACM International on Conference on Information and Knowledge Management . [S.l.]: ACM, 2015: 653−662.
22 PENNINGTON J, SOCHER R, MANNING C. GloVe: global vectors for word representation [C]// Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing . Doha: Association for Computational Linguistics, 2014: 1532−1543.
23 DEVLIN J, CHANG M W, LEE K, et al. BERT: pre-training of deep bidirectional transformers for language understanding [C]// Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers) . Minneapolis: Association for Computational Linguistics, 2019: 4171–4186.
24 TANG D, QIN B, FENG X, et al. Effective LSTMs for target-dependent sentiment classification [C]// Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers . Osaka: The COLING 2016 Organizing Committee, 2016: 3298–3307
25 ALTINOK D. Mastering spaCy: an end-to-end practical guide to implementing NLP applications using the Python ecosystem [M]. [S.l.]: Packt Publishing, 2021.
26 QI P, ZHANG Y, ZHANG Y, et al. Stanza: a Python natural language processing toolkit for many human languages [C]// Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Demonstrations . [S.l.]: Association for Computational Linguistics, 2020: 101–108.
27 DONG L, WEI F, TAN C, et al. Adaptive recursive neural network for target-dependent Twitter sentiment classification [C]// Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers) . Baltimore: Association for Computational Linguistics, 2014: 49−54.
28 PONTIKI M, GALANIS D, PAVLOPOULOS J, et al. Semeval-2014 task 4: aspect based sentiment analysis [C]// Proceedings of the 8th International Workshop on Semantic Evaluation (SemEval-2014) . Dublin: Association for Computational Linguistics, 2014: 27−35.
29 PONTIKI M, GALANIS D, PAPAGEORGIOU H, et al. SemEval-2015 task 12: aspect based sentiment analysis [C]// Proceedings of the 9th International Workshop on Semantic Evaluation (SemEval 2015) . Denver: Association for Computational Linguistics, 2015: 486−495.
30 PONTIKI M, GALANIS D, PAPAGEORGIOU H, et al. SemEval-2016 task 5: aspect based sentiment analysis [C]// Proceedings of the 10th International Workshop on Semantic Evaluation (SemEval-2016) . San Diego: Association for Computational Linguistics, 2016: 19−30.
31 MA D, LI S, ZHANG X, et al. Interactive attention networks for aspect-level sentiment classification [C]// Proceedings of the 26th International Joint Conference on Artificial Intelligence . [S. l.]: AAAI, 2017: 4068–4074.
32 CHEN C, TENG Z, ZHANG Y. Inducing target-specific latent structures for aspect sentiment classification [C]// Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing . [S.l.] : Association for Computational Linguistics, 2020: 5596−5607.
33 ZHOU J, HUANG J X, HU Q V, et al SK-GCN: modeling syntax and knowledge via graph convolutional network for aspect-level sentiment classification[J]. Knowledge-Based Systems, 2020, 205: 106292
doi: 10.1016/j.knosys.2020.106292
34 崔少国, 陈思奇, 杜兴 面向目标情感分析的双重图注意力网络模型[J]. 西安电子科技大学学报, 2023, 50 (1): 137- 148
CUI Shaoguo, CHEN Siqi, DU Xing Dual graph attention networks model for target sentiment analysis[J]. Journal of Xidian University, 2023, 50 (1): 137- 148
35 XIN X, WUMAIER A, KADEER Z, et al SSEMGAT: syntactic and semantic enhanced multi-layer graph attention network for aspect-level sentiment analysis[J]. Applied Sciences, 2023, 13 (8): 5085
doi: 10.3390/app13085085
36 JIANG T, WANG Z, YANG M, et al Aspect-based sentiment analysis with dependency relation weighted graph attention[J]. Information, 2023, 14 (3): 185
doi: 10.3390/info14030185
37 谷雨影, 高美凤 融合词性与外部知识的方面级情感分析[J]. 计算机科学与探索, 2013, 17 (10): 2488- 2498
GU Yuying, GAO Meifeng Aspect-level sentiment analysis combining part-of-speech and external knowledge[J]. Journal of Frontiers of Computer Science and Technology, 2013, 17 (10): 2488- 2498
38 BROWN T, MANN B, RYDER N, et al Language models are few-shot learners[J]. Advances in Neural Information Processing Systems, 2020, 33: 1877- 1901
39 OUYANG L, WU J, JIANG X, et al Training language models to follow instructions with human feedback[J]. Advances in Neural Information Processing Systems, 2022, 35: 27730- 27744
[1] 李松,王哲,张丽平. SL-tgStore:新的时序知识图谱存储模型[J]. 浙江大学学报(工学版), 2024, 58(3): 449-458.
[2] 申自浩,唐雨雨,王辉,刘沛骞,刘琨. 基于聚类和深度学习的车联网轨迹隐私保护机制[J]. 浙江大学学报(工学版), 2024, 58(1): 20-28.
[3] 王慧欣,童向荣. 融合知识图谱的推荐系统研究进展[J]. 浙江大学学报(工学版), 2023, 57(8): 1527-1540.
[4] 孟闯,王慧. 多信息融合的时空图卷积交通流量预测模型[J]. 浙江大学学报(工学版), 2023, 57(8): 1541-1550.
[5] 李松,舒世泰,郝晓红,郝忠孝. 融合文本描述和层次类型的知识表示学习方法[J]. 浙江大学学报(工学版), 2023, 57(5): 911-920.
[6] 程艳芬,吴家俊,何凡. 基于关系门控图卷积网络的方面级情感分析[J]. 浙江大学学报(工学版), 2023, 57(3): 437-445.
[7] 邢雪琪,丁雨童,夏唐斌,潘尔顺,奚立峰. 基于知识图谱的商用飞机维修方案推荐系统集成建模[J]. 浙江大学学报(工学版), 2023, 57(3): 512-521.
[8] 苏丰龙,景宁. 基于关系聚合的时序知识图谱表示学习[J]. 浙江大学学报(工学版), 2023, 57(2): 235-242.
[9] 张京京,张兆功,许鑫. 融合图增强和采样策略的图卷积协同过滤模型[J]. 浙江大学学报(工学版), 2023, 57(2): 243-251.
[10] 顾桂梅,贾耀华,赵岩浩,张文辉,闫炳旭. 基于组合零样本学习的接触网吊弦线缺陷识别[J]. 浙江大学学报(工学版), 2023, 57(11): 2285-2293.
[11] 林栋,李永强,仇翔,冯远静,谢碧峰. 结合静态事实和重复历史事实的动态知识图谱推理方法[J]. 浙江大学学报(工学版), 2023, 57(10): 1915-1922.
[12] 凤丽洲,杨阳,王友卫,杨贵军. 基于Transformer和知识图谱的新闻推荐新方法[J]. 浙江大学学报(工学版), 2023, 57(1): 133-143.
[13] 侯越,韩成艳,郑鑫,邓志远. 基于时空融合图卷积的交通流数据修复方法[J]. 浙江大学学报(工学版), 2022, 56(7): 1394-1403.
[14] 郭策,曾志文,朱鹏铭,周智千,卢惠民. 基于图卷积模仿学习的分布式群集控制[J]. 浙江大学学报(工学版), 2022, 56(6): 1055-1061.
[15] 王友卫,童爽,凤丽洲,朱建明,李洋,陈福. 基于图卷积网络的归纳式微博谣言检测新方法[J]. 浙江大学学报(工学版), 2022, 56(5): 956-966.