# Machine Learning- and Deep Learning-Based Multi-Model System for Hate Speech Detection on Facebook
## 2 Literature Review  
The rising incidence of hate speech on social media has attracted considerable research interest in the area of Natural Language Processing (NLP) and artificial intelligence (AI). A number of these hate speech detection and mitigation methods using machine learning (ML) and deep learning (DL) models have been proposed [21]. Detecting hate speech has been widely studied in high-resource languages such as English but remains a challenging area for low-resource languages such as Roman Urdu due to the scarcity of both large annotated datasets and language processing tools [22]. Roman Urdu presents several linguistic challenges for hate speech detection. Unlike standardized languages, Roman Urdu lacks a fixed grammatical structure and standardized spellings, making it difficult for traditional NLP techniques to effectively process it [23]. Moreover, code-mixing between Roman Urdu and English further complicates detection efforts, as many hate speech expressions involve bilingual mixing. The limited availability of annotated datasets for Roman Urdu also restricts the application of advanced machine learning models in this domain [24]. There are some studies on ML-based approaches for hate speech detection for various languages since LLMs are still not being trained on any languages other than English and Roman Urdu. Commonly used ML models are Random Forest (RF), Decision Trees (DTs), Naive Bayes (NB), Support Vector Machines (SVMs), and Logistic Regression (LR) [25]. Most of these models utilize feature extraction methods like TF-IDF (Term Frequency-Inverse Document Frequency), n-grams, and Bag-of-Words (BoW) for data representation related to text [26]. But there are limitations on such methods, specifically in dealing with context-dependent hate speech expressions, as well as implicit invective. With the advancement of deep learning (DL), several models have been developed to improve hate speech classification. Recurrent Gated Recurrent Units (GRUs), Long Short-Term Memory (LSTM), Convolutional Neural Networks (CNNs), and Neural Networks (RNNs) have been widely used to classify hate speech with higher accuracy [27]. CNN is particularly effective in detecting word patterns and short phrases associated with hate speech, while LSTM captures sequential dependencies and contextual information [28]. These deep learning models outperform traditional ML approaches due to their ability to automatically learn features without requiring extensive manual preprocessing. Recent studies have suggested hybrid approaches that integrate ML and DL models for improved hate speech detection [29]. Hybrid models combine feature-based ML classifiers with deep learning architectures to leverage the strengths of both techniques. For example, a model might use TF-IDF for feature extraction and an LSTM network for classification, thereby improving overall performance in detecting complex hate speech expressions [30]. Such hybrid techniques have shown promising results in multilingual hate speech detection. One of the most significant advancements in hate speech detection is the use of word embeddings, which capture semantic relationships between words. Pre-trained word embedding models such as Word2 Vec, GloVe, and FastText have been employed to enhance hate speech classification [19]. FastText in particular is effective for Roman Urdu because it can handle out-of-vocabulary (OOV) words by breaking them into character-level n-grams [9]. These embeddings improve feature representation and help in detecting implicit and context-dependent hate speech. One of the primary challenges in hate speech detection for Roman Urdu is the scarcity of publicly available datasets [23]. While large-scale datasets exist for English-language hate speech detection, there are very few labeled datasets for Roman Urdu. Some researchers have attempted to crowdsource annotations for Roman Urdu datasets, but bias in labeling and subjective interpretation of hate speech remain major concerns [27].