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.