Elsevier

Neurocomputing

Volume 388, 7 May 2020, Pages 135-143
Neurocomputing

Aspect-based sentiment classification with multi-attention network

https://doi.org/10.1016/j.neucom.2020.01.024Get rights and content

Abstract

Aspect-based sentiment classification aims to predict the sentiment polarity of an aspect term in a sentence instead of the sentiment polarity of the entire sentence. Neural networks have been used for this task, and most existing methods have adopted sequence models, which require more training time than other models. When an aspect term comprises several words, most methods involve a coarse-level attention mechanism to model the aspect, and this may result in information loss. In this paper, we propose a multi-attention network (MAN) to address the above problems. The proposed model uses intra- and inter-level attention mechanisms. In the former, the MAN employs a transformer encoder instead of a sequence model to reduce training time. The transformer encoder encodes the input sentence in parallel and preserves long-distance sentiment relations. In the latter, the MAN uses a global and a local attention module to capture differently grained interactive information between aspect and context. The global attention module focuses on the entire relation, whereas the local attention module considers interactions at word level; this was often neglected in previous studies. Experiments demonstrate that the proposed model achieves superior results when compared to the baseline models.

Introduction

Aspect-based sentiment classification is a fine-grained task in aspect-based sentiment analysis (ABSA). Instead of predicting the sentiment polarity of an entire sentence, the sentiment polarity of a specific aspect in the sentence is determined [1]. For example, in the sentence ‘This is a high-speed computer, but it has short battery life’, the sentiment polarity of the aspects ‘speed’ and ‘battery life’ are positive and negative, respectively. Aspect-based sentiment classification overcomes the limitation of sentence-level sentiment classification that the sentiment polarity of each aspect may differ when a sentence contains more than one aspect. Aspect-based sentiment classification consists of two stages: aspect extraction [2], [3], [4], [5], [6], [7] and sentiment classification [8], [9]. The former explores the aspects that appear in reviews, and the latter classifies the opinions about these aspects. In this study, we focus only on sentiment classification.

Recently, sequence models such as long short-term memory (LSTM) [10] and gated recurrent units [11] have been successfully used in aspect-based sentiment classification [9], [12], [13]. Despite the effectiveness of these approaches, sequential models encode words individually, which is time-consuming. To overcome this, Xue and Li [14] proposed a parallelisable solution by using convolutional neural networks (CNNs). Although CNNs are effective in reducing training time, they cannot capture long-distance relations in sentences. In addition, aspect-level sentiment polarity is highly dependent on both review context and aspect. Some models utilise an attention mechanism to add aspect information [15], [16], [17]. However, most of them regard all aspect words as a whole. When an aspect contains several words, these approaches ignore the different importance between the words in the aspect phrase, resulting in information loss. For example, the aspect of the sentence ‘This place has many different styles of pizza, and they are all amazing’ contains three words. In the aspect phrase ‘styles of pizza’, ‘of’ contributes less than ‘styles’ and ‘pizza’. It is inappropriate to place the three aspect words in equal position.

In this paper, we propose a multi-attention network (MAN) to address the aforementioned issues. MAN is a parallelisable model, as no sequence model is involved. It contains an intra- and an inter-level attention mechanism. The former learns word representations through a transformer encoder [18], which is based on a self-attention mechanism that can process context and aspect in parallel. Self-attention also allows MAN to handle long-distance dependencies because it considers every two words in a sentence. The latter employs global and local attention to capture coarse- and fine-grained interactive information between aspect and context. Global attention captures the entire interaction, whereas local attention captures the word-level interaction between aspect and context words. The main contributions of this study can be summarised as follows:

  • We propose a novel model (MAN) to process words in review sentences in parallel using an attention mechanism. The proposed model requires significantly less training time than sequence models. MAN can effectively capture long dependencies in sentences by self-attention.

  • MAN introduces global and local attention modules to capture different-level interactions between aspect and context. The local attention module considers the difference between aspect words.

  • We evaluated MAN on several datasets, namely laptop, restaurant, and twitter. Experiments demonstrate that the proposed model achieves superior results when compared to the baseline models.

The rest of this paper is organised as follows. In Section 2, we review related work. In Section 3, we define the problem of aspect-based sentiment classification and present the proposed model in detail. Section 4 reports experiments and evaluations. Section 5 concludes this paper.

Section snippets

Related work

In this section, we review related work as follows: First, we discuss the particularities of aspect-based sentiment classification and existing related methods. Secondly, we present recent neural networks for aspect-based sentiment classification. Thirdly, we present some attention mechanisms for aspect-based sentiment classification.

Multi-attention network for aspect-based sentiment classification

This section presents the structure of MAN. The overall architecture is shown in Fig. 1. It consists of input embedding, multi-attention and output layers.

Datasets

We evaluate MAN on five datasets: laptop2014, restaurant2014,restaurant2015,restaurant2016, and twitter. The first two datasets are from SemEval 2014 Task 4,3 which consist of reviews of laptops and restaurants. Restaurant2015 and Restaurant2016 are reviews of restaurants from SemEval 2015 Task 124 and SemEval 2016 Task 5,5

Conclusion and future work

We proposed a novel model based on multiple attention (MAN) for aspect-based sentiment classification. MAN requires less training time than sequence models because it can process the input sentence in parallel. Compared with convolution models, MAN can effectively capture long-range sentiment relations. Moreover, it uses global and local attention mechanisms to capture differently grained interactive relations between aspect and context. The global attention mechanism computes the entire

CRediT authorship contribution statement

Qiannan Xu: Conceptualization, Methodology, Software, Data curation, Writing - original draft, Writing - review & editing. Li Zhu: Resources, Writing - review & editing, Funding acquisition. Tao Dai: Writing - original draft, Writing - review & editing. Chengbing Yan: Project administration, Writing - original draft.

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.

Acknowledgment

This research is supported by National Key Research and Development Project (No. 2018AAA0101100) and National Key Research and Development Project (No. 2019YFB2102500).

Qiannan Xu received her B.E. degree in Computer Science and Technology from Southwestern University of Finance and Economics, China, in 2017. She is currently pursuing the M.S. degree in the School of Software Engineering at Xi’an Jiaotong University. Her main research interests include sentiment analysis and natural language processing.

References (57)

  • D. Ma et al.

    Exploring sequence-to-sequence learning in aspect term extraction

    Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics

    (2019)
  • H. Xu et al.

    Double embeddings and CNN-based sequence labeling for aspect extraction

    Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)

    (2018)
  • J. Wang et al.

    Aspect sentiment classification with both word-level and clause-level attention networks

    Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence

    (2018)
  • X. Li et al.

    Transformation networks for target-oriented sentiment classification

    Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics

    (2018)
  • S. Hochreiter et al.

    Long short-term memory

    Neural Comput.

    (1997)
  • J. Chung, Ç. Gülçehre, K. Cho, Y. Bengio, Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling,...
  • Y. Wang et al.

    Attention-based lstm for aspect-level sentiment classification

    Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing

    (2016)
  • D. Tang et al.

    Effective lstms for target-dependent sentiment classification

    Proceedings of the 26th International Conference on Computational Linguistics: Technical Papers

    (2016)
  • W. Xue et al.

    Aspect based sentiment analysis with gated convolutional networks

    Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics

    (2018)
  • D. Tang et al.

    Aspect level sentiment classification with deep memory network

    Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing

    (2016)
  • D. Ma et al.

    Interactive attention networks for aspect-level sentiment classification

    Proceedings of International Joint Conference on Artificial Intelligence

    (2017)
  • Y. Cui et al.

    Attention-over-attention neural networks for reading comprehension

    Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics

    (2017)
  • A. Vaswani et al.

    Attention is all you need

    Proceedings of Neural Information Processing Systems

    (2017)
  • K. Schouten et al.

    Survey on aspect-level sentiment analysis

    IEEE Trans. Knowl. Data Eng.

    (2016)
  • M. Dragoni et al.

    A neural word embeddings approach for multi-domain sentiment analysis

    IEEE Trans. Affect. Comput.

    (2017)
  • A. Tripathy et al.

    Document-level sentiment classification using hybrid machine learning approach

    Knowl. Inf. Syst.

    (2017)
  • D. Ma et al.

    Cascading multiway attentions for document-level sentiment classification

    Proceedings of the Eighth International Joint Conference on Natural Language Processing

    (2017)
  • F. Wu et al.

    Sentence-level sentiment classification with weak supervision

    Proceedings of the 40th International ACM SIGIR Conference on Research and Development in Information Retrieval

    (2017)
  • Cited by (93)

    View all citing articles on Scopus

    Qiannan Xu received her B.E. degree in Computer Science and Technology from Southwestern University of Finance and Economics, China, in 2017. She is currently pursuing the M.S. degree in the School of Software Engineering at Xi’an Jiaotong University. Her main research interests include sentiment analysis and natural language processing.

    Li Zhu received his Ph.D. degree in Computer System Architecture from Xi’an Jiaotong University, China, in 2000. He is currently a Professor in the School of Software Engineering at Xi’an Jiaotong University. His research interests include machine learning and computer networking.

    Tao Dai received his B.E. and M.S. degree in Software Engineering from Xi’an Jiaotong University, China, in 2008 and 2011, respectively. He is currently a Ph.D. candidate in the School of Software Engineering at Xi’an Jiaotong University. His main research interests include machine learning and information retrieval.

    Chengbing Yan received her B.E. degree in Computer Science and Technology from Sun Yat-Sen University, China, in 2017. She is currently pursuing the M.S. degree in the School of Software Engineering at Xi’an Jiaotong University. Her main research interests include machine learning and image processing.

    View full text