Please wait a minute...
Journal of ZheJiang University (Engineering Science)  2026, Vol. 60 Issue (6): 1269-1276    DOI: 10.3785/j.issn.1008-973X.2026.06.014
    
Aspect-based sentiment analysis via knowledge-enhanced graph Transformer
Wenjun ZHENG1,2(),Zhikun LI1,Shoufei HAN1,2,3,*()
1. School of Artificial Intelligence, Anhui University of Science and Technology, Hefei 231131, China
2. State Key Laboratory of Digital Intelligent Technology for Unmanned Coal Mining, Anhui University of Science and Technology, Huainan 232001, China
3. Key Laboratory of Computing Power Network and Information Security, Ministry of Education, Qilu University of Technology (Shandong Academy of Sciences), Jinan 250300, China
Download: HTML     PDF(865KB) HTML
Export: BibTeX | EndNote (RIS)      

Abstract  

A knowledge-enhanced graph Transformer network (K-GTNet) was proposed in order to address the reasoning limitation of existing aspect-based sentiment analysis method caused by insufficient feature interaction and lack of knowledge utilization. A logical framework of “prior knowledge guidance–local syntactic modeling–global semantic reasoning” was constructed to achieve a deep understanding of complex textual sentiment. External sentiment knowledge and internal syntactic structure were fused to construct a graph representation with edge dependency weight. Neighborhood information was aggregated on this graph through a graph neural network, and local sentiment feature centered on aspect term was captured. The extracted local-aware feature sequence was fed into a Transformer. Global contextual dependency was built through self-attention mechanism, and robust aspect sentiment polarity classification was achieved. Experiments conducted on five benchmark datasets demonstrated that K-GTNet achieved average accuracy of 84.95% and F1 of 77.96%, outperforming mainstream baseline model.



Key wordsnatural language processing      sentiment analysis      knowledge enhancement      graph neural network      Transformer     
Received: 02 August 2025      Published: 06 May 2026
CLC:  TP 391  
Fund:  安徽理工大学青年基金资助项目(QNYB202204);国家自然科学基金资助项目(62306279);中国博士后面上基金资助项目(2424M760592);算力互联网与信息安全教育部重点实验室开放基金资助项目(2024Y005).
Corresponding Authors: Shoufei HAN     E-mail: zwj@aust.edu.cn;hanshoufei@gmail.com
Cite this article:

Wenjun ZHENG,Zhikun LI,Shoufei HAN. Aspect-based sentiment analysis via knowledge-enhanced graph Transformer. Journal of ZheJiang University (Engineering Science), 2026, 60(6): 1269-1276.

URL:

https://www.zjujournals.com/eng/10.3785/j.issn.1008-973X.2026.06.014     OR     https://www.zjujournals.com/eng/Y2026/V60/I6/1269


知识增强图Transformer的方面级情感分析

针对现有方面级情感分析方法因特征交互不足与知识利用缺失而导致的推理局限,提出知识增强的图Transformer网络(K-GTNet). 通过构建“先验知识引导—局部句法建模—全局语义推理”的逻辑框架,实现对复杂文本情感的深入理解. 该方法融合外部情感知识与内部句法结构,构建带有边依赖权重的图表示. 通过图神经网络在该图上进行邻域信息聚合,捕捉以方面词为中心的局部情感特征. 将提取的局部感知特征序列输入Transformer,通过自注意力机制建立全局上下文依赖,实现鲁棒的方面情感极性判别. 在5个基准数据集上进行实验验证,K-GTNet的平均准确率达到84.95%,F1达到77.96%,优于主流的基线模型.


关键词: 自然语言处理,  情感分析,  知识增强,  图神经网络,  Transformer 
Fig.1 Model architecture of knowledge-enhanced graph Transformer for aspect-based sentiment analysis
数据集正向负向中性
训练集测试集训练集测试集训练集测试集
Restaurant142164728807196637196
Laptop14994341870128464169
Twitter156117315601733127346
Restaurant159123262561823634
Restaurant1612404694391176930
Tab.1 Statistical information of aspect-based sentiment analysis dataset
嵌入方式模型Restaurant14Laptop14TwitterRestaurant15Restaurant16
AccF1AccF1AccF1AccF1AccF1
GloVeSenticGCN (2021)0.81340.73070.76020.72070.72540.70460.80630.65110.88960.7096
SSEGCN (2022)0.82930.75390.78480.74530.76120.74790.80260.65250.90580.7579
KGAN (2023)0.83250.75260.78280.74520.77270.76190.80760.62330.89220.7151
DualGCN (2024)0.82660.74450.76740.73560.75180.73710.80260.66850.89120.7416
TextGT (2024)0.83290.76640.77370.73420.75480.74090.79340.61610.87340.7273
DAGCN (2024)0.82040.73940.75790.71850.76670.75420.81370.65780.87180.6855
K-GTNet (本文)0.84270.77600.78160.74850.76930.75500.81470.66410.89980.7681
BERTSenticGCN (2021)0.85800.78400.77740.73360.74280.73290.84130.68030.90750.7461
SSEGCN (2022)0.85180.77420.80490.76830.77030.75990.84870.72610.92370.7654
GMF-SKIA (2023)0.84190.78360.78690.75570.74120.7321
KGAN (2023)0.86180.80850.81090.77770.80260.79390.85840.72940.92810.8141
TextGT (2024)0.85610.79940.81170.77710.77400.76160.85980.70750.91560.7762
DAGCN (2024)0.81950.70100.80850.77220.73410.72070.82840.63340.92370.7901
WordTransABSA (2024)0.85540.79110.78400.74830.74880.7651
LSOIT (2024)0.86070.80370.78990.75580.77600.7651
K-GTNet (本文)0.86420.81150.82010.78620.77870.76740.85690.72130.92750.8116
Tab.2 Comparison result with baseline model on five datasets
模型Restaurant14Laptop14Twitter
AccF1AccF1AccF1
K-GTNet0.84270.77600.78160.74850.76930.7550
K-GTNet w/o Graph0.81960.72590.75480.71980.73630.7249
K-GTNet w/o Transformer0.80250.71020.73420.69360.71850.7082
K-TGNet0.81110.72880.75000.71200.73030.7211
K-GTNet w/o AK0.83290.76640.77370.73420.75480.7409
K-GTNet w/o SK0.82580.73070.76020.72130.74290.7228
Tab.3 Ablation experiment result of K-GTNet
Fig.2 Effect of number of GTM layer on accuracy
Fig.3 Attention visualization result
模型ttrain/sttest/s
SenticNet531.730.44
SSEGCN695.940.33
KGAN2786.242.44
DualGCN747.940.64
TextGT864.970.78
DAGCN1021.290.55
K-GTNet775.430.64
Tab.4 Running time result on Laptop14 dataset
序号句子真实极性SenticGCNKGANTextGTLSOITK-GTNet
1I trust the people at Go Sushi , it never disappoints .正向×
2mariah carey Welocmes Twins : Price William asked Kate Middleton if their
first public kiss as a married couple was ' , , .
中性×
3Put a SSD and use a 21 ' ' LED screen , this set up is silky smooth !中性,中性,正向√,×,√√,√,×√,×,×√,√,×√,√,√
4The Apple engineers have not yet discovered the delete key .负向×
5just started liking two songs i hated when they first came out - britney spears ,
sexy bitch - david guetta feat akon .
负向××
Tab.5 Case analysis result of K-GTNet and comparative model on dataset
[21]   ZHAO A, YU Y Knowledge-enabled BERT for aspect-based sentiment analysis[J]. Knowledge-Based Systems, 2021, 227: 107220
doi: 10.1016/j.knosys.2021.107220
[22]   ZHANG Z, ZHOU Z, WANG Y. SSEGCN: syntactic and semantic enhanced graph convolutional network for aspect-based sentiment analysis [C]//Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. Seattle: ACL, 2022: 4916–4925.
[23]   HAN Y, ZHOU X, WANG G, et al Fusing sentiment knowledge and inter-aspect dependency based on gated mechanism for aspect-level sentiment classification[J]. Neurocomputing, 2023, 551: 126462
doi: 10.1016/j.neucom.2023.126462
[24]   WU H, ZHOU D, SUN C, et al LSOIT: lexicon and syntax enhanced opinion induction tree for aspect-based sentiment analysis[J]. Expert Systems with Applications, 2024, 235: 121137
doi: 10.1016/j.eswa.2023.121137
[1]   LIU X, HOU R, GAN Y, et al. Aspect-oriented opinion alignment network for aspect-based sentiment classification [C]//Proceedings of the 26th European Conference on Artificial Intelligence. Ohmsha: IOS, 2023: 1552-1559.
[2]   陈巧红, 孙佳锦, 漏杨波, 等 基于多任务学习与层叠Transformer的多模态情感分析模型[J]. 浙江大学学报: 工学版, 2023, 57 (12): 2421- 2429
CHEN Qiaohong, SUN Jiajin, LOU Yangbo, et al Multimodal sentiment analysis model based on multi-task learning and stacked cross-modal Transformer[J]. Journal of Zhejiang University: Engineering Science, 2023, 57 (12): 2421- 2429
[3]   WANG Y, HUANG M, ZHU X, et al. Attention-based LSTM for aspect-level sentiment classification [C]//Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing. Austin: ACL, 2016: 606–615.
[4]   ZHU C, YI B, LUO L Base on contextual phrases with cross-correlation attention for aspect-level sentiment analysis[J]. Expert Systems with Applications, 2024, 241: 122683
doi: 10.1016/j.eswa.2023.122683
[5]   程艳, 胡建生, 赵松华, 等 融合Transformer和交互注意力网络的方面级情感分类模型[J]. 智能系统学报, 2024, 19 (3): 728- 737
CHENG Yan, HU Jiansheng, ZHAO Songhua, et al Aspect-level sentiment classification model combining Transformer and interactive attention network[J]. CAAI Transactions on Intelligent Systems, 2024, 19 (3): 728- 737
doi: 10.11992/tis.202303016
[6]   PHAN H T, NGUYEN N T, HWANG D Aspect-level sentiment analysis: a survey of graph convolutional network methods[J]. Information Fusion, 2023, 91: 149- 172
doi: 10.1016/j.inffus.2022.10.004
[7]   SHANG W, CHAI J, CAO J, et al Aspect-level sentiment analysis based on aspect-sentence graph convolution network[J]. Information Fusion, 2024, 104: 102143
doi: 10.1016/j.inffus.2023.102143
[8]   程艳芬, 吴家俊, 何凡 基于关系门控图卷积网络的方面级情感分析[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
[9]   ZHAO X, PENG H, DAI Q, et al. RDGCN: reinforced dependency graph convolutional network for aspect-based sentiment analysis [C]//Proceedings of the 17th ACM International Conference on Web Search and Data Mining. Merida, Mexico: ACM, 2024: 976-984.
[10]   LI R, CHEN H, FENG F, et al DualGCN: exploring syntactic and semantic information for aspect-based sentiment analysis[J]. IEEE Transactions on Neural Networks and Learning Systems, 2024, 35 (6): 7642- 7656
doi: 10.1109/TNNLS.2022.3219615
[11]   WANG Z, ZHANG B, YANG R, et al. DAGCN: distance-based and aspect-oriented graph convolutional network for aspect-based sentiment analysis [C]//Proceedings of the Findings of the Association for Computational Linguistics: NAACL 2024. Mexico City: ACL, 2024: 1863–1876.
[12]   CHEN B, OUYANG Q, LUO Y, et al. S2GSL: incorporating segment to syntactic enhanced graph structure learning for aspect-based sentiment analysis [C]//Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Bangkok: ACL, 2024: 13366–13379.
[13]   YIN S, ZHONG G. TextGT: a double-view graph transformer on text for aspect-based sentiment analysis [C]//Proceedings of the AAAI Conference on Artificial Intelligence. Palo Alto: AAAI, 2024: 19404-19412.
[14]   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
[15]   段文杰, 邓金科, 张顺香, 等 基于多层次知识增强的方面级情感分析模型[J]. 智能系统学报, 2024, 19 (5): 1287- 1297
DUAN Wenjie, DENG Jinke, ZHANG Shunxiang, et al Aspect-based sentiment analysis model based on multilevel knowledge enhancement[J]. CAAI Transactions on Intelligent Systems, 2024, 19 (5): 1287- 1297
doi: 10.11992/tis.202308044
[16]   ZHONG Q, DING L, LIU J, et al Knowledge graph augmented network towards multiview representation learning for aspect-based sentiment analysis[J]. IEEE Transactions on Knowledge and Data Engineering, 2023, 35 (10): 10098- 10111
doi: 10.1109/TKDE.2023.3250499
[17]   何勇禧, 韩虎, 孔博 基于多依赖图和知识融合的方面级情感分析模型[J]. 浙江大学学报: 工学版, 2024, 58 (4): 737- 747
HE Yongxi, HAN Hu, KONG Bo Aspect-based sentiment analysis model based on multi-dependency graph and knowledge fusion[J]. Journal of Zhejiang University: Engineering Science, 2024, 58 (4): 737- 747
[18]   WAN B, WU P, HAN P, et al Aspect-based sentiment analysis by knowledge and attention integrated graph convolutional network[J]. Applied Soft Computing, 2025, 171: 112763
doi: 10.1016/j.asoc.2025.112763
[19]   BAI H, WANG D L, FENG S, et al EKBSA: a Chinese sentiment analysis model by enhancing K-BERT[J]. Journal of Computer Science and Technology, 2025, 40 (1): 60- 72
doi: 10.1007/s11390-024-2870-9
[1] Wenyuan BIAN,Jiuyuan HUO,Chen CHANG. Wind power data cleaning method based on improved imputation diffusion model and LSTM[J]. Journal of ZheJiang University (Engineering Science), 2026, 60(5): 1016-1026.
[2] Jing PENG,Jiarong YAN,Jiaying LIU,Ziyi WEI,Shan BAI,Yahong DENG. Multi-scale residual learning combined with Dilformer for dual-stream medical image registration network[J]. Journal of ZheJiang University (Engineering Science), 2026, 60(5): 1082-1091.
[3] Yuzhen HOU,Xiaohong SHEN,Li LI,Mingyuan YANG,Caiming ZHANG. Dual-stage deraining network based on mask and non-local attention[J]. Journal of ZheJiang University (Engineering Science), 2026, 60(4): 791-799.
[4] Gang WAN,Xiaobo WANG,Gang SHI,Dezhen YE,Sisi ZHU,Fan SI. Underwater image enhancement algorithm based on feature refinement and attention-augmented reconstruction[J]. Journal of ZheJiang University (Engineering Science), 2026, 60(4): 800-811.
[5] Wenqiang CHEN,Linyue FENG,Dongdan WANG,Yulei GU,Xuan ZHAO. Vehicle trajectory prediction model integrating dynamic risk map and multivariate attention mechanism[J]. Journal of ZheJiang University (Engineering Science), 2026, 60(3): 455-467.
[6] Yansong LI,Ning CHEN,Fengguang LIU,Pan CHEN,Xiaofeng HUANG,Huili GE. Large language model framework for event extraction based on staged semantic perception[J]. Journal of ZheJiang University (Engineering Science), 2026, 60(3): 527-535.
[7] Yanle WANG,Ruifeng ZHANG,Qiang LI. Graph neural network recommendation model integrating global information and contrastive learning[J]. Journal of ZheJiang University (Engineering Science), 2026, 60(2): 351-359.
[8] Xiao’an BAO,Shuyou PENG,Na ZHANG,Xiaomei TU,Qingqi ZHANG,Biao WU. Object detection algorithm based on multi-azimuth perception deep fusion detection head[J]. Journal of ZheJiang University (Engineering Science), 2026, 60(1): 32-42.
[9] Xuan MENG,Xueying ZHANG,Ying SUN,Yaru ZHOU. EEG emotion recognition based on electrode arrangement and Transformer[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(9): 1872-1880.
[10] Yishan LIN,Jing ZUO,Shuhua LU. Multimodal sentiment analysis based on multi-head self-attention mechanism and MLP-Interactor[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(8): 1653-1661.
[11] Jie LIU,You WU,Jiahe TIAN,Ke HAN. Based on improved Transformer for super-resolution reconstruction of lung CT images[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(7): 1434-1442.
[12] Yongqing CAI,Cheng HAN,Wei QUAN,Wudi CHEN. Visual induced motion sickness estimation model based on attention mechanism[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(6): 1110-1118.
[13] Mengyao ZHANG,Jie ZHOU,Wenting LI,Yong ZHAO. Three-dimensional mesh segmentation framework using global and local information[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(5): 912-919.
[14] Dejun ZHANG,Yanzi BAI,Feng CAO,Yiqi WU,Zhanya XU. Point cloud Transformer adapter for dense prediction task[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(5): 920-928.
[15] Li MA,Yongshun WANG,Yao HU,Lei FAN. Pre-trained long-short spatiotemporal interleaved Transformer for traffic flow prediction applications[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(4): 669-678.