Arabic harmful content detection improves with entity recognition model

REGLAT at ArGuard Shared Tasks: An Ensemble-Based Model Integrating NER for Harmful Content Detection in Arabic

Computation and Language

Summary

Detecting harmful content in Arabic is tricky because of different dialects and overlapping meanings between types of harmful messages. The authors combined two AI tools: one finds harmful terms in the text, and the other uses that information to better understand and classify the overall message. They tested this on a set of Arabic prompts and got promising accuracy in identifying seven types of harmful content. However, they note that distinguishing between closely related harmful categories is still hard. Their work shows that adding explicit information about harmful words helps Arabic language models detect harmful content more accurately.

What this means in practice

  • For content moderation teams: Improve automated flagging of harmful Arabic user-generated content by integrating entity recognition to boost classification accuracy.
  • For social media platform developers: Develop better Arabic-language harmful content filters that recognize fine-grained categories by combining entity extraction with language models.

Authors

Ahmed M. Fetouh, Mariam Labib, Nsrin Ashraf, Omer Dawood, Hamada Nayel

Abstract

Detecting harmful content in Arabic is challenging because of dialectal variations and the semantic overlap between different harm categories. This paper presents a two-stage approach for classifying Arabic user prompts into seven categories of harmful content. First, GLiNER is used to extract harm-related entities from each prompt. The extracted entities are then added to the original text and passed to a fine-tuned MARBERT classifier for final classification. The approach combines explicit entity information with the contextual understanding of a pretrained Arabic language model. The system was evaluated on the development set of the ArGuard 2026 shared task. The results achieved a macro-F1 score of 0.886 and an accuracy of 0.897, demonstrating promising performance in fine-grained harmful content detection. The system reported an accuracy of 0.793 and Macro-F score of 0.735 on a blind test set for subtask 1. For subtask 2, it achieved an accuracy of 0.770 and Macro-F score of 0.754. The analysis also showed that distinguishing between related categories remains challenging. These findings suggest that integrating NER with Arabic language models is a promising approach to harmful content detection.