Comparative Performance of Machine Learning and Deep Learning Algorithms for Arabic Hate Speech Detection in OSNs

  • Ahmed OmarEmail author
  • Tarek M. Mahmoud
  • Tarek Abd-El-Hafeez
Conference paper
Part of the Advances in Intelligent Systems and Computing book series (AISC, volume 1153)


Nowadays, Online Social Networks (OSNs) are the most popular and interactive media that used to express feelings, communicate and share information between people. However, along with useful and interesting content, sometimes unsuitable or abusive content can be published on these networks, such as hate speech and insults. Hate speech includes any type of online abuse concepts like cyberbullying, discrimination, abusive language, profanity, flaming, toxicity, and harassment. Most of the Hate speech detection attempts have concentrated on the English text, while work on the Arabic text is sparse. In this paper, we constructed a standard Arabic dataset that can be used for hate speech and abuse detection. In contrast to most previous work the datasets were collected from one platform, the proposed dataset is collected from more social network platforms (Facebook, Twitter, Instagram, and YouTube). To validate the effectiveness of the proposed datasets twelve machine learning algorithms and two deep learning architecture were used. Recurrent Neural Network (RNN) outperformed other classifiers with an accuracy of 98.7%.


Arabic hate speech Hate speech detection Arabic text classification OSN 


  1. 1.
    Al-Tahrawi, M.M., Al-Khatib, S.N.: Arabic text classification using polynomial networks. J. King Saud Univ. Comput. Inf. Sci. 27(4), 437–449 (2015)Google Scholar
  2. 2.
    Alakrot, A., Murray, L., Nikolov, N.S.: Dataset construction for the detection of anti-social behaviour in online communication in Arabic. Procedia Comput. Sci. 142, 174–181 (2018)CrossRefGoogle Scholar
  3. 3.
    Alakrot, A., Murray, L., Nikolov, N.S.: Towards accurate detection of offensive language in online communication in Arabic. Procedia Comput. Sci. 142, 315–320 (2018)CrossRefGoogle Scholar
  4. 4.
    Albadi, N., Kurdi, M., Mishra, S.: Are they our brothers? Analysis and detection of religious hate speech in the Arabic Twittersphere. In: Proceedings of the 2018 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining. ASONAM 2018, pp. 69–76 (2018)Google Scholar
  5. 5.
    Bodkhe, R., Ghorpade, T., Jethani, V.: A novel methodology to filter out unwanted messages from OSN user’s wall using trust value calculation. In: Satapathy, S.C., Raju, K.S., Mandal, J.K., Bhateja, V. (eds.) Proceedings of the Second International Conference on Computer and Communication Technologies, pp. 755–764. Springer, New Delhi (2016)Google Scholar
  6. 6.
    Clement, J.: Most popular social networks worldwide as of October 2019, ranked by number of active users (2019). Accessed 01 Jan 2020
  7. 7.
    Elayeb, B.: Arabic word sense disambiguation: a review. Artif. Intell. Rev., 1–58 (2018)Google Scholar
  8. 8.
    Fortuna, P., Nunes, S.: A survey on automatic detection of hate speech in text. ACM Comput. Surv. 51(4), 1–30 (2018)CrossRefGoogle Scholar
  9. 9.
    Founta, A.M., Chatzakou, D., Kourtellis, N., Blackburn, J., Vakali, A., Leontiadis, I.: A unified deep learning architecture for abuse detection. In: WebSci 2019 – Proceedings of the 11th ACM Conference on Web Science, pp. 105–114 (2019)Google Scholar
  10. 10.
    Ghosh Chowdhury, A., Didolkar, A., Sawhney, R., Shah, R.R.: ARHNet - leveraging community interaction for detection of religious hate speech in Arabic, pp. 273–280 (2019)Google Scholar
  11. 11.
    Haddad, H., Mulki, H., Oueslati, A.: T-HSAB: a tunisian hate speech and abusive dataset. Springer International Publishing (2019)Google Scholar
  12. 12.
    Internet World Stats: INTERNET WORLD USERS BY LANGUAGE (2019). Accessed 30 July 2019
  13. 13.
    Lecun, Y., Bengio, Y., Hinton, G.: Deep learning. Nature 521(7553), 436–444 (2015)CrossRefGoogle Scholar
  14. 14.
    Mar, B.: How Much Data Do We Create Every Day? The Mind-Blowing Stats Everyone Should Read, Forbes (2018). Accessed 12 Dec 2019
  15. 15.
    Mohaouchane, H., Mourhir, A., Nikolov, N.S.: Detecting offensive language on Arabic social media using deep learning. In: 2019 Sixth International Conference on Social Networks Analysis, Management and Security, pp. 466–471 (2019)Google Scholar
  16. 16.
    Mubarak, H., Darwish, K., Magdy, W.: Abusive language detection on Arabic social media. In: Proceedings of the First Workshop on Abusive Language Online, pp. 52–56. Association for Computational Linguistics, Stroudsburg (2017)Google Scholar
  17. 17.
    Mulani, J., Heda, S., Tumdi, K., Patel, J., Chhinkaniwala, H., Patel, J.: Deep Learning Techniques for Biomedical and Health Informatics. Springer, Cham (2020)Google Scholar
  18. 18.
    Mulki, H., Haddad, H., Bechikh Ali, C., Alshabani, H.: L-HSAB: a levantine Twitter dataset for hate speech and abusive language, pp. 111–118 (2019)Google Scholar
  19. 19.
    Omar, A., Mahmoud, T.M., Abd-El-Hafeez, T.: Building online social network dataset for Arabic text classification. In: The International Conference on Advanced Machine Learning Technologies and Applications (AMLTA2018). Advances in Intelligent Systems and Computing, pp. 486–495 (2018)Google Scholar
  20. 20.
    Pedregosa, F., Grisel, O., Weiss, R., Passos, A., Brucher, M.: Scikit-learn: machine learning in Python 12, 2825–2830 (2011)Google Scholar
  21. 21.
    Stieglitz, S., Mirbabaie, M., Ross, B., Neuberger, C.: Social media analytics – challenges in topic discovery, data collection, and data preparation. Int. J. Inf. Manag. 39(October 2017), 156–168 (2018)CrossRefGoogle Scholar

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  1. 1.Computer Science Department, Faculty of ScienceMinia UniversityEL-MiniaEgypt
  2. 2.Deraya UniversityEL-MiniaEgypt

Personalised recommendations