A Deep Neural Network Model For Target-Based Sentiment Analysis
A Deep Neural Network Model For Target-Based Sentiment Analysis
Sentiment Analysis
Siyuan Chen Chao Peng
School of Computer Science and Software Engineering Shanghai Key Lab of Trustworthy Computing
East China Normal University School of Computer Science and Software Engineering
Shanghai,China East China Normal University
[email protected] [email protected]
Abstract—In recent years, with the development of social net- POS (Part-of-Speech) features and TF-IDF features have great
works, sentiment analysis has become one of the most important impacts on the method’s accuracy. And these machine-learning
research topics in the field of natural language processing. The based methods tend to predict that different targets in a same
deep neural network model combining attention mechanism has
achieved remarkable success in the task of target-based sentiment sentence to have same sentiment polarities. What’s more,
analysis. In current research, however, the attention mechanism the feature engineering relies on human design and is not
is more combined with LSTM networks, such neural network- compatible with datasets in different fields.
based architectures generally rely on complex computation and In recent years, deep learning methods have achieved great
only focus on the single target, thus it is difficult to effectively progress in many fields, more and more researchers applied
distinguish the different polarities of variant targets in the same
sentence. To address this problem, we propose a deep neural deep neural network models like convolutional neural network
network model combining convolutional neural network and (CNN) model [4] and long-short term memory(LSTM) net-
regional long short-term memory (CNN-RLSTM) for the task work model [5] to NLP tasks. In sentiment analysis tasks,
of target-based sentiment analysis. The approach can reduce the people use deep neural network models to represent sentence
training time of neural network model through a regional LSTM. as a feature vector and through a softmax function to get the
At the same time, the CNN-RLSTM uses a sentence-level CNN to
extract sentiment features of the whole sentence, and controls the sentiment classification. However, these methods haven’t paid
transmission of information through different weight matrices, much attention to the fact that different context words might
which can effectively infer the sentiment polarities of different have different contributions to targets’ sentiment polarities [8].
targets in the same sentence. Finally, experimental results on Inspired by the success of attention mechanism in image
multi-domain datasets of two languages from SemEval2016 and recognition applications, researchers try to utilize it in NLP
auto data show that, our approach yields better performance
than SVM and several other neural network models. tasks. Attention mechanism enables models to focus on a
Index Terms—Deep learning, Sentiment analysis, Target-based target’s specific feature during training and explore more
sentiment analysis, Convolutional neural network, Long short- potential correlation between words. In recent years, attention
term memory network, Deep neural network model based neural networks have achieved high performance in
many target-based NLP tasks, as demonstrated in relation clas-
I. I NTRODUCTION sification [5], modeling sentence pairs [6], machine translation
Target-based sentiment analysis is a fundamental task in the [7] and aspect-level sentiment classification [8].
field of sentiment analysis [1]. Different from conventional However, LSTM receives sequential input of sentence,
sentiment classification, it requires analyzing the sentiment which costs much training time. Furthermore, the attention
polarity of different targets in the same sentence since there mechanism requires neuron to do extra computation which can
may be more than one object in a sentence. For example, double the training time. On the other hand, common CNN
there are two targets in the sentence “Good food but dreadful takes little time in training, but attention-based CNN [6] needs
service at that restaurant”. The sentiment polarity of target to build the attention matrix and analyze sentiment features
“food” is positive while the polarity of target “service” is which require much more work in feature engineering.
negative. Different targets in the same sentence may have In this paper we propose a deep neural network model
opposite sentiment polarities. named CNN-RLSTM, which combines convolutional neural
In traditional machine learning methods, feature engineering network and regional long short-term memory. To overcome
is the key task. Different compositions of n-gram features, the long training time of LSTM, we segment the sentence
TABLE V
B INARY CLASSIFICATION ACCURACY OF DIFFERENT MODELS
R EFERENCES
[1] B. Pang, L. Lee, ”Opinion mining and sentiment analysis,” Foundations
and Trends in Information Retrieval, vol. 2, No. 1-2, pp. 1-135, July
2008.
[2] M. Pontiki, D. Galanis, J. Pavlopoulos, et al, ”Semeval-2014 task 4:
Aspect based sentiment analysis,” Proceedings of the 8th International
Workshop on Semantic Evaluation (SemEval-2016), pp. 19-30, 2014.
[3] E. Boiy, M. F. Moens, ”A machine learning approach to sentiment
analysis in multilingual web texts,” Information Retrieval, vol. 12, No.
5, pp. 526-558, 2009.
[4] Y. Kim, ”Convolutional neural networks for sentence classification,”
Proc of the 2014 Conference on Empirical Methods in Natural Language
Processing (EMNLP). Stroudsburg, pp. 1746-1751, 2014.
[5] P. Zhou, W. Shi, J. Tian, et al, ”Attention-based bidirectional long short-
term memory networks for relation classification,” Proceedings of the
54th Annual Meeting of the Association for Computational Linguistics.
Stroudsburg, vol. 2, pp. 207-212, 2016.
[6] W. Yin, H. Schtze, B. Xiang, et al, ”Abcnn: Attention-based convolu-
tional neural network for modeling sentence pairs,” Transactions of the
Association for Computational Linguistics, vol. 4, No. 11, pp. 259-272,
2015.
[7] D. Bahdanau, K. Cho, Y. Bengio, Neural machine translation by jointly
learning to align and translate, arXiv preprint arXiv: 1409.0473, 2014.
[8] Y. Wang, M. Huang, L. Zhao, et al, ”Attention-based LSTM for Aspect-
level Sentiment Classification,” Proceedings of the 2016 Conference on
Empirical Methods in Natural Language Processing. Stroudsburg, pp.
606-615, 2016.
[9] D. Tang, B. Qin, T. Liu, ”Aspect level sentiment classification with deep
memory network,” Proceedings of the 2016 Conference on Empirical
Methods in Natural Language Processing. Stroudsburg, pp. 214-224,
2016.
[10] B. Liang, Q. Liu, J. Xu, Q. Zhou, P. Zhang, ”Aspect-Based Sentiment
Analysis Based on Multi-Attention CNN,” Journal of Computer Re-
search and Development. Chinese, vol. 54, No. 8, pp. 1724-1735, 2017.