RAG-TCGCN: Aspect Sentiment Analysis Based on Residual Attention Gating and Three-Channel Graph Convolutional Networks
Abstract
:1. Introduction
2. Related Work
3. Methodology
3.1. Input Layer
3.2. Syntactic Graph Convolution Moduler
3.3. Semantic Graph Convolution Module
3.4. Common Graph Convolution Module
3.5. Attention Module
3.5.1. Multi-Head Self-Attention
3.5.2. Residual Attention Gating
3.6. Output Layer
4. Experiment
4.1. Datasets
4.2. Dataset Implementation and Parameter Settings
4.3. Baseline Methods
- (1)
- IAN [12]: Simultaneous modeling of aspect words and context information to make aspect words and context information interactively fuse with attention.
- (2)
- AOA [45]: Simultaneous modeling of aspects and text using long short-term memory neural networks to focus on what is important in sentences.
- (3)
- RAM [34]: Mem-Net is enhanced with deep Bi-LSTM and position weighting. The gated recurrent unit network is nonlinearly combined with multiple attention results using a recurrent network to obtain the final feature representation.
- (4)
- MGAN [46]: Fine-grained attention is proposed to solve the loss caused by coarse-grained attention, and then combined with coarse-grained attention to predict the sentiment polarity of sentences.
- (5)
- ASGCN [15]: GCNs on syntactic dependency trees are built and generate aspect-oriented sentence representations by applying masking and an attention mechanism. Finally, two variants of ASGCN are proposed, namely, ASGCN-DG based on an undirected dependency graph and ASGCN-DT based on a directed dependency tree.
- (6)
- CDT [16]: BiLSTM is used to obtain the feature representation of the sentence and further enhance the embedding by a direct convolution operation on the dependency tree.
- (7)
- BiGCN [47]: A conceptual hierarchy is built on the syntactic and lexical graphs to distinguish various types of dependencies or lexical word pairs, and a two-layer interactive graph convolutional network is designed to take full advantage of these two graphs.
- (8)
- R-GAT [37]: An aspect correlation tree rooted in aspect terms by reshaping the dependency parse tree is constructed, which uses relational graph attention network coding.
- (9)
- DGEDT [6]: A dual-transformer structure is designed to enable interaction enhancement between planar representations learned from the transformer and graph-based representations.
- (10)
- DualGCN [39]: The dual-graph convolutional network considers both the complementarity of the syntactic structure and semantic relevance.
4.4. Comparative Results and Analysis
- (1)
- On the three datasets of Restaurant, Laptop and Twitter, our model performance is better than the attention-based and syntax-based models, which shows that the RAG-TCGCN model performs better in encoding syntactic and semantic information through the adaptive fusion of syntactic and semantic information.
- (2)
- On the three datasets, the performance of the syntax-based model and the attention-based model is very different. The syntax-based model (ASGCN, CDT, BiGCN) is superior to the attention-based model (IAN, AOA, RAM). The main reason is that syntactic structure can more effectively capture the relationship between aspects and corresponding sentiment words, and extract more useful information.
- (3)
- Compared with attention-based models (MGAN, IAN), our model demonstrates significant improvement. The IAN model mainly obtains the initial feature representation through an LSTM pre-training model, and then obtains relatively rich semantic feature information through an attention mechanism. The effect of the model highly depends on whether the attention mechanism can accurately establish the connection between aspects and context. However, due to the complexity of a sentence and the inadequacy of the attention mechanism in capturing long-distance dependent information, this introduces some irrelevant information and generates noise, resulting in a poor performance of the model. However, our model constructs the relationship between aspects and opinion words by using syntactic information. Therefore, the noise introduced by the attention mechanism is avoided.
- (4)
- Compared with syntax-based models (R-GAT, DGEDT), our model's performance demonstrates significant improvement. Syntax-based models mainly obtain local features through syntactic structures and establish word-word relationships, but they ignore the global information and the semantic information between words. However, when there are sentences with obscure grammatical structure or complex sentences, extracting features only by syntactic knowledge leads to poor results.
- (5)
- Compared with the DualGCN model, our RAG-TCGCN model shows an improvement of 0.32% and 0.74% on Laptop and Twitter accuracy, respectively, and 0.3% and 1.12% on F1. Although a DualGCN model extracts information features syntactically and semantically, due to the complexity of sentences, each sentence has a different sensitivity to syntax and semantics. Therefore, important information cannot be obtained by self-learning according to the characteristics of sentences. On the basis of syntax and semantics, our model adds public information channels to form a three-channel network, which can learn adaptively and fuse according to the characteristics of sentences. This allows it to obtain good results.
4.5. Ablation Study
4.6. Case Study
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Pang, B.; Lee, L. Opinion mining and sentiment analysis. Found. Trends Inf. Retr. 2008, 2, 1–135. [Google Scholar] [CrossRef] [Green Version]
- Liu, B. Sentiment Analysis and Opinion Mining. Synth. Lect. Hum. Lang. Technol. 2012, 5, 1–167. [Google Scholar]
- Medhat, W.; Hassan, A.; Korashy, H. Sentiment analysis algorithms and applications: A survey. Ain Shams Eng. J. 2014, 4, 1093–1113. [Google Scholar] [CrossRef] [Green Version]
- Fink, C.R.; Chou, D.S.; Kopecky, J.J. Coarse- and fine-grained sentiment analysis of social media text. Johns Hopkins Appl. Techn. Digest. 2011, 1, 22–30. [Google Scholar]
- Rana, T.A.; Cheah, Y. Aspect extraction in sentiment analysis: Comparativeanalysis and survey. Artif. Intell. Rev. 2016, 46, 459–483. [Google Scholar] [CrossRef]
- Tang, H.; Ji, D.H.; Li, C.L.; Zhou, Q. Dependency graph enhanced dual-transformer structure for aspect-based sentiment classification. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Association for Computational Linguistics, Online, 5–10 July 2020; pp. 6578–6588. [Google Scholar]
- Lai, Y.; Zhang, L.; Han, D.; Zhou, R.; Wang, G. Fine-grained emotion classification of chinese microblogs based on graph convolution networks. World Wide Web. 2020, 23, 2771–2787. [Google Scholar] [CrossRef]
- Zhao, P.; Hou, L.; Wu, O. Modeling sentiment dependencies with graph convolutional networks for aspect-level sentiment classification. Knowl. Systems 2020, 193, 1–10. [Google Scholar] [CrossRef] [Green Version]
- Wan, H.; Yang, Y.F.; Du, J.F.; Liu, Y.A.; Qi, K.X.; Pan, J.Z. Target-aspect-sentiment joint detection for aspect-based sentiment analysis. Proc. AAAI Conf. Artif. Intell. 2020, 34, 9122–9129. [Google Scholar] [CrossRef]
- Schmitt, M.; Steinheber, S.; Schreiber, K.; Roth, B. Joint aspect and polarity classification for aspect-based sentiment analysis with end-to-end neural networks. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, 31 October–4 November 2018; pp. 1109–1114. [Google Scholar]
- Wang, Y.; Huang, M.; Zhu, X. Attention-based lstm for aspect-level sentiment classification. Empir. Methods Nat. Lang. Process. 2016, 1, 606–615. [Google Scholar]
- Ma, D.; Li, S.; Zhang, X.; Wang, H. Interactive attention networks for aspect-level sentiment classification. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, Melbourne, Australia, 19–25 August 2017; pp. 4068–4074. [Google Scholar]
- Zhang, X.; Gao, T. Multi-head attention model for aspect level sentiment analysis. J. Intell. Fuzzy Systems 2020, 38, 89–96. [Google Scholar] [CrossRef]
- Liu, P.; Liu, T.; Shi, J. Aspect level sentiment classification with unbiased attention and target enhanced representations. In Proceedings of the 35th Annual ACM Symposium on Applied Computing, Virtual, 30 March–3 April 2020; pp. 843–850. [Google Scholar]
- Zhang, C.; Li, Q.C.; Song, D.W. 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), Hong Kong, China, 3–7 November 2019; Volume 2, pp. 4560–4570. [Google Scholar]
- Sun, K.; Zhang, R.C.; Samuel, M.; Mao, Y.Y.; Liu, X.D. 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), Hong Kong, China, 3–7 November 2019; pp. 5679–5688. [Google Scholar]
- Huang, B.X.; Kathleen, M.C. Syntactic-aware aspect level sentiment classification with graph attention 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), Hong Kong, China, 3–7 November 2019; pp. 5472–5480. [Google Scholar]
- Wang, X.; Zhu, M.Q.; Bo, D.; Cui, P.; Shi, C.; Pei, J. Am-gcn: Adaptive multichannel graph convolutional networks. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, Virtual, 6–10 July 2020; pp. 1243–1253. [Google Scholar]
- Zheng, Y.W.; Zhang, R.C.; Samuel, M.; Mao, Y.Y. Replicate, walk, and stop on syntactic: An effective neural network model for aspectlevel sentiment classification. Proc. AAAI Conf. Artif. Intell. 2020, 34, 9685–9692. [Google Scholar]
- Bahdanau, D.; Cho, K.; Bengio, Y. Neural machine translation by jointly learning to align and translate. ICLR 2015, 7, 1–15. [Google Scholar]
- Baccianella, S.; Esuli, A.; Sebastiani, F. Senti-WordNet 3.0: An enhanced lexical resource for sentiment analysis and opinion mining. In Proceedings of the International Conference on Language Resources and Evaluation (LREC 2010), Valletta, Malta, 17–23 May 2010; pp. 83–90. [Google Scholar]
- Ku, L.W.; Chen, H.H. Mining opinions from the Web: Beyond relevance retrieval. J. Am. Inf. Sci. Technol. 2007, 58, 1838–1850. [Google Scholar] [CrossRef]
- Hownet Sentiment Dictionary. Available online: https://cidian.cnki.net (accessed on 22 October 2007).
- Nguyen, T.H.; Shirai, K. Aspect-based sentiment anslysis using tree kernel based relation. In Lecture Notes in Computer Science, Proceedings of the International Conference on Intelligent Text Processing and Computational Linguistics, Cairo, Egypt, 14–20, April 2015; Springer: Cham, Switzerland, 2015; pp. 114–125. [Google Scholar]
- Ding, X.; Liu, B.; Yu, P. A holist lexicon-based approach to opinion mining. In Proceedings of the 2008 International Conference on Web Search and Data Mining, Palo Alto, CA, USA, 11–12 February 2008; pp. 231–240. [Google Scholar]
- Pang, B.; Lee, L.; Shivakumar, V. Thumbs up? Sentiment classification usingmachine learning techniques. In Proceedings of the Conference on Empirical Methods in Natural Language Professing (EMNLP), Philadelphia, PA, USA, 6–7 July 2002; pp. 79–86. [Google Scholar]
- Waila, P.; Marisha; Singh, V.K.; Singh, M.K. Evaluating Machine Learning and Unsupervised Semantic Orientation approaches for sentiment analysis of textual reviews. In Proceedings of the 2012 IEEE International Conference on Computational Intelligence and Computing Research, Coimbatore, India, 18–20 December 2012; pp. 1–6. [Google Scholar]
- Gang, Z.; Zan, X. Research on sentiment analysis model of commodity reviews based on machine learning. Inf. Secur. Res. 2017, 2, 166–170. [Google Scholar]
- Chen, Y.H. Convolutional Neural Networks for Sentence Classification. Master’s Thesis, University of Waterloo, Waterloo, ON, Canada, 2015. [Google Scholar]
- Zhang, Y.; Jiang, Y.; Tong, Y. Study of sentiment classification for Chinese microblog based on recurrent neural network. Chin. Jourmal Electron. 2016, 4, 601–607. [Google Scholar] [CrossRef]
- Nowak, J.; Taspinar, A.; Scherer, R. LSTM recurrent neural networks for short text and sentiment classification. In Lecture Notes in Computer Science, Proceedings of the International Conference on Artificial Intelligence and Soft Computing, Zakopane, Poland, 11–15 June 2017; Springer: Cham, Switzerland, 2017; pp. 553–562. [Google Scholar]
- Wang, Y.Q.; Huang, M.; Zhu, X.Y.; Zhao, L. Attention-based lstm for aspect-level sentiment classification. In Proceedings of the 2016 conference on empirical methods in natural language processing, Austin, TX, USA, 1–5 November 2016; pp. 606–615. [Google Scholar]
- Song, Y.; Wang, J.H.; Tao, J.; Liu, Z.Y.; Rao, Y. Attentional encoder network for targeted sentiment classification. arXiv 2019, arXiv:1902.09314. [Google Scholar]
- Chen, P.; Sun, Z.Q.; Bing, L.D.; Yang, W. Recurrent attention network on memory for aspect sentiment analysis. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, Copenhagen, Denmark, 7–11 September 2017; pp. 452–461. [Google Scholar]
- Li, C.; Guo, X.; Mei, Q. Deep Memory Networks for Attitude Identifification. In Proceedings of the Tenth ACM International Conference on Web Search and Data Mining, Cambridge, UK, 6–10 February 2017; pp. 671–680. [Google Scholar]
- Kipf, T.N.; Welling, M. Semi-Supervised Classifification with Graph Convolutional Networks. In Proceedings of the 2017 International Conference on Learning Representations (ICLR), Toulon, France, 24–26 April 2017; pp. 24–26. [Google Scholar]
- Wang, K.; Shen, W.; Yang, Y.Y.; Quan, X.J.; Wang, R. Relational Graph Attention Network for Aspect-based Sentiment Analysis. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Online, 5–10 July 2020; pp. 3229–3238. [Google Scholar]
- Huang, B.X.; Carley, K.M. Parameterized convolutional neural net-works for aspect level sentiment classification. arXiv 2019, arXiv:1909.06276. [Google Scholar]
- Li, R.F.; Chen, H.; Feng, F.X.; Ma, Z.Y.; Wang, X.J.; Eduard, H. 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, Period, Online, 1–6 August 2021; pp. 6319–6329. [Google Scholar]
- Pennington, J.; Socher, R.; Manning, C. Glove: Global vectors for word representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, Qatar, 25–29 October 2014; pp. 1532–1543. [Google Scholar]
- Ashish, V.; Noam, S.; Niki, P.; Jakob, U.; Llion, J.; Aidan, N.G.; Łukasz, K.; Illia, P. Attention is all you need. Adv. Neural Inf. Process. Syst. (NIPS) 2017, 30, 5998–6008. [Google Scholar]
- Liina, P. The neural basis of combinatory syntactic and semantics. Science 2019, 366, 62–66. [Google Scholar]
- Li, D.; Wei, F.; Tan, C.Q.; Tang, D.Y.; Zhou, M.; Xu, K. Adaptive recursive neural network for target-dependent Twitter sentiment classification. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics, Baltimore, MI, USA, 23–24 June 2014; pp. 49–54. [Google Scholar]
- Maria, P.; Dimitris, G.; John, P.; Harris, P.; Ion, A.; Suresh, M. SemEval-2014 task 4: Aspect based sentiment analysis. In Proceedings of the 8th International Workshop on Semantic Evaluation (SemEval 2014), Dublin, Ireland, 23–24 August 2014; pp. 27–35. [Google Scholar]
- Huang, B.; Ou, Y.; Carley, K.M. Aspect level sentiment classification with attention-over-attention neural networks. In Lecture Notes in Computer Science, Proceedings of the International Conference on Social Computing, Behavioral-Cultural Modeling and Prediction and Behavior Representation in Modeling and Simulation, Washington, DC, USA, 10–13 July 2018; Springer: Cham, Switzerland, 2018; pp. 197–206. [Google Scholar]
- Fan, F.F.; Feng, Y.S.; Zhao, D.Y. Multi-grained attention network for aspect-level sentiment classification. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, 31 October–4 November 2018; pp. 3433–3442. [Google Scholar]
- Zhang, M.; Qian, T.Y. 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), Online, 16–18 November 2020; pp. 3540–3549. [Google Scholar]
Method | Characteristic | Representative | Comparison Results |
---|---|---|---|
sentiment dictionary | According to the sentiment polarity of sentiment words provided by different sentiment dictionaries, sentiment polarity can be divided at different granularity. | SentiWordNet, NTUSD, How Net, et al. | (1) Performance: deep learning is more accurate than traditional machine learning for sentiment classification. (2) Time and hardware: traditional machine learning requires less time and hardware than deep learning training. |
machine learning | Generally, sentiment polarity is divided through two stages: feature extraction and classification algorithm design. | SVM, NBM, LR, et al. | |
deep learning | Simple neural network, attention-based neural network, and graph convolution network are mainly used to divide the sentiment polarity. | CNN, LSTM, GCN, et al. |
Dataset | Division | Positive | Negative | Neutral |
---|---|---|---|---|
Rest14 | Training | 2164 | 807 | 637 |
Testing | 728 | 196 | 196 | |
Lap14 | Training | 994 | 851 | 455 |
Testing | 341 | 128 | 167 | |
Training | 1507 | 1528 | 3016 | |
Testing | 173 | 169 | 336 |
System | Windows 10 |
CPU | Intel(R) Core(TM) i7-10510u |
GPU | NVIDIA GeForce MX250 |
Language | Python 3.8 |
Tool | Pycharm 2021 |
Parameter Settings | Value |
---|---|
embed_dim | 300 |
batch_size | 16 |
rnn_hidden | 50 |
input_dropout | 0.7 |
gcn_dropout | 0.1 |
num_epoch | 50 |
learning_rate | 0.002 |
Models | Restaurant | Laptop | ||||
---|---|---|---|---|---|---|
Accuracy | Macro-F1 | Accuracy | Macro-F1 | Accuracy | Macro-F1 | |
IAN | 78.60 | - | 72.10 | - | - | - |
AOA | 80.53 | 69.84 | 72.88 | 67.48 | 72.25 | 69.96 |
RAM | 80.23 | 70.80 | 74.49 | 71.35 | 69.36 | 67.30 |
MGAN | 81.25 | 71.94 | 75.39 | 72.47 | 72.54 | 70.81 |
ASGCN-DG | 80.77 | 72.02 | 75.55 | 71.05 | 72.15 | 70.40 |
ASGCN-DT | 80.86 | 72.19 | 74.14 | 69.24 | 71.53 | 69.68 |
CDT | 82.30 | 74.02 | 77.19 | 72.99 | 74.66 | 73.66 |
BiGCN | 81.97 | 73.48 | 74.59 | 71.84 | 74.16 | 73.35 |
R-GAT | 83.30 | 76.08 | 77.42 | 73.76 | 75.57 | 73.82 |
DGEDT | 83.90 | 75.10 | 76.80 | 72.30 | 74.80 | 73.40 |
DualGCN | 84.27 | 78.08 | 78.48 | 74.74 | 75.92 | 74.29 |
RAG-TCGCN | 84.09 | 77.02 | 78.80 | 75.04 | 76.66 | 75.41 |
Models | Restaurant | Laptop | ||||
---|---|---|---|---|---|---|
Accuracy | Macro-F1 | Accuracy | Macro-F1 | Accuracy | Macro-F1 | |
SynGCN | 82.57 | 75.06 | 76.90 | 72.60 | 74.59 | 73.13 |
SemGCN | 82.48 | 73.12 | 76.42 | 72.19 | 75.18 | 73.87 |
Comom | 81.50 | 71.99 | 77.22 | 73.14 | 74.45 | 73.39 |
TCGCN | 82.84 | 74.70 | 77.85 | 73.97 | 75.78 | 74.59 |
RAG-TCGCN | 84.09 | 77.02 | 78.80 | 75.04 | 76.66 | 75.41 |
Moedel | Aspect | Attention Visualization | Prediction | Label |
---|---|---|---|---|
IAN | food | Great food but terrible service | Neutral | Positive |
dinner | My wife and I recently visited the bistro for dinner and have a wonderfull experience | Positive | Neutral | |
Windows11 | Did not enjoy the new Windows11 and touchscreen functions | Neutral | Negative | |
SynGCN | food | Great food but terrible service | Positive | Positive |
dinner | My wife and I recently visited the bistro for dinner and have a wonderfull experience | Positive | Neutral | |
Windows11 | Did not enjoy the new Windows11 and touchscreen functions | Positive | Negative | |
SemGCN | food | Great food but terrible service | Positive | Positive |
dinner | My wife and I recently visited the bistro for dinner and have a wonderfull experience | Positive | Neutral | |
Windows11 | Did not enjoy the new Windows11 and touchscreen functions | Negative | Negative | |
Comom | food | Great food but terrible service | Positive | Positive |
dinner | My wife and I recently visited the bistro for dinner and have a wonderfull experience | Positive | Neutral | |
Windows11 | Did not enjoy the new Windows11 and touchscreen functions | Negative | Negative | |
RAG-TCGCN | food | Great food but terrible service | Positive | Positive |
dinner | My wife and I recently visited the bistro for dinner and have a wonderfull experience | Neutral | Neutral | |
Windows11 | Did not enjoy the new Windows11 and touchscreen functions | Negative | Negative |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Xu, H.; Liu, S.; Wang, W.; Deng, L. RAG-TCGCN: Aspect Sentiment Analysis Based on Residual Attention Gating and Three-Channel Graph Convolutional Networks. Appl. Sci. 2022, 12, 12108. https://doi.org/10.3390/app122312108
Xu H, Liu S, Wang W, Deng L. RAG-TCGCN: Aspect Sentiment Analysis Based on Residual Attention Gating and Three-Channel Graph Convolutional Networks. Applied Sciences. 2022; 12(23):12108. https://doi.org/10.3390/app122312108
Chicago/Turabian StyleXu, Huan, Shuxian Liu, Wei Wang, and Le Deng. 2022. "RAG-TCGCN: Aspect Sentiment Analysis Based on Residual Attention Gating and Three-Channel Graph Convolutional Networks" Applied Sciences 12, no. 23: 12108. https://doi.org/10.3390/app122312108
APA StyleXu, H., Liu, S., Wang, W., & Deng, L. (2022). RAG-TCGCN: Aspect Sentiment Analysis Based on Residual Attention Gating and Three-Channel Graph Convolutional Networks. Applied Sciences, 12(23), 12108. https://doi.org/10.3390/app122312108