Stance Detection in Arabic Tweets: A Machine Learning Framework for Identifying Extremist Discourse
Abstract
1. Introduction
1.1. Problem Definition
1.2. Our Contributions
- Creation of a specialized Arabic dataset: A collection of 7053 tweets focused on Hezbollah’s activities was compiled and annotated, addressing the scarcity of labeled data for Arabic stance detection research. We made the dataset available for non-commercial use.
- Development of a practical stance detection system: An efficient ML-based framework for classifying stances in Arabic tweets about Hezbollah’s involvement in Syria was developed.
2. Background
2.1. Challenges in Handling Arabic Tweets
2.2. Stance Detection
- Disambiguation Problem: A stance-bearing statement may not identify its target explicitly but instead reference related sub-events, policies, or entities. For instance, a tweet stating, “They finally lifted the ban!” conveys a positive stance, but without an explicit target, it could refer to (1) women’s driving rights in Saudi Arabia, (2) COVID-19 travel restrictions, or (3) the reinstatement of a suspended player. Correct interpretation requires deep contextual modeling and extensive world knowledge to resolve that the term “they” refers to a specific authority and “the ban” to a specific policy.
- Limits of Lexical and Syntactic Patterns: Traditional supervised and feature-based approaches (e.g., relying on tf-idf, n-grams, or syntactic dependencies) struggle when surface lexical cues are absent. If words such as “climate,” “global,” or “warming” never appear, these models lack anchors to tether stance predictions to the correct topic. This illustrates why implicit targets cannot be resolved by shallow statistical associations alone.
- Knowledge Gap for LLMs: Modern large language models (LLMs) encapsulate vast world knowledge, yet they are not immune to errors with implicit targets. The challenge lies in retrieval and alignment: the model must (a) recall the relevant event (e.g., that lifting the ban on Saudi women driving occurred in 2018), (b) align this knowledge to ambiguous references such as “they” and “ban,” and (c) filter this event from countless similar “ban-lifting” instances. This process is highly sensitive to context length, prompt phrasing, and model biases, which often results in inconsistent stance predictions.
- Context and Figurative Language: Implicit stance frequently co-occurs with figurative language such as irony, sarcasm, or metaphor, where the literal form diverges from the intended meaning. Statements like “What a brilliant idea!” could signal sarcasm and convey a negative stance, requiring pragmatic inference beyond lexical cues.
- Data Scarcity and Annotation Difficulty: Constructing datasets for implicit stance detection is particularly challenging. Human annotators can rely on commonsense reasoning to infer implicit targets, but for machine learning, this requires datasets labeled not only with stance but also with supporting evidence and often explicit target resolution. This is expensive, time-intensive, and hard to scale. Consequently, most benchmarks (e.g., SemEval-2016) underrepresent implicit targets, leaving models poorly trained for real-world ambiguity.
- Evaluation Dilemma: Assessing stance detection performance on implicit targets is also non-trivial. For example, if a model labels a post as “against” a policy, but the gold label associates the stance with the political party responsible for the policy, should this be considered correct? Simple accuracy or F-scores are insufficient, and evaluation frameworks must account for reasoning chains and conceptual proximity to capture model competence fairly.
3. Related Works
3.1. Stance Detection
3.2. Terrorism Detection
3.3. Concluding Remarks
4. Our Proposed System
4.1. Dataset and Annotation
4.2. Tweet Preprocessing
4.3. Stemming
5. Experiments and Discussion
5.1. Evaluation Metrics
5.2. Word Embedding Using FastText
- Epochs: The term refers to the number of times the instance is seen by FastText. The standard range for the number of epochs is 5–50.
- Learning rate (LR): It refers to the amount of change performed by the model after processing each instance. The standard range for LR is 0.1–1.0.
5.3. Supervised Classifiers
5.4. Hyper-Parameter Optimization
5.5. Discussion
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Backlinko Team. Social Media Users & Growth Statistics. 2024. Available online: https://backlinko.com/social-media-users (accessed on 9 June 2025).
- DataReportal/Kepios. Global Social Media Statistics. 2025. Available online: https://datareportal.com/social-media-users (accessed on 12 June 2025).
- Boczkowski, P.J.; Matassi, M.; Mitchelstein, E. How Young Users Deal With Multiple Platforms: The Role of Meaning-Making in Social Media Repertoires. J. Comput.-Mediat. Commun. 2018, 23, 245–259. [Google Scholar] [CrossRef]
- Zubiaga, A.; Aker, A.; Bontcheva, K.; Liakata, M.; Procter, R. Detection and resolution of rumours in social media: A survey. Acm Comput. Surv. (Csur) 2018, 51, 1–36. [Google Scholar] [CrossRef]
- Al-Ghadir, A.I.; Azmi, A.M.; Hussain, A. A novel approach to stance detection in social media tweets by fusing ranked lists and sentiments. Inf. Fusion 2020, 67, 29–40. [Google Scholar] [CrossRef]
- Williamson, M. Terrorism, War and International Law: The Legality of the Use of Force Against Afghanistan in 2001; Routledge: London, UK, 2016. [Google Scholar]
- Kruglanski, A.W.; Fishman, S. Terrorism between “syndrome” and “tool”. Curr. Dir. Psychol. Sci. 2006, 15, 45–48. [Google Scholar] [CrossRef]
- Azmi, A.M.; Al-Ghadir, A.I. Using Twitter as a digital insight into public stance on societal behavioral dynamics. J. King Saud-Univ.-Comput. Inf. Sci. 2024, 36, 102078. [Google Scholar] [CrossRef]
- Callegaro, M.; Yang, Y. The role of surveys in the era of “big data”. In The Palgrave Handbook of Survey Research; Palgrave Macmillan: Cham, Switzerland, 2017; pp. 175–192. [Google Scholar]
- Bruns, A.; Stieglitz, S. Twitter Data: What do they represent? IT—Inf. Technol. 2014, 56, 240–245. [Google Scholar] [CrossRef]
- Alruily, M.; Manaf Fazal, A.; Mostafa, A.M.; Ezz, M. Automated Arabic long-tweet classification using transfer learning with BERT. Appl. Sci. 2023, 13, 3482. [Google Scholar] [CrossRef]
- Azmi, A.M.; Aljafari, E.A. Universal web accessibility and the challenge to integrate informal Arabic users: A case study. Univers. Access Inf. Soc. 2018, 17, 131–145. [Google Scholar] [CrossRef]
- Almuzaini, H.A.; Azmi, A.M. TaSbeeb: A judicial decision support system based on deep learning framework. J. King Saud-Univ.-Comput. Inf. Sci. 2023, 35, 101695. [Google Scholar] [CrossRef]
- Al-Jouie, M.F.; Azmi, A.M. Automated Evaluation of School Children Essays in Arabic. In Proceedings of the 3rd International Conference on Arabic Computational Linguistics (ACLing 2017), Dubai, United Arab Emirates, 5–6 November 2017; Volume 117, pp. 19–22. [Google Scholar]
- Alqahtani, A.; Al-Saif, A. Automated Arabic essay evaluation. In Proceedings of the 17th International Conference on Natural Language Processing (ICON), Patna, India, 18–21 December 2020; pp. 181–190. [Google Scholar]
- AlShenaifi, N.; Azmi, A. Arabic dialect identification using machine learning and transformer-based models. In Proceedings of the Seventh Arabic Natural Language Processing Workshop (WANLP 2022), Abu Dhabi, United Arab Emirates, 8 December 2022; pp. 464–467. [Google Scholar]
- Mohammad, S.; Kiritchenko, S.; Sobhani, P.; Zhu, X.; Cherry, C. Semeval-2016 Task 6: Detecting stance in tweets. In Proceedings of the SemEval, San Diego, CA, USA, 16–17 June 2016; pp. 31–41. [Google Scholar]
- Somasundaran, S.; Wiebe, J. Recognizing stances in ideological on-line debates. In Proceedings of the NAACL HLT 2010 Workshop on Computational Approaches to Analysis and Generation of Emotion in Text, Los Angeles, CA, USA, 1–6 June 2010; pp. 116–124. [Google Scholar]
- Addawood, A.; Schneider, J.; Bashir, M. Stance Classification of Twitter Debates: The Encryption Debate as A Use Case. In Proceedings of the 8th International Conference on Social Media & Society, Toronto, ON, Canada, 28–30 July 2017. [Google Scholar]
- Taulé, M.; Martí, A.; Rangel, F.; Rosso, P.; Bosco, C.; Patti, V. Overview of the Task on Stance and Gender Detection in Tweets on Catalan Independence at IberEval 2017. In Proceedings of the 2nd Workshop on Evaluation of Human Language Technologies for Iberian Languages, Murcia, Spain, 19 September 2017. [Google Scholar]
- Pangtey, L.; Choudhary, R.; Mehta, P. Large Language Models Meet Stance Detection: A Survey of Tasks, Methods, Applications, Challenges and Future Directions. arXiv 2025, arXiv:2505.08464. [Google Scholar] [CrossRef]
- Garg, K.; Caragea, C. Stanceformer: Target-Aware Transformer for Stance Detection. In Proceedings of the Findings of the Association for Computational Linguistics: EMNLP 2024, Miami, FL, USA, 12–16 November 2024; pp. 4969–4984. [Google Scholar]
- Barel, G.; Tsur, O.; Vilenchik, D. Acquired TASTE: Multimodal Stance Detection with Textual and Structural Embeddings. In Proceedings of the 31st International Conference on Computational Linguistics, Abu Dhabi, United Arab Emirates, 19–24 January 2025; pp. 6492–6504. [Google Scholar]
- Ma, J.; Wang, C.; Xing, H.; Zhao, D.; Zhang, Y. Chain of stance: Stance detection with large language models. In Natural Language Processing and Chinese Computing (NLPCC 2024); Lecture Notes in Computer Science; Wong, D.F., Wei, Z., Yang, M., Eds.; Springer: Singapore, 2024; Volume 15363, pp. 82–94. [Google Scholar]
- Zhao, X.; Li, F.; Wang, H.; Zhang, M.; Liu, Y. Zero-Shot Stance Detection Based on Multi-Expert Collaboration. Sci. Rep. 2024, 14, 15923. [Google Scholar] [CrossRef]
- Ma, J.; Qian, Y.; Yang, J. Exploring Multi-Agent Debate for Zero-Shot Stance Detection: A Novel Approach. Appl. Sci. 2025, 15, 4612. [Google Scholar] [CrossRef]
- Abdelhade, N.; Soliman, T.; Ibrahim, H. Detecting Twitter users’ opinions of Arabic comments during various time episodes via deep neural network. In Proceedings of the International Conference on Advanced Intelligent Systems and Informatics, Cairo, Egypt, 1–3 September 2018. [Google Scholar]
- Alkhathlan, A.; Alahmadi, F.; Kateb, F.; Al-Khalifa, H. Constructing and evaluating ArabicStanceX: A social media dataset for Arabic stance detection. Front. Artif. Intell. 2025, 8, 1615800. [Google Scholar] [CrossRef]
- Charfi, A.; Khene, M.; Belguith, L.H. Stance Detection in Arabic with a Multi-Dialectal Cross-Domain Stance Corpus. Soc. Netw. Anal. Min. 2024, 14, 69. [Google Scholar] [CrossRef]
- Alturayeif, N.; Luqman, H.; Alyafeai, Z.; Yamani, A. StanceEval 2024: The first Arabic stance detection shared task. In Proceedings of the Second Arabic Natural Language Processing Conference, Bangkok, Thailand, 16 August 2024; pp. 774–782. [Google Scholar]
- Badran, M.; Hamdy, M.; Torki, M.; El-Makky, N.M. AlexUNLP-BH at StanceEval2024: Multiple contrastive losses ensemble strategy with multi-task learning for stance detection in Arabic. In Proceedings of the Second Arabic Natural Language Processing Conference, Bangkok, Thailand, 16 August 2024; pp. 823–827. [Google Scholar]
- Zhang, B.; Jiang, Y.; Wang, L.; Wang, Z.; Li, X. A Survey of Stance Detection on Social Media: New Directions and Perspectives. arXiv 2024, arXiv:2409.15690. [Google Scholar] [CrossRef]
- Gera, P.; Neal, T. Deep Learning in Stance Detection: A Survey. ACM Comput. Surv. 2025, 58, 1–37. [Google Scholar] [CrossRef]
- Omer, E. Using Machine Learning to Identify Jihadist Messages on Twitter. In Proceedings of the 2015 European Intelligence and Security Informatics Conference, Manchester, UK, 7–9 September 2015. [Google Scholar]
- Alsaedi, N.; Burnap, P. Arabic event detection in social media. In Computational Linguistics and Intelligent Text Processing (CICLing 2015); Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2015; Volume 9041, pp. 384–401. [Google Scholar]
- Ali, G. Identifying Terrorist Affiliations through Social Network Analysis Using Data Mining Techniques. Master’s Thesis, Valparaiso University, Valparaiso, IN, USA, 2016. [Google Scholar]
- Alhalabi, W.; Jussila, J.; Jambi, K.; Visvizi, A.; Qureshi, H.; Lytras, M.; Malibari, A.; Adham, R. Social mining for terroristic behavior detection through Arabic tweets characterization. Future Gener. Comput. Syst. 2021, 116, 132–144. [Google Scholar] [CrossRef]
- Al-Shawakfa, E.M.; Alsobeh, A.M.; Omari, S.; Shatnawi, A. RADAR#: An Ensemble Approach for Radicalization Detection in Arabic Social Media Using Hybrid Deep Learning and Transformer Models. Information 2025, 16, 522. [Google Scholar] [CrossRef]
- Himdi, H.; Alhayan, F.; Shaalan, K. Neural Networks and Sentiment Features for Extremist Content Detection in Arabic Social Media. Int. Arab J. Inf. Technol. (IAJIT) 2025, 22, 522–534. [Google Scholar] [CrossRef]
- Aldera, S.; Emam, A.; Al-Qurishi, M.; Alrubaian, M.; Alothaim, A. Annotated Arabic Extremism Tweets. IEEE Dataport, 8 August 2021. [Google Scholar] [CrossRef]
- Fraiwan, M. Identification of Markers and Artificial Intelligence-Based Classification of Radical Twitter Data. Appl. Comput. Inform 2022. [Google Scholar] [CrossRef]
- Mussiraliyeva, S.; Bolatbek, M.; Omarov, B.; Bagitova, K. Detection of extremist ideation on social media using machine learning techniques. In Proceedings of the International Conference on Computational Collective Intelligence (ICCCI 2020); Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2020; Volume 12496, pp. 743–752. [Google Scholar]
- Almohaimeed, N.; Azmi, A.M. Abstractive text summarization: A comprehensive survey of techniques, systems, and challenges. Comput. Sci. Rev. 2025, 57, 100762. [Google Scholar] [CrossRef]
- Abdel-Nabi, H.; Awajan, A.; Ali, M.Z. Deep learning-based question answering: A survey. Knowl. Inf. Syst. 2023, 65, 1399–1485. [Google Scholar] [CrossRef]
- Sabri, R.F.; Abdullah, N.A. A Review for Arabic Extremism Detection Using Machine Learning. Iraqi J. Sci. 2024, 65, 6617–6630. [Google Scholar] [CrossRef]
- Mohammad, S.; Kiritchenko, S.; Sobhani, P.; Zhu, X.; Cherry, C. A dataset for detecting stance in tweets. In Proceedings of the 10th Edition of the the Language Resources and Evaluation Conference (LREC), Portorož, Slovenia, 23–28 May 2016. [Google Scholar]
- Almuzaini, H.A.; Azmi, A.M. An unsupervised annotation of Arabic texts using multi-label topic modeling and genetic algorithm. Expert Syst. Appl. 2022, 203, 117384. [Google Scholar] [CrossRef]
- Al-Zyoud, A.; Al-Rabayah, W. Arabic Stemming Techniques: Comparisons and New Vision. In Proceedings of the 8th IEEE GCC Conference and Exhibition, Muscat, Oman, 1–4 February 2015. [Google Scholar]
- Taghva, K.; Elkhoury, R.J.; Coombs, J. Arabic stemming without a root dictionary. In Proceedings of the International Conference on Information Technology: Coding and Computing (ITCC’05)-Volume II, Las Vegas, NV, USA, 4–6 April 2005; Volume 1, pp. 152–157. [Google Scholar]
- Chawla, N.V.; Bowyer, K.W.; Hall, L.O.; Kegelmeyer, W.P. SMOTE: Synthetic minority over-sampling technique. J. Artif. Intell. Res. 2002, 16, 321–357. [Google Scholar] [CrossRef]
- Bojanowski, P.; Grave, E.; Joulin, A.; Mikolov, T. Enriching Word Vectors with Subword Information. Trans. Assoc. Comput. Linguist. 2017, 5, 135–146. [Google Scholar] [CrossRef]
- Sparck Jones, K. A Statistical Interpretation of Term Specificity and Its Application in Retrieval. J. Doc. 1972, 28, 11–21. [Google Scholar] [CrossRef]
- Salton, G.; Buckley, C. Term-weighting approaches in automatic text retrieval. Inf. Process. Manag. 1988, 24, 513–523. [Google Scholar] [CrossRef]
- Bergstra, J.; Bengio, Y. Random Search for Hyper-Parameter Optimization. J. Mach. Learn. Res. 2012, 13, 281–305. [Google Scholar]
- Cortes, C.; Vapnik, V. Support-Vector Networks. Mach. Learn. 1995, 20, 273–297. [Google Scholar] [CrossRef]
- Schölkopf, B.; Burges, C.J.; Vapnik, V.N. Comparing Support Vector Machines with Gaussian Kernels to Radial Basis Function Classifiers. In Proceedings of the 9th International Conference on Artificial Neural Networks (ICANN), Edinburgh, UK, 7–10 September 1997; pp. 63–72. [Google Scholar]
Tweet | Stance |
---|---|
أصلا حزب الله وداعش حلفاء ولم يتعرض حزب الله لداعش في سوريا أبدا وكلاهما كان يقتل في الشعب السوري وكلاهما صناعة إسرائيلية وما وراء ذلك كله تمثيل | Against |
In fact, Hezbollah and ISIS are allies, and Hezbollah never confronted ISIS in Syria; both were killing the Syrian people, both are an Israeli creation, and everything beyond that is mere theatrics. | |
قَسَم لو ما قَسَم مايفرق.. بعد لو يحط ايد عالقرآن وإيد على عيونه عساها العمى ويحلف حلف مايفيده،حزب الله بيرد بيرد والسيد ما يثنّي كلمته، بس اعطوا هالنتن كلينكس لايصيح | Favor |
Whether he swears an oath or not, it makes no difference. Even if he puts one hand on the Qur’an and the other over his eyes—may they go blind—and swears the strongest oath, it won’t help him. Hezbollah will definitely respond, and “the Sayyid” doesn’t go back on his word. Just give that stinker a Kleenex so he doesn’t start crying. | |
والله مو كاسر خاطري الا الايتام الي بالدول العربيه الي فقدوا اهلهم بالربيع العربي تخيل فجاه تصير بدون عائله وبدون وطن وعمرك صغير وعندك اخوات كنت اتمنى من سفارات دول الخليج انها تتبنى الايتام وتوفر لهم سكن وملبس وتعليم خصوصا دول الخليج مقتدره ماديا #سوريا | Neutral |
By God, what breaks my heart most are the orphans in Arab countries who lost their families during the Arab Spring. Imagine suddenly being without a family or a homeland, being so young and having siblings. I wish the embassies of the Gulf states would take in these orphans and provide housing, clothing, and education especially the Gulf countries which are financially capable. #Syria | |
هههههه تمثيلياتكم وأفلامكم أنتهت والجيش السوري بالتعاون مع روسيا وإيران يحررون سوريا من ما تبقي من جرذان الغرب و المدن التي يحررها دائما ما يمهل فترة للمدنيين ومن يبقون هم الخونة والعملاء فقط وعلي أساس الخونة مسالمون وليسوا بلطجية وإرهابيين ومسلحين | Favor |
Hahaha—your theatrics and films are over. The Syrian army, in cooperation with Russia and Iran, is liberating Syria from what remains of the West’s “rats.” In the cities it liberates, it always gives civilians a grace period, and those who remain are only the traitors and collaborators. As if those traitors were “peaceful” and not thugs, terrorists, and armed men. | |
الاف القتلى المسلمين السنة في سوريا و تهجير الملايين المسلمين السنة السوريين بمساعدة الحرس الثوري الايراني و الميليشيات الشيعية العنصرية الارهابية من حشد شعبي و ما يسمى حزب الله و حتى الجيش الروسي و انت تستغرب !! | Against |
Thousands of Sunni Muslims have been killed in Syria, and millions of Syrian Sunni Muslims have been displaced with the help of the Iranian Revolutionary Guard, sectarian terrorist Shiite militias from the Popular Mobilization Forces, the so-called Hezbollah, and even the Russian army, and you’re surprised?! |
Training (70%) | Testing (30%) | Total | |
---|---|---|---|
Favor | 2241 | 960 | 3201 |
Against | 1646 | 706 | 2352 |
Neither | 1050 | 450 | 1500 |
Total | 4937 | 2116 | 7053 |
Learning Rate | Epochs | F-Score |
---|---|---|
0 (default) | 5 (default) | 0.1361 |
0.1 | 25 | 0.7086 |
0.2 | 25 | 0.7006 |
0.3 | 25 | 0.6957 |
1.0 | 25 | 0.6851 |
1.0 | 50 | 0.6847 |
MNB | SVM-RBF | W-1NN | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
# Feature | ||||||||||||||||||||||
1 | 100 | 0.675 | 0.806 | 0.735 | 0.546 | 0.559 | 0.552 | 0.644 | 0.802 | 0.771 | 0.786 | 0.643 | 0.606 | 0.624 | 0.705 | 0.664 | 0.683 | 0.673 | 0.502 | 0.451 | 0.475 | 0.574 |
500 | 0.714 | 0.796 | 0.753 | 0.573 | 0.663 | 0.615 | 0.684 | 0.814 | 0.779 | 0.796 | 0.639 | 0.640 | 0.639 | 0.718 | 0.527 | 0.638 | 0.577 | 0.388 | 0.447 | 0.415 | 0.496 | |
1000 | 0.735 | 0.788 | 0.761 | 0.562 | 0.682 | 0.616 | 0.689 | 0.807 | 0.789 | 0.798 | 0.650 | 0.641 | 0.646 | 0.722 | 0.518 | 0.557 | 0.537 | 0.354 | 0.502 | 0.415 | 0.476 | |
1500 | 0.745 | 0.781 | 0.763 | 0.562 | 0.713 | 0.629 | 0.696 | 0.799 | 0.782 | 0.790 | 0.644 | 0.656 | 0.650 | 0.720 | 0.928 | 0.157 | 0.269 | 0.356 | 0.977 | 0.522 | 0.395 | |
2000 | 0.741 | 0.779 | 0.759 | 0.549 | 0.712 | 0.620 | 0.690 | 0.804 | 0.781 | 0.792 | 0.642 | 0.656 | 0.649 | 0.720 | 0.949 | 0.152 | 0.262 | 0.356 | 0.984 | 0.523 | 0.393 | |
2 | 100 | 0.578 | 0.875 | 0.696 | 0.588 | 0.288 | 0.387 | 0.542 | 0.595 | 0.845 | 0.698 | 0.543 | 0.416 | 0.471 | 0.585 | 0.672 | 0.307 | 0.422 | 0.342 | 0.717 | 0.463 | 0.442 |
500 | 0.659 | 0.803 | 0.724 | 0.551 | 0.501 | 0.525 | 0.624 | 0.655 | 0.790 | 0.716 | 0.559 | 0.537 | 0.548 | 0.632 | 0.679 | 0.469 | 0.555 | 0.410 | 0.616 | 0.492 | 0.523 | |
1000 | 0.680 | 0.785 | 0.729 | 0.553 | 0.546 | 0.550 | 0.639 | 0.672 | 0.780 | 0.722 | 0.553 | 0.568 | 0.561 | 0.641 | 0.652 | 0.588 | 0.619 | 0.419 | 0.504 | 0.457 | 0.538 | |
1500 | 0.695 | 0.776 | 0.733 | 0.546 | 0.575 | 0.560 | 0.647 | 0.677 | 0.777 | 0.723 | 0.556 | 0.599 | 0.577 | 0.650 | 0.649 | 0.620 | 0.634 | 0.438 | 0.490 | 0.463 | 0.548 | |
2000 | 0.714 | 0.772 | 0.742 | 0.544 | 0.611 | 0.576 | 0.659 | 0.687 | 0.778 | 0.729 | 0.552 | 0.603 | 0.577 | 0.653 | 0.625 | 0.640 | 0.633 | 0.435 | 0.435 | 0.435 | 0.534 | |
3 | 100 | 0.481 | 0.962 | 0.641 | 0.500 | 0.082 | 0.141 | 0.391 | 0.482 | 0.961 | 0.642 | 0.496 | 0.095 | 0.160 | 0.401 | 0.769 | 0.135 | 0.230 | 0.332 | 0.922 | 0.488 | 0.359 |
500 | 0.506 | 0.949 | 0.660 | 0.583 | 0.186 | 0.282 | 0.471 | 0.506 | 0.951 | 0.661 | 0.601 | 0.196 | 0.296 | 0.478 | 0.801 | 0.200 | 0.320 | 0.344 | 0.900 | 0.497 | 0.409 | |
1000 | 0.513 | 0.932 | 0.662 | 0.571 | 0.228 | 0.326 | 0.494 | 0.513 | 0.935 | 0.663 | 0.586 | 0.224 | 0.324 | 0.493 | 0.765 | 0.241 | 0.367 | 0.353 | 0.881 | 0.504 | 0.435 | |
1500 | 0.527 | 0.921 | 0.670 | 0.582 | 0.269 | 0.368 | 0.519 | 0.524 | 0.925 | 0.669 | 0.599 | 0.253 | 0.356 | 0.513 | 0.768 | 0.256 | 0.384 | 0.353 | 0.855 | 0.499 | 0.441 | |
2000 | 0.534 | 0.913 | 0.674 | 0.591 | 0.290 | 0.389 | 0.531 | 0.531 | 0.916 | 0.672 | 0.603 | 0.280 | 0.382 | 0.527 | 0.770 | 0.279 | 0.410 | 0.360 | 0.849 | 0.506 | 0.458 | |
1 + 2 | 100 | 0.678 | 0.804 | 0.736 | 0.553 | 0.555 | 0.554 | 0.645 | 0.796 | 0.772 | 0.784 | 0.636 | 0.593 | 0.614 | 0.699 | 0.667 | 0.688 | 0.677 | 0.497 | 0.442 | 0.468 | 0.572 |
500 | 0.716 | 0.797 | 0.755 | 0.585 | 0.657 | 0.619 | 0.687 | 0.819 | 0.779 | 0.798 | 0.641 | 0.646 | 0.643 | 0.721 | 0.540 | 0.659 | 0.594 | 0.410 | 0.470 | 0.438 | 0.516 | |
1000 | 0.742 | 0.790 | 0.765 | 0.578 | 0.676 | 0.623 | 0.694 | 0.807 | 0.787 | 0.797 | 0.653 | 0.649 | 0.651 | 0.724 | 0.533 | 0.589 | 0.559 | 0.367 | 0.504 | 0.424 | 0.492 | |
1500 | 0.759 | 0.787 | 0.773 | 0.578 | 0.704 | 0.635 | 0.704 | 0.809 | 0.782 | 0.795 | 0.645 | 0.656 | 0.650 | 0.723 | 0.915 | 0.164 | 0.279 | 0.356 | 0.969 | 0.520 | 0.400 | |
2000 | 0.760 | 0.781 | 0.770 | 0.579 | 0.728 | 0.645 | 0.708 | 0.803 | 0.787 | 0.795 | 0.644 | 0.650 | 0.647 | 0.721 | 0.935 | 0.161 | 0.275 | 0.356 | 0.977 | 0.522 | 0.399 | |
1 + 3 | 100 | 0.678 | 0.804 | 0.736 | 0.553 | 0.555 | 0.554 | 0.645 | 0.796 | 0.772 | 0.784 | 0.636 | 0.593 | 0.614 | 0.699 | 0.667 | 0.688 | 0.677 | 0.497 | 0.442 | 0.468 | 0.572 |
500 | 0.717 | 0.793 | 0.753 | 0.582 | 0.659 | 0.618 | 0.686 | 0.821 | 0.780 | 0.800 | 0.643 | 0.649 | 0.646 | 0.723 | 0.541 | 0.656 | 0.593 | 0.411 | 0.476 | 0.441 | 0.517 | |
1000 | 0.743 | 0.787 | 0.764 | 0.577 | 0.678 | 0.624 | 0.694 | 0.809 | 0.789 | 0.799 | 0.653 | 0.647 | 0.650 | 0.724 | 0.526 | 0.590 | 0.556 | 0.359 | 0.485 | 0.412 | 0.484 | |
1500 | 0.758 | 0.786 | 0.772 | 0.577 | 0.703 | 0.634 | 0.703 | 0.808 | 0.783 | 0.795 | 0.645 | 0.654 | 0.650 | 0.722 | 0.917 | 0.167 | 0.283 | 0.356 | 0.969 | 0.521 | 0.402 | |
2000 | 0.766 | 0.780 | 0.773 | 0.582 | 0.735 | 0.649 | 0.711 | 0.805 | 0.788 | 0.797 | 0.642 | 0.652 | 0.647 | 0.722 | 0.936 | 0.163 | 0.278 | 0.356 | 0.977 | 0.522 | 0.400 | |
2 + 3 | 100 | 0.578 | 0.867 | 0.693 | 0.569 | 0.302 | 0.394 | 0.544 | 0.593 | 0.843 | 0.696 | 0.535 | 0.420 | 0.471 | 0.584 | 0.656 | 0.298 | 0.410 | 0.339 | 0.723 | 0.461 | 0.436 |
500 | 0.659 | 0.800 | 0.723 | 0.550 | 0.493 | 0.520 | 0.621 | 0.651 | 0.792 | 0.715 | 0.557 | 0.514 | 0.535 | 0.625 | 0.693 | 0.459 | 0.552 | 0.411 | 0.625 | 0.496 | 0.524 | |
1000 | 0.679 | 0.773 | 0.723 | 0.540 | 0.545 | 0.542 | 0.632 | 0.672 | 0.771 | 0.718 | 0.546 | 0.568 | 0.557 | 0.637 | 0.660 | 0.560 | 0.606 | 0.413 | 0.527 | 0.463 | 0.534 | |
1500 | 0.690 | 0.766 | 0.726 | 0.542 | 0.571 | 0.556 | 0.641 | 0.681 | 0.772 | 0.724 | 0.555 | 0.599 | 0.576 | 0.650 | 0.664 | 0.587 | 0.623 | 0.510 | 0.417 | 0.459 | 0.541 | |
2000 | 0.704 | 0.770 | 0.735 | 0.534 | 0.592 | 0.562 | 0.648 | 0.690 | 0.779 | 0.732 | 0.549 | 0.600 | 0.573 | 0.653 | 0.658 | 0.617 | 0.637 | 0.453 | 0.511 | 0.480 | 0.558 |
Kernel # | Best C | Best |
---|---|---|
Linear | 1.0 | 0.01 |
RBF | 1.0 | 1.0 |
Polynomial | 0.01 | 10 |
Sigmoid | 10 | 0.01 |
Without SMOTE | With SMOTE | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Model | |||||||||||||||
1 | MNB | 0.735 | 0.788 | 0.7606 | 0.562 | 0.682 | 0.6164 | 0.6885 | 0.789 | 0.688 | 0.7354 | 0.649 | 0.716 | 0.6809 | 0.7081 |
SVM linear | 0.794 | 0.777 | 0.7852 | 0.638 | 0.622 | 0.6300 | 0.7076 | 0.847 | 0.718 | 0.7772 | 0.720 | 0.698 | 0.7089 | 0.7430 | |
SVM RBF | 0.807 | 0.789 | 0.7979 | 0.650 | 0.641 | 0.6455 | 0.7217 | 0.845 | 0.769 | 0.8053 | 0.774 | 0.749 | 0.7613 | 0.7833 | |
SVM poly | 0.625 | 0.890 | 0.7347 | 0.653 | 0.565 | 0.6059 | 0.6703 | 0.973 | 0.329 | 0.4916 | 0.563 | 0.932 | 0.7017 | 0.5966 | |
SVM sigmoid | 0.728 | 0.820 | 0.7712 | 0.600 | 0.657 | 0.6275 | 0.6993 | 0.860 | 0.703 | 0.7734 | 0.723 | 0.661 | 0.6906 | 0.7320 | |
W-1NN | 0.518 | 0.557 | 0.5366 | 0.354 | 0.502 | 0.4150 | 0.4758 | 0.918 | 0.172 | 0.2891 | 0.574 | 0.762 | 0.6549 | 0.4720 | |
W-5NN | 0.641 | 0.779 | 0.7032 | 0.509 | 0.590 | 0.5468 | 0.6250 | 0.911 | 0.104 | 0.1869 | 0.517 | 0.733 | 0.6067 | 0.3968 | |
W-10NN | 0.664 | 0.780 | 0.7173 | 0.551 | 0.603 | 0.5758 | 0.6465 | 0.959 | 0.073 | 0.1348 | 0.519 | 0.767 | 0.6186 | 0.3767 | |
2 | MNB | 0.680 | 0.785 | 0.7288 | 0.553 | 0.546 | 0.5497 | 0.6392 | 0.787 | 0.540 | 0.6408 | 0.505 | 0.691 | 0.5837 | 0.6122 |
SVM linear | 0.642 | 0.817 | 0.7193 | 0.604 | 0.488 | 0.5397 | 0.6295 | 0.768 | 0.565 | 0.6509 | 0.683 | 0.538 | 0.6016 | 0.6263 | |
SVM RBF | 0.672 | 0.780 | 0.7220 | 0.553 | 0.568 | 0.5606 | 0.6413 | 0.794 | 0.564 | 0.6594 | 0.678 | 0.588 | 0.6298 | 0.6446 | |
SVM poly | 0.539 | 0.877 | 0.6679 | 0.526 | 0.250 | 0.3392 | 0.5036 | 0.821 | 0.430 | 0.5643 | 0.745 | 0.427 | 0.5427 | 0.5535 | |
SVM sigmoid | 0.503 | 0.961 | 0.6608 | 0.597 | 0.204 | 0.3034 | 0.4821 | 0.812 | 0.538 | 0.6474 | 0.714 | 0.418 | 0.5274 | 0.5874 | |
W-1NN | 0.652 | 0.588 | 0.6186 | 0.419 | 0.504 | 0.4574 | 0.5380 | 0.753 | 0.494 | 0.5967 | 0.672 | 0.546 | 0.6026 | 0.5997 | |
W-5NN | 0.613 | 0.636 | 0.6241 | 0.414 | 0.460 | 0.4358 | 0.5299 | 0.609 | 0.641 | 0.6248 | 0.663 | 0.508 | 0.5749 | 0.5998 | |
W-10NN | 0.584 | 0.676 | 0.6265 | 0.406 | 0.406 | 0.4058 | 0.5162 | 0.602 | 0.621 | 0.6113 | 0.675 | 0.457 | 0.5448 | 0.5781 | |
3 | MNB | 0.513 | 0.932 | 0.6621 | 0.571 | 0.228 | 0.3263 | 0.4942 | 0.839 | 0.234 | 0.3658 | 0.360 | 0.920 | 0.5172 | 0.4415 |
SVM linear | 0.507 | 0.943 | 0.6593 | 0.591 | 0.201 | 0.2994 | 0.4793 | 0.850 | 0.231 | 0.3630 | 0.606 | 0.224 | 0.3267 | 0.3449 | |
SVM RBF | 0.513 | 0.935 | 0.6625 | 0.586 | 0.224 | 0.3241 | 0.4933 | 0.809 | 0.251 | 0.3834 | 0.615 | 0.227 | 0.3315 | 0.3574 | |
SVM poly | 0.505 | 0.943 | 0.6574 | 0.574 | 0.176 | 0.2690 | 0.4632 | 0.842 | 0.207 | 0.3327 | 0.647 | 0.199 | 0.3042 | 0.3185 | |
SVM sigmoid | 0.467 | 0.994 | 0.6353 | 0.412 | 0.010 | 0.0200 | 0.3276 | 0.979 | 0.097 | 0.1765 | 0.341 | 0.985 | 0.5069 | 0.3417 | |
W-1NN | 0.765 | 0.241 | 0.3670 | 0.353 | 0.881 | 0.5039 | 0.4354 | 0.379 | 0.902 | 0.5336 | 0.587 | 0.189 | 0.2861 | 0.4099 | |
W-5NN | 0.757 | 0.243 | 0.3683 | 0.352 | 0.889 | 0.5041 | 0.4362 | 0.747 | 0.253 | 0.3783 | 0.358 | 0.896 | 0.5119 | 0.4451 | |
W-10NN | 0.510 | 0.921 | 0.6567 | 0.563 | 0.221 | 0.3175 | 0.4871 | 0.763 | 0.249 | 0.3756 | 0.357 | 0.886 | 0.5087 | 0.4422 | |
1 + 2 | MNB | 0.742 | 0.790 | 0.7652 | 0.578 | 0.676 | 0.6230 | 0.6941 | 0.798 | 0.705 | 0.7483 | 0.670 | 0.714 | 0.6913 | 0.7198 |
SVM linear | 0.795 | 0.776 | 0.7854 | 0.638 | 0.631 | 0.6343 | 0.7099 | 0.854 | 0.730 | 0.7874 | 0.734 | 0.717 | 0.7253 | 0.7564 | |
SVM RBF | 0.807 | 0.787 | 0.7967 | 0.653 | 0.649 | 0.6509 | 0.7238 | 0.850 | 0.766 | 0.8060 | 0.775 | 0.755 | 0.7647 | 0.7853 | |
SVM poly | 0.634 | 0.894 | 0.7419 | 0.648 | 0.568 | 0.6053 | 0.6736 | 0.976 | 0.339 | 0.5034 | 0.565 | 0.924 | 0.7012 | 0.6023 | |
SVM sigmoid | 0.731 | 0.820 | 0.7734 | 0.601 | 0.643 | 0.6209 | 0.6972 | 0.864 | 0.699 | 0.7724 | 0.713 | 0.659 | 0.6849 | 0.7286 | |
W-1NN | 0.533 | 0.589 | 0.5594 | 0.367 | 0.504 | 0.4244 | 0.4919 | 0.932 | 0.181 | 0.3028 | 0.566 | 0.752 | 0.6460 | 0.4744 | |
W-5NN | 0.642 | 0.778 | 0.7037 | 0.518 | 0.596 | 0.5541 | 0.6289 | 0.913 | 0.118 | 0.2097 | 0.529 | 0.753 | 0.6211 | 0.4154 | |
W-10NN | 0.674 | 0.789 | 0.7268 | 0.547 | 0.597 | 0.5710 | 0.6489 | 0.962 | 0.078 | 0.1436 | 0.513 | 0.766 | 0.6145 | 0.3791 | |
1 + 3 | MNB | 0.743 | 0.787 | 0.7641 | 0.577 | 0.678 | 0.6235 | 0.6938 | 0.797 | 0.704 | 0.7472 | 0.672 | 0.711 | 0.6907 | 0.7189 |
SVM linear | 0.795 | 0.773 | 0.7839 | 0.638 | 0.630 | 0.6337 | 0.7088 | 0.848 | 0.730 | 0.7848 | 0.733 | 0.718 | 0.7256 | 0.7552 | |
SVM RBF | 0.809 | 0.789 | 0.7987 | 0.653 | 0.647 | 0.6500 | 0.7243 | 0.852 | 0.765 | 0.8062 | 0.775 | 0.758 | 0.7663 | 0.7862 | |
SVM poly | 0.635 | 0.894 | 0.7422 | 0.645 | 0.565 | 0.6026 | 0.6724 | 0.974 | 0.338 | 0.5018 | 0.568 | 0.926 | 0.7042 | 0.6030 | |
SVM sigmoid | 0.733 | 0.822 | 0.7747 | 0.599 | 0.638 | 0.6180 | 0.6963 | 0.859 | 0.696 | 0.7686 | 0.712 | 0.653 | 0.6808 | 0.7247 | |
W-1NN | 0.526 | 0.590 | 0.5561 | 0.359 | 0.485 | 0.4124 | 0.4843 | 0.933 | 0.184 | 0.3071 | 0.567 | 0.749 | 0.6453 | 0.4762 | |
W-5NN | 0.644 | 0.778 | 0.7046 | 0.518 | 0.597 | 0.5547 | 0.6296 | 0.923 | 0.123 | 0.2164 | 0.528 | 0.749 | 0.6192 | 0.4178 | |
W-10NN | 0.677 | 0.787 | 0.7279 | 0.553 | 0.606 | 0.5786 | 0.6532 | 0.965 | 0.084 | 0.1541 | 0.513 | 0.762 | 0.6133 | 0.3837 | |
2 + 3 | MNB | 0.679 | 0.773 | 0.7226 | 0.540 | 0.545 | 0.5422 | 0.6324 | 0.780 | 0.528 | 0.6297 | 0.496 | 0.684 | 0.5753 | 0.6025 |
SVM linear | 0.645 | 0.809 | 0.7176 | 0.589 | 0.480 | 0.5290 | 0.6233 | 0.751 | 0.557 | 0.6392 | 0.674 | 0.519 | 0.5865 | 0.6129 | |
SVM RBF | 0.672 | 0.771 | 0.7179 | 0.546 | 0.568 | 0.5566 | 0.6373 | 0.786 | 0.556 | 0.6511 | 0.682 | 0.597 | 0.6364 | 0.6437 | |
SVM poly | 0.548 | 0.863 | 0.6700 | 0.539 | 0.274 | 0.3631 | 0.5165 | 0.790 | 0.446 | 0.5704 | 0.756 | 0.439 | 0.5551 | 0.5627 | |
SVM sigmoid | 0.506 | 0.958 | 0.6624 | 0.594 | 0.217 | 0.3175 | 0.4900 | 0.795 | 0.530 | 0.6360 | 0.712 | 0.435 | 0.5403 | 0.5881 | |
W-1NN | 0.660 | 0.560 | 0.6059 | 0.413 | 0.527 | 0.4630 | 0.5344 | 0.590 | 0.673 | 0.6288 | 0.688 | 0.547 | 0.6095 | 0.6191 | |
W-5NN | 0.636 | 0.603 | 0.6191 | 0.414 | 0.488 | 0.4478 | 0.5335 | 0.590 | 0.652 | 0.6194 | 0.670 | 0.503 | 0.5749 | 0.5971 | |
W-10NN | 0.597 | 0.641 | 0.6183 | 0.393 | 0.419 | 0.4056 | 0.5120 | 0.593 | 0.650 | 0.6201 | 0.675 | 0.467 | 0.5518 | 0.5859 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Alkhraiji, A.K.; Azmi, A.M. Stance Detection in Arabic Tweets: A Machine Learning Framework for Identifying Extremist Discourse. Mathematics 2025, 13, 2965. https://doi.org/10.3390/math13182965
Alkhraiji AK, Azmi AM. Stance Detection in Arabic Tweets: A Machine Learning Framework for Identifying Extremist Discourse. Mathematics. 2025; 13(18):2965. https://doi.org/10.3390/math13182965
Chicago/Turabian StyleAlkhraiji, Arwa K., and Aqil M. Azmi. 2025. "Stance Detection in Arabic Tweets: A Machine Learning Framework for Identifying Extremist Discourse" Mathematics 13, no. 18: 2965. https://doi.org/10.3390/math13182965
APA StyleAlkhraiji, A. K., & Azmi, A. M. (2025). Stance Detection in Arabic Tweets: A Machine Learning Framework for Identifying Extremist Discourse. Mathematics, 13(18), 2965. https://doi.org/10.3390/math13182965