Investigating Offensive Language Detection in a Low-Resource Setting with a Robustness Perspective
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 complexit...
Saved in:
| Main Authors: | , , , , , |
|---|---|
| Format: | Article |
| Language: | English |
| Published: |
MDPI AG
2024-11-01
|
| Series: | Big Data and Cognitive Computing |
| Subjects: | |
| Online Access: | https://www.mdpi.com/2504-2289/8/12/170 |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1850036361501868032 |
|---|---|
| author | Israe Abdellaoui Anass Ibrahimi Mohamed Amine El Bouni Asmaa Mourhir Saad Driouech Mohamed Aghzal |
| author_facet | Israe Abdellaoui Anass Ibrahimi Mohamed Amine El Bouni Asmaa Mourhir Saad Driouech Mohamed Aghzal |
| author_sort | Israe Abdellaoui |
| collection | DOAJ |
| description | 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. |
| format | Article |
| id | doaj-art-350487bfddb848c9809c00a66cb3b81d |
| institution | DOAJ |
| issn | 2504-2289 |
| language | English |
| publishDate | 2024-11-01 |
| publisher | MDPI AG |
| record_format | Article |
| series | Big Data and Cognitive Computing |
| spelling | doaj-art-350487bfddb848c9809c00a66cb3b81d2025-08-20T02:57:12ZengMDPI AGBig Data and Cognitive Computing2504-22892024-11-0181217010.3390/bdcc8120170Investigating Offensive Language Detection in a Low-Resource Setting with a Robustness PerspectiveIsrae Abdellaoui0Anass Ibrahimi1Mohamed Amine El Bouni2Asmaa Mourhir3Saad Driouech4Mohamed Aghzal5School of Science and Engineering, Al Akhawayn University, Ifrane 53000, MoroccoSchool of Science and Engineering, Al Akhawayn University, Ifrane 53000, MoroccoSchool of Science and Engineering, Al Akhawayn University, Ifrane 53000, MoroccoSchool of Science and Engineering, Al Akhawayn University, Ifrane 53000, MoroccoSchool of Science and Engineering, Al Akhawayn University, Ifrane 53000, MoroccoSchool of Science and Engineering, Al Akhawayn University, Ifrane 53000, MoroccoMoroccan 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.https://www.mdpi.com/2504-2289/8/12/170offensive language detectionDarijarobustnessfairnessadversarial datametamorphic testing |
| spellingShingle | Israe Abdellaoui Anass Ibrahimi Mohamed Amine El Bouni Asmaa Mourhir Saad Driouech Mohamed Aghzal Investigating Offensive Language Detection in a Low-Resource Setting with a Robustness Perspective Big Data and Cognitive Computing offensive language detection Darija robustness fairness adversarial data metamorphic testing |
| title | Investigating Offensive Language Detection in a Low-Resource Setting with a Robustness Perspective |
| title_full | Investigating Offensive Language Detection in a Low-Resource Setting with a Robustness Perspective |
| title_fullStr | Investigating Offensive Language Detection in a Low-Resource Setting with a Robustness Perspective |
| title_full_unstemmed | Investigating Offensive Language Detection in a Low-Resource Setting with a Robustness Perspective |
| title_short | Investigating Offensive Language Detection in a Low-Resource Setting with a Robustness Perspective |
| title_sort | investigating offensive language detection in a low resource setting with a robustness perspective |
| topic | offensive language detection Darija robustness fairness adversarial data metamorphic testing |
| url | https://www.mdpi.com/2504-2289/8/12/170 |
| work_keys_str_mv | AT israeabdellaoui investigatingoffensivelanguagedetectioninalowresourcesettingwitharobustnessperspective AT anassibrahimi investigatingoffensivelanguagedetectioninalowresourcesettingwitharobustnessperspective AT mohamedamineelbouni investigatingoffensivelanguagedetectioninalowresourcesettingwitharobustnessperspective AT asmaamourhir investigatingoffensivelanguagedetectioninalowresourcesettingwitharobustnessperspective AT saaddriouech investigatingoffensivelanguagedetectioninalowresourcesettingwitharobustnessperspective AT mohamedaghzal investigatingoffensivelanguagedetectioninalowresourcesettingwitharobustnessperspective |