Next Article in Journal
Hardware Emulation of Step-Down Converter Power Stages for Digital Control Design
Next Article in Special Issue
Leveraging State-of-the-Art Topic Modeling for News Impact Analysis on Financial Markets: A Comparative Study
Previous Article in Journal
A Filtering Antenna with Slots and Stacked Patch Based on SISL for 5G Communications
Previous Article in Special Issue
Digital Twin-Based Zero-Touch Management for IoT
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Attentional Interactive Encoder Network Focused on Aspect for Sentiment Classification

1
China Unicom Research Institute, Beijing 100048, China
2
School of Electronic Engineering, Beijing University of Posts and Telecommunications, Beijing 100876, China
3
School of Computer Science (National Pilot Software Engineering School), Beijing University of Posts and Telecommunications, Beijing 100876, China
4
School of Information and Communication Engineering, Beijing University of Posts and Telecommunications, Beijing 100876, China
5
School of Artificial Intelligence, Beijing University of Posts and Telecommunications, Beijing 100876, China
*
Author to whom correspondence should be addressed.
Electronics 2023, 12(6), 1329; https://doi.org/10.3390/electronics12061329
Submission received: 7 February 2023 / Revised: 4 March 2023 / Accepted: 8 March 2023 / Published: 10 March 2023
(This article belongs to the Special Issue Big Data Analytics, Emerging Technologies and Its Applications)

Abstract

:
Aspect-based sentiment analysis (ABSA) plays a significant role in the field of big data and aims to distinguish the sentiment polarity of specific aspects in given sentences; however, the previous works on ABSA had two limitations. They mainly considered semantic features, rather than syntactic dependency features, and paid too much attention to the context words, while ignoring the high-level interaction of multiple representations of aspects themselves. To cope with these limitations, we propose a new method based on the graph convolutional network (GCN) and the multi-head attention mechanism, called the attention interactive encoder network (AIEN). The GCN was used to obtain the syntactic information that has the greatest syntactic impact on the aspect based on the syntax dependency tree. The multi-head attention mechanism can not only obtain the context-aware information of the given aspects, but also the interaction information between multiple representations of the aspect itself. The high-level information generated by the interaction of multi-dimensional features can produce a stronger representation ability for the aspect. Our experiments with the proposed model on five benchmark datasets showed that our model outperformed other works significantly. The experimental results further demonstrated the feasibility and applicability of our proposed model in the ABSA task.

1. Introduction

As an emerging technology, big data analysis aims to collect massive data, analyze and mine the hidden relationship between datasets, and establish corresponding data [1,2]. Due to the rapid development of AI technology, the use of deep learning methods for data analysis has become the norm in industry and academia [3]. In natural language processing, sentiment analysis is a common data analysis task, widely used in various text and voice services [4,5,6]. Among them, aspect-based (also known as aspect-level) sentiment analysis (ABSA) is a fine-grained sentiment analysis task for a given aspect [7]. It determines the relative sentiment polarity of each aspect of the sentence, rather than outputting a single sentiment polarity for the whole sentence. The sentiment polarity of a particular aspect item is closely related to its contextual words and syntactic dependencies, so the polarity of each aspect in a sentence is usually unique. For example, in the sentence “The pizza is delicious, but the service is terrible.”, pizza and service have different emotion polarity.
Early work applied rule-based or statistical methods to ABSA tasks with obvious manual characteristics [8]. Lately, machine learning and neural networks have been broadly utilized in ABSA tasks [9]. The mainstream is to develop a neural network structure that can learn the features of aspects and context words such as semantic features. Because long-term and short-term memory (LSTM) can extract the sequential characterizations of sentences [10] and the attention mechanism can pay more attention to the important information of context words for a given aspect and reduce the interference of irrelevant information [11], these two advanced technologies are widely used in ASBA tasks. However, the attention mechanism has some limitations. Generally speaking, it is impossible to obtain the complex syntactic dependency between aspect and context words, because it only outputs their relative importance. For example, from “Its size is ideal and its weight is acceptable”, the attention mechanism may misinterpret “acceptable” as a key contextual word describing size. To capture the relationship between aspect and context, recent research tried to obtain the syntactical dependency of these two contents in ABSA based on a graph convolutional network (GCN) [12,13]. Nevertheless, these works focused more on context words and less on interactive information between context words and aspects.
In short, the current research on ABSA has two limitations. First, previous works mainly focused on semantic features rather than syntactic dependency features [14]. They mainly focused on context-aware features without considering aspects. At the same time, they also ignored some syntactical dependency of aspect related to context words, which may lead to their inability to capture the information given by the most-applicable context words about determining the sentiment polarity of a particular aspect. In addition, some work focused on the intuitive information between context words and aspects, but ignored the interaction between features of multiple representations of aspects [12,13]. However, these multiple representations of aspects contain rich information, such as semantics, syntax, context-aware features, etc. Through the interaction between these contents containing comprehensive information to obtain advanced features, various aspects of information can be synthesized and the representation of aspects can be improved, so as to more effectively describe the emotion polarity of aspects.
Hence, we designed an attentional interactive encoder network (AIEN) to tackle these two problems. In the AIEN, how to explore the semantic and syntactic dependencies centered on aspect itself will become the main concern in this paper. Firstly, the semantic features of context and aspect in sentences are captured by LSTM, respectively. Then, we used the GCN to obtain the syntactic dependency features from the graph constructed according to the syntactic dependency tree. A simple schematic of syntactical dependency analysis is shown in Figure 1.
Interactive features can integrate multiple feature capabilities to obtain a better representation. Therefore, after acquiring the multi-dimensional representation features of aspect and context words, we need to acquire the high-level interaction features centered on the aspect. We propose a strategy based on the attention mechanism to obtain interactive information on aspects according to various features. Considering the multiple representations of aspects in semantics and syntax and the influence of context words on aspects, we obtained two types of high-level interaction features of aspects based on the multi-head attention mechanism, including the interaction between multiple representations of aspects and the interaction between aspects and context words. These interactive features improved the basic characterization ability of aspects.
Our contributions are as follows:
1. We endeavored to investigate multiple representations of aspects, including the semantic features of the aspect word itself, as well as the semantic and syntactic dependency features in the whole sentence.
2. We propose a high-level interactive feature extraction strategy focusing on aspect by the attention mechanism. These generated high-level interaction features consider both semantic characteristics and syntactical dependence in the meantime.
3. The extensive experimental results showed that our model performed better than the state-of-the-art models. Our ablation experiments additionally confirmed the significance of semantic features and syntactic dependence information; meanwhile, they also demonstrated the effectiveness of interaction features focused on aspect in the ABSA task.
The rest of this paper is organized as follows. Section 2 reviews some existing works related to our work. Section 3 presents the architecture of our model the AIEN. Section 4 shows the experimental results and analyzes them. Finally, Section 5 concludes this work.

2. Related Works

2.1. Aspect-Based Sentiment Analysis

As a fine-grained sentiment classification task, ABSA has attracted the attention of researchers and has gradually become an important branch in the field of sentiment analysis. In early studies, researchers mainly extracted features of the specific aspect through rule-based and statistics methods. Most of these methods are manual and labor-intensive [15]. With the emergence of deep learning (DL), many scholars have turned to explore ABSA tasks by introducing neural networks. In the beginning, researchers only extracted the semantics of the text through LSTM, not considering the relationship between aspect and context [9,16]. Later research realized the importance of this relationship between aspect and context words and proposed to use LSTM and the attention mechanism to establish the sentiment polarity of aspects considering aspect and context. Because of the excellent performance of attention in the natural language processing (NLP) and computer vision (CV) tasks, many works have also tried to enhance the important information of context words related to aspect through the attention method in the ABSA task [17,18,19]. While enjoying the benefits brought by the attention mechanism, the researchers also considered integrating other methods to improve the model effect of ABSA tasks, such as feature interaction and regularization. Reference [20] proposed an interactive attention network (IAN) to interactively learn contextual and aspect attention and generate representations for aspect and context, respectively. Reference [14] used the attention encoder network to model the relationship between the context and the target and introduced label smoothing regularization to improve the results. These methods simply model the semantic information of aspect and context words. However, they lack information about the syntactic dependencies. Thus, this may result in irrelevant contexts being involved in determining the sentiment polarity of aspect.

2.2. Graph Convolutional Network

The graph convolutional neural network (GCN) proposed by [21] can be effectively used to process graph-structured data containing rich inter-node relationship information. The GCN was introduced into computer vision processing and applied to the tasks of image segmentation and video detection [22,23]. The GCN was also applied to social network mining and recommendation system, to build graphs through the relationship between users or users and items [24]. Furthermore, the GCN was extended to NLP tasks such as text classification [25], machine translation [26], and relation extraction [27]. In recent years, there have been some works that have attempted to introduce the GCN into sentiment analysis. Reference [12] first built a GCN on the syntactic dependence tree to use syntactic information to solve related syntactic constraints and long-distance word dependence. Reference [28] combined the attention mechanism and the GCN to capture the syntactic dependence between different aspects of a sentence. Reference [13] proposed a model composed of the attention mechanism and the graph convolutional network built on sentence dependency trees. Reference [29] proposed a directed GCN, which performs joint extraction and sentiment analysis by encoding syntactic information. Although these methods attempt to obtain syntactic dependency features through the GCN, they do not consider the feature interactions of aspect and context words at the same time. In this paper, we propose a novel method called the AIEN to obtain comprehensive interactive features focusing on the aspect-based GCN and attention mechanism.

3. Methodology

The architecture of our developed AIEN model is shown in Figure 2. In the figure, “Embedding” represents GloVe embedding or pre-trained BERT embedding; “Hidden states” represents the Bi-LSTM; “GCN Layer” represents the layers in the GCN; “Mask Layer” denotes the layer of the aspect-specific masking technique; “MHA” refers to multi-head attention.

3.1. Embedding

Given a sentence s = w 1 s , w 2 s , , w τ s , w ( τ + 1 ) s , , w ( τ + m ) s , , w n s of n words including corresponding m words’ aspect beginning from the ( τ + 1 ) to ( τ + m ) token, through word embedding, we map each word to a low-dimensional real-valued vector space. The embedding matrix is denoted as E R d × | V | , where d is the embedding dimension of word vectors and | V | is the size of the vocabulary. In our work, the pre-trained word embedding of GloVe [30] and BERT [31] is used to initialize word embeddings.
Considering the BERT embedding layer, the network architecture of BERT uses a multi-layer transformer encoder structure; here, we used the most-basic BERT model, which has 12 transformer layers. The training of the BERT model was divided into two steps: pre-training and fine-tuning. After pre-training, BERT returns two feature vectors, which contain the context information extracted for aspect and context, respectively. Then, we fine-tuned the model. To simplify, we first added a dropout layer after the output of the model and then added a linear layer. After word embedding, we encoded an n-word sentence and an m-word target embedding vector c = e 1 c , e 2 c , e 3 c , , e n c and t = e 1 t , e 2 t , e 3 t , , e m t , respectively.

3.2. Semantic Information Encoding

3.2.1. Bidirectional LSTM

We employed bidirectional LSTM (Bi-LSTM) in the next layer of the embedding to capture the context information of each word, which can effectively use the previous words and future words of contextual information and then summarize the information in two directions to obtain word features.
The word embedding vectors including context and target words are sent into Bi-LSTM, respectively. Then, the Bi-LSTM produces the hidden state vector for contexts and the target, respectively, as follows:
H c = h 1 c , h 2 c , h 3 c , , h n c
H t = h 1 t , h 2 t , h 3 t , , h n t
where h i c , h i t R 2 d h represents the hidden state vector at time i in Bi-LSTM and d h is the dimension of the hidden state vector output by undirected LSTM.

3.2.2. Aspect-Specific Masking

To obtain aspect features’ focusing, we designed a masking mechanism that filters out non-aspect words and keeps solely aspect-specific features:
h t L = 0 1 t < τ + 1 , τ + m < t n
H m a s k = 0 , , h τ , , h τ + m , , 0
As shown in Equation (2), H m a s k represents the semantic information filtered through the mask mechanism. In our work, we obtained the context-perceived features’ focusing aspect through a masking mechanism. The masked information focuses on aspects. At this time, aspects have rich contextual semantic information.

3.3. Syntactic Information Encoding

3.3.1. Position Encoding

Empirically, we found that the polarity of a specific aspect is more easily affected by the context words that are closer to the aspect. Therefore, we employed position encoding to simulate these normal rules before feeding into a successive GCN layer. Formally, given an aspect W, which is indexed from τ to τ + m , the relative distance weight of the i-th word is defined as follows:
q i = 1 τ + 1 i n 1 i < τ + 1 1 τ + 1 i τ + m 1 i τ m n τ + m < i n
where q i R is the position weight to the i-th token. In Equation (4), q i = 1 means that the word in the sentence is an aspect word. That indicates that the position distance weight of the aspect is 1, and then, the weight is gradually reduced from the aspect to the sides. Finally, we can obtain the position-aware representation with position information:
H = h 1 L , , h τ + 1 L , , h τ + m L , , h n L

3.3.2. Graph Convolutional Network

The graph convolutional network (GCN) can effectively obtain the correlation of the graph through the information transfer between the nodes of the graph. Even if it is not trained and completely uses the randomly initialized parameter W, the features extracted by the GCN are excellent. Due to the GCN capturing the connectivity of the graph through information propagation between the nodes of the graph, we can use the GCN to solve the sentiment dependency between aspect and context of the ABSA problem. We used the GCN on the syntactic dependency tree of sentences and manually set each word to be adjacent to itself according to the idea of the GCN, that is the diagonal elements of the adjacency matrix are ones. The representation of each node is updated with the graph convolutional operation with a normalization factor, which is shown below:
h i ( k ) = f W ( k ) · u N ( i ) h u ( k 1 ) | N ( i ) | + B · h i ( k 1 )
where h i ( k ) is node v’s embedding at step k and h i ( 0 ) is node v’s initial embedding specifically. The embedding of a neighbor of node v is h u ( k 1 ) . Apparently, u N ( i ) h u ( k 1 ) | N ( i ) | is the mean of v’s neighbor’s embeddings at step k 1 . For each step k, the function f and matrices W and B are potentially learnable parameters and shared across all nodes. Especially, h i 0 = X , which is a feature description x i for every node i, summarized in an N × D feature matrix X (N: number of nodes, D: number of input features). h i L = Z , which is a node-level output Z (an N × F feature matrix, where F is the number of output features per node), and L is the number of layers.
In our work, we used a two-layer GCN to exploit text information, and the calculation can be indicated as follows:
Z ( 0 ) = R e l u A ˜ X W ( 0 )
Z ( 1 ) = softmax A ˜ Z ( 0 ) W ( 1 )
where Z ( 0 ) represents the first layer and Z ( 1 ) represents the second layer. R e l u is a nonlinear activation function, which can effectively alleviate the overfitting problem. The final output is H g :
H g = softmax A ˜ Relu A ˜ X l W ( 0 ) W ( 1 )
Then, by analogy with the aspect semantic feature extraction of the context, we also applied the mask mechanism to obtain the syntactic dependency features of the aspect in the context. As shown in Equation (8), H g is the syntax-dependent feature of aspect.

3.4. Aspectwise Feature Interaction

3.4.1. Multi-Head Attention

Our model is based on multi-head attention (MHA), which can be performed in parallel subspaces. The main method of MHA is to divide the dimension of attention parameters (Query, Key, and Value) into multiple subspaces. After segmentation, each subspace can pay attention to different feature spaces to improve the performance of the model and, finally, put together the results of these subspaces. We define a Key sequence k = { k 1 , k 2 , , k n } and a Query sequence q = { q 1 , q 2 , , q n } . Then, the mathematical calculation is as follows:
Attention ( k , q ) = softmax f m ( k , q ) k
where f m is the function utilized to calculate and learn the semantic relation between q j and k i :
f m k i , q j = tanh k i ; q j · W a
where W a R 2 d h i d is the parameter learnable matrix. MHA is able to learn the scores of different n h e a d in parallel spaces, and the parameters are not shared between these heads, because the values of q and k are continuously changing. The results of n h e a d are connected and projected to the particular hidden dimension d h i d by
MHA = o 1 o 2 o n head · W m
o h = Attention h ( k , q )
where “⊕” represents the vector concatenation, W m R d h i d × d h i d , o h = o 1 h , o 2 h , , o m h is the output of the h-th head’s attention, and h 1 , n head .

3.4.2. Aspect to Aspect Interaction

Through the above work, we obtained aspect-focused contextual features H g a , semantic features H c a , and syntactic features H c g , as well as the semantic features H a of the aspect itself. Considering that the information contained in different representation forms of aspect is different, its high-level features are obtained through interaction. We realized the interaction through MHA, including the interaction of context-aware semantic features and syntactic features and the interaction between the aspect’s own features and context-aware aspect features, respectively. The calculation formulas of these three groups of focused aspect interaction characteristics are as follows:
H c a = MultiHead H c , H a
H g a = MultiHead H g , H a
H c g = MultiHead H c , H g
where H c a = { h 1 c a , h 2 c a , , h n c a R d h × n } , H g a = { h 1 g a , h 2 g a , , h n g a R d h × n } , H c g = { h 1 c g , h 2 c g , , h n c g R d h × n } and d h is the dimension of MHIA.

3.5. Output and Training

After obtaining the aspect-focused contextual features representation h g a , semantic feature representation h c a , and syntactic feature represent h c g , we first obtained the average vector by adapting the averaging pooling method and then concatenated the aspect feature with the interactive feature between aspect and context, the interaction feature between aspect and GCN context, the interaction feature between context and GCN context, and the GCN context feature. The final feature representation u is as follows:
u = h a v g c h a v g c a h a v g g a h a v g c g h a v g a
where “⊕” represents the vector concatenation and h a v g stands for i = 1 n h i n . Finally, the probability distribution of different target sentiment polarities is obtained through the output of the softmax layer, as follows:
x = W ˜ u T u ˜ + b u
y = softmax ( x ) = exp ( x ) k = 1 C exp ( x )
Our model was trained by minimizing the cross-entropy with the L2-regularization term. For a given sentence, the loss function is represented by
Loss = ( c , l ) C log P l + λ Θ 2
where C is the collection of datasets, l is the label, P l means the l-th element of P, Θ represents all of the trainable parameters, and λ is the parameter of regularization.

4. Experiments

This section presents the experimental setup, including the dataset, evaluation metrics, and baseline, in which the effectiveness of our proposed model and its comparison with other models were shown. The outstanding features of the model for the ABSA task were highlighted by conducting an ablation experiment, parameter experiment, and case study on the model.

4.1. Experiment Setting

4.1.1. Datasets

To comprehensively evaluate the performance of the AIEN, we conducted experiments on five real datasets. The TWITTER dataset was originally constructed by [16] and contains Twitter posts, while the other four datasets (LAP14, REST14, REST15, REST16) were derived from SemEval 2014 Task 4 [32], SemEval 2015 Task 12 [33], and SemEval 2016 Task 5 [34]. These four datasets include two categories: laptop and restaurant. Each sample consists of the review sentences, aspects, and sentiment polarity towards the aspects. These datasets are labeled with three sentiment polarities: positive, neutral, and negative. For the fairness and rationality of the experiment, we used the same training set, validation set, and test set data distribution as all other baseline models. Table 1 shows the number of training and test instances in each dataset.

4.1.2. Evaluation Metrics

The experimental results were obtained by averaging 3 times with random initialization, where the accuracy and macro-averaged F1 were adopted as the evaluation metrics.

4.1.3. Baseline

To comprehensively evaluate the performance of the proposed AIEN, we compared our model with a range of baselines and state-of-the-art models, as listed below:
  • SVM [35] is a traditional method based on complicated feature engineering.
  • LSTM [36] obtains the extracted features through LSTM and then uses the obtained softmax function to obtain the emotion polarity.
  • The MemNet [37] uses a multi-hop architecture and handles contexts as external memory.
  • AOA [38] migrates the attention-over-attention method from the field of machine translation and applies it to the field of ABSA.
  • The IAN [20] proposes an interactive attention network model based on LSTM and the attention mechanism, modeling target and context, respectively, then interacting with them, and finally, obtaining the results.
  • The TNet-LF [39] proposes a technique for producing target-specific word representations that incorporates a mechanism for keeping the original contextual data from the RNN layer.
  • The AEN [14] eliminates recurrence and models the relationship between the contexts and the specific targets using an attentional encoder network.
  • The ASGCN [12] proposes a graph convolutional network (GCN) on the dependency tree of sentences to make use of syntactic information and word dependence.
  • The AEGCN [13] proposes the multi-head attention and an improved graph convolutional network built over the dependency tree of a sentence.
  • The SK-GCN [40] utilizes both the syntax-based and knowledge-based GCN to describe dependency trees and knowledge graphs.
In order to fairly evaluate our method, all experiments in this paper extracted the embedding vector with the GloVe pre-trained model. Furthermore, we also used the BERT pre-trained model and fine-tuned it in combination with this task.

4.2. Performance Comparison

The overall performance of all the models is shown in Table 2, from which several observations can be noted. The AIEN consistently outperformed all compared models on the TWITTER, LAP14, and REST14 datasets.
The AIEN based on the deep learning model had better performance than the traditional machine learning methods. In the above table, the SVM model proposed by Kirishenko uses SVM for classification, which depends on a large amount of manual feature extraction. On the TWITTER, LAP14, and Rest14 datasets, the accuracy of our model was 10.97%, 5.44%, and 1.74% higher than that of SVM without manual feature extraction. This result showed that the deep learning model is applicable to specific aspects of sentiment analysis.
In addition, the mask mechanism can have the effect of preserving context information on specific aspect words, which had some advantages on REST16. Furthermore, we also speculated that the REST16 dataset may have the shortcomings of fuzzy feature information and a large number of noise data, which, to some extent, affected our model. The experimental results also showed that the accuracy of our model on the REST15 dataset was slightly lower than that on SK-GCN, but the AIEN was significantly better than the SK-GCN on the F1 measurement. Compared with the benchmark models, the ASGCN and AEGCN, our model performed better on various datasets, which showed that the idea of using LSTM and the GCN for feature extraction and emotion classification through the multi-head attention mechanism is reasonable.
The pre-trained model based on BERT showed excellent performance, and the final classification accuracy was far higher than all existing ABSA models. At the same time, in order to make the BERT pre-trained model better match our emotion classification task, we fine-tuned the model. By adding a simple linear layer and a softmax output layer, the model accuracy and F1 value on various datasets exceeded the basic pre-trained model, which fully proved the ability of BERT in this task. As an embedded layer, BERT showed further improvement after joining our network, the AIEN. These results proved the effectiveness of the AIEN in capturing important syntactic structures of sentiment analysis.

4.3. Study of our Method

4.3.1. Ablation Experiment

To further understand the impact of each part of our model on the performance, we conducted several ablation experiments, as shown in Table 3. All the data in the w/o context experiments were inferior to the benchmark because the context contains aspect lexical structure information and semantic correlation, which had an impact on the performance of the model. In addition, the result of w/o the GCN experiments also proved that the GCN method can be harmoniously combined with our proposed model and plays a positive role. The experimental results of w/o mask further emphasized the importance of the mask layer and proved that the target-oriented feature extraction plays a key role in the ABSA task.
From the result without MHIA, the performance of the Rest15 dataset was improved after deleting MHIA. The possible reason is that, compared with the other datasets, the Rest15 dataset is more sensitive to syntactic information. Using MHIA will cause a small part of the Rest15 dataset to lose key feature information.

4.3.2. Parameter Experiment

Since the design of the AIEN model involves MHA and the GCN, we investigated the impact of the number of headers of MHA and the number of layers of the GCN on the model performance and checked the accuracy and macro-F1 of the AIEN on the LAP14 dataset. The results are shown in Figure 3 and Figure 4. When the attention headers reached three and the number of GCN layers was two, the model obtained the best performance. This proved the rationality of selecting parameters in the design of the AIEN model.

4.3.3. Case Study

In this section, to better understand how the AIEN works, we further show the advantages of our proposals through some typical examples. We list some examples from the test set that have typical characteristics in Figure 5. In Sentence (a), “I have not a bad thing to say about this place.”, there is a negative word: not. This can easily lead to the model making the wrong predictions. Our model can obtain the correct polarity, unaffected by negation words that do not represent negation here. In Sentence (b), “great food but the service was dreadful!”, there are two different aspects of food and service, which brings additional difficulty to detecting the target semantics. Our model can distinguish different aspects of different emotion polarities. In the last instance (c), “I’m not necessarily fanatical about this place, but it was a fun time for low prices”, the sentence structures are long and complex, and it may be difficult for existing models to make correct judgments to correctly predict the polarity. However, our model can process these sentences well with the help of modules such as the attention mechanism and the GCN to make the correct sentiment polarity judgment.

5. Conclusions

Due to the lack of research on syntactic features and high-level interaction features simultaneously in traditional works, this paper proposed the AIEN model to overcome the problem. Through LSTM and the GCN layer, we obtained multi-dimensional features including the semantic features of the aspect itself, the context-aware semantic features, and the syntactic features. Based on these features, we constructed the multi-dimensional representation of a specific aspect, which was composed of the new high-level interactive features. These generated multi-dimensional features were used for the final prediction of the ABSA task. We conducted extensive experiments on five datasets and compared the experimental performance with other advanced methods. The experimental results showed that our proposed approach can significantly improve the effectiveness of the model. In future work, we will extend the method proposed in this paper to study the performance of multiple aspects to verify the scalability of this method.

Author Contributions

Conceptualization, B.Y. and H.L.; methodology, B.Y. and S.T.; software, H.L., S.T. and Y.S.; validation, Y.S.; formal analysis, S.T. and Y.X.; investigation, H.L. and Y.S.; resources, Y.X.; data curation, S.T. and Y.X.; writing original draft preparation, H.L.; writing—review and editing, H.L., Y.S. and Y.X.; visualization, Y.S.; supervision, Y.X.; project administration, Y.X. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Chen, M.; Mao, S.; Liu, Y. Big data: A survey. Mob. Netw. Appl. 2014, 19, 171–209. [Google Scholar] [CrossRef]
  2. Mayer-Schönberger, V.; Cukier, K. Big Data: A Revolution That Will Transform How We Live, Work, and Think. In Smart Business Cincinnati/Northern Kentucky; Houghton Mifflin Harcourt: Boston, MA, USA, 2013. [Google Scholar]
  3. Deng, L.; Yu, D. Deep Learning: Methods and Applications. Found. Trends Signal Process. 2014, 7, 197–387. [Google Scholar] [CrossRef] [Green Version]
  4. Elkorany, A.; Hassan, H. Opinion Mining and Sentimental Analysis Approaches: A Survey. Life Sci. J. 2014, 11, 321–326. [Google Scholar]
  5. Muthukumaran, S.; Suresh, P.; Amudhavel, J. A state of art approaches on sentiment analysis techniques. J. Adv. Res. Dyn. Control Syst. 2017, 9, 1353–1370. [Google Scholar]
  6. Sitaula, C.; Basnet, A.; Mainali, A.; Shahi, T.B. Deep learning-based methods for sentiment analysis on Nepali COVID-19-related tweets. Comput. Intell. Neurosci. 2021, 2021, 2158184. [Google Scholar] [CrossRef] [PubMed]
  7. Yadav, K.; Kumar, N.; Kumar Reddy, P.; Reddy Gadekallu, T. A Comprehensive Study on Aspect Based Sentimental Analysis Framework and its Techniques. Int. J. Eng. Syst. Model. Simul. 2021, 12, 279. [Google Scholar]
  8. Talafha, B.; Al-Ayyoub, M.; Abuammar, A.; Jararweh, Y. Outperforming State-of-the-Art Systems for Aspect-Based Sentiment Analysis. In Proceedings of the 2019 IEEE/ACS 16th International Conference on Computer Systems and Applications (AICCSA), Abu Dhabi, United Arab Emirates, 3–7 November 2019; pp. 1–5. [Google Scholar] [CrossRef]
  9. Vo, D.T.; Zhang, Y. Target-dependent twitter sentiment classification with rich automatic features. In Proceedings of the Twenty-fourth International Joint Conference on Artificial Intelligence, Buenos Aires, Argentina, 25–31 July 2015. [Google Scholar]
  10. Greff, K.; Srivastava, R.K.; Koutník, J.; Steunebrink, B.R.; Schmidhuber, J. LSTM: A Search Space Odyssey. IEEE Trans. Neural Netw. Learn. Syst. 2016, 28, 2222–2232. [Google Scholar] [CrossRef] [Green Version]
  11. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention Is All You Need. arXiv 2017, arXiv:1706.03762. [Google Scholar]
  12. Zhang, C.; Li, Q.; Song, D. Aspect-based Sentiment Classification with Aspect-specific Graph Convolutional Networks. arXiv 2019, arXiv:1909.03477. [Google Scholar]
  13. Xiao, L.; Hu, X.; Chen, Y.; Xue, Y.; Gu, D.; Chen, B.; Zhang, T. Targeted sentiment classification based on attentional encoding and graph convolutional networks. Appl. Sci. 2020, 10, 957. [Google Scholar] [CrossRef] [Green Version]
  14. Song, Y.; Wang, J.; Jiang, T.; Liu, Z.; Rao, Y. Attentional encoder network for targeted sentiment classification. arXiv 2019, arXiv:1902.09314. [Google Scholar]
  15. Jiang, L.; Yu, M.; Zhou, M.; Liu, X.; Zhao, T. Target-dependent twitter sentiment classification. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, Portland, OR, USA, 19–24 June 2011; pp. 151–160. [Google Scholar]
  16. Dong, L.; Wei, F.; Tan, C.; Tang, D.; 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 (Volume 2: Short Papers), Baltimore, MD, USA, 22–27 June 2014; pp. 49–54. [Google Scholar]
  17. Wang, Y.; Huang, M.; Zhu, X.; 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]
  18. Wang, B.; Lu, W. Learning latent opinions for aspect-level sentiment classification. In Proceedings of the AAAI Conference on Artificial Intelligence, New Orleans, LA, USA, 2–7 February 2018; Volume 32. [Google Scholar]
  19. Yang, H.; Zeng, B. Enhancing Fine-grained Sentiment Classification Exploiting Local Context Embedding. arXiv 2020, arXiv:2010.00767. [Google Scholar]
  20. Ma, D.; Li, S.; Zhang, X.; Wang, H. Interactive attention networks for aspect-level sentiment classification. arXiv 2017, arXiv:1709.00893. [Google Scholar]
  21. Kipf, T.N.; Welling, M. Semi-supervised classification with graph convolutional networks. arXiv 2016, arXiv:1609.02907. [Google Scholar]
  22. Qi, X.; Liao, R.; Jia, J.; Fidler, S.; Urtasun, R. 3d graph neural networks for rgbd semantic segmentation. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 5199–5208. [Google Scholar]
  23. Xu, M.; Zhao, C.; Rojas, D.S.; Thabet, A.; Ghanem, B. G-tad: Sub-graph localization for temporal action detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 14–19 June 2020; pp. 10156–10165. [Google Scholar]
  24. Wang, H.; Zhao, M.; Xie, X.; Li, W.; Guo, M. Knowledge graph convolutional networks for recommender systems. In Proceedings of the World Wide Web Conference, San Francisco, CA, USA, 13–17 May 2019; pp. 3307–3313. [Google Scholar]
  25. Peng, H.; Li, J.; He, Y.; Liu, Y.; Bao, M.; Wang, L.; Song, Y.; Yang, Q. Large-scale hierarchical text classification with recursively regularized deep graph-cnn. In Proceedings of the 2018 World Wide Web Conference, Lyon, France, 23–27 April 2018; pp. 1063–1072. [Google Scholar]
  26. Bastings, J.; Titov, I.; Aziz, W.; Marcheggiani, D.; Sima’an, K. Graph convolutional encoders for syntax-aware neural machine translation. arXiv 2017, arXiv:1704.04675. [Google Scholar]
  27. Zhang, Y.; Qi, P.; Manning, C.D. Graph convolution over pruned dependency trees improves relation extraction. arXiv 2018, arXiv:1809.10185. [Google Scholar]
  28. Zhao, P.; Hou, L.; Wu, O. Modeling sentiment dependencies with graph convolutional networks for aspect-level sentiment classification. Knowl. Based Syst. 2020, 193, 105443. [Google Scholar] [CrossRef] [Green Version]
  29. Chen, G.; Tian, Y.; Song, Y. Joint aspect extraction and sentiment analysis with directional graph convolutional networks. In Proceedings of the 28th International Conference on Computational Linguistics, Barcelona, Spain, 8–13 December 2020; pp. 272–279. [Google Scholar]
  30. 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; Association for Computational Linguistics: Doha, Qatar, 2014; pp. 1532–1543. [Google Scholar] [CrossRef]
  31. Devlin, J.; Chang, M.W.; Lee, K.; Toutanova, K. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), Minneapolis, MN, USA, 2–7 June 2019; Association for Computational Linguistics: Minneapolis, MN, USA, 2019; pp. 4171–4186. [Google Scholar] [CrossRef]
  32. Manandhar, S. 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. [Google Scholar]
  33. Pontiki, M.; Galanis, D.; Papageorgiou, H.; Manandhar, S.; Androutsopoulos, I. Semeval-2015 task 12: Aspect based sentiment analysis. In Proceedings of the 9th international workshop on semantic evaluation (SemEval 2015), Denver, CO, USA, 4–5 June 2015; pp. 486–495. [Google Scholar]
  34. Pontiki, M.; Galanis, D.; Papageorgiou, H.; Androutsopoulos, I.; Manandhar, S.; Al-Smadi, M.; Al-Ayyoub, M.; Zhao, Y.; Qin, B.; De Clercq, O.; et al. Semeval-2016 task 5: Aspect based sentiment analysis. In Proceedings of the International Workshop on Semantic Evaluation, San Diego, CA, USA, 16–17 June 2016; pp. 19–30. [Google Scholar]
  35. Kiritchenko, S.; Zhu, X.; Cherry, C.; Mohammad, S. Detecting aspects and sentiment in customer reviews. In Proceedings of the 8th International Workshop on Semantic Evaluation (SemEval), Dublin, Ireland, 23–24 August 2014; pp. 437–442. [Google Scholar]
  36. Tang, D.; Qin, B.; Feng, X.; Liu, T. Effective LSTMs for target-dependent sentiment classification. arXiv 2015, arXiv:1512.01100. [Google Scholar]
  37. Tang, D.; Qin, B.; Liu, T. Aspect level sentiment classification with deep memory network. arXiv 2016, arXiv:1605.08900. [Google Scholar]
  38. Huang, B.; Ou, Y.; Carley, K.M. Aspect level sentiment classification with attention-over-attention neural networks. In 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: Berlin/Heidelberg, Germany, 2018; pp. 197–206. [Google Scholar]
  39. Li, X.; Bing, L.; Lam, W.; Shi, B. Transformation networks for target-oriented sentiment classification. arXiv 2018, arXiv:1805.01086. [Google Scholar]
  40. Zhou, J.; Huang, J.X.; Hu, Q.V.; He, L. Sk-gcn: Modeling syntax and knowledge via graph convolutional network for aspect-level sentiment classification. Knowl. Based Syst. 2020, 205, 106292. [Google Scholar] [CrossRef]
Figure 1. An example of a syntactic dependency parse tree.
Figure 1. An example of a syntactic dependency parse tree.
Electronics 12 01329 g001
Figure 2. The overall architecture of the attentional interactive encoder network (AIEN).
Figure 2. The overall architecture of the attentional interactive encoder network (AIEN).
Electronics 12 01329 g002
Figure 3. Impact of number of heads in MHA.
Figure 3. Impact of number of heads in MHA.
Electronics 12 01329 g003
Figure 4. Impact of number of GCN layers.
Figure 4. Impact of number of GCN layers.
Electronics 12 01329 g004
Figure 5. Case study. Visualization of attention scores for Rest14, Rest15, and Rest16.
Figure 5. Case study. Visualization of attention scores for Rest14, Rest15, and Rest16.
Electronics 12 01329 g005
Table 1. Statistics of datasets used in this paper.
Table 1. Statistics of datasets used in this paper.
DatasetsPosNeuNegTotal
TWITTERTrain1561312715606248
Test173346173692
LAP14Train9944648702328
Test341169128638
REST14Train21646378073608
Test7281961961120
REST15Train912362561204
Test32634182542
REST16Train1240694391748
Test46930117616
Table 2. Model comparison results (%). The top two results with each dataset are in bold. We use “N/A” to represent unreported experimental results. The comparison models’ results were retrieved from the original papers.
Table 2. Model comparison results (%). The top two results with each dataset are in bold. We use “N/A” to represent unreported experimental results. The comparison models’ results were retrieved from the original papers.
ModelTWITTERLAP14REST14REST15REST16
AccuracyF1AccuracyF1AccuracyF1AccuracyF1AccuracyF1
SVM [35]63.463.370.49N/A80.16N/AN/AN/AN/AN/A
LSTM [36]69.5667.769.2863.0978.1367.4777.3755.1786.863.88
MemNet [37]71.4869.970.6465.1779.6169.6477.3158.2885.4465.99
AOA [38]72.370.272.6267.5279.9770.4278.1757.0287.566.21
IAN [20]72.570.8172.0567.3879.2670.0978.5452.6584.7455.21
TNet-LF [39]72.9871.4374.6170.1480.4271.0378.4759.4789.0770.43
AEN [14]72.8369.8173.5169.0480.9872.14N/AN/AN/AN/A
ASGCN-DT [12]71.5369.6874.1469.2480.8672.1979.3460.7888.6966.64
ASGCN-DG [12]72.1570.475.5571.0580.7772.0279.8961.8988.9967.48
AEGCN [13]73.1671.8275.9171.6381.0471.3279.9560.8787.3968.22
SK-GCN [40]71.9770.2273.2069.1880.3670.4380.1260.7085.1768.08
Our GloVe74.3772.7875.9171.7181.9073.6980.0163.7088.3169.43
Our BERT74.8673.7178.2173.3985.3678.3383.5864.6790.5874.49
BERT + FineTune74.9873.1579.0174.9886.9681.8284.1371.4191.4075.35
Table 3. Ablation study results (%). The best results with each dataset are highlighted in bold.
Table 3. Ablation study results (%). The best results with each dataset are highlighted in bold.
ModelTWITTERLAP14REST14REST15REST16
AccuracyF1AccuracyF1AccuracyF1AccuracyF1AccuracyF1
Our74.3772.7875.9171.7181.9073.6980.0163.7088.3169.43
w/o mask73.9872.6173.0968.2979.8269.5178.5960.9387.5367.77
w/o GCN73.6972.2075.2870.9581.6973.5379.5862.2488.0468.07
w/o context72.1070.1773.1468.4180.5371.0979.5256.8787.7166.19
w/o MHIA72.8871.6973.7769.3780.5070.0080.5062.7788.0465.73
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Yang, B.; Li, H.; Teng, S.; Sun, Y.; Xing, Y. Attentional Interactive Encoder Network Focused on Aspect for Sentiment Classification. Electronics 2023, 12, 1329. https://doi.org/10.3390/electronics12061329

AMA Style

Yang B, Li H, Teng S, Sun Y, Xing Y. Attentional Interactive Encoder Network Focused on Aspect for Sentiment Classification. Electronics. 2023; 12(6):1329. https://doi.org/10.3390/electronics12061329

Chicago/Turabian Style

Yang, Bin, Haoling Li, Sikai Teng, Yuze Sun, and Ying Xing. 2023. "Attentional Interactive Encoder Network Focused on Aspect for Sentiment Classification" Electronics 12, no. 6: 1329. https://doi.org/10.3390/electronics12061329

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop