An Explainable System for Offensive Content Detection in Nastaliq Urdu: Corpus Curation, Transformer Benchmarking, and Word-Level Attribution
Abstract
Automated moderation systems are deployed at scale, yet they remain opaque to the users and moderators affected by their decisions, and their coverage is almost entirely confined to English. For Urdu written in the Nastaliq script, no such system exists, and the annotated resources it would be built on are drawn largely from Twitter/X, where character limits constrain how users write. Interpretability has received little attention, leaving it unclear what such models actually learn. This study addresses these gaps in three steps. First, we curate and publicly release a corpus of 7604 Nastaliq Urdu Facebook comments, extending an earlier corpus by correcting text-level inconsistencies and re-examining the original labels. Second, we fine-tune four Urdu-capable transformers under a common grid-search protocol and compare them against twelve feature-classifier baselines on identical data partitions. The best configuration, Multilingual Representations for Indian Languages (MuRIL), reaches 87.05% accuracy and 87.06% macro F1, improving on the strongest baseline by 5.52 percentage points, a margin that exceeds the 95% confidence interval on test accuracy; the two leading transformers differ by less than the test set can resolve, and performance is stable across five optimizers. Third, we compute word-level SHAP attributions adapted to right-to-left rendering. Attribution mass concentrates on high-frequency slurs but extends to syntactically neutral function words and to political vocabulary characteristic of the source pages, indicating that aggregate performance may rest partly on lexical and topical regularities rather than a generalizable representation of offensiveness.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI
- Comments
- 15 figures, 15 tables
Related papers
The Constitution Speaks Nheengatu: An Open MT System and Reproducible Corpus Pipeline for the Amazonian Língua Geral
Shared title terminologycs.CLFabrício Carraro, Rodolfo Joel Zevallos, Rodrigo Gonçalves de Souza et al.
IRTIQA: Evolving in English, Evaluated in Urdu -- Does Agent Self-Evolution Transfer from English to Urdu and Code-Switched Input?
Shared title terminologycs.CLAbdullah Hashmat, Danish Javed, Usman Naseem et al.
Familiar Words, Unfamiliar Minds: Conventionalization without Calibration in the Vocabulary of Mind
Shared title terminologycs.CLMatthieu Queloz
Is Sara Omar the true author of Dødevaskeren (The Dead Washer)? Authorship attribution in Danish literature
Shared title terminologycs.CLJacques Savoy
Auto-Features: An LLM-Assisted Corpus for Contextual Recognition of Standard and Optional Car Features
Shared title terminologycs.CLFilippos Ventirozos, Ioanna Nteka, Tania Nandy et al.
ChemDeduce: Benchmarking LLMs for Unknown Chemical Identification through Interactive Simulated Experiments
Shared title terminologycs.CLHengyi Cai, Yuqi Tang, Zichang Li et al.