Abstract
Different from sentence-level sentiment analysis, the aspect-based sentiment analysis (ABSA) is a fine-grained task that aims to identify the sentiment polarity towards specific aspect terms in a sentence. However, the lack of fine-grained labeled data and the fact that a sentence may contain multiple aspects or complex implicit sentiment relations make ABSA still face challenges. Specifically, effectively exploiting syntactic dependencies to construct contextual information in a sentence to capture implicit sentiment polarities and constructing the data augmentation paradigm to obtain fine-grained aspect-specific information are the key concerns of this paper. To mitigate the above issues, we propose a Contrastive Learning Framework with Tree-Structured LSTM (CLF-TrLSTM), which applies a concatenated form of Tree-LSTMs and self-attention with window mechanism to utilize dependency tree to capture syntactic and contextual information of the sentence. Meanwhile, to alleviate the data scarcity problem, we use mask generation operation and contrastive learning to generate in-domain high-quality positive and negative samples, then encourage anchor sentences and positive samples to be more similar than negative example pairs, which can achieve alignment of different granularities. Finally, experimental results on three public datasets demonstrate that our proposed framework achieves the state-of-the-art performance and comprehensive analysis verifies the effectiveness of each component.
Similar content being viewed by others
Data Availability
Restaurant and Laptop datasets [3]: https://paperswithcode.com/dataset/semeval-2014-task-4-sub-task-2 Twitter dataset [18]: http://goo.gl/5Enpu7 Bert-base-uncased: https://github.com/huggingface/transformers
References
Liu B (2012) Sentiment analysis and opinion mining. Synthesis Lect Human Lang Technol 5(1):1–167
Russo I, Caselli T, Strapparava C (2015) Semeval-2015 task 9: clipeval implicit polarity of events. In: Proceedings of the 9th international workshop on semantic evaluation (SemEval 2015), pp. 443–450
Pontiki M, Papageorgiou H, Galanis D, Androutsopoulos I, Pavlopoulos J, Manandhar S (2014) Semeval-2014 task 4: aspect based sentiment analysis. SemEval 2014:27
Gu S, Zhang L, Hou Y, Song Y (2018) A position-aware bidirectional attention network for aspect-level sentiment analysis. In: Proceedings of the 27th international conference on computational linguistics, pp. 774–784
Huang B, Ou Y, Carley KM (2018) Aspect level sentiment classification with attention-over-attention neural networks. In: International conference on social computing, behavioral-cultural modeling and prediction and behavior representation in modeling and simulation, pp. 197–206. Springer
Wang K, Shen W, Yang Y, Quan X, Wang R (2020) Relational graph attention network for aspect-based sentiment analysis. In: Proceedings of the 58th annual meeting of the association for computational linguistics, pp. 3229–3238
Pang S, Xue Y, Yan Z, Huang W, Feng J (2021) Dynamic and multi-channel graph convolutional networks for aspect-based sentiment analysis. In: Findings of the association for computational linguistics: ACL-IJCNLP 2021, pp. 2627–2636
Li R, Chen H, Feng F, Ma Z, Wang X, Hovy E (2021) Dual graph convolutional networks for aspect-based sentiment analysis. In: Proceedings of the 59th annual meeting of the association for computational linguistics and the 11th international joint conference on natural language processing (Volume 1: Long Papers), pp. 6319–6329
Liang S, Wei W, Mao X-L, Wang F, He Z (2022) Bisyn-gat+: Bi-syntax aware graph attention network for aspect-based sentiment analysis. In: Findings of the association for computational linguistics: ACL 2022, pp. 1835–1848
Zhang K, Zhang K, Zhang M, Zhao H, Liu Q, Wu W, Chen E (2022) Incorporating dynamic semantics into pre-trained language model for aspect-based sentiment analysis. In: Findings of the association for computational linguistics: ACL 2022, pp. 3599–3610
Zhao A, Yu Y (2021) Knowledge-enabled bert for aspect-based sentiment analysis. Knowl-Based Sys 227:107220
He R, Lee WS, Ng HT, Dahlmeier D (2018) Exploiting document knowledge for aspect-level sentiment classification. In: Proceedings of the 56th annual meeting of the association for computational linguistics (Volume 2: Short Papers), pp. 579–585
Zhang Y, Zhang M, Wu S, Zhao J (2022) Towards unifying the label space for aspect-and sentence-based sentiment analysis. In: Findings of the association for computational linguistics: ACL 2022, pp. 20–30
Jiang Q, Chen L, Xu R, Ao X, Yang M (2019) A challenge dataset and effective models for aspect-based sentiment analysis. In: Proceedings of the 2019 conference on empirical methods in natural language processing and the 9th international joint conference on natural language processing (EMNLP-IJCNLP), pp. 6280–6285
Li G, Wang H, Ding Y, Zhou K, Yan X (2022) Data augmentation for aspect-based sentiment analysis. Int J Mach Learn Cybern. https://doi.org/10.1007/s13042-022-01535-5
Tai KS, Socher R, Manning CD (2015) Improved semantic representations from tree-structured long short-term memory networks. arXiv preprint arXiv:1503.00075
Raffel C, Shazeer N, Roberts A, Lee K, Narang S, Matena M, Zhou Y, Li W, Liu PJ (2020) Exploring the limits of transfer learning with a unified text-to-text transformer. J Mach Learn Res 21:1–67
Dong L, Wei F, Tan C, Tang D, Zhou M, Xu K (2014) Adaptive recursive neural network for target-dependent twitter sentiment classification. In: Proceedings of the 52nd annual meeting of the association for computational linguistics (volume 2: Short Papers), pp. 49–54
Zhang L, Wang S, Liu B (2018) Deep learning for sentiment analysis: a survey. Wiley Interdisc Rev: Data Min Knowl Discov 8(4):1253
Wei W, Liu J, Mao X, Guo G, Zhu F, Zhou P, Hu Y (2019) Emotion-aware chat machine: Automatic emotional response generation for human-like emotional interaction. In: Proceedings of the 28th ACM international conference on information and knowledge management, pp. 1401–1410
Lan T, Mao X-L, Wei W, Gao X, Huang H (2020) Pone: a novel automatic evaluation metric for open-domain generative dialogue systems. ACM Trans Inf Sys (TOIS) 39(1):1–37
Qiu M, Huang X, Chen C, Ji F, Qu C, Wei W, Huang J, Zhang Y (2021) Reinforced history backtracking for conversational question answering. In: Thirty-Fifth AAAI conference on artificial intelligence, AAAI, pp. 13718–13726
Musto C, de Gemmis M, Semeraro G, Lops P (2017) A multi-criteria recommender system exploiting aspect-based sentiment analysis of users’ reviews. In: Proceedings of the eleventh ACM conference on recommender systems, pp. 321–325
Liu P, Zhang L, Gulla JA (2021) Multilingual review-aware deep recommender system via aspect-based sentiment analysis. ACM Trans Inf Sys (TOIS) 39(2):1–33
Birjali M, Kasri M, Beni-Hssane A (2021) A comprehensive survey on sentiment analysis: approaches, challenges and trends. Knowl-Based Sys 226:107134
Wankhade M, Rao ACS, Kulkarni C (2022) A survey on sentiment analysis methods, applications, and challenges. Artif Intell Rev 55(7):5731–5780
Wang Y, Huang M, Zhu X, Zhao L (2016) Attention-based lstm for aspect-level sentiment classification. In: Proceedings of the 2016 conference on empirical methods in natural language processing, pp. 606–615
Chen P, Sun Z, Bing L, Yang W (2017) Recurrent attention network on memory for aspect sentiment analysis. In: Proceedings of the 2017 Conference on empirical methods in natural language processing, pp. 452–461
Zhang C, Li Q, Song D (2019) Aspect-based sentiment classification with aspect-specific graph convolutional networks. In: Proceedings of the 2019 conference on empirical methods in natural language processing and the 9th international joint conference on natural language processing (EMNLP-IJCNLP), pp. 4568–4578
Sun K, Zhang R, Mensah S, Mao Y, Liu X (2019) Aspect-level sentiment analysis via convolution over dependency tree. In: Proceedings of the 2019 conference on empirical methods in natural language processing and the 9th international joint conference on natural language processing (EMNLP-IJCNLP), pp. 5679–5688
Vaswani A, Shazeer N, Parmar N, Uszkoreit J, Jones L, Gomez AN, Kaiser Ł, Polosukhin I (2017) Attention is all you need. Adv Neur Inf Process Sys, 30
Bai X, Liu P, Zhang Y (2020) Investigating typed syntactic dependencies for targeted sentiment classification using graph attention neural network. IEEE/ACM Trans Audio, Speech, Lang Process 29:503–514
Yu J, Gong C, Xia R (2021) Cross-domain review generation for aspect-based sentiment analysis. In: Findings of the association for computational linguistics: ACL-IJCNLP 2021, pp. 4767–4777
Chen Z, Qian T (2019) Transfer capsule network for aspect level sentiment classification. In: Proceedings of the 57th Annual meeting of the association for computational linguistics, pp. 547–556
Liang Y, Meng F, Zhang J, Xu J, Chen Y, Zhou J (2020) An iterative knowledge transfer network with routing for aspect-based sentiment analysis. arXiv preprint arXiv:2004.01935
Yu G, Ao X, Luo L, Yang M, Sun X, Li J, He Q (2021) Making flexible use of subtasks: A multiplex interaction network for unified aspect-based sentiment analysis. In: Findings of the association for computational linguistics: ACL-IJCNLP 2021, pp. 2695–2705
Wang B, Ding L, Zhong Q, Li X, Tao D (2022) A contrastive cross-channel data augmentation framework for aspect-based sentiment analysis. arXiv preprint arXiv:2204.07832
Devlin J, Chang M-W, Lee K, Toutanova K (2018) Bert: pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805
Song Y, Wang J, Jiang T, Liu Z, Rao Y (2019) Attentional encoder network for targeted sentiment classification. arXiv preprint arXiv:1902.09314
He K, Zhang X, Ren S, Sun J (2016) Deep residual learning for image recognition. In: Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778
Kingma DP, Ba J (2014) Adam: a method for stochastic optimization. arXiv preprint arXiv:1412.6980
Fan F, Feng Y, Zhao D (2018) Multi-grained attention network for aspect-level sentiment classification. In: Proceedings of the 2018 conference on empirical methods in natural language processing, pp. 3433–3442
Zhang M, Qian T (2020) Convolution over hierarchical syntactic and lexical graphs for aspect level sentiment analysis. In: Proceedings of the 2020 conference on empirical methods in natural language processing (EMNLP), pp. 3540–3549
Tang H, Ji D, Li C, Zhou Q (2020) Dependency graph enhanced dual-transformer structure for aspect-based sentiment classification. In: Proceedings of the 58th annual meeting of the association for computational linguistics, pp. 6578–6588
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
No conflict of interest exits in the submission of this manuscript, and manuscript is approved by all authors for publication. I would like to declare on behalf of my co-authors that the work described was original research that has not been published previously, and not under consideration for publication elsewhere, in whole or in part. All the authors listed have approved the manuscript that is enclosed.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Zhang, Q., Wang, S. & Li, J. A Contrastive Learning Framework with Tree-LSTMs for Aspect-Based Sentiment Analysis. Neural Process Lett 55, 8869–8886 (2023). https://doi.org/10.1007/s11063-023-11181-9
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11063-023-11181-9