基于自适应建模的方面级情感分析模型
Aspect-Based Sentiment Analysis Model Based on Adaptive Modeling
摘要: 本文提出了一种基于自适应滑窗机制与变分自编码器(VAE)的方面级情感分析模型——AdaptWin-ABSA。该模型通过结合BERT、VAE、自适应滑窗机制和对比学习策略,旨在提升情感分析中多方面情感区分的能力及上下文特征建模效果。首先,利用BERT生成高质量的句子和方面嵌入表示,为情感分析提供强大的文本表征能力。其次,采用变分自编码器(VAE)对文本的潜在情感分布进行建模,有效捕捉复杂的情感模式,增强模型的鲁棒性。自适应滑窗机制根据不同方面自动调整上下文窗口大小,灵活地提取局部情感特征,从而提升情感识别的精度。最后,集成对比学习策略,最大化不同方面之间的表示差异,进一步提升情感极性分类的准确性。实验结果表明,AdaptWin-ABSA在SEMEVAL 2014和ACL14数据集上的表现优于现有主流方法,在准确率和F1值上均有显著提升,展示了该模型在方面级情感分析任务中的有效性与潜力。
Abstract: This paper presents an aspect-based sentiment analysis model, AdaptWin-ABSA, based on an adaptive sliding window mechanism and a variational autoencoder (VAE). The model enhances the ability to distinguish sentiments across multiple aspects and improve contextual feature modeling by combining BERT, VAE, adaptive sliding window, and contrastive learning strategies. First, BERT is utilized to generate high-quality sentence and aspect embeddings, providing strong text representation for sentiment analysis. Second, a variational autoencoder (VAE) is introduced to model the latent sentiment distribution of texts, effectively capturing complex sentiment patterns and enhancing the robustness of the model. The adaptive sliding window mechanism dynamically adjusts the context window size for different aspects, extracting local sentiment features and improving sentiment recognition accuracy. Finally, contrastive learning is integrated to maximize the differentiation between aspect representations, further enhancing the accuracy of sentiment polarity classification. Experimental results demonstrate that AdaptWin-ABSA outperforms existing mainstream methods on the SEMEVAL 2014 and ACL14 datasets, achieving significant improvements in accuracy and F1-score, highlighting its effectiveness and potential in aspect-based sentiment analysis tasks.
文章引用:刘彦君. 基于自适应建模的方面级情感分析模型[J]. 计算机科学与应用, 2025, 15(12): 360-375. https://doi.org/10.12677/csa.2025.1512350

参考文献

[1] Liu, B. (2012) Sentiment Analysis and Opinion Mining (Synthesis Lectures on Human Language Technologies). Morgan & Claypool Publishers.
[2] Pontiki, M., Galanis, D., Papageorgiou, H., Androutsopoulos, I., Manandhar, S., AL-Smadi, M., et al. (2016) Semeval-2016 Task 5: Aspect Based Sentiment Analysis. Proceedings of the 10th International Workshop on Semantic Evaluation (SemEval-2016), San Diego, June 2016, 19-30. [Google Scholar] [CrossRef
[3] Devlin, J., Chang, M.W., Lee, K., et al. (2019) BERT: Pre-Training of Deep Bidirectional Transformers for Language Understanding. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), Minneapolis, 2-7 June 2019, 4171-4186.
[4] Hochreiter, S. and Schmidhuber, J. (1997) Long Short-Term Memory. Neural Computation, 9, 1735-1780. [Google Scholar] [CrossRef] [PubMed]
[5] Cho, K., van Merrienboer, B., Gulcehre, C., Bahdanau, D., Bougares, F., Schwenk, H., et al. (2014) Learning Phrase Representations Using RNN Encoder-Decoder for Statistical Machine Translation. Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, October 2014, 1724-1734. [Google Scholar] [CrossRef
[6] Zhang, W., Li, X., Deng, Y., Bing, L. and Lam, W. (2023) A Survey on Aspect-Based Sentiment Analysis: Tasks, Methods, and Challenges. IEEE Transactions on Knowledge and Data Engineering, 35, 11019-11038. [Google Scholar] [CrossRef
[7] Liu, Q., Zhang, H., Zeng, Y., Huang, Z. and Wu, Z. (2018) Content Attention Model for Aspect Based Sentiment Analysis. Proceedings of the 2018 World Wide Web Conference on World Wide Web, Lyon, 23-27 April 2018, 1023-1032. [Google Scholar] [CrossRef
[8] Tang, D., Qin, B., Feng, X., et al. (2016) Effective LSTMs for Target-Dependent Sentiment Classification. Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers, Osaka, December 2016, 3298-3307.
https://aclanthology.org/C16-1311/
[9] Wang, Y., Huang, M., Zhu, x. and Zhao, L. (2016) Attention-Based LSTM for Aspect-Level Sentiment Classification. Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, Austin, November 2016, 606-615. [Google Scholar] [CrossRef
[10] Tan, X., Cai, Y. and Zhu, C. (2019) Recognizing Conflict Opinions in Aspect-Level Sentiment Classification with Dual Attention Networks. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), Hong Kong, November 2019, 3426-3431. [Google Scholar] [CrossRef
[11] Sun, C., Huang, L. and Qiu, X. (2019) Utilizing BERT for Aspect-Based Sentiment Analysis via Constructing Auxiliary Sentence. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Minneapolis, June 2019, 380-385. [Google Scholar] [CrossRef
[12] Xu, H., Liu, B., Shu, L., et al. (2019) BERT Post-Training for Review Reading Comprehension and Aspect-Based Sentiment Analysis. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Minneapolis, June 2019, 2324-2335. [Google Scholar] [CrossRef
[13] Xu, W., Sun, H., Deng, C. and Tan, Y. (2017) Variational Autoencoder for Semi-Supervised Text Classification. Proceedings of the AAAI Conference on Artificial Intelligence, 31, 3358-3364. [Google Scholar] [CrossRef
[14] Cheng, X., Xu, W., Wang, T., et al. (2019) Variational Semi-Supervised Aspect-Term Sentiment Analysis via Transformer. Proceedings of the 23rd Conference on Computational Natural Language Learning (CoNLL), Hong Kong, November 2019, 961-969. [Google Scholar] [CrossRef
[15] Yang, K., Zhang, T., Alhuzali, H. and Ananiadou, S. (2023) Cluster-Level Contrastive Learning for Emotion Recognition in Conversations. IEEE Transactions on Affective Computing, 14, 3269-3280. [Google Scholar] [CrossRef
[16] Song, X., Huang, L., Xue, H. and Hu, S. (2022) Supervised Prototypical Contrastive Learning for Emotion Recognition in Conversation. Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, Abu Dhabi, December 2022, 5197-5206. [Google Scholar] [CrossRef
[17] Wang, X., Zhang, D., Tan, H. and Lee, D. (2022) A Self-Fusion Network Based on Contrastive Learning for Group Emotion Recognition. IEEE Transactions on Computational Social Systems, 10, 458-469. [Google Scholar] [CrossRef
[18] He, J., Li, L. and Wu, X. (2017) A Self-Adaptive Sliding Window Based Topic Model for Non-Uniform Texts. 2017 IEEE International Conference on Data Mining (ICDM), New Orleans, 18-21 November 2017, 147-156. [Google Scholar] [CrossRef
[19] Zhang, Q., Chen, Q., Li, Y., Liu, J. and Wang, W. (2021) Sequence Model with Self-Adaptive Sliding Window for Efficient Spoken Document Segmentation. 2021 IEEE Automatic Speech Recognition and Understanding Workshop (ASRU), Cartagena, 13-17 December 2021, 411-418. [Google Scholar] [CrossRef
[20] Ahmed, K., Nadeem, M.I., Zheng, Z., Li, D., Ullah, I., Assam, M., et al. (2023) Breaking down Linguistic Complexities: A Structured Approach to Aspect-Based Sentiment Analysis. Journal of King Saud UniversityComputer and Information Sciences, 35, Article 101651. [Google Scholar] [CrossRef
[21] Tang, D., Qin, B. and Liu, T. (2016) Aspect Level Sentiment Classification with Deep Memory Network. Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, Austin, November 2016, 214-224. [Google Scholar] [CrossRef
[22] Chen, P., Sun, Z., Bing, L. and Yang, W. (2017) Recurrent Attention Network on Memory for Aspect Sentiment Analysis. Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, Copenhagen, September 2017, 452-461. [Google Scholar] [CrossRef
[23] Ma, D.H., Li, S.J., Zhang, X.D. and Wang, H.F. (2017) Interactive Attention Networks for Aspect-Level Sentiment Classification. Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, Melbourne, 19-25 August 2017, 4068-4074. [Google Scholar] [CrossRef
[24] Gu, S., Zhang, L., Hou, Y., et al. (2018) A Position-Aware Bidirectional Attention Network for Aspect-Level Sentiment Analysis. Proceedings of the 27th International Conference on Computational Linguistics, Santa Fe, 20-26 August 2018, 774-784.
[25] Song, Y., Wang, J., Jiang, T., et al. (2019) Attentional Encoder Network for Targeted Sentiment Classification. In: Tetko, I., Kůrková, V., Karpov, P., Theis, F. (Eds.), Artificial Neural Networks and Machine LearningICANN 2019: Text and Time Series. Springer, Cham. [Google Scholar] [CrossRef
[26] Chen, C., Teng, Z. and Zhang, Y. (2020) Inducing Target-Specific Latent Structures for Aspect Sentiment Classification. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), Online, November 2020, 5596-5607. [Google Scholar] [CrossRef
[27] 黄俊, 刘洋, 王庆风, 等. 基于语序知识的双通道图卷积网络方面级情感分析[J]. 计算机应用研究, 2024, 41(3): 1032-1043.
[28] Wang, K., Shen, W., Yang, Y., Quan, X. and Wang, R. (2020) Relational Graph Attention Network for Aspect-Based Sentiment Analysis. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Online, July 2020, 3229-3238. [Google Scholar] [CrossRef
[29] Zhang, Z., Zhou, Z. and Wang, Y. (2022) SSEGCN: Syntactic and Semantic Enhanced Graph Convolutional Network for Aspect-Based Sentiment Analysis. Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Seattle, July 2022, 4916-4925. [Google Scholar] [CrossRef
[30] Xiao, Z., Wu, J., Chen, Q. and Deng, C. (2021) BERT4GCN: Using BERT Intermediate Layers to Augment GCN for Aspect-Based Sentiment Classification. Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, Punta Cana, November 2021, 9193-9200. [Google Scholar] [CrossRef