AK_QMUL participates in the ArGuard-2026 shared task: a single fine-tuned JAIS detects Arabic harmful promptsAK_QMUL at ArGuard Shared Tasks: A Single Fine-Tuned JAIS for Arabic Harmful-Prompt Detection
The authors use a single QLoRA fine-tuned JAIS-6.7B to participate in ArGuard-2026 Arabic harmful prompt detection, with B1 macro F1 0.984 and B2 macro F1 0.790; the authors say both tracks rank first.
Defender task: determine before answering whether an Arabic prompt is harmful (B1 binary classification), and classify harmful prompts into seven harm domains (B2). Input covers MSA and five regional dialects; there is no attacker setting, and evaluation is macro F1 on the shared task official test set.
- An Arabic assistant needs to judge whether a prompt is harmful before answering, covering MSA and multiple dialects. The ArGuard-2026 shared task sets this up as two tracks: B1 safe/unsafe binary classification and B2 seven-harm-domain classification.
- Both tracks share a single 4-bit QLoRA fine-tuned JAIS-6.7B backbone and a last-token linear classification head. B1 uses a {safe,unsafe}×{MSA,other} four-way head and augments with AraSafe safe MSA data; B2 uses a seven-class head and averages the softmax over five seeds.
- The authors report ranking first in both tracks: B1 macro F1 0.984, with accuracy of 93.6%–99.8% across the six dialects; B2 macro F1 0.790, with F1 between 0.73 and 0.98 for six of the seven classes, and errors concentrated in the Bully class (recall 0.443), mainly on MSA.
- The authors note: only a single backbone with a linear head was evaluated, and other architectures were not compared; the B1 ablation was not repeated across seeds; the confusion of the Bully class on MSA remains unresolved, and the authors believe finer annotation may be needed.
- Evaluated models
- JAIS-6.7B
- Benchmarks
- ArGuard-2026 shared task (B1, B2)AraSafe
- Metrics
- macro-F1accuracyprecisionrecallF1
AK_QMUL participates in the ArGuard-2026 Arabic harmful prompt detection shared task with a single QLoRA fine-tuned JAIS-6.7B, ranking first in both tracks: B1 binary classification macro-F1 0.984, B2 seven-class classification 0.790. B1 was augmented with AraSafe data, B2 averaged the softmax over five random seeds, and errors were concentrated in the Bully class.
Paper analysis
What problem does this paper attempt to solve?
A single fine-tuned JAIS-6.7B is used for both the B1 and B2 tracks of ArGuard-2026 Arabic harmful prompt detection.
Core question: how to detect harmful prompts on MSA and multiple Arabic dialects (B1 binary classification), and assign harmful prompts to seven harm domains (B2).
- Setting and motivation: the authors argue that Arabic LLMs can already follow instructions well and therefore may also be misused; a deployed assistant needs to judge whether a prompt is harmful before answering, and must work across MSA and dialects, whose surface forms differ more than in English.
- Two difficulties posed by the data: the harm rate is uneven across dialects (37% of MSA prompts are unsafe, versus 72%–91% for the five dialects); B2 classes are imbalanced, with adult_content appearing nearly four times as often as hate_speech, and some classes overlap semantically, so the macro F1 penalty is concentrated there.
- Evaluation setting: the ArGuard-2026 shared task (Alam et al., 2026) provides labeled train/dev splits and an unlabeled test split; both tracks use macro F1 as the official metric, which weights rare and common classes equally.
- Paper's approach: both tracks share the same backbone—a 4-bit QLoRA fine-tuned JAIS-6.7B with a last-token linear classification head; B1 uses a four-way head decomposed by dialect register and is augmented with AraSafe, while B2 uses a seven-class head with five-seed softmax averaging. The authors report ranking first in both tracks, with macro F1 of 0.984 and 0.790 respectively.
- Threat model: this is a defender-side task, and the paper does not define an attacker.
- Protected asset: a deployed Arabic assistant that performs prompt safety judgment before answering.
- Input scope: prompts in MSA and five regional dialects (Syrian, Egyptian, Palestinian, Moroccan, Algerian).
- Judgment target: B1 judges safe/unsafe; B2 assigns unsafe prompts to seven harm domains.
- Not stated in the paper: assumptions about adversarial inputs designed to evade detection.
What related research exists?
The paper cites only a small amount of work: the shared task and data, the JAIS backbone model, the AraSafe augmentation data, and the QLoRA/LoRA training method.
The paper has no separate Related Work section; citations are concentrated in the introduction, task description, and method sections, and can be divided into three groups.
Shared task and data
- Alam et al. (2026)—ArGuard shared task: harmful content detection for Arabic memes and LLM prompts; this paper participates in its prompt tracks B1/B2.
- Zaghouani et al. (2026)—Arabic-dialectsafety: a dialect-aware Arabic content safety classification benchmark, i.e. the source of this task's prompt data, each item with a dialect label and a harm label.
- Mubarak et al. (2025)—AraSafe: an Arabic LLM safety benchmark; this paper takes its human-written safe MSA prompts (7,607 filtered from 12,077) to augment B1 training, an example of the external data permitted by the shared task.
Backbone model
- Sengupta et al. (2023)—JAIS and JAIS-Chat: Arabic-centric open-source generative LLMs; this paper uses JAIS-6.7B as the only backbone, and the paper does not compare with other backbones.
Training methods
- Dettmers et al. (2023)—QLoRA: an efficient fine-tuning method for quantized LLMs.
- Hu et al. (2021)—LoRA: low-rank adaptation; this paper loads the backbone in 4-bit NF4 and adds LoRA adapters to all linear projections.
Positioning: The authors state the contribution is using a single QLoRA fine-tuned backbone to serve both tracks, supplemented by B1's dialect-decomposed head and AraSafe augmentation and B2's five-seed averaging, and providing per-dialect and per-class error breakdowns; the paper does not make a method-level comparison with other participating teams or existing detection systems, and has no baseline methods.
How does the paper address this problem?
A single JAIS-6.7B QLoRA backbone plus a last-token linear head; B1 uses a dialect-decomposed four-way head plus AraSafe augmentation, B2 uses a seven-class head plus five-seed averaging.
Overall approach: both tracks share the same backbone and training recipe, changing only the label scheme and two task-specific configurations (Table 1).
Shared backbone and training
- Backbone: JAIS-6.7B, loaded in 4-bit NF4 with double quantization, compute dtype bfloat16; LoRA adapters are added to all linear projections (r=16, α=32, dropout 0.05), with base weights frozen.
- Pooling and classification head: the hidden state at the last non-padding position of the top layer is passed in float32 through a linear classification head.
- Training setup: AdamW, learning rate 10−4, linear schedule, 5% warmup, batch size 8, maximum sequence length 192 tokens, trained for 3 epochs; the loss is cross-entropy weighted by the inverse class frequency, which the authors say is to keep rare classes from being overwhelmed and directly serves the macro F1 objective.
- Data splits: stratified group k-fold (k=7) is used to build training folds; for the final test submission, the model is retrained on the concatenation of train+dev. The above is identical for both tasks.
B1: dialect-decomposed four-way head
- Label decomposition: each B1 label is split by dialect register into four classes: safe-MSA, safe-other, unsafe-MSA, unsafe-other, so that the model represents the safe/unsafe boundary separately for standard Arabic and dialectal Arabic.
- Decoding: a plain argmax over the four logits, then collapsed by prefix into binary classification (both unsafe subclasses map to unsafe); no dialect-based post-processing is done, and dialect information enters only through the training labels (Figure 1).
- AraSafe augmentation: in the B1 training pool (train+dev, 19,236 examples), safe-MSA accounts for only 7.6%, the smallest class; from the AraSafe human-written set (12,077 examples), harmless instances are kept, samples shorter than 10 characters or matching the dialect marker word list are removed, and duplicates against train/dev/test are removed, yielding 7,607 prompts that are all safe MSA, added only to training folds (labeled safe-MSA), with held-out folds untouched; the augmentation is used only for the final test retraining.
B2: seed-averaged seven-class classifier
- Head: the same backbone with a seven-class head, without dialect decomposition or augmentation.
- Ensemble: five seeds with identical configurations (42–46) are trained, and the softmax distributions are averaged before argmax (Figure 2); the authors state that averaging is the only ensemble step, with no stacking, held-out meta-learner, or per-class thresholds.
Success criterion
- Both tracks are judged by macro F1 on the official test set; B1 additionally reports per-dialect accuracy and predicted unsafe rate, and B2 reports per-class P/R/F1.
What experiments did the paper conduct?
B1 macro F1 0.984, B2 macro F1 0.790, which the authors say both rank first; the ablation shows that AraSafe augmentation is key for B1, and B2 errors are concentrated in the Bully class on MSA.
Experimental setup
- System under test: Both submitted systems are JAIS-6.7B + 4-bit QLoRA + last-token linear head; B1 is a four-way head single seed, B2 is a seven-class head averaged over five seeds (42–46).
- Data: ArGuard-2026 prompt data; B1 training pool train+dev totals 19,236 items; B1 test set 7,809 items (of which 3,851 are truly unsafe); B2 test set is 5,979 unsafe prompts (the n column of Table 4).
- Augmentation data: 7,607 safe MSA prompts filtered from the AraSafe human-written set, used only for the B1 final test retraining.
- Metrics: The official metric is macro F1; per-dialect accuracy, predicted unsafe rate, and per-class P/R/F1 are also reported.
- Review method: Scoring on the shared task official test set; the paper does not describe scoring implementation details, and there is no LLM review.
- Number of repetitions: B2 uses five seeds; the B1 submission is single-seed, and the ablation is done once under the submitted seed and split.
Main results
Official test set macro F1 for both tracks (per the abstract and Section 4):
Track System Macro F1 B1 (safe/unsafe) Four-way head + AraSafe augmentation, argmax 0.984 B2 (seven harm domains) Seven-class head, five-seed softmax average 0.790 - The authors state both submissions ranked first in their respective tracks.
- B1's predicted unsafe rate is 3888/7809, within 1% of the true rate of 3851.
- B2's five seeds each score 0.779–0.785 on the test set, and 0.790 after averaging the softmax.
B1 per-dialect breakdown and ablation
- Per dialect (Table 2): Accuracy across six dialects ranges from 93.6% (Moroccan) to 99.8% (Egyptian); predicted unsafe rates are close to true rates, e.g. MSA 37.1% vs 36.6%, Egyptian 91.6% vs 91.3%. The authors state the model treats dialect as evidence rather than a fixed rule, and dialect prompts that are actually safe are still judged safe.
- Ablation (Table 3, official test set, submitted seed and split): Removing the AraSafe augmentation gives macro F1 0.624; the authors explain that the training pool is about 80% unsafe while the blind test is close to balanced, so the un-augmented model carries the training prior and predicts 6,426 of 7,809 as unsafe (true 3,851).
- Role of the four-way head (Table 3): Two-way head plus augmentation is 0.983, four-way head plus augmentation is 0.984; the authors state the gain is concentrated at the MSA safe/unsafe boundary rather than in the total score.
B2 per-class and per-dialect breakdown
- Per class (Table 5): Six of the seven classes have F1 between 0.73 and 0.98; errors are concentrated in Bully (P 0.815, R 0.443, F1 0.574), and the authors state the model finds fewer than half of the true Bully prompts, with the rest mostly assigned to harassment and harm-to-others; Bully has 908 samples, more than four higher-scoring classes, and the authors therefore consider this not a data quantity problem and that follow-up should focus on the Bully class.
- Class × dialect (Table 4): adult_content has F1 0.95–1.00 across dialects; Bully is 0.81–0.97 across five dialects, and the low total score comes almost entirely from MSA (0.46, with 719 of its 908 test samples being MSA); MSA is the hardest register (macro F1 0.70), with dialects at 0.88–0.95. The authors state the confusion among adjacent harm domains is an MSA phenomenon rather than a dialect phenomenon, and note that the non-MSA per-class cells are based on only 14–239 samples and should be treated as indicative results.
Other ablations and analyses
- B1 head decomposition ablation: two-way + AraSafe 0.983, four-way without augmentation 0.624, four-way + AraSafe 0.984 (Table 3).
- B2 seed variance: five seeds 0.779–0.785, 0.790 after ensembling (Section 4).
- The paper does not report other hyperparameter ablations.
What are some points that can be further explored?
The authors list three limitations: a single backbone with no architecture comparison, ablations not repeated across seeds, and unresolved confusion of the Bully class on MSA.
Limitations and future directions noted by the authors
- Single backbone (Limitations): The system relies on a single Arabic-centric backbone plus a linear head and does not compare other Arabic encoders or architectures, so the results characterize this recipe rather than the upper bound achievable on the task.
- Ablation not repeated (Limitations): The B1 ablation was performed on the official test split with the submitted seed and fold, and was not repeated across seeds.
- Bully class errors unresolved (Limitations): Confusion of Bully with harassment and harm-to-others within MSA remains; the authors believe closing the gap may require finer annotation rather than more data.
Scope of experiments
- The only backbone tested is JAIS-6.7B, shared by both tracks (Section 3.1).
- Evaluation data is the official ArGuard-2026 split: B1 test set 7,809 items, B2 test set 5,979 unsafe prompts; dialects cover MSA and Syrian, Egyptian, Palestinian, Moroccan, Algerian, six in total (Table 2, Table 4).
- External data is only the 7,607 safe MSA prompts from AraSafe, used only for B1 (Section 3.2).
- The B2 ensemble covers five seeds (42–46); the B1 submission and ablation are both single-seed (Table 1, Table 3).
- The paper does not report comparisons with other participating teams' scores, nor inference time or training cost.
Summarize the main content of the paper
A single QLoRA fine-tuned JAIS-6.7B takes both ArGuard-2026 tracks: B1 macro F1 0.984, B2 macro F1 0.790, which the authors say both rank first.
This is the participating system report for the ArGuard-2026 shared task: a single 4-bit QLoRA fine-tuned JAIS-6.7B backbone plus a last-token linear classification head completes both tracks of Arabic harmful prompt detection.
- Problem: B1 judges safe/unsafe on MSA and five dialects; B2 classifies unsafe prompts into seven harm domains; the official metric is macro F1, and the data has uneven harm rates across dialects and class imbalance.
- Method highlights: B1 decomposes the label by dialect register into four heads, folds them into a binary classification with ordinary argmax, and augments the smallest class, safe-MSA, with 7,607 safe MSA prompts from AraSafe; B2 uses a seven-class head and averages the softmax over five seeds (42–46).
- Main results: B1 macro F1 0.984, accuracy across six dialects 93.6%–99.8%, predicted unsafe rate within 1% of the true rate; B2 macro F1 0.790 (single seed 0.779–0.785). The authors state both tracks ranked first.
- Ablation: Removing the AraSafe augmentation from B1 drops macro F1 to 0.624, and the authors state the augmentation is the most critical component; the four-way head brings only a small improvement from 0.983 to 0.984 over the two-way head, concentrated at the MSA boundary.
- Residual errors: Six of the seven B2 classes have F1 between 0.73 and 0.98, with errors concentrated in Bully (recall 0.443), and almost all on MSA (that class's MSA F1 0.46, dialects 0.81–0.97); the authors state this is an MSA phenomenon rather than a dialect phenomenon.
- Authors' conclusion: A single Arabic decoder plus a simple linear head suffices to achieve leading scores on both tracks; limitations are that other architectures were not compared, the ablation was not repeated across seeds, and the Bully class confusion may require finer annotation to resolve.