Context-Aware And Explainable Hate Speech Detection In Iraqi Social Media: A Framework For Parliamentary And Policy Analysis
Abstract
Overview: Concerns about hate speech and its implications for social cohesion, public discourse, and the safety of targeted communities have been intensified by the rapid expansion of social media, particularly in Iraq owing to its social, cultural, and linguistic diversity, as well as its experience of severe sectarian conflict and communal violence during 2006–2007. Hence, it is important to examine social cohesion and harmful intergroup discourse in contemporary digital environments without assuming a direct causal relationship between past conflict and present-day online hate speech.
Gap: Machine learning and Transformer-based hate-speech detection frameworks have significantly advanced in recent times; however, the reliable identification of hate speech in Iraqi social-media discourse remains challenging since online communication in the country often involves dialectal variation, informal and non-standard spelling, code-mixing, sarcasm, implicit and coded expressions, and deliberate linguistic obfuscation. These context-dependent and dialect-sensitive characteristics may not be adequately captured by generic language representations, and classification performance alone may fail to provide enough insight into model explainability, generalization across different forms of Iraqi online discourse, and robustness to linguistic manipulation. Hence, there is a need for a framework that can combine contextual understanding, dialect sensitivity, explainability, and robustness for the Iraqi context.
Contributions: A context-aware and explainable hate-speech detection framework has been proposed in this study for deployment across Iraqi social media; the methodology of the proposed framework dynamically combines contextual and dialect-specific information for hate-speech classification by integrating Iraqi-aware text preprocessing, contextual Transformer representations, dialect-sensitive feature learning, and an adaptive fusion mechanism. The system also incorporates Explainable Artificial Intelligence (XAI) for identifying the linguistic elements contributing to model predictions; robustness analysis evaluates model behavior under realistic linguistic variations and obfuscation strategies. In addition to the computational contribution, an interdisciplinary AI–policy framework is also incorporated, wherein anonymized and aggregated hate-speech patterns can provide empirical evidence for parliamentary and public-policy analysis. The legislative and oversight role of the Iraqi Council of Representatives in addressing online hate speech was also examined in consideration of freedom of expression, privacy, explainability, responsible digital governance, and human oversight.
Conclusion: An integrated approach that connects Iraqi-contextualized hate-speech detection with explainable and robust artificial intelligence and parliamentary policy analysis has been proposed in this study, wherein AI is positioned as an empirical research and decision-support instrument rather than a mechanism for automated censorship, punishment, or legal determination. A combination of linguistic adaptation, contextual modeling, explainability, robustness assessment, and aggregated policy-oriented evidence in the proposed methodology provides an experimentally testable and socially responsible foundation for analyzing hate speech in Iraqi social media and supporting evidence-informed parliamentary and public-policy analysis.
Keywords
References
- A. Irfan, D. Azeem, S. Narejo, and N. Kumar, “Multi-modal hate speech recognition through machine learning,” in 2024 IEEE 1st Karachi Section Humanitarian Technology Conference (KHI-HTC), IEEE, 2024, pp. 1–6.
- S. Narejo, “Generalized Epileptic Seizure Prediction using,” IJACSA) Int. J. Adv. Comput. Sci. Appl., vol. 14, pp. 502–510, 2023.
- S. Kumar, R. Asthana, S. Upadhyay, N. Upreti, and M. Akbar, “Fake news detection using deep learning models: A novel approach,” Trans. Emerg. Telecommun. Technol., vol. 31, no. 2, p. e3767, 2020.
- R. Prabhu and V. Seethalakshmi, “A comprehensive framework for multi-modal hate speech detection in social media using deep learning,” Sci. Rep., vol. 15, no. 1, p. 13020, 2025.
- A. Carcano, “End of the occupation in 2004? The status of the multinational force in Iraq after the transfer of sovereignty to the interim Iraqi government,” J. Confl. Secur. Law, vol. 11, no. 1, pp. 41–66, 2006.
- H. Travis, “After regime change: United States law and policy regarding Iraqi refugees, 2003-2008,” Wayne L. Rev., vol. 55, p. 1007, 2009.
- A. A. Qadir, “The Judicial Review of Law-Making Process in Iraq under the Constitution of Republic of Iraq-2005,” UKH J. Soc. Sci., vol. 4, no. 1, pp. 37–49, 2020.
- S. F. Abdulghani, B. A. Shtayt, M. S. Taha, and M. M. Hashim, “Effective Knowledge Graph Representation for Cybersecurity Using AI-Based X Data and Named Entity Relation Technique,” in International Conference on Cybersecurity and Artificial Intelligence Strategies, Springer, 2025, pp. 71–89.
- N. A. Yaseen, A. A.-A. Hadad, and M. S. Taha, “An Anomaly Detection Model Using Principal Component Analysis Technique for Medical Wireless Sensor Networks,” in 2021 International Conference on Data Science and Its Applications (ICoDSA), IEEE, 2021, pp. 66–71.
- W. Antoun, F. Baly, and H. Hajj, “Arabert: Transformer-based model for arabic language understanding,” in Proceedings of the 4th workshop on open-source arabic corpora and processing tools, with a shared task on offensive language detection, 2020, pp. 9–15.
- A. Conneau et al., “Unsupervised cross-lingual representation learning at scale,” in Proceedings of the 58th annual meeting of the association for computational linguistics, 2020, pp. 8440–8451.
- S. M. M. Sideek, N. S. Ali, W. Y. Abed, and M. S. Taha, “An Improved Anomaly-based Intrusion Detection System for IoT Applications using Machine Learning Methods,” Pertanika J. Sci. Technol., vol. 34, no. 1, p. 401, 2026.
- N. A. Yaseen, R. S. Hameed, M. M. Hashim, and M. S. Taha, “Enhancing Road Safety through Advanced Machine Learning: A Comparative Study of Tree Ensembles, Neural Networks, and Integrated Models for Multi-class Accident Severity Prediction under Class Imbalance.,” Int. J. Intell. Eng. Syst., vol. 19, no. 9, p. 467, 2026.
- Z. N. Nuimi, Z. S. Al-Eqabi, H. F. Hasan, and M. S. Taha, “Decoupling Transient from Steady-state Performance in Fractional-order PI Control of a DC Microgrid: A Bi-objective Formulation Validated Against Single-metric and Recent-metaheuristic Benchmarks.,” Int. J. Intell. Eng. Syst., vol. 19, no. 9, p. 337, 2026.
- B. M. Ismael, A. Bin Ngadi, M. S. Taha, and J. B. M. Sharif, “Non-dominated sorting genetic algorithm for channel assignment in multiple radio interfaces with multiple channels,” in AIP Conference Proceedings, AIP Publishing LLC, 2026, p. 60041.
- A. S. Ahmed, I. N. Abood, and M. S. Taha, “Adaptive Multi-objective Optimization for Obstacle-aware Wireless Sensor Network Deployment: A Comparative Analysis of State-of-the-Art Algorithms.,” Int. J. Intell. Eng. Syst., vol. 19, no. 2, p. 707, 2026.
- N. S. Ali, A. F. Alsafo, H. D. Ali, and M. S. Taha, “An Effective Face Detection and Recognition Model Based on Improved YOLO v3 and VGG 16 Networks,” J. homepage http//iieta. org/journals/ijcmem, vol. 12, no. 2, pp. 107–119, 2024.
- A. S. Ahmed, A. A.-A. Haddad, R. S. Hameed, and M. S. Taha, “An Accurate Model for Text Document Classification Using Machine Learning Techniques,” J. homepage http//iieta. org/journals/isi, vol. 30, no. 4, pp. 913–921, 2025.
- M. Sundararajan, A. Taly, and Q. Yan, “Axiomatic attribution for deep networks,” in International conference on machine learning, PMLR, 2017, pp. 3319–3328.