Please wait a minute...
Journal of ZheJiang University (Engineering Science)  2024, Vol. 58 Issue (4): 737-747    DOI: 10.3785/j.issn.1008-973X.2024.04.009
    
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
Download: HTML     PDF(1258KB) HTML
Export: BibTeX | EndNote (RIS)      

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 wordsaspect-based sentiment analysis      multi-dependency graph      knowledge graph      graph convolution network      affective knowledge      conceptual knowledge     
Received: 13 April 2023      Published: 27 March 2024
CLC:  TP 391.1  
Fund:  国家自然科学基金资助项目(62166024).
Corresponding Authors: Hu HAN     E-mail: kuyuweixun@163.com;hanhu_lzjtu@mail.lzjtu.cn
Cite this article:

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.

URL:

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


基于多依赖图和知识融合的方面级情感分析模型

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


关键词: 方面级情感分析,  多依赖图,  知识图谱,  图卷积网络,  情感知识,  概念知识 
Fig.1 Framework diagram of aspect-based sentiment analysis model based on multi-dependency graph and knowledge fusion
Fig.2 Example sentences introducing conceptual knowledge and corresponding visible matrix
Fig.3 Dual-channel graph convolutional network layer
数据集NposNneuNneg
训练测试训练测试训练测试
Twitter1 5611733 1273461 560173
Laptop14994341464169870128
Restaurant142 164728637196807196
Restaurant159123263634256182
Restaurant161 2604696930439117
Tab.1 Sample label distribution for each dataset
超参数数值
GloVeBERT
批量训练样本数3216
训练迭代次数100100
学习率10?310?5
丢失率0.30.2
L2正则化系数10?510?3
Tab.2 Experimental parameter settings for proposed model based on two types of word embeddings
%
类别模型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
Tab.3 Comparison of classification accuracy and macro F1 score of different models in five datasets
%
模型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
Tab.4 Ablation experimental results of proposed model in five datasets
%
模型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
Tab.5 Ablation experimental results for proposed model with BERT in five different datasets
%
类别模型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
Tab.6 Comparative experimental results between proposed model and large language models
Fig.4 Effect of graph convolutional networks layers on accuracy and macro F1 score
Fig.5 Effect of external knowledge on accuracy and macro F1 score
Fig.6 Effect of concept knowledge fusion method on accuracy and macro F1 score
Fig.7 Comparison of attention weights for aspect word "food"
Fig.8 Comparison of attention weights for aspect word “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] Song LI,Zhe WANG,Liping ZHANG. SL-tgStore: new temporal knowledge graph storage model[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(3): 449-458.
[2] Hui-xin WANG,Xiang-rong TONG. Research progress of recommendation system based on knowledge graph[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(8): 1527-1540.
[3] Song LI,Shi-tai SHU,Xiao-hong HAO,Zhong-xiao HAO. Knowledge representation learning method integrating textual description and hierarchical type[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(5): 911-920.
[4] Xue-qi XING,Yu-tong DING,Tang-bin XIA,Er-shun PAN,Li-feng XI. Integrated modeling of commercial aircraft maintenance plan recommendation system based on knowledge graph[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(3): 512-521.
[5] Feng-long SU,Ning JING. Temporal knowledge graph representation learning based on relational aggregation[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(2): 235-242.
[6] Gui-mei GU,Yao-hua JIA,Yan-hao ZHAO,Wen-hui ZHANG,Bing-xu YAN. Defect identification for catenary dropper line based on compositional zero-shot learning[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(11): 2285-2293.
[7] Dong LIN,Yong-qiang LI,Xiang QIU,Yuan-jing FENG,Bi-feng XIE. Dynamic knowledge graph inference method combining static facts and repeated historical facts[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(10): 1915-1922.
[8] Li-zhou FENG,Yang YANG,You-wei WANG,Gui-jun YANG. New method for news recommendation based on Transformer and knowledge graph[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(1): 133-143.
[9] Cheng CHEN,Hao ZHANG,Yong-qiang LI,Yuan-jing FENG. Knowledge graph link prediction based on relational generative graph attention network[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(5): 1025-1034.