arXiv:2610.36360cs.CLOct 2026

Manuscript Offprint

arXiv:2610.36360

AK_QMUL at ArGuard Shared Tasks: A Single Fine-Tuned JAIS for Arabic Harmful-Prompt Detection

Ali Khairallah, Arkaitz Zubiaga

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We present AK_QMUL's submissions to the ArGuard-2026 shared tasks on Arabic harmful-prompt detection: a binary safe/unsafe task (B1) and a seven-way harm-domain task (B2). Both submissions use one backbone – JAIS-6.7B fine-tuned with 4-bit QLoRA and a linear classification head over its last-token representation. For B1 we train a four-way head that factors the label by dialect register {safe, unsafe} × {MSA, other}, we augment the training fold with MSA prompts from AraSafe, and decode with a plain argmax to score safe/unsafe. For B2 we fine-tune the same backbone as a seven-way classifier and average the softmax outputs of five random seeds. Both submissions ranked first on their track, with macro-F1 0.984 on B1 and 0.790 on B2. 1^{1} We report results by dialect and by class: on B1 the model is accurate across all six dialects (93.6–99.8%) and its predicted unsafe rate tracks the true rate closely; on B2 six of the seven classes reach F1 between 0.73 and 0.98, with the residual error concentrated in the Bully class, which overlaps semantically with harassment and harm-to-others.

1 Introduction

Large language models now are capable of following instructions in Arabic well enough to be useful, yet for the same reason, well enough to be misused (Khairallah and Zubiaga, 2025). A deployed assistant has to decide before it answers whether a prompt is asking for something harmful, and it has to make that decision across Modern Standard Arabic (MSA) and a wide range of dialects, where surface form varies far more than in English (Sengupta et al., 2023). The ArGuard-2026 shared task (Alam et al., 2026) frames this as two problems over the same Arabic prompts: B1 asks whether a prompt is safe or unsafe, and B2 asks which of the seven harm domains an unsafe prompt belongs to. Both are scored by macro-F1, which weights the rare classes as heavily as the common ones and therefore rewards a detector that is uniform across categories rather than one that is accurate on average.

Our approach uses one Arabic-centric decoder for both tasks. We fine-tune JAIS-6.7B with 4-bit QLoRA (Dettmers et al., 2023; Hu et al., 2021), read a fixed-size representation from its last token, and attach a linear classification head. The backbone, the optimiser settings, and the pooling are shared; only the label set and two task-specific configurations change. For B1 we train a four-way head that factors the label by dialect register and decodes it with a plain argmax; for B2 we average five seeds of the same seven-way model. Both submissions ranked first on their track, with macro-F1 0.984 on B1 and 0.790 on B2.

This paper describes the two systems and reports their results: (i) a single QLoRA-tuned JAIS backbone serves both tasks; (ii) for B1, a dialect-factored four-way head with AraSafe augmentation and a plain-argmax decode; (iii) for B2, a five-seed softmax average; and (iv) a per-dialect and per-class breakdown showing where each system succeeds and where its residual error lies.