Skip to main content

Write a PREreview

Detect Then Rewrite: A Two-Stage Pipeline for Arabic Toxicity Moderation under Data Scarcity

Posted
Server
Preprints.org
DOI
10.20944/preprints202609.0208.v1

Arabic harmful-content moderation is commonly framed as toxicity detection, but many practical settings also require safer alternatives to toxic text rather than only blocking or labeling it. We study Arabic toxicity handling as a low-resource detect–then–rewrite problem. The first stage classifies comments as normal, hate, or abusive using a multi-dialect Arabic encoder, while the second stage rewrites toxic inputs into neutral alternatives using an Arabic sequence-to-sequence model. The detector is fine-tuned on Tun-EL, and the rewriter is trained with hybrid supervision from human rewrites, span-targeted rule-based augmentation, and multilingual ParaDetox transfer pairs. Our main focus is rewrite informativeness: many toxic–neutral pairs are identical or minimally edited, which may encourage copying rather than meaningful detoxification. The classifier achieves 82.42\% accuracy and 0.93 macro AUC. For rewriting, the more informative supervision variant improves sacreBLEU from 49.09 to 61.19, while the lower-informativeness variant gives stronger relative toxicity reduction under the current evaluation. These results suggest that Arabic detoxification is sensitive to supervision quality under data scarcity.

You can write a PREreview of Detect Then Rewrite: A Two-Stage Pipeline for Arabic Toxicity Moderation under Data Scarcity. A PREreview is a review of a preprint and can vary from a few sentences to a lengthy report, similar to a journal-organized peer-review report.

Before you start

We will ask you to log in with your ORCID iD. If you don’t have an iD, you can create one.

What is an ORCID iD?

An ORCID iD is a unique identifier that distinguishes you from everyone with the same or similar name.

Start now