journal article·2022-09-07Open access

Enhanced Arabic Sentiment Analysis Using a Novel Stacking Ensemble of Hybrid and Deep Learning Models

Hager Saleh, Sherif Mostafa, Lubna Abdelkareim Gabralla, Ahmad O. Aseeri, Shaker El-Sappagh

Applied Sciences· Volume 12· Issue 18

Abstract

Sentiment analysis (SA) is a machine learning application that drives people’s opinions from text using natural language processing (NLP) techniques. Implementing Arabic SA is challenging for many reasons, including equivocation, numerous dialects, lack of resources, morphological diversity, lack of contextual information, and hiding of sentiment terms in the implicit text. Deep learning models such as convolutional neural networks (CNN) and long short-term memory (LSTM) have significantly improved in the Arabic SA domain. Hybrid models based on CNN combined with long short-term memory (LSTM) or gated recurrent unit (GRU) have further improved the performance of single DL models. In addition, the ensemble of deep learning models, especially stacking ensembles, is expected to increase the robustness and accuracy of the previous DL models. In this paper, we proposed a stacking ensemble model that combined the prediction power of CNN and hybrid deep learning models to predict Arabic sentiment accurately. The stacking ensemble algorithm has two main phases. Three DL models were optimized in the first phase, including deep CNN, hybrid CNN-LSTM, and hybrid CNN-GRU. In the second phase, these three separate pre-trained models’ outputs were integrated with a support vector machine (SVM) meta-learner. To extract features for DL models, the continuous bag of words (CBOW) and the skip-gram models with 300 dimensions of the word embedding were used. Arabic health services datasets (Main-AHS and Sub-AHS) and the Arabic sentiment tweets dataset were used to train and test the models (ASTD). A number of well-known deep learning models, including DeepCNN, hybrid CNN-LSTM, hybrid CNN-GRU, and conventional ML algorithms, have been used to compare the performance of the proposed ensemble model. We discovered that the proposed deep stacking model achieved the best performance compared to the previous models. Based on the CBOW word embedding, the proposed model achieved the highest accuracy of 92.12%, 95.81%, and 81.4% for Main-AHS, Sub-AHS, and ASTD datasets, respectively.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Sentiment Analysis and Opinion Mining · Topic Modeling · Text and Document Classification Technologies

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Faculty of Computers and Artificial Intelligence, South Valley University, Hurghada 1974531, Egypt

Department of Computer Science and Information Technology, College of Applied, Princess Nourah Bint Abdulrahman University, P.O. Box 84428, Riyadh 11671, Saudi Arabia

Department of Computer Science, College of Computer Engineering and Sciences, Prince Sattam Bin Abdulaziz University, Al-Kharj 11942, Saudi Arabia

Faculty of Computer Science and Engineering, Galala University, Suez 435611, Egypt

Information Systems Department, Faculty of Computers and Artificial Intelligence, Benha University, Banha 13518, Egypt

Funding

Princess Nourah bint Abdulrahman University

References (67)

Show source-provided references
1. Sosa, P.M. (2017). Twitter sentiment analysis using combined LSTM-CNN models. arXiv.
2. A novel deep learning-based multilevel parallel attention neural (MPAN) model for multidomain arabic sentiment analysis10.1109/ACCESS.2021.3049626 ↗
3. A survey of opinion mining in Arabic: A comprehensive system perspective covering challenges and advances in tools, resources, models, applications, and visualizations10.1145/3295662 ↗
4. Al-Hashedi, A., Al-Fuhaidi, B., Mohsen, A.M., Ali, Y., Gamal Al-Kaf, H.A., Al-Sorori, W., and Maqtary, N. (2022). Ensemble Classifiers for Arabic Sentiment Analysis of Social Network (Twitter Data) towards COVID-19-Related Conspiracy Theories. Appl. Comput. Intell. Soft Comput., 2022.10.1155/2022/6614730 ↗
5. Zhang, J., Li, Y., Tian, J., and Li, T. (2018, January 12–14). LSTM-CNN hybrid model for text classification. Proceedings of the 2018 IEEE 3rd Advanced Information Technology, Electronic and Automation Control Conference (IAEAC), Chongqing, China.10.1109/IAEAC.2018.8577620 ↗
6. A novel hybrid deep learning model for sentiment classification10.1109/ACCESS.2020.2982538 ↗
7. Al Omari, M., Al-Hajj, M., Sabra, A., and Hammami, N. (2019, January 22–25). Hybrid CNNs-LSTM deep analyzer for arabic opinion mining. Proceedings of the 2019 Sixth International Conference on Social Networks Analysis, Management and Security (SNAMS), Granada, Spain.10.1109/SNAMS.2019.8931819 ↗
8. Alwehaibi, A., and Roy, K. (2018, January 17–20). Comparison of pre-trained word vectors for arabic text classification using deep learning approach. Proceedings of the 2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA), Orlando, FL, USA.10.1109/ICMLA.2018.00239 ↗
9. Sentiment analysis of Arabic tweets using deep learning10.1016/j.procs.2018.10.466 ↗
10. Saleh, H., Mostafa, S., Alharbi, A., El-Sappagh, S., and Alkhalifah, T. (2022). Heterogeneous Ensemble Deep Learning Model for Enhanced Arabic Sentiment Analysis. Sensors, 22.10.3390/s22103707 ↗
11. Tsoumakas, G., Partalas, I., and Vlahavas, I. (2008, January 21–22). A taxonomy and short review of ensemble selection. Proceedings of the Workshop on Supervised and Unsupervised Ensemble Methods and Their Applications, Patras, Greece.
12. Whalen, S., and Pandey, G. (2013, January 7–10). A comparative analysis of ensemble classifiers: Case studies in genomics. Proceedings of the 2013 IEEE 13th International Conference on Data Mining, Dallas, TX, USA.10.1109/ICDM.2013.21 ↗
13. Building heterogeneous ensembles by pooling homogeneous ensembles10.1007/s13042-021-01442-1 ↗
14. Bagging predictors10.1007/BF00058655 ↗
15. Boosting: An ensemble learning tool for compound classification and QSAR modeling10.1021/ci0500379 ↗
16. A comparative assessment of ensemble learning for credit scoring10.1016/j.eswa.2010.06.048 ↗
17. Farha, I.A., and Magdy, W. (2019, January 1). Mazajak: An online Arabic sentiment analyser. Proceedings of the Fourth Arabic Natural Language Processing Workshop, Florence, Italy.
18. Dahou, A., Xiong, S., Zhou, J., Haddoud, M.H., and Duan, P. (2016, January 11–16). Word embeddings and convolutional neural network for arabic sentiment classification. Proceedings of the Coling 2016, the 26th International Conference on Computational Linguistics: Technical Papers, Osaka, Japan.
19. Arasenti-tweet: A corpus for arabic sentiment analysis of saudi tweets10.1016/j.procs.2017.10.094 ↗
20. Omara, E., Mosa, M., and Ismail, N. (2018, January 17–19). Deep convolutional network for arabic sentiment analysis. Proceedings of the 2018 International Japan-Africa Conference on Electronics, Communications and Computations (JAC-ECC), Alexandria, Egypt.10.1109/JEC-ECC.2018.8679558 ↗
21. Deep bidirectional lstm network learning-based sentiment analysis for arabic text
22. Oussous, A., Lahcen, A.A., and Belfkih, S. (2019, January 27–29). Impact of text pre-processing and ensemble learning on Arabic sentiment analysis. Proceedings of the 2nd International Conference on Networking, Information Systems & Security, Rabat, Morocco.10.1145/3320326.3320399 ↗
23. Opinion mining using ensemble text hidden Markov models for text classification10.1016/j.eswa.2017.07.019 ↗
24. Kaddoura, S., Itani, M., and Roast, C. (2021). Analyzing the effect of negation in sentiment polarity of facebook dialectal arabic text. Appl. Sci., 11.10.3390/app11114768 ↗
25. Arabic tweets sentiment analysis—A hybrid scheme10.1177/0165551515610513 ↗
26. Abdulla, N.A., Ahmed, N.A., Shehab, M.A., and Al-Ayyoub, M. (2013, January 3–5). Arabic sentiment analysis: Lexicon-based and corpus-based. Proceedings of the 2013 IEEE Jordan Conference on Applied Electrical Engineering and Computing Technologies (AEECT), Amman, Jordan.10.1109/AEECT.2013.6716448 ↗
27. Kowsari, K., Jafari Meimandi, K., Heidarysafa, M., Mendu, S., Barnes, L., and Brown, D. (2019). Text classification algorithms: A survey. Information, 10.10.3390/info10040150 ↗
28. Dhar, A., Dash, N.S., and Roy, K. (2018). Application of tf-idf feature for categorizing documents of online bangla web text corpus. Intelligent Engineering Informatics, Springer.10.1007/978-981-10-7566-7_6 ↗
29. Text mining: Use of TF-IDF to examine the relevance of words to documents
30. How to generate a good word embedding10.1109/MIS.2016.45 ↗
31. Evaluating word embedding models: Methods and experimental results10.1017/ATSIP.2019.12 ↗
32. Aravec: A set of arabic word embedding models for use in arabic nlp10.1016/j.procs.2017.10.117 ↗
33. Suleiman, D., Awajan, A.A., and Al Etaiwi, W. (2019, January 9–11). Arabic text keywords extraction using word2vec. Proceedings of the 2019 2nd International Conference on new Trends in Computing Sciences (ICTCS), Amman, Jordan.10.1109/ICTCS.2019.8923034 ↗
34. Speed up grid-search for parameter selection of support vector machines10.1016/j.asoc.2019.03.037 ↗
35. Design of experiments and focused grid search for neural network parameter optimization10.1016/j.neucom.2015.12.061 ↗
36. Cross-validation methods10.1006/jmps.1999.1279 ↗
38. O’Malley, T., Bursztein, E., Long, J., Chollet, F., Jin, H., and Invernizzi, L. (2022, July 23). Hyperparameter Tuning with Keras Tuner. Available online: https://github.com/keras-team/keras-tuner.
39. Shawki, N., Nunez, R.R., Obeid, I., and Picone, J. (2021, January 4). On Automating Hyperparameter Optimization for Deep Learning Applications. Proceedings of the 2021 IEEE Signal Processing in Medicine and Biology Symposium (SPMB), Philadelphia, PA, USA.10.1109/SPMB52430.2021.9672266 ↗
40. Logistic regression was as good as machine learning for predicting major chronic diseases10.1016/j.jclinepi.2020.03.002 ↗
41. Rymarczyk, T., Kozłowski, E., Kłosowski, G., and Niderla, K. (2019). Logistic regression for machine learning in process tomography. Sensors, 19.10.3390/s19153400 ↗
42. John, G.H., and Langley, P. (2013). Estimating continuous distributions in Bayesian classifiers. arXiv.
43. A machine learning based robust prediction model for real-life mobile phone data10.1016/j.iot.2019.01.007 ↗
44. Random forests10.1023/A:1010933404324 ↗
45. Effectiveness analysis of machine learning classification models for predicting personalized context-aware smartphone usage10.1186/s40537-019-0219-y ↗
46. Shape quantization and recognition with randomized trees10.1162/neco.1997.9.7.1545 ↗
47. Boehmke, B., and Greenwell, B. (2019). Hands-on Machine Learning with R, Chapman and Hall/CRC.10.1201/9780367816377 ↗
48. Sun, S., and Huang, R. (2010, January 10–12). An adaptive k-nearest neighbor algorithm. Proceedings of the 2010 Seventh International Conference on Fuzzy Systems and Knowledge Discovery, Yantai, China.10.1109/FSKD.2010.5569740 ↗
49. Introduction to machine learning: K-nearest neighbors10.21037/atm.2016.03.37 ↗
50. Laaksonen, J., and Oja, E. (1996, January 3–6). Classification with learning k-nearest neighbors. Proceedings of the International Conference on Neural Networks (ICNN’96), Washington, DC, USA.10.1109/ICNN.1996.549118 ↗
51. Li, Z., Liu, F., Yang, W., Peng, S., and Zhou, J. (2021). A survey of convolutional neural networks: Analysis, applications, and prospects. IEEE Trans. Neural Netw. Learn. Syst.10.1109/TNNLS.2021.3084827 ↗
52. Chollet, F. (2018). Keras: The Python Deep Learning Library, Astrophysics Source Code Library.
53. O’Shea, K., and Nash, R. (2015). An introduction to convolutional neural networks. arXiv.
54. Agarap, A.F. (2018). Deep learning using rectified linear units (relu). arXiv.
55. Zhang, Z. (2018, January 4–6). Improved adam optimizer for deep neural networks. Proceedings of the 2018 IEEE/ACM 26th International Symposium on Quality of Service (IWQoS), Banff, AB, Canada.10.1109/IWQoS.2018.8624183 ↗
56. Use of binary sigmoid function and linear identity in artificial neural networks for forecasting population density
57. Lipton, Z.C., Kale, D.C., Elkan, C., and Wetzel, R. (2015). Learning to diagnose with LSTM recurrent neural networks. arXiv.
58. Dey, R., and Salem, F.M. (2017, January 6–9). Gate-variants of gated recurrent unit (GRU) neural networks. Proceedings of the 2017 IEEE 60th International Midwest Symposium on Circuits and Systems (MWSCAS), Boston, MA, USA.10.1109/MWSCAS.2017.8053243 ↗
59. Light gated recurrent units for speech recognition10.1109/TETCI.2017.2762739 ↗
60. Are GRU cells more specific and LSTM cells more sensitive in motive classification of text?10.3389/frai.2020.00040 ↗
61. Ensemble learning: A survey10.1002/widm.1249 ↗
62. Alayba, A.M., Palade, V., England, M., and Iqbal, R. (2017, January 3–5). Arabic language sentiment analysis on health services. Proceedings of the 2017 1st International Workshop on Arabic Script Analysis and Recognition (ASAR), Nancy, France.10.1109/ASAR.2017.8067771 ↗
63. Alayba, A.M., Palade, V., England, M., and Iqbal, R. (2018, January 12–14). Improving sentiment analysis in Arabic using word representation. Proceedings of the 2018 IEEE 2nd International Workshop on Arabic and Derived Script Analysis and Recognition (ASAR), London, UK.10.1109/ASAR.2018.8480191 ↗
64. Nabil, M., Aly, M., and Atiya, A. (2015, January 17–21). Astd: Arabic sentiment tweets dataset. Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, Lisbon, Portugal.10.18653/v1/D15-1299 ↗
65. Flach, P.A. (2016). ROC analysis. Encyclopedia of Machine Learning and Data Mining, Springer.10.1007/978-1-4899-7502-7_739-1 ↗
66. Sokolova, M., Japkowicz, N., and Szpakowicz, S. (2006). Beyond accuracy, F-score and ROC: A family of discriminant measures for performance evaluation. Lecture Notes in Computer Science: Proceedings of the Australasian Joint Conference on Artificial Intelligence, Springer.10.1007/11941439_114 ↗
67. A comprehensive review on Arabic word sense disambiguation for natural language processing applications10.1002/widm.1447 ↗