Modeling_Category_Semantic_and_Sentiment_Knowledge_for_Aspect-Level_Sentiment_Analysis
Modeling_Category_Semantic_and_Sentiment_Knowledge_for_Aspect-Level_Sentiment_Analysis
4, OCTOBER-DECEMBER 2024
Abstract—To classify the sentiment polarity of the aspect entity classifying sentiments of specific terms within a sentence. For
in a sentence, most existing research evaluates the semantic knowl- instance, in “The food is good, but the waiter is so rude.” ATSC
edge among a certain aspect of a sentence and corresponding con- identifies ‘food’ as positive (corresponding to the expression
text as significant clues for the task. However, available accompa-
nying information has not been completely exploited, especially the “good”) and ‘waiter’ as negative (corresponding to the expres-
coarse-grained category-level knowledge in contexts. Such knowl- sion “so rude”). In contrast, ACSC is a coarse-grained subtask
edge can help to alleviate polysemy and ambivalence problems. that predicts sentiments over general categories in a sentence.
In this article, we propose a multi-task learning framework Co- In the same instance, ACSC might categorize ‘Food Quality’ as
interactive Attention Network(CoAN) to jointly learn and handle positive and ‘Service Quality’ as negative. Thus, while ATSC
multiple granularity features at both target and category levels. In
order to leverage the fine-grained and coarse-grained knowledge deals with explicit terms, ACSC handles broad categories.
in contexts and get multi-granularity sentiment related sentence In the evolving landscape of sentiment analysis, the comple-
representations, we introduce two co-interactive attention layers mentary strengths of symbolic and sub-symbolic AI approaches
to conduct accompanying semantic interactions at the word-level play a pivotal role in addressing the challenges of ACSC and
and the feature-level. The experimental results on three restaurant ATSC. Symbolic methods [3], [4] use structured knowledge,
review datasets prove that CoAN is superior to the baselines by
1.41% in accuracy and 2.81% in F1-score. Furthermore, ablation such as syntax or commonsense knowledge for sentiment anal-
studies and attention visualizations show that the multi-task frame- ysis. However, symbolic methods typically struggle to under-
work and novel co-interactive mechanisms can distinguish and fuse stand nuanced language structures. Zhu et al. [5], [6] focus
multi-granularity knowledge, which benefits the two subtasks in on the structure investigation of syntactic dependency relations
aspect based sentiment analysis. but ignore rich semantic structures between words. Formally,
Index Terms—Aspect-level sentiment analysis, category-level attention-based sub-symbolic models [7], [8], [9] usually con-
knowledge, multi-task learning. struct two-channel neural network to model text sequences and
aspect sequences. However, the performance of these models
I. INTRODUCTION is contingent upon the availability of large corpus, and their
potential is constrained by high computational costs. Within a
SPECT based sentiment analysis (ABSA) is drawn to
A infer sentiment polarities towards different aspects in a
sentence, where aspect can be a specific term or a general
specific domain of interest, the availability of labeled dataset is
not always guaranteed, and the process of manual annotation
is both laborious and costly. Dragoni et al. [10], [11] achieve
category. ABSA includes two subtasks: Aspect Term Sentiment automatic discrimination of fine-grained sentiment analysis by
Classification [1] (ATSC) and Aspect Category Sentiment Clas- establishing a graph structure. The accuracy of the sentiment
sification [2] (ACSC). ATSC is a fine-grained subtask focuses on analysis heavily depends on the quality of the graph’s con-
struction. And the majority of current research [12], [13], [14],
Manuscript received 2 February 2023; revised 21 January 2024; accepted [15] focuses on addressing either ATSC or ACSC as isolated
15 April 2024. Date of publication 19 April 2024; date of current version 18 tasks. Current research, while grappling with data limitations
November 2024. This work was supported in part by the National Natural
Science Foundation of China under Grant 61702367 and Grant 61976156, in and computational challenges, often overlooks the potential of
part by Tianjin Science and Technology Commissioner project under Grant combining syntactic and semantic analyses.
20YDTPJC00560, in part by the Fundamental Research Program of Shanxi We observe that the granular knowledge from ATSC and
Province under Grant 202303021221132, and in part by the special fund for
Science and Technology Innovation Teams of Shanxi Province under Grant ACSC can be mutually supplementary, especially in complex
202304051001017. Recommended for acceptance by P. Nakov. (Corresponding sentiment contexts. In Fig. 1(a), there are two sentences with the
author: Jucheng Yang.) same aspect category “food” and the same sentiment expression
Yuan Wang, Peng Huo, Lingyan Tang, Ning Xiong, and Jucheng Yang are
with the College of Artificial Intelligence, Tianjin University of Science and “high”, but express opposite sentiment polarities. Therefore, it
Technology, Tianjin 300457, China (e-mail: [email protected]; yaphet is biased to assume that the emotional polarities of aspect cate-
[email protected]; [email protected]; [email protected]. gory is only related to the sentiment expressions in a sentence.
cn; [email protected]).
Mengting Hu is with Nankai University, Tianjin 300192, China, and also with In Fig. 1(b), the aspect category “food” originally expresses
the Shanxi Medical University, Jinzhong 030605, China. positive sentiment but ends up with neutral sentiment polarity
Qi Yu is with Shanxi Medical University, Jinzhong 030605, China, and also due to the implicit category semantics with negative sentiment.
with the Key Laboratory of Big Data Clinical Decision Research in Shanxi
Province, Taiyuan 030619, China. It means the target sentiment prediction will be affected by
Digital Object Identifier 10.1109/TAFFC.2024.3391337 the sentiment of given target’s corresponding aspect category.
1949-3045 © 2024 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See https://www.ieee.org/publications/rights/index.html for more information.
Authorized licensed use limited to: Mepco Schlenk Engineering College. Downloaded on February 24,2025 at 08:26:58 UTC from IEEE Xplore. Restrictions apply.
WANG et al.: MODELING CATEGORY SEMANTIC AND SENTIMENT KNOWLEDGE FOR ASPECT-LEVEL SENTIMENT ANALYSIS 1963
1) Two Output Strategies for ACSC Prediction: For improv- IV. EXPERIMENTS
ing the performance of ACSC task, we adopt two output strate-
gies in the ACSC task learning module: (1) In CoAN+Four, A. Datasets and Settings
we regard ACSC as N 4-classification problems. The prediction Experiments are conducted on three benchmark restaurant
layer not only predicts the probability distributions of the three datasets from SemEval’14 Task 4 [26], SemEval’15 Task 12 [27]
sentiments but also judges whether the category attribute exists and SemEval’16 Task 5 [28] (denoted as Rest14, Rest15 and
in the current sentence; (2) In CoAN+Thri, we regard ACSC as Rest16). In accordance with the settings in previous works [1],
N 3-classification sentiment classification problems. [13], samples with conf lict sentiment label have been removed
The j − th category-oriented sentence representation is ap- and only the ones with positive, negative and neutral labels
plied to predict the sentiment polarity: have been retained. The number of each sentiment label in
yj = softmax Wpa · Hcaj
+ bap (9) training and test samples has been shown in Table I. In order
to balance the dataset, the 13 aspect categories are mapped into
where Wpa ∈ R1×C and bap ∈ RC are learnable parameters, and eight broad categories with the method mentioned in [2], while
the value of C can be 3 or 4 due to the strategy. the sentiment labels are kept unchanged. In all experiments,
2) ATSC Prediction: In order to enhance the context seman- the pre-trained BERT-base format is fine-tuned, embedding
tic features and aspect entity semantic features, we average dimension is set to 768 and hidden dimension to 300. During the
pooling the context sentiment semantic representation Hct , the training process, dropout rate is set to 0.1 to avoid overfitting,
context initial semantic representation Hc and the aspect entity and the number of training epochs is 20. The best models are
initial semantic representation Ht , and then concatenate the selected by early stopping. The model parameters are optimized
semantic vectors in series to obtain the input of aspect-level and updated by Adam optimizer with a learning rate of 5e-5.
fine-grained sentiment classification. The experiments are conducted using an Nvidia RTX 1080 GPU.
The experimental results are obtained by averaging the outcomes
oavg
ct = Hc
avg
⊕ Htavg ⊕ Hctavg
Authorized licensed use limited to: Mepco Schlenk Engineering College. Downloaded on February 24,2025 at 08:26:58 UTC from IEEE Xplore. Restrictions apply.
1966 IEEE TRANSACTIONS ON AFFECTIVE COMPUTING, VOL. 15, NO. 4, OCTOBER-DECEMBER 2024
Authorized licensed use limited to: Mepco Schlenk Engineering College. Downloaded on February 24,2025 at 08:26:58 UTC from IEEE Xplore. Restrictions apply.
WANG et al.: MODELING CATEGORY SEMANTIC AND SENTIMENT KNOWLEDGE FOR ASPECT-LEVEL SENTIMENT ANALYSIS 1967
TABLE V
ABLATION STUDY FOR ACSC
TABLE IV
ABLATION STUDY FOR ATSC
Authorized licensed use limited to: Mepco Schlenk Engineering College. Downloaded on February 24,2025 at 08:26:58 UTC from IEEE Xplore. Restrictions apply.
1968 IEEE TRANSACTIONS ON AFFECTIVE COMPUTING, VOL. 15, NO. 4, OCTOBER-DECEMBER 2024
V. CONCLUSION
In this article, we propose a novel multi-task learning frame-
work to jointly learn the two important subtasks of ABSA and
improve their performance simultaneously. We design two co-
interactive attention layers that can effectively exploit and lever-
age multiple granularity informative interactions at word-level
and feature-level. The experimental results show that CoAN
performs better than other baselines on the three public datasets,
and the problem of polysemy and ambivalence is solved by
adding coarse-grained knowledge. In future work, we would try
to further solve the information deficiency issue by introducing
graph-structured knowledge with the help of the multi-grained
graph attention networks, to deal with the task of the detection
of polysemy information.
REFERENCES
[1] D. Tang, B. Qin, X. Feng, and T. Liu, “Effective LSTMs for target-
dependent sentiment classification,” in Proc. COLING, 26th Int. Conf.
Comput. Linguistics, 2016, pp. 3298–3307.
[2] Y. Li, C. Yin, and S. Zhong, “Sentence constituent-aware aspect-category
sentiment analysis with graph attention networks,” in Proc. Natural Lang.
Process. Chin. Comput., 2020, pp. 815–827.
[3] G. Qiu and B. Liu, “Opinion word expansion and target extraction through
double propagation,” Comput. Linguistics, vol. 37, pp. 9–27, 2011.
[4] X. Bao, Z. Wang, X. Jiang, R. Xiao, and S. Li, “Aspect-based sentiment
analysis with opinion tree generation,” in Proc. 31st Int. Joint Conf. Artif.
Intell., 2022, pp. 4044–4050.
Fig. 5. Visualization of attention weight. The darker the color, the higher the
[5] L. Zhu, X. Zhu, J. Guo, and S. Dietze, “Exploring rich structure information
weight. IAN (positive) and ASGCN (neutral) get wrong predictions on the
for aspect-based sentiment classification,” J. Intell. Inf. Syst., vol. 60,
first sample. IAN (positive), ASGCN (positive) and AEN (negative) get
pp. 97–117, 2023.
wrong predictions on the second sample.
[6] Y. Liang, F. Meng, J. Zhang, Y. Chen, J. Xu, and J. Zhou, “A dependency
syntactic knowledge augmented interactive architecture for end-to-end
aspect-based sentiment analysis,” Neurocomputing, vol. 454, pp. 291–302,
2021.
[7] W. Zhang, X. Li, Y. Deng, L. Bing, and W. Lam, “Towards generative
E. Error Case Analysis aspect-based sentiment analysis,” in Proc. 59th Annu. Meeting Assoc.
Comput. Linguistics 11th Int. Joint Conf. Natural Lang. Process., 2021,
To provide an intuitive understanding of CoAN, we ana- pp. 504–510.
lyze two error cases in Fig. 4. These cases reveal that though [8] Y. Song, J. Wang, T. Jiang, Z. Liu, and Y. Rao, “Attentional encoder
CoAN+Thri occasionally mispredicts sentiment in multi-task network for targeted sentiment classification,” 2019, arXiv:1902.09314.
[9] W. Li, S. Yin, and T. Pu, “Lexical attention and aspect-oriented graph
settings, it performs accurately in single-task settings. And these convolutional networks for aspect-based sentiment analysis,” J. Intell.
cases also suggest that the contextual semantic learning and Fuzzy Syst., vol. 42, pp. 1643–1654, 2022.
overall training of the framework primarily rely on the results of [10] M. Dragoni, C. d. C. Pereira, and A. G. B. Tettamanzi, “Combining
argumentation and aspect-based opinion mining: The smack system,” AI
the ATSC task, and further influence the outcomes of ACSC task. Commun., vol. 31, pp. 75–95, 2018.
Furthermore, the effectiveness of the auxiliary task is essential [11] M. Dragoni, M. Federici, and A. Rexha, “ReUS: A real-time unsuper-
for enhancing the main task’s performance. vised system for monitoring opinion streams,” Cogn. Comput., vol. 11,
pp. 469–488, 2019.
To elucidate CoAN’s approach of learning category-level [12] B. Liang, H. Su, L. Gui, E. Cambria, and R. Xu, “Aspect-based sentiment
semantics and its impact on targeted sentiment classification, analysis via affective knowledge enhanced graph convolutional networks,”
we visualized the attention weights of IAN, ASGCN, AEN, and Knowl.-Based Syst., vol. 235, 2022, Art. no. 107643.
[13] Y. Wang, M. Huang, X. Zhu, and L. Zhao, “Attention-based LSTM for
CoAN+Thri models, as shown in Fig. 5. All models correctly aspect-level sentiment classification,” in Proc. Conf. Empirical Methods
predict the training sample “The food quality is high.” How- Natural Lang. Process., 2016, pp. 606–615.
ever, in testing, when “quality” is replaced with “price,” only [14] F. Fan, Y. Feng, and D. Zhao, “Multi-grained attention network for aspect-
level sentiment classification,” in Proc. Conf. Empirical Methods Natural
CoAN appropriately focuses more on “price”, highlighting its Lang. Process., 2018, pp. 3433–3442.
importance over “food”. This demonstrates CoAN’s robustness [15] M. Hu et al., “CAN: Constrained attention networks for multi-aspect
and ability to effectively discern and utilize coarse-grained con- sentiment analysis,” in Proc. Conf. Empirical Methods Natural Lang.
Process. Int. Joint Conf. Natural Lang. Process., 2019, pp. 4601–4610.
text, especially in complex language scenarios. As shown in [16] Z. Wang, S. Ho, and E. Cambria, “Multi-level fine-scaled sentiment
Fig. 5(a), CoAN effectively balances attention between explicit sensing with ambivalence handling,” Int. J. Uncertainty Fuzziness Knowl.
and implicit category sentiments within the global context. As Based Syst., vol. 28, pp. 683–697, 2020.
[17] X. Hou, P. Qi, G. Wang, R. Ying, and B. Zhou, “Graph ensemble learning
shown in Fig. 5(b), CoAN outperforms other models in capturing over multiple dependency trees for aspect-level sentiment classification,”
sentence sentiment-affecting features and deals more effectively in Proc. Conf. North Amer. Chapter Assoc. Comput. Linguistics, 2021,
with neutral labeled samples compared with AEN. pp. 2884–2894.
Authorized licensed use limited to: Mepco Schlenk Engineering College. Downloaded on February 24,2025 at 08:26:58 UTC from IEEE Xplore. Restrictions apply.
WANG et al.: MODELING CATEGORY SEMANTIC AND SENTIMENT KNOWLEDGE FOR ASPECT-LEVEL SENTIMENT ANALYSIS 1969
[18] Y. Li, C. Yin, S. Zhong, and X. Pan, “Multi-instance multi-label learning Peng Huo received the BS degree from the Tianjin University of Science and
networks for aspect-category sentiment analysis,” in Proc. Conf. Empirical Technology in 2017, and the MS degree from the Tianjin University of Science
Methods Natural Lang. Process., 2020, pp. 3550–3560. and Technology, in 2021. His research interests include sentiment analysis and
[19] X. Chen et al., “Aspect sentiment classification with document-level senti- knowledge graphs.
ment preference modeling,” in Proc. 58th Annu. Meeting Assoc. Comput.
Linguistics, 2020, pp. 3667–3677.
[20] Z. Dai, C. Peng, H. Chen, and Y. Ding, “A multi-task incremental learning
framework with category name embedding for aspect-category sentiment
analysis,” in Proc. Conf. Empirical Methods Natural Lang. Process., 2020,
pp. 6955–6965.
[21] B. Liang, R. Yin, L. Gui, J. Du, Y. He, and R. Xu, “Aspect-invariant sen-
timent features learning: Adversarial multi-task learning for aspect-based Lingyan Tang received the BS degree in computer science and technology from
sentiment analysis,” in Proc. 29th ACM Int. Conf. Inf. Knowl. Manage., the Jiangxi University of Traditional Chinese Medicine in 2019. She is currently
2020, pp. 825–834. working toward the master’s degree with the Department of Artificial Intelli-
[22] L. Qin, W. Che, Y. Li, M. Ni, and T. Liu, “DCR-Net:A deep co-interactive gence, Tianjin University of Science and Technology. Her research interests
relation network for joint dialog act recognition and sentiment classifica- include machine learning, text classification, and sentiment analysis.
tion,” in Proc. AAAI Conf. Artif. Intell., 2020, pp. 8665–8672.
[23] W. Li, W. Shao, S. Ji, and E. Cambria, “BiERU: Bidirectional emotional
recurrent unit for conversational sentiment analysis,” Neurocomputing,
vol. 467, pp. 73–82, 2022.
[24] J. A. Kumar, T. E. Trueman, and E. Cambria, “A convolutional stacked
bidirectional LSTM with a multiplicative attention mechanism for aspect
category and sentiment detection,” Cogn. Comput., vol. 13, pp. 1423–1432,
2021. Ning Xiong received the B.S. degree in computer science and technology from
[25] R. He, W. S. Lee, H. T. Ng, and D. Dahlmeier, “An interactive multi-task the Tianjin University of Science and Technology in 2022. He is currently work-
learning network for end-to-end aspect-based sentiment analysis,” in Proc. ing toward the master’s degree with the Department of Artificial Intelligence,
57th Annu. Meeting Assoc. Comput. Linguistics, 2019, pp. 504–515. Tianjin University of Science and Technology. His research interests include
[26] M. Pontiki, D. Galanis, J. Pavlopoulos, H. Papageorgiou, I. Androutsopou- machine learning and deep learning.
los, and S. Manandhar, “SemEval-2014 task 4: Aspect based sentiment
analysis,” in Proc. 8th Int. Workshop Semantic Eval., 2014, pp. 27–35.
[27] M. Pontiki, D. Galanis, H. Papageorgiou, S. Manandhar, and I. Androut-
sopoulos, “SemEval-2015 task 12: Aspect based sentiment analysis,” in
Proc. 9th Int. Workshop Semantic Eval., 2015, pp. 486–495.
[28] M. Pontiki, D. Galanis, H. Papageorgiou, I. Androutsopoulos, S. Manand-
har, and M. AL-Smadi, “SemEval-2016 task 5: Aspect based sentiment
analysis,” in Proc. 10th Int. Workshop Semantic Eval., 2016, pp. 19–30.
[29] B. Huang and K. M. Carley, “Syntax-aware aspect level sentiment clas- Mengting Hu received the BS degree from Tongji University in 2015, the MS
sification with graph attention networks,” in Proc. Empirical Methods and PhD degrees from Nankai University, in 2018 and 2021, respectively. His
Natural Lang. Process.-Int. Joint Conf. Natural Lang. Process., 2019, PhD degree is jointly conferred by IBM CRL. She is currently an assistant
pp. 5469–5477. professor with the College of Software, Nankai University. Her research interests
[30] D. Ma, S. Li, X. Zhang, and H. Wang, “Interactive attention networks for include sentiment analysis, domain adaptation, and few-shot learning.
aspect-level sentiment classification,” in Proc. 26th Int. Joint Conf. Artif.
Intell., 2017, pp. 4068–4074.
[31] D. Tang, B. Qin, and T. Liu, “Aspect level sentiment classification with
deep memory network,” in Proc. Conf. Empirical Methods Natural Lang.
Process., 2016, pp. 214–224.
[32] C. Zhang, Q. Li, and D. Song, “Aspect-based sentiment classification with
aspect-specific graph convolutional networks,” in Proc. Conf. Empirical
Methods Natural Lang. Process.-Int. Joint Conf. Natural Lang. Process.,
2019, pp. 4568–4578. Qi Yu received the BS degree from Shanxi University in 2004, the MS degree
[33] M. Zhang and T. Qian, “Convolution over hierarchical syntactic and lexical from Wuhan University in 2007, and the PhD degree from Shanxi Medical Uni-
graphs for aspect level sentiment analysis,” in Proc. Conf. Empirical versity in 2014. He went to Indiana University for visiting study, Bloomington
Methods Natural Lang. Process., 2020, pp. 3540–3549. in 2013. He is currently a professor with the School of Management, Shanxi
[34] K. Sun, R. Zhang, S. Mensah, Y. Mao, and X. Liu, “Aspect-level sentiment Medical University. His research focuses on healthcare Big Data.
analysis via convolution over dependency tree,” in Proc. Conf. Empirical
Methods Natural Lang. Process.-Int. Joint Conf. Natural Lang. Process.,
2019, pp. 5679–5688.
[35] W. Xue and T. Li, “Aspect based sentiment analysis with gated convolu-
tional networks,” in Proc. 56th Annu. Meeting Assoc. Comput Linguistics,
2018, pp. 483–493.
Authorized licensed use limited to: Mepco Schlenk Engineering College. Downloaded on February 24,2025 at 08:26:58 UTC from IEEE Xplore. Restrictions apply.