A Combined CNN and LSTM Model for Arabic Sentiment Analysis
Paper · 2018 · Abdulaziz M. Alayba; Vasile Palade; Matthew England; and Rahat Iqbal
Summary
The paper tackles binary (positive/negative) sentiment classification of Arabic tweets. This is hard because tweets are short, Arabic morphology is rich (a single verb takes many gendered, numbered and tensed forms), and reliable preprocessing tools are scarce, especially for dialectal text. The authors stack a CNN and an LSTM. Convolutional filters with ReLU extract local features from a matrix of 100-dimensional token embeddings. Max-pooling and dropout follow. An LSTM then models the sequence of pooled features, and a sigmoid output gives the label. Each dataset is fed at three granularities: single characters, words split into chunks of the average word length (five characters), and whole words. They evaluate on four tweet corpora: their own Main-AHS and its subset Sub-AHS, Ar-Twitter, and ASTD. Word-level and 5-gram inputs clearly beat character input. The model sets new best results on three corpora, reaching 0.9424 on Main-AHS and 0.9568 on Sub-AHS. It falls slightly short of earlier work on ASTD. The study shows that segmentation granularity matters for morphologically rich, noisy text.
Key points
- Datasets (two classes only):
- Main-AHS: 2026 health-services tweets (1398 negative, 628 positive).
- Sub-AHS: 1732 tweets (1230 negative, 502 positive).
- Ar-Twitter: 1975 usable tweets (975 negative, 1000 positive).
- ASTD: a 2479-tweet positive/negative slice of a 54k corpus (1684 negative, 795 positive).
- Architecture is Embedding (size 100) → Conv (ReLU) → Max-pooling → Dropout 0.5 → LSTM → fully connected layer with sigmoid. Filter widths are 3 for words, 10 for Ch5gram and 20 for characters.
- Inputs are padded to the longest tweet; for example, Main-AHS at character level gives 241×100 matrices.
- The protocol is a single 80/20 train/test split, 50 epochs, with accuracy as the only metric.
- Best accuracies by dataset:
- Main-AHS: 0.9424 with Word-level, up from 0.92 in the authors' prior work.
- Sub-AHS: 0.9568 with Ch5gram, up from 0.95.
- Ar-Twitter: 0.8810 with Word-level.
- ASTD: 0.7762 with Ch5gram, just below the 79.07 reported by Dahou et al.
Interesting ideas
- I1. Words longer than the corpus-average length are cut into overlapping fixed-length chunks, while shorter words stay whole; this cheap, tool-free segmentation captures shared stems across inflected forms.
- I2. The same model is run on one corpus at three input granularities (characters, length-based chunks, words) to measure how much segmentation choice alone changes the outcome.
- I3. The authors evaluate on both a full corpus and a curated subset of it (Main-AHS vs Sub-AHS), which shows how much cleaner data shifts scores.
- I4. With unbalanced classes and plain accuracy on one split, Main-AHS already has a majority-class rate near 69%, a reminder that headline numbers need a trivial baseline beside them.
- I5. Character input was meant to enlarge the feature count for very short texts but performed worst, showing that finer units are not automatically better for short inputs.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (tokens): A data-driven chunking fallback could give the tagger and lemmatizer sub-word evidence for rare or unseen English words before any lexicon match.
- I2 (learn): Mova's evaluation could routinely compare tokenization variants under a fixed parser, so tokenizer changes are judged by their downstream effect on trees and answers.
- I3 (learn): Silver data could be scored on both the full set and its high-agreement subset, separating witness-parser noise from real model weakness.
- I4 (learn): Every reported Mova metric should come with a majority or shuffled-label negative control, so gains are shown to exceed what label skew alone gives.
- I5 (answer): For short school-test items and word problems, readers should rely on word-level, structured cues rather than assuming finer-grained signals will compensate for brevity.
Institutions
Fields, topics and concepts
📚 Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 18,614 worksArtificial Intelligence · 17,965 worksArts and Humanities · 17,450 worksLanguage and Linguistics · 17,296 works
🧭 Topics 2Research subjects and languages the work is about.Sentiment & emotion · 1,035 worksSemitic languages · 3,066 works
Cite
Cite as Abdulaziz M. Alayba; Vasile Palade; Matthew England; and Rahat Iqbal. 2018. A Combined CNN and LSTM Model for Arabic Sentiment Analysis. arXiv:1807.02911 · Proc. International Cross-Domain Conference for Machine Learning and Knowledge Extraction. CD-MAKE 2018. Lecture Notes in Computer Science, vol 11,015, pp. 179-191. Springer, Cham.
@misc{england2018combined,
title = {{A Combined CNN and LSTM Model for Arabic Sentiment Analysis}},
author = {Abdulaziz M. Alayba; Vasile Palade; Matthew England; and Rahat Iqbal},
year = {2018},
doi = {10.1007/978-3-319-99740-7\_12},
eprint = {1807.02911},
archivePrefix = {arXiv},
url = {https://doi.org/10.1007/978-3-319-99740-7_12}
}References
- Liu, B.: Sentiment Analysis and Opinion Mining. Morgan & Claypool, (2012). find
- Balaji, P., Nagaraju, O., Haritha, D.: Levels of sentiment analysis and its challenges: A literature review. In: International Conference on Big Data Analytics and Computational Intelligence (ICBDAC) 2017, vol. 6, pp. 436–439. Chirala, India, (2017). find
- Feldman, R.: Techniques and Applications for Sentiment Analysis. Commun. ACM 56(4), 82–89 (2013). find
- Lakomkin, E., Bothe, C., Wermter, S.: GradAscent at EmoInt-2017: Character and Word Level Recurrent Neural Network Models for Tweet Emotion Intensity Detection. In: Editor, F., Editor, S. (eds.) Proceedings of the 8th Workshop on Computational Approaches to Subjectivity, Sentiment and Social Media Analysis 2017, pp. 169–174. ACL, Copenhagen, Denmark (2017). find
- Joshi, A., Prabhu, A., Shrivastava, M., Varma, V.: Towards Sub-Word Level Compositions for Sentiment Analysis of Hindi-English Code Mixed Text. Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers 2016, pp. 2482–2491. The COLING 2016 Organizing Committee, Osaka, Japan (2016). find
- Kim, Y.: Convolutional Neural Networks for Sentence Classification. Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 1746–1751. ACL, Doha, Qatar (2014).
- Yin, W., Schütze, H.: Multichannel Variable-Size Convolution for Sentence Classification. Proceedings of the Nineteenth Conference on Computational Natural Language Learning, pp. 204–214. ACL, Beijing, China (2015). find
- Shin, B., Lee, T., Choi, J. D.: Lexicon Integrated CNN Models with Attention for Sentiment Analysis. Proceedings of the 8th Workshop on Computational Approaches to Subjectivity, Sentiment and Social Media Analysis, pp. 149–158. ACL, Copenhagen, Denmark (2017). find
- Alayba, A. M., Palade, V., England, M., Iqbal, R.: Arabic Language Sentiment Analysis on Health Services. In: 2017 1st International Workshop on Arabic Script Analysis and Recognition (ASAR), pp. 114–118, IEEE, Nancy, France (2017).
- Alayba, A. M., Palade, V., England, M., Iqbal, R.: Improving Sentiment Analysis in Arabic Using Word Representation. In: 2018 2nd International Workshop on Arabic and Derived Script Analysis and Recognition (ASAR), pp. 13–18, IEEE, London, UK (2018).
- Athiwaratkun, B., Kang, K.: Feature Representation in Convolutional Neural Networks. arXiv preprint arXiv:1507.02313, (2015). ↗
- Gers F.A., Eck D., Schmidhuber J.: Applying LSTM to Time Series Predictable Through Time-Window Approaches. In: Editor, Tagliaferri R., Marinaro M. (eds.) Neural Nets WIRN Vietri-01. Perspectives in Neural Computing 2002., vol. 9999, pp. 193–200. Springer, London (2002). find
- Yousefi-Azar, M., Hamey, L.: Text Summarization Using Unsupervised Deep Learning. Expert Systems with Applications 68, 93–105 (2017). find
- Yih, S. W., He, X., Meek, C.: Semantic Parsing for Single-Relation Question Answering. In: Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics, (vol. 2: Short Papers), pp. 643–648. ACL, Baltimore, Maryland, USA (2014).
- Auli, M. W., Galley, M., Quirk, C., Zweig, G.: Joint Language and Translation Modeling with Recurrent Neural Networks. In: Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pp. 1044–1054. ACL, Seattle, Washington, USA (2013). find
- Mikolov, T., Sutskever, I., Chen, K., Corrado, G., Dean, J.: Distributed Representations of Words and Phrases and Their Compositionality. In: Proceedings of the 26th International Conference on Neural Information Processing Systems NIPS’2013, vol. 2, pp. 3111–3119. Curran Associates Inc., Lake Tahoe, Nevada, USA (2013).
- Wang, Y., Huang, M., Zhao, L., Zhu, X.: Attention-based LSTM for Aspect-level Sentiment Classification. In: Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing 2016, pp. 606–615. ACL, Austin, Texas (2016).
- Abdul-Mageed, M., Diab, M. T., Korayem, M.: Subjectivity and Sentiment Analysis of Modern Standard Arabic. In: Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies HLT 2011: Short Papers - Volume 2, pp. 587–591. ACL, Stroudsburg, PA, USA (2011).
- Shoukry, A., Rafea, A.: Sentence-Level Arabic Sentiment Analysis. In: 2012 International Conference on Collaboration Technologies and Systems (CTS), pp. 546– 550, IEEE, Denver, CO, USA (2012). find
- Abdulla, N. A., Ahmed, N. A., Shehab, M. A., Al-Ayyoub, M.: Arabic sentiment analysis: Lexicon-based and corpus-based. In: 2013 IEEE Jordan Conference on Applied Electrical Engineering and Computing Technologies (AEECT), pp. 1–6, IEEE, Amman, Jordan (2013). find
- Abdulla, N., Majdalawi, R., Mohammed, S., Al-Ayyoub, M., Al-Kabi, M.: Automatic Lexicon Construction for Arabic Sentiment Analysis. In: 2014 International Conference on Future Internet of Things and Cloud, pp. 547–552, IEEE, Barcelona, Spain (2014). find
- Badaro, G., Baly, R., Hajj, H., Habash, N., El-Hajj, W.: A Large Scale Arabic Sentiment Lexicon for Arabic Opinion Mining. In: Proceedings of the EMNLP 2014 Workshop on Arabic Natural Language Processing (ANLP), pp. 165–173, ACL, Doha, Qatar (2014).
- Duwairi, R. M., Marji, R., Sha’ban, N., Rushaidat, S.: Sentiment Analysis in Arabic tweets. In: 2014 5th International Conference on Information and Communication Systems (ICICS), pp. 1–6, IEEE, Irbid, Jordan (2014). find
- Al Sallab, A., Hajj, H., Badaro, G., Baly, B., El Haj, W., Shaban, K. B.: Deep Learning Models for Sentiment Analysis in Arabic. In: Proceedings of the Second Workshop on Arabic Natural Language Processing, pp. 9–17, ACL, Beijing, China (2015).
- Ibrahim, H. F., Abdou, S. M., Gheith, M.: Sentiment Analysis for Modern Standard Arabic and Colloquial. International Journal on Natural Language Computing (IJNLC) 4(2), 95–109 (2015).
- Dahou, A., Xiong, S., Zhou, J., Haddoud, M. H., Duan, P.: Word Embeddings and Convolutional Neural Network for Arabic Sentiment Classification. In: Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers, pp. 2418–2427, The COLING 2016 Organizing Committee, Osaka, Japan (2016).
- Tartir, S., Abdul-Nabi, I.: ASemantic Sentiment Analysis in Arabic Social Media. Journal of King Saud University - Computer and Information Sciences 29(2), 229– 233 (2017). find
- El-Beltagy S.R., Khalil T., Halaby A., Hammad M.: Combining Lexical Features and a Supervised Learning Approach for Arabic Sentiment Analysis. In: Gelbukh A. (eds) Computational Linguistics and Intelligent Text Processing. CICLing 2016. Lecture Notes in Computer Science, vol 9624. Springer, Cham (2018). find
- Nabil, M., Aly, M., Atiya, A.: ASTD: Arabic Sentiment Tweets Dataset. In: Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pp. 2515–2519, ACL, Lisbon, Portugal (2015).
- Smrž, O., Encode Arabic Online Interface, http://quest.ms.mff.cuni.cz/cgi-bin/encode/index.fcgi. Last accessed 18 June 2018. ↗
- Bahloul, M.: Structure and Function of the Arabic Verb. Routledge, London (2008). find
- Keras, https://keras.io. Last accessed 15 Apr 2018. ↗
- Han, J. and M., Claudio: The Influence of the Sigmoid Function Parameters on the Speed of Backpropagation Learning. In: Proceedings of the International Workshop on Artificial Neural Networks: From Natural to Artificial Neural Computation, pp. 195–201, Springer-Verlag, London, UK (1995). find
- Manning, C., Raghavan, P., Schütze, H.: Introduction to Information Retrieval. 1st edn. Cambridge University Press, New York, NY, USA (2008). find
- Pennington, J., Socher, R., Manning, C. D.: GloVe: Global Vectors for Word Representation. In: Empirical Methods in Natural Language Processing (EMNLP), pp. 1532–1543, ACL, Doha, Qatar (2014).
- Bojanowski, P., Grave, E., Joulin, A. Mikolov, T.: Enriching Word Vectors with Subword Information. Transactions of the Association for Computational Linguistics 5, 135–146 (2017).
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/alayba-2018-combined-cnn-lstm-model-arabic/