# Detecting Hateful and Offensive Speech in Arabic Social Media Using Transfer Learning
## 2 Related Works
The third dataset, in German, contains 5009 tweets, of which, 1688 were labeled as \"offensive\", whereas the remaining 3321 were labeled as \"other\". Using these numbers, the authors made sure to keep a 1 to 3 ratio between hateful and non-hateful tweets in their datasets. The best performances were provided by the FastText backed Long Short Term Memory (LSTM) algorithm with an F1-Score of 82% for English, word embedding of Italian tweets along with LSTM for the Italian language with an 80% F1-Score, and FastText embedding with Gated Recurrent Unit (GRU) for German with a 75.8% F1-Score. [PERSON] and [PERSON] [21] have trained and compared the performance of mBERT [4] and XLM-R [22] models on a multilingual dataset containing tweets and Facebook comments in Bengali (4000 FB comments), Hindi (8000 tweets), and Spanish (6600 tweets), which were labeled as \"hateful\" or \"non-hateful\". The overall best performance for this dataset was provided by XLM-R with F1-scores of 84% for Bengali, 85% for Hindi, and 75% for Spanish. When compared to other languages, works dedicated to hateful and offensive language detection in Arabic are scarcer. To the best of our knowledge, most of the earliest works started in 2017 when [PERSON] and [PERSON] [23] suggested a statistical learning approach to back the Support Vector Machines (SVM) algorithm to classify tweets in Arabic as either \"abusive\" or not. [PERSON] et al. [24] are also considered pioneers of Arabic obscene language detection. They set up a list of common obscene words in Arabic social media, and based on it, they extracted and annotated 32000 tweets that contain these words. Among these tweets, 79% were considered \"offensive\", 2% were considered \"obscene\", and the remaining 19% were considered \"normal\". Different approaches have been proposed since then. [PERSON] et al. [25] presented an approach dedicated to religious hate speech detection. They constructed a dataset of 6000 tweets, where each 1000 is specific to one of the six most common religions or sets in the Middle East. They extracted the features from the tweets using AraVec [26] and then, proceeded to a binary classification using LR, SVM, and GRU algorithms. The latter provided the best performance with a 79% accuracy. [PERSON] [27] collected a dataset of 4203 comments from different social media platforms. Each of these comments was manually annotated by a group of Arab native speaker to one of seven classes (\"Against Religion\", \"Racist\", \"Against Gender Equality\", \"Insulting or bullying\", \"Violent or offensive\", \"Normal Positive\", and \"Normal Negative\"). For the classification, they opted for Recurrent Neural Networks (RNN) for an accuracy rate of 84.14%. [PERSON] et al. [28] built a dataset of 4505 tweets from four different domains where there is a high possibility of finding offensive speech (\"Celebrities\", \"Gaming\", \"News\", and \"Sports\"). They fine-tuned AraVec and GloVe models and fed the word embeddings to two classifiers (SVM and XGBoost) that had their hyperparameters optimized by the Genetic Algorithm (GA). The best performance was provided by the AraVec-backed GA-SVM combination with an 88.2% accuracy. [PERSON] et al. [29] built a dataset of 5631 tweets which were annotated by two female and one male Gulf native speakers. The dataset had six labels (\"Clean\", \"Offensive\", \"Religious Hate\", \"Gender Hate\", \"Nationality Hate\", and \"Ethnicity Hate\"). They used different word embedding techniques such as AraVec, FastText, and mBERT, and then, fed the data to three deep learning algorithms: LSTM, GRU, and Convolutional Neural Networks (CNN). The mBERT-CNN combination provided the best results with an F-Macro of 75.51%, which they considered encouraging given the training limitations.