ANLP-UniSo at ArGuard 2026 Task B: Multi-Task MARBERT with Focal Loss and Hierarchical Consistency for Arabic Harmful Prompt Detection

Saoussen Ben Chaabane, Omar Trigui, Maher Jaoua


Abstract
Detecting harmful prompts directed at large language models is a critical safety challenge, especially in Arabic where dialectal variation, code-switching, and culturally specific expressions of harm complicate classification. The ArGuard 2026 shared task addresses this problem through two subtasks: binary classification of prompts as safe or unsafe (B1) and fine-grained classification of unsafe prompts into seven harm domains (B2). We participate with a multi-task fine-tuning of MARBERT that shares encoder representations across a binary head and a seven-class granular head. Training combines focal loss with class weights and label smoothing, a hierarchical consistency regularizer that discourages contradictory safe/unsafe and granular predictions, a weighted sampler, and light character-level augmentation. On the official development set the system reaches a binary macro-F1 of 0.9618 and a granular macro-F1 of 1.0000; on the blind test set it obtains binary macro-F1 0.688 and granular macro-F1 0.752. We analyse the substantial development–test gap and discuss limitations of the submitted system.
Anthology ID:
2026.arabicnlp-sharedtasks.59
Volume:
Proceedings of The Fourth Arabic Natural Language Processing Conference: Shared Tasks
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Muhammad Abdul-Mageed, Tamer Elsayed, Houda Bouamor, Samhaa El-Beltagy, Hend Al-Khalifa, Ahmed Abdelali, AbdelRahim Elmadany, Abdellah El Mekki, Kareem Darwish, Sakhar Alkhereyf, Hamzah Luqman, Salam Khalifa, Samar Magdy, Zaid Alyafeai, Injy Hamed, Wajdi Zaghouani, Imed Zitouni
Venue:
ArabicNLP
SIG:
SIGARAB
Publisher:
Association for Computational Linguistics
Note:
Pages:
453–457
Language:
URL:
https://aclanthology.org/2026.arabicnlp-sharedtasks.59/
DOI:
Bibkey:
Cite (ACL):
Saoussen Ben Chaabane, Omar Trigui, and Maher Jaoua. 2026. ANLP-UniSo at ArGuard 2026 Task B: Multi-Task MARBERT with Focal Loss and Hierarchical Consistency for Arabic Harmful Prompt Detection. In Proceedings of The Fourth Arabic Natural Language Processing Conference: Shared Tasks, pages 453–457, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
ANLP-UniSo at ArGuard 2026 Task B: Multi-Task MARBERT with Focal Loss and Hierarchical Consistency for Arabic Harmful Prompt Detection (Ben Chaabane et al., ArabicNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.arabicnlp-sharedtasks.59.pdf