《计算机应用》唯一官方网站 ›› 2025, Vol. 45 ›› Issue (8): 2507-2514.DOI: 10.11772/j.issn.1001-9081.2024081088
• 人工智能 • 上一篇
收稿日期:
2024-08-05
修回日期:
2024-10-21
接受日期:
2024-11-04
发布日期:
2024-11-19
出版日期:
2025-08-10
通讯作者:
秦玉华
作者简介:
赵彪(2001—),男,山东菏泽人,硕士研究生,主要研究方向:智能信息处理、情感分类基金资助:
Biao ZHAO1, Yuhua QIN1(), Rongkun TIAN1, Yuehang HU2, Fangrui CHEN2
Received:
2024-08-05
Revised:
2024-10-21
Accepted:
2024-11-04
Online:
2024-11-19
Published:
2025-08-10
Contact:
Yuhua QIN
About author:
ZHAO Biao, born in 2001, M. S. candidate. His research interests include intelligent information processing, emotion classification.Supported by:
摘要:
方面级情感分析(ABSA)任务旨在判断评论语句中特定方面词的情感极性。在ABSA领域中,同时提取语法和语义这2种信息的双通道模型取得了一定的效果。然而,现有模型未能考虑语法节点间的重要程度不同、全局范围下的注意力机制引入的额外噪声以及同类特征间存在一定关联性等问题。为了解决以上问题,提出一种依赖类型及距离增强的双通道图卷积模型。首先,在语法模块引入依赖类型以衡量不同邻近节点的重要程度;其次,以依赖树距离为依据构造掩码矩阵进而过滤与语法无关的噪声;最后,引入一个有监督对比损失帮助模型学习同类特征间的关联性。实验结果表明,相较于次优模型DGNN(Dual Graph Neural Network),所提模型在SemEval-2014 Restaurant、SemEval-2014 Laptop和Twitter这3个数据集上分别取得了0.11、0.94和1.01个百分点的准确率提升,以及0.63、1.66和0.83个百分点的宏F1值提升,验证了所提模型的有效性。
中图分类号:
赵彪, 秦玉华, 田荣坤, 胡月航, 陈芳锐. 依赖类型及距离增强的方面级情感分析模型[J]. 计算机应用, 2025, 45(8): 2507-2514.
Biao ZHAO, Yuhua QIN, Rongkun TIAN, Yuehang HU, Fangrui CHEN. Dependency type and distance enhanced aspect based sentiment analysis model[J]. Journal of Computer Applications, 2025, 45(8): 2507-2514.
情感类别 | Restaurant | Laptop | ||||
---|---|---|---|---|---|---|
训练集 | 测试集 | 训练集 | 测试集 | 训练集 | 测试集 | |
积极 | 2 164 | 727 | 976 | 337 | 1 507 | 172 |
中性 | 637 | 196 | 455 | 167 | 3 016 | 336 |
消极 | 807 | 196 | 851 | 128 | 1 528 | 169 |
表1 数据集样本数的统计信息
Tab. 1 Statistical information on the number of samples in the datasets
情感类别 | Restaurant | Laptop | ||||
---|---|---|---|---|---|---|
训练集 | 测试集 | 训练集 | 测试集 | 训练集 | 测试集 | |
积极 | 2 164 | 727 | 976 | 337 | 1 507 | 172 |
中性 | 637 | 196 | 455 | 167 | 3 016 | 336 |
消极 | 807 | 196 | 851 | 128 | 1 528 | 169 |
类别 | 模型 | Restaurant | Laptop | ||||
---|---|---|---|---|---|---|---|
ACC | 宏F1 | ACC | 宏F1 | ACC | 宏F1 | ||
上下文 | TD-LSTM | 75.60 | 64.51 | 70.81 | 69.11 | 70.80 | 69.00 |
GCAE | 79.14 | 68.53 | 71.73 | 66.04 | 72.45 | 70.87 | |
语义 | IAN | 79.26 | 70.09 | 72.05 | 67.38 | 72.50 | 70.81 |
AOA | 79.97 | 70.42 | 72.62 | 67.52 | 72.30 | 70.20 | |
语法 | ASGCN | 80.77 | 72.02 | 75.55 | 71.05 | 72.15 | 70.40 |
Sentic GCN | 84.03 | 75.38 | 77.90 | 74.71 | — | — | |
CRF-GCN | 82.71 | 73.87 | 75.83 | 74.78 | — | — | |
多通道 | DGEDT | 83.90 | 75.10 | 76.80 | 72.30 | 74.80 | 73.40 |
R-GAT | 83.30 | 76.08 | 77.42 | 73.76 | 75.57 | 73.82 | |
DGNN | 84.25 | 77.05 | 77.86 | 74.09 | 75.36 | 74.33 | |
TCKGCN | — | — | 78.50 | 74.21 | 75.92 | 74.26 | |
本文模型 | 84.36 | 77.68 | 78.80 | 75.75 | 76.37 | 75.16 |
表2 不同模型的结果对比 (%)
Tab. 2 Comparison of results of different models
类别 | 模型 | Restaurant | Laptop | ||||
---|---|---|---|---|---|---|---|
ACC | 宏F1 | ACC | 宏F1 | ACC | 宏F1 | ||
上下文 | TD-LSTM | 75.60 | 64.51 | 70.81 | 69.11 | 70.80 | 69.00 |
GCAE | 79.14 | 68.53 | 71.73 | 66.04 | 72.45 | 70.87 | |
语义 | IAN | 79.26 | 70.09 | 72.05 | 67.38 | 72.50 | 70.81 |
AOA | 79.97 | 70.42 | 72.62 | 67.52 | 72.30 | 70.20 | |
语法 | ASGCN | 80.77 | 72.02 | 75.55 | 71.05 | 72.15 | 70.40 |
Sentic GCN | 84.03 | 75.38 | 77.90 | 74.71 | — | — | |
CRF-GCN | 82.71 | 73.87 | 75.83 | 74.78 | — | — | |
多通道 | DGEDT | 83.90 | 75.10 | 76.80 | 72.30 | 74.80 | 73.40 |
R-GAT | 83.30 | 76.08 | 77.42 | 73.76 | 75.57 | 73.82 | |
DGNN | 84.25 | 77.05 | 77.86 | 74.09 | 75.36 | 74.33 | |
TCKGCN | — | — | 78.50 | 74.21 | 75.92 | 74.26 | |
本文模型 | 84.36 | 77.68 | 78.80 | 75.75 | 76.37 | 75.16 |
模型 | Restaurant | Laptop | ||||
---|---|---|---|---|---|---|
ACC | 宏F1 | ACC | 宏F1 | ACC | 宏F1 | |
原模型 | 84.36 | 77.68 | 78.80 | 75.75 | 76.37 | 75.16 |
w/o DepType | 83.20 | 75.76 | 77.53 | 74.25 | 75.48 | 73.84 |
w/o synMask | 83.91 | 75.94 | 77.06 | 73.51 | 75.63 | 73.88 |
w/o SCLoss | 83.65 | 76.66 | 78.01 | 74.55 | 75.18 | 74.02 |
表3 消融实验结果 (%)
Tab. 3 Results of ablation study
模型 | Restaurant | Laptop | ||||
---|---|---|---|---|---|---|
ACC | 宏F1 | ACC | 宏F1 | ACC | 宏F1 | |
原模型 | 84.36 | 77.68 | 78.80 | 75.75 | 76.37 | 75.16 |
w/o DepType | 83.20 | 75.76 | 77.53 | 74.25 | 75.48 | 73.84 |
w/o synMask | 83.91 | 75.94 | 77.06 | 73.51 | 75.63 | 73.88 |
w/o SCLoss | 83.65 | 76.66 | 78.01 | 74.55 | 75.18 | 74.02 |
[1] | 李阳,王石,朱俊武,等. 方面级情感分析综述[J]. 计算机科学, 2023, 50(6A):No.220400077. |
LI Y, WANG S, ZHU J W,et al. Summarization of aspect-level sentiment analysis[J]. Computer Science, 2023, 50(6A): No.220400077. | |
[2] | TANG D, QIN B, FENG X, et al. Effective LSTMs for target-dependent sentiment classification[C]// Proceedings of the 26th International Conference on Computational Linguistics: Technical Papers. [S.l.]: COLING 2016 Organizing Committee, 2016: 3298-3307. |
[3] | XUE W, LI T. Aspect based sentiment analysis with gated convolutional networks[C]// Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Stroudsburg: ACL, 2018: 2514-2523. |
[4] | 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. Stroudsburg: ACL, 2016: 606-615. |
[5] | 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. California: ijcai.org, 2017: 4068-4074. |
[6] | VASWANI A, SHAZEER N, PARMAR N, et al. Attention is all you need[C]// Proceedings of the 31st International Conference on Neural Information Processing Systems. Red Hook: Curran Associates Inc., 2017: 6000-6010. |
[7] | 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. Stroudsburg: ACL, 2019: 4568-4578. |
[8] | 王汝言,陶中原,赵容剑,等. 多交互图卷积网络用于方面情感分析[J]. 电子与信息学报, 2022, 44(3): 1111-1118. |
WANG R Y, TAO Z Y, ZHAO R J, et al. Multi-interaction graph convolutional networks for aspect-level sentiment analysis[J]. Journal of Electronics and Information Technology, 2022, 44(3): 1111-1118. | |
[9] | TANG H, JI D, LI C, et al. Dependency graph enhanced dual transformer structure for aspect-based sentiment classification[C]// Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. Stroudsburg: ACL, 2020: 6578-6588. |
[10] | WANG P, TAO L, TANG M, et al. Incorporating syntax and semantics with dual graph neural networks for aspect-level sentiment analysis[J]. Engineering Applications of Artificial Intelligence, 2024, 133(Pt B): No.108101. |
[11] | ZHANG S, GONG H, SE L. An aspect sentiment classification model for graph attention networks incorporating syntactic, semantic, and knowledge[J]. Knowledge-Based Systems, 2023, 275: No.110662. |
[12] | TE L, JOE I. An adaptive masked attention mechanism to act on the local text in a global context for aspect-based sentiment analysis[J]. IEEE Access, 2023, 11: 43055-43066. |
[13] | ZENG B, YANG H, LIU S, et al. Learning for target-dependent sentiment based on local context-aware embedding[J]. Journal of Supercomputing, 2022, 78(3): 4358-4376. |
[14] | HUANG B, OU Y, CARLEY K M. Aspect level sentiment classification with attention-over-attention neural networks[C]// Proceedings of the 2018 International Conference on Social Computing, Behavioral-Cultural Modeling and Prediction and Behavior Representation in Modeling and Simulation, LNCS 10899. Cham: Springer, 2018: 197-206. |
[15] | 孔丽雅,周治平. 基于ELMo的混合注意力网络的方面级情感分析研究[J]. 中文信息学报, 2023, 37(6): 147-156. |
KONG L Y, ZHOU Z P. ELMo and hybrid attention network for aspect-level sentiment analysis[J]. Journal of Chinese Information Processing, 2023, 37(6):147-156. | |
[16] | BAI X, LIU P, ZHANG Y. Investigating typed syntactic dependencies for targeted sentiment classification using graph attention neural network[J]. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 2021, 29: 503-514. |
[17] | LIANG B, HANG S, GUI L, et al. Aspect-based sentiment analysis via affective knowledge enhanced graph convolutional networks[J]. Knowledge-Based Systems, 2022, 235: No.107643. |
[18] | SHANG W, CHAI J, CAO J, et al. Aspect-level sentiment analysis based on aspect-sentence graph convolution network[J]. Information Fusion, 2024, 104: No.102143. |
[19] | 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. Stroudsburg: ACL, 2020: 3229-3238. |
[20] | XIAO L, XUE Y, WANG H, et al. Exploring fine-grained syntactic information for aspect-based sentiment classification with dual graph Neural Networks[J]. Neurocomputing, 2022, 471: 48-59. |
[21] | 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. Stroudsburg: ACL, 2022: 4916-4925. |
[22] | WANG Y, YANG N, MIAO D, et al. Dual-channel and multi-granularity gated graph attention network for aspect-based sentiment analysis[J]. Applied Intelligence, 2023, 53(11): 13145-13157. |
[23] | KIPF T N, WELLING M. Semi-supervised classification with graph convolutional networks[EB/OL]. [2024-10-12].. |
[24] | 刘欣逸,宁博,王明,等. 基于句法增强的细粒度情感三元组抽取方法[J]. 计算机研究与发展, 2023, 60(7): 1649-1660. |
LIU X Y, NING B, WANG M, et al. Fine-grained sentiment triplet extraction method based on syntactic enhancement[J]. Journal of Computer Research and Development, 2023, 60(7): 1649-1660. | |
[25] | JAVEED A. A hybrid attention mechanism for multi-target entity relation extraction using graph neural networks[J]. Machine Learning with Applications, 2023, 11: No.100444. |
[26] | KHOSLA P, TETERWAK P, WANG C, et al. Supervised contrastive learning[C]// Proceedings of the 34th International Conference on Neural Information Processing Systems. Red Hook: Curran Associates Inc., 2020: 18661-18673. |
[27] | JIA O, HUANG H, REN J, et al. Contrastive learning with text augmentation for text classification[J]. Applied Intelligence, 2023, 53(16): 19522-19531. |
[28] | CHEN Q, ZHANG R, ZHENG Y, et al. Dual contrastive learning: text classification via label-aware data augmentation[EB/OL]. [2024-07-15].. |
[29] | PENNINGTON J, SOCHER R, MANNING C D. GloVe: global vectors for word representation[C]// Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing. Stroudsburg: ACL, 2014: 1532-1543. |
[30] | MANNING C D, SURDEANU M, BAUER J, et al. The Stanford CoreNLP natural language processing toolkit[C]// Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics: System Demonstrations. Stroudsburg: ACL, 2014: 55-60. |
[31] | 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. Stroudsburg: ACL, 2014: 27-35. |
[32] | 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). Stroudsburg: ACL, 2014: 49-54. |
[33] | HUANG B, ZHANG J, JU J, et al. CRF-GCN: an effective syntactic dependency model for aspect-level sentiment analysis[J]. Knowledge-Based Systems, 2023, 260: No.110125. |
[34] | HAO J, PEI L, HE Y, et al. TCKGCN: graph convolutional network for aspect-based sentiment analysis with three-channel knowledge fusion[J]. Neurocomputing, 2024, 600: No.128163. |
[1] | 涂银川, 郭勇, 毛恒, 任怡, 张建锋, 李宝. 基于分布式环境的图神经网络模型训练效率与训练性能评估[J]. 《计算机应用》唯一官方网站, 2025, 45(8): 2409-2420. |
[2] | 梁辰, 王奕森, 魏强, 杜江. 基于Tsransformer-GCN的源代码漏洞检测方法[J]. 《计算机应用》唯一官方网站, 2025, 45(7): 2296-2303. |
[3] | 张子墨, 赵雪专. 多尺度稀疏图引导的视觉图神经网络[J]. 《计算机应用》唯一官方网站, 2025, 45(7): 2188-2194. |
[4] | 陈丹阳, 张长伦. 多尺度去相关的图卷积网络模型[J]. 《计算机应用》唯一官方网站, 2025, 45(7): 2180-2187. |
[5] | 张悦岚, 苏静, 赵航宇, 杨白利. 基于知识感知与交互的多视图蒸馏推荐算法[J]. 《计算机应用》唯一官方网站, 2025, 45(7): 2211-2220. |
[6] | 姜超英, 李倩, 刘宁, 刘磊, 崔立真. 基于图对比学习的再入院预测模型[J]. 《计算机应用》唯一官方网站, 2025, 45(6): 1784-1792. |
[7] | 党伟超, 温鑫瑜, 高改梅, 刘春霞. 基于多视图多尺度对比学习的图协同过滤[J]. 《计算机应用》唯一官方网站, 2025, 45(4): 1061-1068. |
[8] | 田仁杰, 景明利, 焦龙, 王飞. 基于混合负采样的图对比学习推荐算法[J]. 《计算机应用》唯一官方网站, 2025, 45(4): 1053-1060. |
[9] | 游兰, 张雨昂, 刘源, 陈智军, 王伟, 曾星, 何张玮. 基于协作贡献网络的开源项目开发者推荐[J]. 《计算机应用》唯一官方网站, 2025, 45(4): 1213-1222. |
[10] | 王聪, 史艳翠. 基于多视角学习的图神经网络群组推荐模型[J]. 《计算机应用》唯一官方网站, 2025, 45(4): 1205-1212. |
[11] | 马汉达, 吴亚东. 多域时空层次图神经网络的空气质量预测[J]. 《计算机应用》唯一官方网站, 2025, 45(2): 444-452. |
[12] | 蔡启健, 谭伟. 语义图增强的多模态推荐算法[J]. 《计算机应用》唯一官方网站, 2025, 45(2): 421-427. |
[13] | 余肖生, 王智鑫. 基于多层次图对比学习的序列推荐模型[J]. 《计算机应用》唯一官方网站, 2025, 45(1): 106-114. |
[14] | 程子栋, 李鹏, 朱枫. 物联网威胁情报知识图谱中潜在关系的挖掘[J]. 《计算机应用》唯一官方网站, 2025, 45(1): 24-31. |
[15] | 赵文博, 马紫彤, 杨哲. 基于有向超图自适应卷积的链接预测模型[J]. 《计算机应用》唯一官方网站, 2025, 45(1): 15-23. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||