S2SAN: A sentence-to-sentence attention network for sentiment analysis of online reviews
Introduction
The rise of the e-commerce industry has caused substantial changes in business models between merchants and consumers, which has enabled exponential proliferation in the number of online reviews [[1], [2], [3]]. Websites such as Amazon and Jingdong provide customers with a platform for sharing their perspectives and opinions on various products and services [4]. Rich sentiment information exists in online reviews that directly reflect the positive, negative or neutral sentiment polarity of users [5,6]. Note that reviews of products and services in online platforms offer value from a variety of perspectives. The ‘Electronic Word of Mouth’, which is a collection of reviews, is a key driver in decision-making [7,8]. On the other hand, reviews offer clues to users' latent demands and motivations, which render them conducive for improving online merchants' products and service quality [9,10]. Moreover, the potential user interests and preferences revealed in reviews provide reference information for making personalized recommendations [11]. However, the vast number of online reviews hinder the ability of both users and merchants to comprehensively extract and analyze public opinions [12]. To fully utilize the immense value of online reviews, there is a pressing need for a sentiment analysis model that can convert the overloaded sentiment information contained in reviews into a more easily understandable form.
Sentiment analysis, which is also known as opinion mining [13], is dedicated to classifying the sentiment polarity in individual review texts in our work. Previous approaches to sentiment analysis include labeling corpora that are intended for sentiment classification tasks [14,15], building sentiment lexicons [16,17], and training domain-specific sentiment classifiers [15,18,19], all of which have laid a solid foundation for sentiment analysis research. With the increasing computational ability of computers and the continual development of deep learning technology, methods that combine language models and neural networks have become mainstream approaches for solving sentiment analysis problems. These approaches are superior to traditional machine learning classifier models in terms of text representation and deep semantic understanding [12,20,21] and have greatly improved the sentiment analysis performance.
In recent years, attention-based neural network models have achieved remarkable results in many natural language processing (NLP) tasks. Additionally, a large number of studies have applied attention mechanisms to sentiment analysis. The attention mechanism in deep learning is a simulation of the visual attention of human beings [22]. Human beings always ignore information irrelevant to the target task and allocate more attention resources to important information. The attention mechanism helps improve the robustness of deep learning models by extracting useful information from a large number of inputs and allocating more attention weights to this useful information. In this regard, attention mechanisms have made satisfactory progress. Generally, attention mechanism can tell how important every entity is in an entity sequence. An illustration of the case where the entities are words is presented in Section 3.2.1.
However, to the best of our knowledge, existing attention-based neural network models focus on words [[23], [24], [25]] by representing the entire text as a word sequence. The attention weights of different words are calculated based on their similarity in a word attention layer. However, in our research, we suggest that each sentence in a text expresses a unique semantic meaning; thus, the attention weights of different sentences should be calculated individually. Although some works (such as the hierarchical attention network (HAN) proposed by Yang et al. [26]) consider sentence-level attention, most studies calculate sentence-level attention in the same way as word-level attention. However, we suggest that the approaches that directly transplant word-encoding methods into sentence-encoding have a defect: no apparent sequence-structure relationship exists between the sentences in a review, as a result, representing sentences in a review using a sequence model adds unnecessary complexity. To fill this gap, we introduce a novel sentence-to-sentence structure where self-attention is used to calculate relation weights of every two sentences. Compared with the original attention mechanism, self-attention can provide a matrix where the relations of any two entities are represented. An illustration of the case where the entities are sentences is presented in Section 3.2.2.
Our research objectives are three-fold. The first objective is to design the sentence-to-sentence attention network (S2SAN). In S2SAN, the most suitable word encoder and sentence encoder for online review texts should be figured out. The second objective is to certify whether the S2SAN is superior to the sequence of sentences network (HAN) in terms of the classification accuracy and model training time in domain-specific, cross-domain, multidomain sentiment analysis tasks. We suggest that the proposed sentence-to-sentence attention model has excellent compatibility with different word encoders. Therefore, our third objective is to verify whether some extensively applied word encoders can achieve better accuracies with the reconfiguration of sentence-to-sentence attention.
Overall, our contributions are summarized as follows:
- •
To the best of our knowledge, this is the first method that uses sentence-to-sentence attention to realize the sentence-level attention mechanism. This approach disregards sentence positional information and reduces the complexity involved in building sentence sequences.
- •
Aimed at online reviews, S2SAN achieves excellent results in domain-specific, cross-domain and multidomain sentiment analysis experiments. The proposed model increases accuracy by 0.8% to 2.1% and reduces the training time by an average of 25% compared to another hierarchical model (HAN).
- •
In several parallel experiments, we verify that after optimization with a hierarchical structure and the sentence-to-sentence attention framework, the accuracies of some classical sentiment classifiers (e.g., convolutional neural network (CNN), recurrent neural network (RNN), and long short-term memory (LSTM) models) increase by 1.9% to 8%.
The remainder of this paper is organized as follows: Section 2 outlines the most relevant related research regarding sentiment analysis of online reviews and attention mechanisms. The sentence-to-sentence attention model is presented in Section 3. Section 4 reports the experimental results, which are derived from multiple review datasets. The experimental results are discussed in Section 5. Section 6 provides the conclusions, limitations, and suggested directions for future work.
Section snippets
Related works
Our study focuses on online reviews in e-commerce platforms and aims to detect the sentiment of review texts using a novel attention architecture. In this section, we review sentiment analysis methods of online reviews and attention mechanisms that have been reported in works on related NLP tasks.
Proposed approach: S2SAN
In this section, we present the S2SAN. The goal is to calculate sentence-level attention weights in online reviews.
Experiments and evaluation
In this section, we conduct four groups of experiments to validate whether S2SAN can yield better accuracy in domain-specific, cross-domain, and multidomain sentiment analysis tasks and whether the sentence-to-sentence attention framework is compatible with mainstream word encoders, including CNN, DNN, RNN, and LSTM.
Discussion
In this study, we conducted several groups of experiments on four data sets. The first group of experiments involved a typical domain-specific sentiment analysis task. In this group of experiments, the S2SAN model not only slightly improves the accuracy but also reduces the training time. We discovered that the two hierarchical document-representation models (HAN and S2SAN) require less training time than the general sequence models. The second experiment involved cross-domain sentiment
Conclusions
Online reviews contain a vast amount of sentiment information and have substantial value. Sentiment analysis of online reviews is a popular topic in the field of NLP. In addition, calculating the attention weights of different words in the review text using an attention mechanism has become a mainstream approach that has achieved considerable success. However, the semantics of each sentence in an online review text are individual rather than sequential, and less work has been performed on
Funding
This work was supported by the National Natural Science Foundation of China [No. 72074171] and [No. 71774121].
Acknowledgements
The numerical calculations in this paper were conducted on the supercomputing system in the Supercomputing Center of Wuhan University.
Ping Wang, associate professor, he is working at School of Information Management, Wuhan University, Wuhan, China, 430072. He will be able to contact at [email protected] if you have any questions. His research interests focus on data mining and data analysis, governmental information management, social media.
References (67)
- et al.
Understanding web 2.0 service models: a knowledge-creating perspective
Inf. Manag.
(2011) - et al.
What drives consumer knowledge sharing in online travel communities?: personal attributes or e-service factors?
Comput. Hum. Behav.
(2016) - et al.
The influence of reviewer engagement characteristics on online review helpfulness: a text regression model
Decis. Support. Syst.
(2014) - et al.
Revealed preference in online reviews: purchase verification in the tablet market
Decis. Support. Syst.
(2020) - et al.
To whom should I listen? Finding reputable reviewers in opinion-sharing communities
Decis. Support. Syst.
(2012) Examining the role of emotion in online consumer reviews of various attributes in the surprise box shopping model
Decis. Support. Syst.
(2020)- et al.
Deep learning-based sentiment classification of evaluative text based on multi-feature fusion
Inf. Process. Manag.
(2019) - et al.
Unsupervised method for sentiment analysis in online texts
Expert Syst. Appl.
(2016) - et al.
Attention-based long short-term memory network using sentiment lexicon embedding for aspect-level sentiment analysis in Korean
Inf. Process. Manag.
(2019) - et al.
Opinion mining of movie review using hybrid method of support vector machine and particle swarm optimization
Procedia Eng.
(2013)
Adapting sentiment lexicons to domain-specific social media texts
Decis. Support. Syst.
Domain attention model for multi-domain sentiment classification
Knowl.-Based Syst.
Entropy based classifier for cross-domain opinion mining
Appl. Comput. Inform.
Leveraging sentiment analysis at the aspects level to predict ratings of reviews
Inf. Sci.
TDAM: a topic-dependent attention model for sentiment analysis
Inf. Process. Manag.
E-service quality and web 2.0: expanding quality models to include customer participation and inter-customer support
Serv. Ind. J.
What makes a helpful online review? A study of customer reviews on amazon.com
MIS Q.
Sentiment analysis and subjectivity
Opinion mining and sentiment analysis
Found. Trends Inf. Retr.
Self selection and information role of online product reviews
Inf. Syst. Res.
Sentiment analysis and opinion mining
Mining opinion features in customer reviews
Thumbs up? Sentiment classification using machine learning techniques
The creation of a Chinese emotion ontology based on hownet
Eng. Lett.
An operational system for detecting and tracking opinions in on-line discussion
Deeper sentiment analysis using machine translation technology
A sentimental education: Sentiment analysis using subjectivity summarization based on minimum cuts
Sentiment embeddings with applications to sentiment analysis
IEEE Trans. Knowl. Data Eng.
Recurrent models of visual attention
A structured self-attentive sentence embedding
Attention-based LSTM for aspect-level sentiment classification
Hierarchical attention networks for document classification
Emotions in product reviews--empirics and models
Cited by (23)
Sentiment classification of time-sync comments: A semi-supervised hierarchical deep learning method
2024, European Journal of Operational ResearchCognitive process-driven model design: A deep learning recommendation model with textual review and context
2024, Decision Support SystemsCapturing complexity over space and time via deep learning: An application to real-time delay prediction in railways
2023, European Journal of Operational ResearchEnhanced Elman spike neural network based sentiment analysis of online product recommendation
2023, Applied Soft ComputingCitation Excerpt :Where, every product reviews are summarized and sentiments are categorized [14]. SA assesses the opinions of people about products, companies, services, and organization [15,16]. The connections amid the SA and product design have remained relatively unremarked despite rapid advances in SA in other fields [17].
Target-level sentiment analysis for news articles
2022, Knowledge-Based SystemsCitation Excerpt :Comparable results are obtained by a combination of different LSTM models (e.g., [45,46]), which achieve around 80% accuracy on different datasets. Recently in this field, Wang et al. [47] used a sentence-attention model to predict the sentiment of a whole document. Lastly, the comparison of approaches is done for aspect-level sentiment analysis (sometimes also confusingly referred to an entity- or target-level analysis [48]).
Analysis of customer reviews with an improved VADER lexicon classifier
2024, Journal of Big Data
Ping Wang, associate professor, he is working at School of Information Management, Wuhan University, Wuhan, China, 430072. He will be able to contact at [email protected] if you have any questions. His research interests focus on data mining and data analysis, governmental information management, social media.
Jiangnan Li, master student, she is studying at School of Information Management, Wuhan University, Wuhan, China, 430072. She will be able to contact at [email protected] if you have any questions. Her research interests focus on data mining, sentiment analysis, social media.
Jingrui Hou, master student, he is studying at School of Information Management, Wuhan University, Wuhan, China, 430072, he will be able to contact at [email protected] if you have any questions. His research interests focus on natural language processing, sentiment analysis, deep learning.