Detect Then Rewrite: A Two-Stage Pipeline for Arabic Toxicity Moderation under Data Scarcity
- Publicado
- Servidor
- 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.