Protecting Intellectual Security Through Hate Speech Detection Using an Artificial Intelligence Approach
Abstract
:1. Introduction
- Develops a system to detect hate speech in Arabic and classify it into specific types, with the goal of protecting intellectual security in society.
- Creates a comprehensive Arabic hate speech dataset to support accurate detection and classification of hate speech across different dialects and contexts. This dataset will be a valuable resource for future research and technological advancements aimed at combating hate speech in the Arabic-speaking online community.
2. Fundamental Concepts of Hate Speech
Types of Hate Speech
3. Related Studies
3.1. Hate Speech Detection in Non-Arabic Languages
3.2. Hate Speech Detection in Arabic Languages
4. Materials and Methods
4.1. Experimental Dataset and Setup
4.2. Data Representation (Feature Extraction)
- N-gram Feature Extraction: The text data were vectorized using the TF-IDF method, with configurations for word and character N-grams.
- Word N-grams: In a text, word N-grams store groups of words and show how these words relate to each other in context. To improve the feature extraction process, this study used word N-grams between 1 and 3. Using a range of 1 to 3 allows the model to analyze single words (unigrams), pairs of consecutive words (bigrams), and three-word sequences (trigrams). This approach allows the model to understand both the meanings of individual words and the relationship of words in short lines to each other.
- Character N-grams: In character N-grams, the study used characters that span up to 6 characters. This approach is very efficient for languages that have a rich morphological structure, such as Arabic, as it captures the morphological part of words. It also detects different spellings and common spelling errors that occur in digital communication.
- Word/Character N-grams: The study investigated a hybrid approach of word and character N-grams, where word N-grams from 1 to 3 were integrated with character N-grams from 1 to 6 to take advantage of both representations.
- Word Embeddings: For the deep learning models, the study used different methods to embed words. For CNN, RNN, LSTM and BiLSTM, we experimented with text representations by using trainable embeddings and pre-trained embeddings separately. More specifically, the pre-trained embeddings were generated from AraVec. AraVec is a pre-trained word embedding model that converts Arabic words into continuous vector representations. This model has been trained on large collections of Arabic texts, so that it can capture the complex linguistic patterns that characterize the Arabic language. The trainable embeddings, on the other hand, allowed the models to directly adapt the word representations to the dataset during the training process.
4.3. Evaluation and Validation
4.3.1. Stratified K-Fold Cross-Validation
- Class proportion in the dataset
- -
- is the number of samples of class i in the dataset.
- -
- n is the total number of samples in the dataset.
- Class proportion in each fold:
- -
- ni.j is the number of samples of class i in fold j.
- -
- nj is the total number of samples in fold j.
4.3.2. Computational Complexity Analysis
4.3.3. Evaluation Metrics
5. Experimental Results and Discussion
5.1. First Layer: Systematic Detection of Hate Speech
5.2. Second Layer: Systematic Classification of Hate Speech Types
5.3. Confidence Intervals and Statistical Testing
5.4. Benchmarking Against State-of-the-Art Models
5.5. Discussion
5.5.1. Error Analysis
5.5.2. Limitations of the Chosen Model
5.5.3. Recommendations and Future Directions
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Robinson, L.; Smith, M. Social Media and Mental Health: Social Media Addiction. HelpGuide.org. Available online: https://www.helpguide.org/mental-health/wellbeing/social-media-and-mental-health (accessed on 15 April 2024).
- Maarouf, A.; Pröllochs, N.; Feuerriegel, S. The Virality of Hate Speech on Social Media. Proc. ACM Hum. Comput. Interact. 2024, 8, 1–22. [Google Scholar] [CrossRef]
- Al-Hassan, A.; Al-Dossari, H. Detection of Hate Speech in Arabic Tweets Using Deep Learning. Multimed. Syst. 2021, 28, 1963–1974. [Google Scholar] [CrossRef]
- Alnazzawi, N. Using Twitter to Detect Hate Crimes and Their Motivations. HateMotiv Corpus. Data 2022, 7, 69. [Google Scholar] [CrossRef]
- Mateusz, B. The Impact of Social Media on Modern Communication: How Platforms like Facebook and Twitter Influence the Way We Connect with Each Other. aithor.com. Available online: https://aithor.com/essay-examples/the-impact-of-social-media-on-modern-communication-how-platforms-like-facebook-and-twitter-influence-the-way-we-connect-with-each-other (accessed on 9 April 2024).
- Meikle, G. Social Media; Routledge: London, UK, 2016. [Google Scholar] [CrossRef]
- Rehman, A.; Khan, M.; Abbas, A.; Javed, M.; Abbas, M.; Hussain, M.; Ul-Allah, S. Evaluation of genetic variability and heritability of wheat genotypes under late sowing effects. Biol. Clin. Sci. Res. J. 2023, 2023, 268. [Google Scholar] [CrossRef]
- Alhazmi, A.; Mahmud, R.; Idris, N.; Abo, M.E.M.; Eke, C. A systematic literature review of hate speech identification on Arabic Twitter data: Research challenges and future directions. PeerJ Comput. Sci. 2024, 10, e1966. [Google Scholar] [CrossRef]
- Poletto, F.; Basile, V.; Sanguinetti, M.; Bosco, C.; Patti, V. Resources and Benchmark Corpora for Hate Speech Detection: A Systematic Review. Lang. Resour. Eval. 2020, 55, 477–523. [Google Scholar] [CrossRef]
- Laub, Z. Hate Speech on Social Media: Global Comparisons. Council on Foreign Relations. Available online: https://www.cfr.org/backgrounder/hate-speech-social-media-global-comparisons (accessed on 12 January 2024).
- Das, S. Twitter Fails to Delete 99% of Racist Tweets Aimed at Footballers in Run-Up to World Cup. The Guardian. Available online: https://www.theguardian.com/technology/2022/nov/20/twitter-fails-to-delete-99-of-racist-tweets-aimed-at-footballers-in-run-up-to-world-cup (accessed on 1 November 2023).
- Faris, H.; Ibrahim, A.; Habib, M.; Castillo, P. Hate Speech Detection Using Word Embedding and Deep Learning in the Arabic Language Context. In Proceedings of the 9th International Conference on Pattern Recognition Applications and Methods ICPRAM, Valletta, Malta, 22–24 February 2020; SciTePress: Setúbal, Portugal, 2020; Volume 1, pp. 453–460. [Google Scholar] [CrossRef]
- Radcliffe, D.; Abuhmaid, H.; Mahliaire, N. Social Media in the Middle East 2022: A Year in Review; SSRN Electronic Journal: Rochester, NY, USA, 2023. [Google Scholar] [CrossRef]
- Cohen-Almagor, R. Fighting Hate and Bigotry on the Internet. Ssrn.com. Available online: https://ssrn.com/abstract=1916552 (accessed on 9 May 2024).
- Jahan, M.S.; Oussalah, M. A systematic review of hate speech automatic detection using natural language processing. Neurocomputing 2023, 546, 126232. [Google Scholar] [CrossRef]
- Chaudhary, M.; Saxena, C.; Meng, H. Countering online hate speech: An nlp perspective. arXiv 2021, arXiv:2109.02941. [Google Scholar]
- Brown, A.; Sinclair, A. The Politics of Hate Speech Laws; Routledge: London, UK, 2019. [Google Scholar]
- Díaz-Faes, D.A.; Pereda, N. Is there such a thing as a hate crime paradigm? An integrative review of bias-motivated violent victimization and offending, its effects and underlying mechanisms. Trauma Violence Abus. 2022, 23, 938–952. [Google Scholar] [CrossRef]
- Moon, R. Putting Faith in Hate; Cambridge University Press: Cambridge, UK, 2018. [Google Scholar]
- Ganfure, G.O. Comparative Analysis of Deep Learning Based Afaan Oromo Hate Speech Detection. J. Big Data 2022, 9, 76. [Google Scholar] [CrossRef]
- Hüsünbeyi, Z.M.; Akar, D.; Özgür, A. Identifying Hate Speech Using Neural Networks and Discourse Analysis Techniques. In Proceedings of the First Workshop on Language Technology and Resources for a Fair, Inclusive, and Safe Society within the 13th Language Resources and Evaluation Conference, Marseille, France, 20–25 June 2022; pp. 32–41. [Google Scholar]
- Jahan, M.S.; Beddiar, D.; Oussalah, M.; Arhab, N.; Bounab, Y. Hate and Offensive Language Detection Using BERT for English Subtask A. In Proceedings of the Working Notes of FIRE 2021-Forum for Information Retrieval Evaluation, Gandhinagar, India, 13–17 December 2021; RWTH Aachen University: Aachen, Germany, 2021. [Google Scholar]
- Srivastava, A.; Hasan, M.; Yagnik, B.; Walambe, R.; Kotecha, K. Role of Artificial Intelligence in Detection of Hateful Speech for Hinglish Data on Social Media. In Applications of Artificial Intelligence and Machine Learning: Select Proceedings of ICAAAIML 2020; Springer Singapore: Singapore, 2021; pp. 83–95. [Google Scholar] [CrossRef]
- Aftan, S.; Shah, H. Using the AraBERT Model for Customer Satisfaction Classification of Telecom Sectors in Saudi Arabia. Brain Sci. 2023, 13, 147. [Google Scholar] [CrossRef]
- Koshiry, A.M.E.; Eliwa, E.H.I.; Abd El-Hafeez, T.; Omar, A. Arabic Toxic Tweet Classification: Leveraging the AraBERT Model. Big Data Cogn. Comput. 2023, 7, 170. [Google Scholar] [CrossRef]
- Antoun, W.; Baly, F.; HAJJ, H. Arabert: Transformer-based model for arabic language understanding. arXiv 2020, arXiv:2003.00104. [Google Scholar]
- Pires, T. How multilingual is multilingual BERT. arXiv 2019, arXiv:1906.01502. [Google Scholar]
- Wu, S.; Dredze, M. Are all languages created equal in multilingual BERT? arXiv 2020, arXiv:2005.09093. [Google Scholar]
- Plaza-del-Arco, F.M.; Molina-González, M.D.; Ureña-López, L.A.; Martín-Valdivia, M.T. Comparing Pre-Trained Language Models for Spanish Hate Speech Detection. Expert Syst. Appl. 2021, 166, 114120. [Google Scholar] [CrossRef]
- 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), Barcelona, Spain, 28–31 August 2018. [Google Scholar] [CrossRef]
- Albadi, N. nuhaalbadi/Arabic_hatespeech. GitHub. Available online: https://github.com/nuhaalbadi/Arabic_hatespeech (accessed on 10 May 2024).
- Mulki, H.; Haddad, H.; Bechikh Ali, C.; Alshabani, H. L-HSAB: A Levantine Twitter Dataset for Hate Speech and Abusive Language. In Proceedings of the Third Workshop on Abusive Language Online, Florence, Italy, 1 August 2019; pp. 111–118. [Google Scholar] [CrossRef]
- Hala-Mulki. Hala-Mulki/L-HSAB-First-Arabic-Levantine-HateSpeech-Dataset. GitHub. Available online: https://github.com/Hala-Mulki/L-HSAB-First-Arabic-Levantine-HateSpeech-Dataset (accessed on 10 May 2024).
- Haddad, H.; Mulki, H.; Oueslati, A. T-HSAB: A Tunisian Hate Speech and Abusive Dataset. In Communications in Computer and Information Science; Springer International Publishing: Cham, Switzerland, 2019; pp. 251–263. [Google Scholar] [CrossRef]
- Hala-Mulki. Hala-Mulki/T-HSAB-A-Tunisian-Hate-Speech-and-Abusive-Dataset. GitHub. Available online: https://github.com/Hala-Mulki/T-HSAB-A-Tunisian-Hate-Speech-and-Abusive-Dataset (accessed on 24 May 2024).
- Haddad, B.; Zoher, O.; Anas, A.-A.; Ghneim, N. Arabic Offensive Language Detection with Attention-Based Deep Neural Networks. In Proceedings of the 4th Workshop on Open-Source Arabic Corpora and Processing Tools, with a Shared Task on Offensive Language Detection, Marseille, France, 11–16 May 2020; pp. 76–81. [Google Scholar]
- The 4th Workshop on Open-Source Arabic Corpora and Processing Tools (OSACT4). edinburghnlp.inf.ed.ac.uk. Available online: https://edinburghnlp.inf.ed.ac.uk/workshops/OSACT4/ (accessed on 3 June 2024).
- Omar, A.; Mahmoud, T.M.; Abd-El-Hafeez, T. Comparative Performance of Machine Learning and Deep Learning Algorithms for Arabic Hate Speech Detection in OSNs. In Proceedings of the International Conference on Artificial Intelligence and Computer Vision (AICV2020), Cham, Switzerland, 24 March 2020; pp. 247–257. [Google Scholar] [CrossRef]
- Husain, F. OSACT4 Shared Task on Offensive Language Detection: Intensive Preprocessing-Based Approach. arXiv 2020, arXiv:2005.07297. [Google Scholar]
- Alharbi, A.I.; Lee, M. Combining Character and Word Embeddings for the Detection of Offensive Language in Arabic. In Proceedings of the 4th Workshop on Open-Source Arabic Corpora and Processing Tools, with a Shared Task on Offensive Language Detection, Marseille, France, 11–16 May 2020; pp. 91–96. [Google Scholar]
- Djandji, M.; Baly, F.; Antoun, W.; Hajj, H. Multi-Task Learning Using AraBert for Offensive Language Detection. In Proceedings of the 4th Workshop on Open-Source Arabic Corpora and Processing Tools, with a Shared Task on Offensive Language Detection, Marseille, France, 11–16 May 2020; pp. 97–101. [Google Scholar]
- Alshaalan, R.; Al-Khalifa, H. Hate Speech Detection in Saudi Twittersphere: A Deep Learning Approach. In Proceedings of the Fifth Arabic Natural Language Processing Workshop, Barcelona, Spain, 12 December 2020; pp. 12–23. [Google Scholar]
- Aljarah, I.; Habib, M.; Hijazi, N.; Faris, H.; Qaddoura, R.; Hammo, B.; Abushariah, M.; Alfawareh, M. Intelligent Detection of Hate Speech in Arabic Social Network: A Machine Learning Approach. J. Inf. Sci. 2020, 47, 483–501. [Google Scholar] [CrossRef]
- Duwairi, R.; Hayajneh, A.; Quwaider, M. A Deep Learning Framework for Automatic Detection of Hate Speech Embedded in Arabic Tweets. Arab. J. Sci. Eng. 2021, 46, 4001–4014. [Google Scholar] [CrossRef]
- Anezi, F.Y.A. Arabic Hate Speech Detection Using Deep Recurrent Neural Networks. Appl. Sci. 2022, 12, 6010. [Google Scholar] [CrossRef]
- Mohaouchane, H.; Mourhir, A.; Nikolov, N.S. Detecting Offensive Language on Arabic Social Media Using Deep Learning. In Proceedings of the 2019 Sixth International Conference on Social Networks Analysis, Management and Security (SNAMS), Granada, Spain, 22–25 October 2019. [Google Scholar] [CrossRef]
- Alakrot, A.; Murray, L.; Nikolov, N.S. Dataset Construction for the Detection of Anti-Social Behaviour in Online Communication in Arabic. Procedia Comput. Sci. 2018, 142, 174–181. [Google Scholar] [CrossRef]
- Shannaq, F.; Hammo, B.; Faris, H.; Castillo-Valdivieso, P.A. Offensive Language Detection in Arabic Social Networks Using Evolutionary-Based Classifiers Learned from Fine-Tuned Embeddings. IEEE Access 2022, 10, 75018–75039. [Google Scholar] [CrossRef]
- Shannag, F.; Hammo, B.H.; Faris, H. The Design, Construction and Evaluation of Annotated Arabic Cyberbullying Corpus. Educ. Inf. Technol. 2022, 27, 10977–11023. [Google Scholar] [CrossRef] [PubMed]
- Hatebase. Hatebase.org. Available online: https://hatebase.org (accessed on 9 December 2024).
- Ahmad, A.; Azzeh, M.; Alnagi, E.; Abu Al-Haija, Q.; Halabi, D.; Aref, A.; AbuHour, Y. Hate speech detection in the Arabic language: Corpus design, construction, and evaluation. Front. Artif. Intell. 2024, 7, 1345445. [Google Scholar] [CrossRef] [PubMed]
- Aladeemy, A.A.; Alzahrani, A.; Algarni, M.H.; Alsubari, S.N.; Aldhyani, T.H.; Deshmukh, S.N.; Khalaf, O.I.; Wong, W.-K.; Aqburi, S. Advancements and challenges in Arabic sentiment analysis: A decade of methodologies, applications, and resource development. Heliyon 2024, 10, e39786. [Google Scholar] [CrossRef]
- Mednini, L.; Noubigh, Z.; Turki, M.D. Natural language processing for detecting brand hate speech. J. Telecommun. Digit. Econ. 2024, 12, 486–509. [Google Scholar] [CrossRef]
- Abdelsamie, M.M.; Azab, S.S.; Hefny, H.A. A comprehensive review on Arabic offensive language and hate speech detection on social media: Methods, challenges and solutions. Soc. Netw. Anal. Min. 2024, 14, 1–49. [Google Scholar] [CrossRef]
Rf. | Year | Techniques | Classifier | Language | Datasets | Preprocessing | Max-score |
---|---|---|---|---|---|---|---|
[29] | 2018 | Machine Learning/ Deep Learning | LR, SVM, GRU | Arabic | Collection of 6000 tweets | Removing (diacritics, punctuation, non-Arabic characters, emoticons, and stop words). Normalizing letters | GRU = 79% Acc. |
[31] | 2019 | Machine Learning | SVM, NB | Arabic | Collection of 5846 tweets | Removing non-Arabic characters, emojis, URLs, | NB = 88.4% Acc. |
[33] | 2019 | Machine Learning | SVM, NB | Arabic | Collection of 6075 comments | Removing non-Arabic characters, emojis, URLs, | NB = 87.9.4% Acc. |
[22] | 2019 | Deep Learning/Machine Learning | BERT, ELMo, FLAIR, Bi-LSTM | English/Hindi | Collection of 8000 tweets, YouTube, Instagram comments | Removing URLs, hashtags, mentions and punctuations | FLAIR BERTMU + Bi-LSTM = 73% Acc. |
[35] | 2020 | Deep Learning | BiGRU and CNN | Arabic | Collection of 10,000 tweets and YouTube comments | Removing (diacritics, punctuation, non-Arabic characters, emoticons, and stop words). Normalizing letters | BiGRU = 91% Acc. |
[37] | 2020 | Machine Learning/Deep Learning | 12 machine learning models and 2 deep learning models (RNN, CNN) | Arabic | Collection of 20,000 tweets and YouTube, Facebook, Instagram comments | Removing non-Arabic characters, emojis, URLs | RNN = 98.7% Acc. |
[38] | 2020 | Machine Learning | SVM | Arabic | Collection of 10,000 tweets | Data cleaning, symbol removal labeling, tokenization | SVM = 90.2% Acc. |
[39] | 2020 | Machine Learning/Deep Learning | LSTM, XGBoost | Arabic | Collection of 10,000 tweets | Removing punctuation marks and non-Arabic characters. | LSTM = 96% Acc. |
[40] | 2020 | Machine Learning | AraBERT | Arabic | Collection of 10,000 comments | Tokenization (removing user mentions, retweets, URLs, diacritics emojis and newlines), replacing underscore in hashtags with white spaces | AraBERT = 90.15% F1 |
[41] | 2020 | Deep Learning | RNN, CNN | Arabic | Collection of 9316 tweets | Removing non-Arabic characters, emojis, URLs | CNN = 83% Acc. |
[42] | 2021 | Machine Learning | SVM, NB, DT, RF | Arabic | Collection of 3696 tweets | Removing (diacritics, punctuation, non-Arabic characters, emoticons, and stop words). Normalizing letters | RF = 91.3% Acc. |
[43] | 2021 | Deep Learning | CNN, CNNLSTM, BiLSTM-CNN | Arabic | Collection of 23,678 comments | Removing (diacritics, punctuation, non-Arabic characters, emoticons, and stop words). Normalizing letters | BiLSTM = binary label: 80% ternary label: 74% Multi-label: 73% |
[21] | 2021 | Deep Learning/Machine Learning | CNN, BERT ALBERT, RoBERTa, LR | English | Collection of 3843 tweets | Removing special characters, numbers, newlines, mention tags | (CNN + BERT-large-uncased + BERT-base- uncased + ALBERT-xxlarge-v2) = 85.5% Acc, |
[23] | 2021 | Deep Learning/Machine Learning | LR, SVM CNN, LSTM BiLSTM XLM, mBERT BETO | Spanish | HaterNet dataset: collection of 6000 tweets HatEval dataset: collection of 6600 tweets | Normalizing URLs, emails, users’ mentions, percent, money, time, date expressions and phone numbers. | BETO = 65.8% F1 (HaterNet) 75.5% F1 (HatEval). |
[44] | 2022 | Deep Learning | RNN | Arabic | Collection of 4203 comments | Data cleaning, symbol removal labeling, tokenization | RNN = binary label: 99.73% ternary label: 95.38% Multi-label: 84.14% Acc. |
[45] | 2022 | Deep Learning | CNN, CNN-LSTM, BiLSTM | Arabic | Collection of 15,050 comments | Data cleaning, symbol removal labeling, 39 enization | CNN-LSTM = 87.27% 83.65% F1, 83.89% P 83.46% R |
[47] | 2022 | Machine Learning | GA- SVM GA- XGBoost | Arabic | Collection of 4505 tweets | Removing non-Arabic characters, emojid, URLs | SVM = 88% Acc. |
[19] | 2022 | Deep Learning | CNN, LSTMs, BiLSTMs, LSTM, GRU, and CNN-LSTM. | Ethiopian | Collection of 42,100 tweets and Facebook comments | 18 enization, normalizing stop words removal | Bi-LSTM = 91% F1 |
[20] | 2022 | Deep Learning/Machine Learning | CNN + GRU BERT HAN | Turkish | Collection of 18,316 news articles | Removog non-Turkish characters, numbers, URLs | BERT = 90.4% Acc. |
Rf. of Study Used | Dataset | Source | Region | Size | Labels | Year | Rf. of Dataset |
---|---|---|---|---|---|---|---|
[29,41] | Religious hate speech dataset | X | Multinational | 6136 Tweets | Hate (2762), not hate (3374) | 2019 | [29] |
[29,43] | L-HSAB Hate speech and offensive language | X | Levantine | 5846 Tweets | Normal (3650), offensive (1728), hate (468) | 2019 | [31] |
[33] | T-HSAB Hate speech and offensive language | X | Tunisian | 6075 Tweets | Normal (3834), offensive (1127), hate (1078) | 2019 | [33] |
[35,38,39,40,43] | OSACT4 Hate speech and offensive language | X | Multinational | 20,000 Tweets | Offensive (1900), not offensive (8100), hate (50), not hate (9950) | 2020 | [35] |
[45] | Offensive language | YouTube | Multinational | 14,202 Comments | Offensive (9349), not offensive (4853) | 2018 | [45] |
[47] | ArCybC Offensive language, cyberbullying | X | Multinational | 4505 Tweets | Offensive (1887), cyberbullying (1728), Normal (890) | 2022 | [47] |
Evaluation Metrics | Equation | Description |
---|---|---|
Accuracy | Accuracy measures the proportion of correctly classified instances out of the total instances. It is calculated as the ratio of the sum of true positives (TP) and true negatives (TN) to the total number of instances, which includes true positives (TP), true negatives (TN), false positives (FP), and false negatives (FN) | |
Precision | Precision measures the proportion of true positives (TP) out of all positive predictions (TP + FP) | |
Recall | Recall evaluates the proportion of true positives (TP) out of all actual positives (TP + FN) | |
F1 | F1- score indicated as F1 is the average of precision and recall. |
Metrics | |||||
---|---|---|---|---|---|
Model | Features | Accuracy | Precision | Recall | F1 Score |
WordNgrams | 74.90 | 74.88 | 73.83 | 74.07 | |
LR | Char-Ngrams | 76.86 | 76.74 | 75.95 | 76.18 |
Word + Char-N-grams | 77.81 | 77.58 | 77.14 | 77.29 | |
Word-N-grams | 74.49 | 74.16 | 74.26 | 75.02 | |
SVM | Char-N-grams | 77.16 | 76.7 | 76.86 | 77.39 |
Word + Char-N-grams | 77.06 | 76.82 | 76.9 | 77.28 | |
Word-N-grams | 76.24 | 76.89 | 74.69 | 75.06 | |
NB | Char-N-grams | 76.01 | 75.73 | 75.3 | 75.45 |
Word + Char-N-grams | 76.93 | 76.6 | 76.46 | 76.51 | |
Word-N-grams | 72.86 | 72.71 | 71.7 | 71.91 | |
RF | Char-N-grams | 74.76 | 74.91 | 73.42 | 73.71 |
Word + Char-N-grams | 74.45 | 74.62 | 73.06 | 73.35 |
Metrics | |||||
---|---|---|---|---|---|
Model | Features | Accuracy | Precision | Recall | F1 Score |
RNN | Trainble Embeddings | 85.81 | 89.48 | 84.55 | 86.93 |
LSTM | 90.09 | 91.22 | 91.16 | 91.19 | |
BiLSTM | 88.82 | 91.52 | 88.07 | 89.73 | |
CNN | 91.95 | 92.59 | 93.36 | 92.96 | |
(a) Trainable Embedding | |||||
RNN | AraVec pretrained Embeddings | 79.77 | 84.97 | 77.83 | 81.24 |
LSTM | 79.97 | 82.68 | 81.47 | 82.07 | |
BiLSTM | 79.68 | 82.02 | 81.87 | 81.93 | |
CNN | 92.75 | 94.11 | 93.18 | 93.64 | |
Arabert | AraBERT pretrained Embeddings | 91.67 | 91.78 | 91.28 | 91.49 |
Distilbert | 80.37 | 80.25 | 79.66 | 79.88 | |
(b) Pretrained Embedding |
Metrics | |||||
---|---|---|---|---|---|
Model | Features | Accuracy | Precision | Recall | F1 Score |
Word-N-grams | 71.1 | 74.39 | 62.81 | 64.84 | |
LR | Char-N-grams | 74.91 | 77.11 | 69.04 | 71.35 |
Word + Char-N-grams | 75.58 | 77.61 | 70.04 | 72.31 | |
Word-N-grams | 72.22 | 74,34 | 66.59 | 68.83 | |
SVM | Char-N-grams | 75.09 | 76.21 | 70.9 | 72.76 |
Word + Char-N-grams | 73.99 | 74.15 | 70.8 | 72.13 | |
Word-N-grams | 68.02 | 75.76 | 55.09 | 53.19 | |
NB | Char-N-grams | 72.58 | 78.04 | 63.43 | 65.38 |
Word + Char-N-grams | 74.13 | 77.89 | 66.07 | 68.33 | |
Word-N-grams | 69.77 | 73.32 | 62.55 | 64.76 | |
RF | Char-N-grams | 71.05 | 73.28 | 64.38 | 66.55 |
Word + Char-N-grams | 71.66 | 74.14 | 65.27 | 67.52 |
Metrics | |||||
---|---|---|---|---|---|
Model | Features | Accuracy | Precision | Recall | F1 Score |
RNN | Trainable Embeddings | 85.13 | 84.14 | 81.33 | 82.26 |
LSTM | 79.92 | 71.85 | 70.61 | 68.79 | |
BiLSTM | 83.27 | 72.33 | 72.81 | 71.84 | |
CNN | 93.23 | 93.04 | 91.39 | 91.93 | |
(a) Trainable Embedding | |||||
RNN | AraVec pretrained Embeddings | 80.39 | 79.52 | 79.35 | 79.38 |
LSTM | 80.68 | 80.14 | 80.00 | 80.01 | |
BiLSTM | 78.06 | 77.00 | 77.05 | 76.79 | |
CNN | 93.33 | 93.33 | 91.95 | 92.36 | |
Arabert | AraBERT pretrained Embeddings | 84.29 | 84.85 | 83.59 | 84.15 |
Distilbert | 78.68 | 77.57 | 77.18 | 77.24 | |
(b) Pretrained Embedding |
Model | Metric | Mean (%) | 95% CI (%) |
---|---|---|---|
CNN | Accuracy | 92.0 | [91.5, 92.5] |
CNN | F1 Score | 93.0 | [92.4, 93.6] |
Dataset | Model | Accuracy (%) | F1 Score (%) |
---|---|---|---|
L-HSAB | CNN | 89.5 | 88.3 |
L-HSAB | AraBERT | 91.8 | 90.7 |
OSACT4 | CNN | 87.4 | 85.0 |
OSACT4 | AraBERT | 90.2 | 88.5 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Alrasheed, S.; Aladhadh, S.; Alabdulatif, A. Protecting Intellectual Security Through Hate Speech Detection Using an Artificial Intelligence Approach. Algorithms 2025, 18, 179. https://doi.org/10.3390/a18040179
Alrasheed S, Aladhadh S, Alabdulatif A. Protecting Intellectual Security Through Hate Speech Detection Using an Artificial Intelligence Approach. Algorithms. 2025; 18(4):179. https://doi.org/10.3390/a18040179
Chicago/Turabian StyleAlrasheed, Sadeem, Suliman Aladhadh, and Abdulatif Alabdulatif. 2025. "Protecting Intellectual Security Through Hate Speech Detection Using an Artificial Intelligence Approach" Algorithms 18, no. 4: 179. https://doi.org/10.3390/a18040179
APA StyleAlrasheed, S., Aladhadh, S., & Alabdulatif, A. (2025). Protecting Intellectual Security Through Hate Speech Detection Using an Artificial Intelligence Approach. Algorithms, 18(4), 179. https://doi.org/10.3390/a18040179