Hybrid Embedding and GPT-5 Instruction-Augmented Framework for Arabic Hate Speech Detection
الموضوعات : Natural Language ProcessingAnas Khudhur Abbas al juboori 1 , Heshaam Faili 2
1 - Computer Engineering, Department Pardis Alborz, University of Tehran, Tehran, Iran
2 - School of Electrical and Computer Engineering, College of Engineering, University of Tehran , Tehran, Iran
الکلمات المفتاحية: Hate Speech, Large Language Model, Supervised Fine Tuning, Arabic,
ملخص المقالة :
Hate speech is defined as language that creates hatred, hostility, or violence towards people or groups based on their religion, ethnicity, gender, and/or nationality. As social media continues to grow and expand, the influx of hate speech and abusive language on these platforms is on the rise and has become a significant threat to online safety and social cohesion. Despite improvements in the detection of hate speech with automation technologies, there is little research conducted on the detection of hate speech in Arabic, especially regarding varying dialects. Current approaches often fail to identify language patterns or contextual nuances that are specific to different dialects. Moreover, little research has been conducted focused solely on instruction-based learning in this field. We presented a methodology for detecting abusive language and hate speech in Arabic utilizing the L-HSAB database. Through the combination of AraBERT-v2 and Multilingual MPNet, hybrid embeddings were created that have both language-specific characteristics and cross-linguistic conceptual characteristics. UMAP and HDBSCAN were applied for both dimension reduction and cluster analysis, and iterative refinement of clustering was facilitated by the utilization of Silhouette and Coherence scores. Based on the identified resulting clusters generated, GPT-5 was used to produce linguistically grounded instructional prompts, which were then assessed by both LLM-as-a-Judge using prompt generation and by human validators. Finally, the identified instructions were incorporated into further fine-tuning of the models. Experimental results indicate that the proposed method yields 90.5% accuracy for the purpose of detecting hate speech in dialects of Arabic.
[1] K. Gasmi et al., "Hybrid Feature and Optimized Deep Learning Model Fusion for Detecting Hateful Arabic Content," IEEE Access, 2025.
[2] K. E. Daouadi, Y. Boualleg, and O. Guehairia, "Systematic investigation of recent pre-trained language model for hate speech detection in arabic tweets," ACM Transactions on Asian and Low-Resource Language Information Processing, 2024.
[3] B. Corporation, "Most Spoken Languages in the World," 2025. [Online]. Available: https://www.berlitz.com/blog/most-spoken-languages-world.
[4] F. Husain and O. Uzuner, "A survey of offensive language detection for the arabic language," ACM Transactions on Asian and Low-Resource Language Information Processing (TALLIP), vol. 20, no. 1, pp. 1-44, 2021. [5] M. M. Abdelsamie, S. S. Azab, and H. A. Hefny, "The dialects gap: A multi-task learning approach for enhancing hate speech detection in Arabic dialects," Expert Systems with Applications, vol. 295, p. 128584, 2026.
[6] A. Dahou et al., "A Survey on Dialect Arabic Processing and Analysis: Recent Advances and Future Trends," ACM Transactions on Asian and Low-Resource Language Information Processing, 2025.
[7] S. T. Doghmash and M. Saad, "Arabic Hate Speech Identification and Masking in Social Media using Deep Learning Models and Pre-trained Models Fine-tuning," arXiv preprint arXiv:2507.23661, 2025.
[8] S. Salloum, K. Tahat, A. Mansoori, R. Alfaisal, and D. Tahat, "Leveraging K-Means Clustering for Analysis of Arabic Hate Speech Tweets," in Global Congress on Emerging Technologies (GCET-2024), 2024: IEEE, pp. 282-285.
[9] A. H. Ahmed, R.-J. Yew, X. Minocher, and S. Venkatasubramanian, "Navigating Dialectal Bias and Ethical Complexities in Levantine Arabic Hate Speech Detection," arXiv preprint arXiv:2412.10991, 2024.
[10] A. Charfi, M. Besghaier, R. Akasheh, A. Atalla, and W. Zaghouani, "Hate speech detection with ADHAR: a multi-dialectal hate speech corpus in Arabic," (in English), Frontiers in Artificial Intelligence, Review vol. Volume 7 - 2024, 2024-May-30 2024, doi: 10.3389/frai.2024.1391472.
[11] K. E. Daouadi, Y. Boualleg, and K. E. Haouaouchi, "Ensemble of pre-trained language models and data augmentation for hate speech detection from Arabic tweets," arXiv preprint arXiv:2407.02448, 2024.
[12] W. Aldjanabi, A. Dahou, M. A. Al-Qaness, M. A. Elaziz, A. M. Helmi, and R. Damaševičius, "Arabic offensive and hate speech detection using a cross-corpora multi-task learning model," in Informatics, 2021, vol. 8, no. 4: MDPI, p. 69.
[13] W. Antoun, F. Baly, and H. Hajj, "Arabert: Transformer-based model for arabic language understanding," arXiv preprint arXiv:2003.00104, 2020.# [14] N. Reimers and I. Gurevych, "Sentence-bert: Sentence embeddings using siamese bert-networks," arXiv preprint arXiv:1908.10084, 2019.
[15] L. McInnes, J. Healy, and J. Melville, "Umap: Uniform manifold approximation and projection for dimension reduction," arXiv preprint arXiv:1802.03426, 2018.
[16] L. McInnes, J. Healy, and S. Astels, "hdbscan: Hierarchical density based clustering," J. Open Source Softw., vol. 2, no. 11, p. 205, 2017.
[17] H. Mulki, H. Haddad, C. B. Ali, and H. Alshabani, "L-hsab: A levantine twitter dataset for hate speech and abusive language," in Proceedings of the third workshop on abusive language online, 2019, pp. 111-118.
[18] H. Al-Jarrah, M. Al-Smadi, M. Hammad, and F. Shannaq, "Using Deep Learning Techniques to Detect Hate and Abusive Language in Arabic Tweets," International Journal of Intelligent Engineering & Systems, vol. 17, no. 5, 2024.
