# Arabic Hate Speech Detection Using Deep Recurrent Neural Networks
###### Abstract  
With the vast number of comments posted daily on social media and other platforms, manually monitoring internet activity for possible national security risks or cyberbullying is an impossible task. However, with recent advances in machine learning (ML), the automatic monitoring of such posts for possible national security risks and cyberbullying becomes feasible. There is still the issue of privacy on the internet; however, in this study, only the technical aspects of designing an automated system that could monitor and detect hate speech in the Arabic language were targeted, which many companies, such as Facebook, Twitter, and others, could use to prevent hate speech and cyberbullying. For this task, a unique dataset consisting of 4203 comments classified into seven categories, including content against religion, racist content, content against gender equality, violent content, offensive content, insulting/bullying content, normal positive comments, and normal negative comments, was designed. The dataset was extensively preprocessed and labeled, and its features were extracted. In addition, the use of deep recurrent neural networks (RNNs) was proposed for the classification and detection of hate speech. The proposed RNN architecture, called DRNN-2, consisted of 10 layers with 32 batch sizes and 50 iterations for the classification task. Another model consisting of five hidden layers, called DRNN-1, was used only for binary classification. Using the proposed models, a recognition rate of 99.73% was achieved for binary classification, 95.38% for the three classes of Arabic comments, and 84.14% for the seven classes of Arabic comments. This accuracy was high for the classification of a complex language, such as Arabic, into seven different classes. The achieved accuracy was higher than that of similar methods reported in the recent literature, whether for binary classification, three-class classification, or seven-class classification, as discussed in the literature review section. hate speech detection; Arabic comment classification; deep learning; recurrent neural networks; bidirectional RNN; natural language processing [PERSON], F.Y.A. Araibie Hate Speech Detection Using Deep Recurrent Neural Networks. April 2022126010  
words, phrases, and sentences will be required. This system will be smart enough to identify these kinds of conversations and able to determine if they are one-time phrases or if they profile a certain pattern for an individual or organization. In addition, the system will be able to alert the authorities when repetitive unacceptable behavior is observed from an individual group or organization. The system will be called a \"Peace Monitor\" and may also be used to identify bullying on social media. Thus, the motivation for developing an automatic machine learning-based system that is able to detect and identify hate speech is especially needed in countries that are currently progressing to be more inclusive; it will also be useful for the prevention of cyberbullying, particularly in school-aged children with access to social media platforms. A great deal of work has been carried out on the detection of hate speech and cyberbullying in other languages, especially English; however, little work has been completed in Arabic for various reasons, including the complex nature of the Arabic language and the lack of unified large datasets. The aim of this study was to develop a large Arabic language dataset with seven classes that could be used as the basis for the development of an even larger dataset with more classes to be used as a unified dataset for researchers in this field. In addition, this study aimed to develop a modified machine learning algorithm that was able to detect and accurately classify hate speech in Arabic. Machine learning and deep learning algorithms have gained momentum in the past decade as a means to automate many tasks that have conventionally been performed by humans.