Enhancing the interpretability of sentiment analysis with signatures
Abstract
Sentiment analysis is a significant research area within the field of natural language processing, with applications in various social contexts. Recent advances in related research have led to notable improvements in accuracy, yet existing text sentiment analysis models continue to face challenges in terms of interpretability. This paper proposes a text sentiment classification method integrating BERT and BiLstm, comprising three stages: training, signature generation, and testing. Our primary contribution lies in the signature generation and testing stages. In the training stage, BERT is employed to generate word embeddings, while BiLstm is utilized for learning to construct the text sentiment classification model. In the signature generation stage, the training and validation sets are passed through the aforementioned classification model, the feature vectors are extracted following their passage through the fully-connected layer, and the feature vectors are utilized to generate the signature generation stage. The signature is then stored in the database. In the Testing Stage, the aforementioned operation is repeated on the test set in order to obtain the signatures. The signatures are then matched in the constructed signature database in order to obtain the final classification results. The matching degree is subsequently used as a threshold in order to be employed for subsequent evaluation of the results. The method enhances the interpretability of the classification task by matching through signatures. Two datasets, SST-2 and IMDB, were subjected to experimentation. Four quantitative metrics were employed for the evaluation of the results: accuracy, recall, precision, and F1-score. With a threshold of 0.99, the model’s optimal accuracy, recall, precision, and F1-score results reached 0.896, 1, 0.896, 0.945 and 0.847, 0.999, 0.848, 0.917, respectively.
References
- A. Moreo, M. Romero, J. L. Castro, and J. M. Zurita. Lexicon-based Comments-oriented News Sentiment Analyzer system. Expert Systems with Applications, 39(10):9166–9180, August 2012.
- Michael Gamon. Sentiment classification on customer feedback data: Noisy data, large feature vectors, and the role of linguistic analysis. In COLING 2004: Proceedings of the 20th International Conference on Computational Linguistics, pages 841–847, Geneva, Switzerland, August 2004. COLING.
- Hanhoon Kang, Seong Joon Yoo, and Dongil Han. Senti-lexicon and improved Na¨ıve Bayes algorithms for sentiment analysis of restaurant reviews. Expert Systems with Applications, 39(5):6000–6010, April 2012.
- Yan-Yan Zhao, Bing Qin, and Ting Liu. Integrating Intra- and Inter-document Evidences for Improving Sentence Sentiment Classification. Acta Automatica Sinica, 36(10):1417–1425, October 2010.
- Pengfei Liu, Xipeng Qiu, and Xuanjing Huang. Recurrent Neural Network for Text Classification with Multi-Task Learning.
- Fazeel Abid, Muhammad Alam, Muhammad Yasir, and Chen Li. Sentiment analysis through recurrent variants latterly on convolutional neural network of Twitter. Future Generation Computer Systems, 95:292–308, June 2019.
- Mohammad Ehsan Basiri, Shahla Nemati, Moloud Abdar, Erik Cambria, and U. Rajendra Acharya. ABCDM: An Attention-based Bidirectional CNN-RNN Deep Model for sentiment analysis. Future Generation Computer Systems, 115:279–294, February 2021.
- Roger Alan Stein, Patricia A. Jaques, and Jo˜ao Francisco Valiati. An analysis of hierarchical text classification using word embeddings. Information Sciences, 471:216–232, January 2019.
- Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Ng, and Christopher Potts. Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank. In David Yarowsky, Timothy Baldwin, Anna Korhonen, Karen Livescu, and Steven Bethard, editors, Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1631–1642, Seattle, Washington, USA, October 2013. Association for Computational Linguistics.
- Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng, and Christopher Potts. Learning Word Vectors for Sentiment Analysis. In Dekang Lin, Yuji Matsumoto, and Rada Mihalcea, editors, Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, pages 142–150, Portland, Oregon, USA, June 2011. Association for Computational Linguistics.