Elsevier

Knowledge-Based Systems

Volume 264, 15 March 2023, 110326
Knowledge-Based Systems

Aspect-based sentiment analysis via multitask learning for online reviews

https://doi.org/10.1016/j.knosys.2023.110326Get rights and content

Abstract

Aspect based sentiment analysis(ABSA) aims to identify aspect terms in online reviews and predict their corresponding sentiment polarity. Sentiment analysis poses a challenging fine-grained task. Two typical subtasks are involved: Aspect Term Extraction (ATE) and Aspect Polarity Classification (APC). These two subtasks are usually trained discretely, which ignores the connection between ATE and APC. Concretely, we can relate ATE to APC through aspects and train them concurrently. We mainly use the ATE task as an auxiliary task, allowing the APC to focus more on relevant aspects to facilitate aspect polarity classification. In addition, previous studies have shown that utilizing dependency syntax information with a graph neural network (GNN) also contributes to the performance of the APC task. However, most studies directly input sentence dependency relations into graph neural networks without considering the influence of aspects, which do not emphasize the important dependency relationships. To address these issues, we propose a multitask learning model combining APC and ATE tasks that can extract aspect terms as well as classify aspect polarity simultaneously. Moreover, we exploit multihead attention(MHA) to associate dependency sequences with aspect extraction, which not only combines both ATE and APC tasks but also stresses the significant dependency relations, enabling the model to focus more on words closely related to aspects. According to our experiments on three benchmark datasets, we demonstrate that the connection between ATE and APC can be better established by our model, which enhances aspect polarity classification performance significantly. The source code has been released on GitHub https://github.com/winder-source/MTABSA.

Introduction

Aspect based sentiment analysis (ABSA) aims to mine sentiment information toward a given sentence, but is fine-grained. Specifically, its goal is to identify aspect terms in a comment and predict their corresponding sentiment polarity. In the example, “I like the service in the restaurant, but the environment is not very good”, the aspect terms are “service” and “environment”. The output emotional polarity of the two aspects is positive and negative. The sentiments corresponding to these two aspects are quite opposite, so it is not appropriate to conduct a sentiment analysis of the whole sentence but to conduct a more fine-grained analysis. The main research line of ABSA focuses on two subtasks, namely, ATE and APC.

The APC task is usually considered a classification task, or sentiment classification of a given aspect in a sentence. The approach to solving APC tasks has evolved from feature engineering to deep learning-based methods. The most common deep neural network architectures used in APC tasks are convolutional neural networks (CNNs) and recurrent neural networks (RNNs) [1], [2]. Moreover, the application of attention mechanisms in neural networks is becoming increasingly extensive. The attention mechanism [3], [4] is also suitable for ABSA tasks. In recent years, SOTA results have been obtained in numerous NLP tasks with proposed pretraining models. Therefore, many studies are based on the pretraining model, such as the AEN model [5] and BERT-PT [6]. In addition, a sentence contains not only semantic information but also syntactic structure information, such as dependency tree structure. Intuitively, it is helpful to integrate syntactic structure information into the APC task because the syntactic structure can better capture sentiment words related to aspect. Recently, many methods have regarded the dependency tree as an adjacency matrix and utilized GNNs to encode the entire adjacency matrix, such as graph attention networks [7] (GAT) and graph convolutional networks [8], [9] (GCN).

In most of these studies, the ATE task was studied independently. The ATE task is regarded as a NER task aimed at extracting aspects of the sentences as a sequence labeling task [10], [11], [12]. The advancement of deep learning has shown its usefulness in tasks. Recent methods use deep neural networks to assist aspect extraction [13], [14], [15]. Furthermore, there are many models based on BERT to perform sequence labeling tasks due to the success of the model.

Other approaches for sentiment analysis [16], [17] have emerged in recent years, with meta-based self-training sentiment analysis [18] and prompt-based sentiment analysis [19], [20] being proposed to perform sentiment analysis more efficiently, and new trends in neurosymbolic AI for explainable sentiment analysis [21], [22], [23], [24] have also emerged.

In addition, there are also some works that mainly consider multitask learning in ABSA [25], [26], [27] to achieve better performance with the help of interactions between tasks. Based on the inspiration of multitask learning, we also propose a multitask learning model that combines APC and ATE tasks. In our model, the APC task’s performance is further boosted by using the feature of the ATE task. Inspired by the relational graph attention network (RGAT) presented by Wang et al. [28], we also use a series of RGAT processes to encode the reshaped and pruned dependency tree. Although previous studies have shown that graph neural networks contribute to the performance of APC tasks, most previous studies have fed sentence dependencies directly into graph neural networks. Such dependencies do not consider the influence of aspects. Therefore, to address the challenge of dependency relations, we apply MHA to associate dependency sequences with aspect extraction, enabling our model to focus on the dependency sequences that are more closely related to the aspects. To validate the effectiveness of the proposed model, extensive experiments are conducted on three public datasets, and according to the experimental results, our model has obvious improvements and achieves superior performance.

Our main contributions are as follows:

  • We propose a multitask learning model that integrates BERT and RGAT models for APC and ATE tasks. The two tasks are conducted simultaneously in a joint training manner.

  • We propose to associate dependency sequences with aspect extraction via MHA, which can enhance the connection between aspects and their associated dependency sequences.

  • Three public datasets were used to confirm the validity of the model. As seen from the experimental results, the proposed model outperforms recent state-of-the-art models. We further conduct domain-adaptation experiments, achieving appealing results.

Section snippets

Aspect term extraction

As a subtask of ABSA, aspect term extraction works to identify different aspects mentioned in a given sentence. Aspect terms refer to specific characteristics or attributes of products or services discussed in the review. Aspect term extraction can be regarded as a textual entity. Aspect term extraction methods have undergone a development phase from traditional methods to deep learning methods.

Our model

We introduce our multitask learning model in detail in this section. It consists of four main parts: BERT-APC, RGAT, BERT-ATE, and MHA. Fig. 1 shows the overall architecture of our model. The input of our model includes three parts: input sentences and aspects into the BERT-APC module simultaneously; input dependency relations into the RGAT module; and input the sentence into the BERT-ATE module. The model has two outputs: the extracted aspect and the aspect polarity. BERT-APC is used to

Experiments

We first present the three datasets used in this section. Then, we introduce the evaluation metrics and parameter settings and the baseline approaches used for comparison. Finally, the experimental results are given and analyzed.

Discussion

To further understand the effects of some important parameters and modules on the experimental results, this section discusses them in detail, including the impact of multitask learning and MHA, the effects of the number of heads in MHA and RGAT, the effects of hyperparameter α, the effects of different syntactic parsers, and the effects of multitask learning on ATE. In the discussion of the effects of multitask learning and MHA, we go further by changing the calculation of MHA to discuss how

Conclusion

We propose a new multitask learning model for ABSA by combining aspect term extraction and aspect polarity classification. Our model consists of four main modules: BERT-APC, BERT-ATE, RGAT, and MHA. The model can not only extract aspects but also classify aspects, however we mainly focus on the APC task, with the ATE task as an auxiliary means to improve the performance of the APC task. To correlate the two tasks and highlight important dependencies, we leverage a multihead attention mechanism

CRediT authorship contribution statement

Guoshuai Zhao: Conceptualization, Methodology, Formal analysis, Writing – original draft, Writing – review & editing, Supervision. Yiling Luo: Methodology, Software, Data curation, Writing – original draft, Writing – review & editing, Formal analysis, Validation. Qiang Chen: Methodology, Software, Data curation, Writing – original draft, Formal analysis. Xueming Qian: Resources, Supervision.

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgments

This work was supported in part by the National Natural Science Foundation of China under Grants 61902309, in part by China Postdoctoral Science Foundation under Grant 2020M683496 and BX20190273, in part by the Fundamental Research Funds for the Central Universities, China (xxj022019003, xzd012022006) ; in part by the Humanities and Social Sciences Foundation of Ministry of Education, China under Grant 16XJAZH003, and in part by the Science and Technology Program of Xi’an, China under Grant

References (61)

  • ZengJ. et al.

    Relation construction for aspect-level sentiment classification

    Inform. Sci.

    (2022)
  • PhanH.T. et al.

    Convolutional attention neural network over graph structures for improving the performance of aspect-level sentiment analysis

    Inform. Sci.

    (2022)
  • ZhaoM. et al.

    Aggregated graph convolutional networks for aspect-based sentiment classification

    Inform. Sci.

    (2022)
  • FengS. et al.

    Aspect-based sentiment analysis with attention-assisted graph and variational sentence representation

    Knowl.-Based Syst.

    (2022)
  • LiangY. et al.

    A dependency syntactic knowledge augmented interactive architecture for end-to-end aspect-based sentiment analysis

    Neurocomputing

    (2021)
  • W. Xue, T. Li, Aspect Based Sentiment Analysis with Gated Convolutional Networks, in: Proceedings of the 56th Annual...
  • ZhaoG. et al.

    Exploring users’ internal influence from reviews for social recommendation

    IEEE Trans. Multimed.

    (2018)
  • SongY. et al.

    Targeted sentiment classification with attentional encoder network

  • H. Xu, B. Liu, L. Shu, S.Y. Philip, BERT Post-Training for Review Reading Comprehension and Aspect-based Sentiment...
  • BaiX. et al.

    Investigating typed syntactic dependencies for targeted sentiment classification using graph attention neural network

    IEEE/ACM Trans. Audio Speech Lang. Process.

    (2020)
  • G. Lample, M. Ballesteros, S. Subramanian, K. Kawakami, C. Dyer, Neural Architectures for Named Entity Recognition, in:...
  • Da’uA. et al.

    Aspect extraction on user textual reviews using multi-channel convolutional neural network

    PeerJ Comput. Sci.

    (2019)
  • ZhangZ. et al.

    TADC: A topic-aware dynamic convolutional neural network for aspect extraction

    IEEE Trans. Neural Netw. Learn. Syst.

    (2021)
  • CambriaE.

    Affective computing and sentiment analysis

    IEEE Intell. Syst.

    (2016)
  • ZhaoG. et al.

    CAPER: context-aware personalized emoji recommendation

    IEEE Trans. Knowl. Data Eng.

    (2021)
  • HeK. et al.

    Meta-based self-training and re-weighting for aspect-based sentiment analysis

    IEEE Trans. Affect. Comput.

    (2022)
  • MaoR. et al.

    The biases of pre-trained language models: An empirical study on prompt-based sentiment analysis and emotion detection

    IEEE Trans. Affect. Comput.

    (2022)
  • T. Gao, J. Fang, H. Liu, Z. Liu, C. Liu, P. Liu, Y. Bao, W. Yan, LEGO-ABSA: A Prompt-based Task Assemblable Unified...
  • E. Cambria, Y. Li, F.Z. Xing, S. Poria, K. Kwok, SenticNet 6: Ensemble application of symbolic and subsymbolic AI for...
  • E. Cambria, Q. Liu, S. Decherchi, F. Xing, K. Kwok, SenticNet 7: a commonsense-based neurosymbolic AI framework for...
  • Cited by (17)

    • Breaking down linguistic complexities: A structured approach to aspect-based sentiment analysis

      2023, Journal of King Saud University - Computer and Information Sciences
    View all citing articles on Scopus
    1

    They have equal contributions to this work.

    View full text