Investigating Offensive Language Detection in a Low-Resource Setting with a Robustness Perspective
Open Access
- 25 November 2024
- journal article
- research article
- Published by MDPI AG in Big Data and Cognitive Computing
- Vol. 8 (12) , 170
Abstract
Moroccan Darija, a dialect of Arabic, presents unique challenges for natural language processing due to its lack of standardized orthographies, frequent code switching, and status as a low-resource language. In this work, we focus on detecting offensive language in Darija, addressing these complexities. We present three key contributions that advance the field. First, we introduce a human-labeled dataset of Darija text collected from social media platforms. Second, we explore and fine-tune various language models on the created dataset. This investigation identifies a Darija RoBERTa-based model as the most effective approach, with an accuracy of 90% and F1 score of 85%. Third, we evaluate the best model beyond accuracy by assessing properties such as correctness, robustness and fairness using metamorphic testing and adversarial attacks. The results highlight potential vulnerabilities in the model’s robustness, with the model being susceptible to attacks such as inserting dots (29.4% success rate), inserting spaces (24.5%), and modifying characters in words (18.3%). Fairness assessments show that while the model is generally fair, it still exhibits bias in specific cases, with a 7% success rate for attacks targeting entities typically subject to discrimination. The key finding is that relying solely on offline metrics such as the F1 score and accuracy in evaluating machine learning systems is insufficient. For low-resource languages, the recommendation is to focus on identifying and addressing domain-specific biases and enhancing pre-trained monolingual language models with diverse and noisier data to improve their robustness and generalization capabilities in diverse linguistic scenarios.Keywords
Funding Information
- Al Akhawayn University’s seed money grant (92567)
This publication has 57 references indexed in Scilit:
- A comprehensive review on Arabic offensive language and hate speech detection on social media: methods, challenges and solutionsSocial Network Analysis and Mining, 2024
- A survey of hate speech detection in Indian languagesSocial Network Analysis and Mining, 2024
- DarijaBERT: a step forward in NLP for the written Moroccan dialectInternational Journal of Data Science and Analytics, 2024
- The black box problem revisited. Real and imaginary challenges for automated legal decision makingArtificial Intelligence and Law, 2023
- A multilingual offensive language detection method based on transfer learning from transformer fine-tuning modelJournal of King Saud University Computer and Information Sciences, 2022
- On the effectiveness of testing sentiment analysis systems with metamorphic testingInformation and Software Technology, 2022
- Adversarial attacks on a lexical sentiment analysis classifierComputer Communications, 2021
- Abusive language detection from social media comments using conventional machine learning and deep learning approachesMultimedia Systems, 2021
- Detection of hate speech in Arabic tweets using deep learningMultimedia Systems, 2021
- On testing machine learning programsJournal of Systems and Software, 2020