Arabic Cyberbullying Detection: Bridging the Linguistic Gap with Machine Learning

Detection of Arabic Cyberbullying on Social Networks using Machine Learning

2019-11-01
Djedjiga Mouheb, Raghad Albarghash, Mohamad Fouzi Mowakeh, Zaher Al Aghbari, Ibrahim Kamel
Summary
Problem
Method
Results
Takeaways
Abstract

This paper presents a supervised machine learning framework for the automatic detection of cyberbullying in Arabic social media content. Utilizing a Naive Bayes classifier trained on a custom dataset from Twitter and YouTube, the system addresses the linguistic and cultural nuances of Arabic online communication to achieve high-accuracy toxicity detection.

TL;DR

As social media usage explodes in the Middle East, the rise of cyberbullying has become a critical public health issue. This paper introduces an automated detection system specifically designed for the Arabic language. By combining a Naive Bayes classifier with specialized Arabic preprocessing (including stemming and diacritic removal), the authors achieved a 95.9% accuracy rate in identifying offensive content on Twitter and YouTube.

The Problem & Motivation

Cyberbullying is no longer confined to school hallways; it is a 24/7 digital threat that leads to severe psychological distress. While English-language detection tools are highly mature, the Arabic digital landscape remains underserved.

The challenge isn't just the language—it’s the complexity. Arabic is a morphologically rich language where a single root word can take dozens of forms. Previous research often used "word spotting," which is easily bypassed by slang or grammatical variations. The authors recognized that a successful solution must understand the cultural context (expressions that are unacceptable in Arab culture but fine elsewhere) and the linguistic structure of the language.

Methodology: The Core Architecture

The proposed pipeline follows a classic supervised learning workflow but with heavy emphasis on Arabic-specific refinement.

1. The Preprocessing Pipeline

The system doesn't just look at raw text; it "cleans" it through several layers:

  • Noise Removal: Stripping URLs, hashtags, and non-Arabic characters.
  • Diacritic Removal: Removing vowels (Tashkeel) that can change the look of a word without changing its bullying intent.
  • Normalization: Standardizing different forms of letters (like 'Alif' variations) to prevent the model from treating them as unique words.
  • Stemming: This is the "secret sauce." By reducing words like "IÊ¿" and "éJ.Ê¿" to their root, the model significantly reduces the dimensionality of the feature space.

2. Naive Bayes Classification

The authors chose Naive Bayes because of its efficiency and effectiveness in text classification. The model calculates the Posterior Probability—essentially asking: "Given that word X appears in this tweet, what is the probability that the tweet is a bullying message?"

Overall Flowchart Fig 1: The technical workflow from data collection via APIs to the final prediction.

Experimental Insights

The study utilized a dataset of 25,000 comments from Twitter and YouTube, focusing on "hot topics" like race and community where bullying is most prevalent.

Key Metrics:

MetricValue
Accuracy95.95%
Precision92.97%
Recall92.56%
F1-Score92.77%

The confusion matrix reveals that the model is particularly strong at identifying "Not Bullying" content (1,679 correct vs. 47 misclassified), which is vital for minimizing false positives in content moderation.

Performance Results Table 1: Confusion Matrix showing the high True Positive (TP) and True Negative (TN) rates.

Critical Analysis & Conclusion

While the 95.9% accuracy is impressive, the authors acknowledge a few limitations. The current model relies heavily on bullying keywords. Modern online harassment often uses irony, sarcasm, or "dog whistling"—tactics that demand more than just keyword analysis.

The Takeaway: This research provides a vital blueprint for localized AI safety. By proving that Naive Bayes—when paired with rigorous Arabic preprocessing—can outperform basic word-spotting, it paves the way for more sophisticated sentiment analysis tools in the Middle East.

Future Outlook: The next frontier for this work lies in moving beyond keywords to contextual embeddings (like AraBERT) and expanding the dataset to include diverse Arabic dialects (Egyptian, Maghrebi, Khaleeji), where the "bullying vocabulary" can vary significantly.

Find Similar Papers

Try Our Examples

  • Search for recent papers that utilize Deep Learning (Transformers or BERT-based models) for Arabic cyberbullying detection to compare performance against traditional Naive Bayes approaches.
  • Investigate the origin of the "Arabic Stemming" techniques mentioned in the paper and how modern morphological analyzers like Farasa or MADAMIRA improve upon basic prefix/suffix removal.
  • Find studies that explore the cross-dialectal challenges of Arabic cyberbullying detection, specifically focusing on the differences between Gulf, Levantine, and Egyptian social media slang.
Contents
Arabic Cyberbullying Detection: Bridging the Linguistic Gap with Machine Learning
1. TL;DR
2. The Problem & Motivation
3. Methodology: The Core Architecture
3.1. 1. The Preprocessing Pipeline
3.2. 2. Naive Bayes Classification
4. Experimental Insights
4.1. Key Metrics:
5. Critical Analysis & Conclusion