Skip to content

REGLAT participates in the ArGuard shared task: an NER-integrated ensemble model for detecting Arabic harmful contentREGLAT at ArGuard Shared Tasks: An Ensemble-Based Model Integrating NER for Harmful Content Detection in Arabic

arXiv: Jailbreaks, Prompt Injection, Poisoning & Defenses· arXiv:2610.37265· Ahmed M. Fetouh, Mariam Labib, Nsrin Ashraf, Omer Dawood, Hamada NayelFaculty of Computers and Artificial Intelligence, Benha University; Computer Engineering, Elsewedy University of Technology; College of Engineering, Wadi Ad Dwaser, Prince Sattam Bin Abdulaziz University, KSAIndexed by this site · 27 days ago· Originally publishedDefenses

Quick read

Evaluation and benchmarks

Based on the paper PDF (AI-generated); refer to the original

The authors propose a two-stage system of GLiNER entity extraction plus MARBERT classification, with a macro-F1 of 0.886 on the ArGuard 2026 Subtask B2 development set.

Questions
Fine-grained harmful content detection of Arabic user prompts: dialect variants, semantic overlap between categories, and class imbalance make seven-class classification difficult.
Methods
Two-stage pipeline: first GLiNER extracts harm-related entities according to 34 entity labels, serializes them into an [ENTITIES] block appended after the original text, and then passes it to a fine-tuned MARBERT for seven-class classification.
Experiments and results
On the ArGuard 2026 B2 development set (2,405 examples), macro-F1 is 0.886 and accuracy is 0.897; adult_content has an F1 of 0.987, harm-to-others is lowest at 0.815, and errors are concentrated between semantically similar categories.
Limitations and future work
The authors note: the evaluation is based only on the development set, and generalization requires more testing; semantic overlap between categories still causes confusion; NER missed or false detections affect the input; the complete numerical values of the ablation comparisons have not yet been reported.
Experimental setupMARBERT (UBC-NLP/MARBERT) · ArGuard 2026 Subtask B2 · Macro-F1、Accuracy et al.
Evaluated models
MARBERT (UBC-NLP/MARBERT)
Benchmarks
ArGuard 2026 Subtask B2
Metrics
Macro-F1AccuracyMacro-PrecisionMacro-Recall
AI summaryREGLAT proposes a two-stage method for detecting Arabic harmful content in the ArGuard 2026 shared task, achieving a macro-F1 of 0.886 on the development set. The system first uses GLiNER to extract harmful entities and merge them into the original text, then uses a fine-tuned MARBERT to classify into seven categories. On the blind test set, subtasks 1 and 2 achieve accuracies of 0.793 and 0.770, and Macro-F of 0.735 and 0.754; similar categories remain difficult to distinguish.

REGLAT proposes a two-stage method for detecting Arabic harmful content in the ArGuard 2026 shared task, achieving a macro-F1 of 0.886 on the development set. The system first uses GLiNER to extract harmful entities and merge them into the original text, then uses a fine-tuned MARBERT to classify into seven categories. On the blind test set, subtasks 1 and 2 achieve accuracies of 0.793 and 0.770, and Macro-F of 0.735 and 0.754; similar categories remain difficult to distinguish.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Addresses seven-class fine-grained harmful content classification of Arabic user prompts, with difficulties in dialect, semantic overlap between classes, and class imbalance.

    Core problem: classify Arabic user prompts into seven harmful content categories (ArGuard 2026 Subtask B2) and improve the ability to distinguish semantically similar categories.

    • Setting and importance: The authors state that with the spread of LLMs and conversational AI, user prompts may involve violence, self-harm, harassment, bullying, hate speech, fraud, and adult content, and that reliable harmful content detection is necessary for the safe and responsible use of language technology.
    • Task difficulties: The authors point out that Arabic has dialectal variants, informal expressions, and context-dependent meanings; multiple categories (such as bullying, harassment, and hate speech) share vocabulary and semantic features; prompts may contain harmful entities but no clear harmful intent; and the training set is class-imbalanced (the largest class, adult_content, has 4,592 instances, and the smallest class, hate_speech, has 943 instances, about 4.9:1).
    • Shortcomings of existing methods: The authors argue that contextual representations learned by Transformers such as MARBERT may not capture the explicit entity-level information needed to distinguish harmful categories.
    • Core hypothesis: Explicit entity cues extracted by NER (weapons, self-harm terms, financial credentials, protected groups, insults) can serve as supplementary structured signals that, combined with contextual representations, support fine-grained classification.
    • Proposed in the paper: A two-stage system—GLiNER extracts 34 types of harm-related entities and serializes them after the original prompt, then a fine-tuned MARBERT performs seven-class classification; evaluation and error analysis were conducted on the ArGuard 2026 development set.
  2. What related research exists?

    The paper has relatively little related work, mainly covering three groups: Arabic harmful content detection, Arabic pretrained models, and general NER models.

    Arabic harmful content and text classification

    • Ashraf et al. (2025, 2022), Nayel et al. (2021)—the paper cites them to explain that harmful content detection in Arabic is difficult due to dialect variants, informal expressions, and context dependence; Nayel (2020) is cited to explain that class imbalance can cause models to perform unevenly across categories.
    • Ashraf et al. (2025) (REGLAT at MAHED)—the authors' team's earlier hybrid ensemble system on an Arabic hate speech detection shared task; the name REGLAT in the paper's title is carried over from this.

    Arabic pretrained language models

    • Abdul-Mageed et al. (2021)—proposed ARBERT and MARBERT; the paper chooses MARBERT because its pretraining data includes Modern Standard Arabic and dialectal Arabic, suitable for the dialect variants in the data.

    Named entity recognition

    • Zaratiana et al. (2024)—proposed GLiNER, a general NER model based on a bidirectional Transformer that accepts an arbitrary label set at inference time without training data for that label set; this paper uses its multilingual checkpoint for zero-shot entity extraction.
    • Eldouby et al. (2026)—a rule-plus-fuzzy-matching method for disease NER in Arabic biomedical text, cited to show that NER can identify relevant entities and expressions.

    Shared task and data

    • Alam et al. (2026)—the ArGuard shared task (harmful content detection in Arabic memes and LLM prompts); this paper participates in its Subtask B2.
    • Kmainasi et al. (2026)—the AHA-Memes benchmark, cited by the paper as the source of the training set size (16,835 prompts).

    Baselines and comparisons: The paper does not make numerical comparisons with other participating systems or published methods; Section 6 designs two ablation variants, prompt-only (fine-tuning MARBERT on the original text only) and entities-only, as internal controls, but the paper does not report their numerical results.

    Authors' positioning: The authors state that the distinction of this paper lies in splicing explicit entity cues from general NER, in structured form, into the input of an Arabic Transformer classifier for fine-grained harmful content detection.

  3. How does the paper address this problem?

    Two-stage pipeline: GLiNER extracts 34 entity types, serializes them and appends them to the original text, then a fine-tuned MARBERT performs seven-class classification.

    The overall idea is to combine explicit entity cues with the contextual representations of a pretrained Arabic model: first GLiNER extracts harm-related entities, serializes them into a text block appended after the original prompt, and then a fine-tuned MARBERT classifies into seven categories. The authors state that the entity block provides the classifier with a compact, category-oriented summary of the prompt that is complementary to the encoder's contextual representations.

    Task setting

    • ArGuard 2026 Subtask B2: each Arabic user prompt is assigned to one of seven categories: adult_content, harm-to-others, self-harm, harassment, FraudandDeception, Bully, hate_speech.
    • The training set has 16,835 prompts, each containing the prompt, a binary safety label (safe/unsafe), a fine-grained label, and a dialect label (e.g., Modern Standard Arabic, Levantine dialect); the development set has 2,405 examples used for model selection and evaluation; the test set is unlabeled and used only for final prediction.
    • Preprocessing: check missing values, duplicate prompts and identifiers, and prompt length statistics; remove training rows containing missing values.

    Entity extraction (GLiNER)

    • Uses the GLiNER multilingual checkpoint (urchade/gliner_multi-v2.1), given a label set at inference time, used zero-shot without NER training data.
    • 34 custom entity labels, organized by seven harmful domains: violence and physical harm (7 labels), self-harm (4), fraud and sensitive information (7), adult content (4), hate (4), harassment (4), contextual entities (person, organization, location).
    • Confidence threshold 0.5; each entity records surface text, confidence, and character offsets; deduplicated by surface form within the same label; results saved as JSONL.

    NER-augmented input representation

    • Entity outputs are converted into a plain text block: the 34 labels are each written on one line in a fixed order, in the format label: entity_1, entity_2, ..., with label: none written if nothing is detected.
    • The final input is the original prompt followed by the [ENTITIES] block; the fixed order and explicit none values make the input format consistent across samples, making the presence or absence of cues for a given domain directly visible to the classifier.
    • Fine-grained labels are mapped to integers using a label encoder fitted on the training set; the development and test sets reuse the same encoder.

    MARBERT classifier and training

    • Fine-tunes MARBERT (UBC-NLP/MARBERT) with a sequence classification head with seven outputs, trained with standard cross-entropy, without class weighting or resampling; only the fine-grained label is predicted, and the binary safe/unsafe label is not used as input or auxiliary target.
    • Input uses the MARBERT tokenizer, truncated/padded to a maximum of 256 tokens.
    • Hyperparameters (Table 1): learning rate 2 × 10−5, warmup 10%, 3 epochs, training/evaluation batch size 32/16, weight decay 0.01; after each epoch, evaluate on the development set and restore the checkpoint with the highest macro-F1.

    Evaluation method

    • The official main metric is macro-F1 (seven classes equally weighted, suitable for class imbalance); accuracy, macro-precision, macro-recall, per-class precision/recall/F1, and raw and row-normalized confusion matrices are also reported.
    • At test time the same pipeline is used: GLiNER extraction (same label set, same threshold) → construct [ENTITIES]-augmented text → MARBERT tokenizer → predict with the selected checkpoint → map back to label names.
  4. What experiments did the paper conduct?

    Development set macro-F1 0.886, accuracy 0.897; errors are concentrated in semantically similar categories; ablation experiments were designed but numerical values are not reported.

    Experimental setup

    • System under test: GLiNER (urchade/gliner_multi-v2.1) entity extraction + fine-tuned MARBERT (UBC-NLP/MARBERT) seven-class classifier.
    • Data: ArGuard 2026 Subtask B2; training set 16,835 prompts, development set 2,405 examples (used for model selection and evaluation), test set unlabeled.
    • Class distribution: In the training set, adult_content is the most frequent (4,592 examples, 27.28%), hate_speech the least frequent (943 examples, 5.60%).
    • Metrics: Official main metric macro-F1; accuracy, macro-precision, macro-recall, and per-class precision/recall/F1 are also reported.
    • Review method: Metrics are computed automatically from labels, with no human or LLM review.
    • Repetitions: The paper states that the ablation variants are each trained with 3 random seeds and reports mean and standard deviation, but no numerical values are given; the number of seeds for the main system is not stated.

    Main results

    Overall development set results (Table 2) and per-class F1 (Table 3, support is the number of development set examples):

    CategoryF1Support
    adult_content0.9871657
    hate_speech0.9225135
    self-harm0.9021389
    FraudandDeception0.8963252
    harassment0.8483322
    Bully0.8341217
    harm-to-others0.8145433

    Overall: Macro-F1 0.886, Accuracy 0.897, Macro-Precision 0.885, Macro-Recall 0.888 (Table 2).

    • The authors state that macro-precision and macro-recall are close, indicating that the model is not systematically biased toward over-reporting or under-reporting any one class.
    • The authors state that hate_speech, despite being the smallest class in the training set, still has a relatively high F1, suggesting that entity cues for protected groups and offensive expressions are informative.
    • The authors report that the system achieves accuracy 0.793 and Macro-F 0.735 on the subtask 1 blind test set, and accuracy 0.770 and Macro-F 0.754 on subtask 2; the paper does not explain the relationship between these two subtasks and the Subtask B2 setting of this paper.

    Error analysis (Figure 3 confusion matrix)

    • What was measured: Raw and row-normalized confusion matrices for the 2,405 development set examples.
    • Results: The largest confusion is between harm-to-others and self-harm (28 harm-to-others classified as self-harm, 27 in the reverse direction); harm-to-others also absorbs errors from Bully, FraudandDeception, and harassment (18 each); Bully and harassment are misclassified in both directions 12 and 14 times; 7 Bully examples are classified as hate_speech; adult_content has only 8/657 examples assigned to other classes.
    • Authors' interpretation: Errors are concentrated in semantically adjacent categories rather than uniformly distributed; harm-to-others and self-harm both involve physical harm, weapons, and violent behavior, and the difference lies mainly in who the target of harm is, which the mere presence of entities cannot determine; Bully and harassment share insult and threat entities, and the entity block provides limited signal for distinguishing the two.

    Ablation experiments (Section 6)

    • What was measured: (i) two input variants, prompt-only (removing the [ENTITIES] block) and entities-only (using only the entity block); (ii) retraining with one entity label domain removed at a time; (iii) three design choices: serialization format (full 34 lines vs. listing only labels with entities), GLiNER confidence threshold (0.3/0.5/0.7), and maximum sequence length (128/256/512).
    • Results: The paper does not report numerical results for any ablation variant; Section 6.7 explicitly states that the current results alone cannot prove that entity augmentation is superior to the MARBERT-only baseline, and that conclusions can only be drawn after the relevant comparisons report complete numerical values.

    Other ablations and analyses

    • The paper has no other ablations or parameter analyses with reported numerical values.
  5. What are some points that can be further explored?

    The authors list limitations such as generalization, semantic overlap, and NER quality, and plan to supplement the ablation comparisons; ablation numerical values are currently not reported.

    Limitations and future directions noted by the authors

    • Evaluation scope: The evaluation is based on the ArGuard development set; testing on the official test set and more Arabic harmful content datasets is needed to assess generalization across sources and language conditions (Section 7).
    • Semantic overlap: The system is sensitive to semantic overlap between categories; future work could explicitly model the targets and intents of harmful behavior, incorporate relations between entities, or adopt category-specific training strategies to distinguish harm-to-others from self-harm, and Bully from harassment (Section 7).
    • NER dependence: The quality of the augmented input depends on GLiNER's extraction; missed detections lose evidence, and false detections introduce irrelevant information; the fixed serialization of 34 labels increases input length, making the representation subject to the maximum sequence length; future work should examine entity extraction errors, alternative serialization strategies, and the balance between entity information and input efficiency (Section 7).
    • Safety measurement: Classification performance should not be interpreted as a complete measure of actual safety; future evaluations could examine category-specific error costs, calibration, robustness to dialect variants, and performance on prompts that express harmful intent indirectly or ambiguously (Section 7).
    • Ablations pending: The authors state that the planned ablation comparisons (including a prompt-only baseline) need to be completed to establish the effectiveness and applicability of the framework (Sections 6.7, 7).

    Experimental coverage

    • The system under test is a single GLiNER + MARBERT pipeline; the main results are reported only on the ArGuard 2026 B2 development set (2,405 examples) (Table 2, Table 3).
    • The paper reports accuracy and Macro-F on the blind test sets of subtask 1 and subtask 2, but does not explain the relationship between the task settings of these two subtasks and B2 in this paper.
    • The paper does not report numerical values for ablation variants such as prompt-only and entities-only, so there is no quantitative evidence yet for the gain of entity augmentation over plain MARBERT (Section 6.7).
    • The paper does not report the number of random seeds or repetitions for training the main system; the ablation variants are said to use 3 seeds but no numerical values are given.
    • The paper does not make numerical comparisons with other participating systems or published methods.
  6. Summarize the main content of the paper

    GLiNER entity-augmented MARBERT achieves macro-F1 0.886 on the Arabic harmful content seven-class development set, with similar categories still confused.

    A shared-task system paper: the authors participated in ArGuard 2026 Subtask B2, whose task is to classify Arabic user prompts into seven harmful content categories.

    • Problem: Arabic dialect variation, semantic overlap between categories (e.g., bullying, harassment and hate speech share vocabulary) and class imbalance make fine-grained detection difficult; the authors hold that contextual representations alone lack explicit entity-level information.
    • Method: A two-stage pipeline—GLiNER zero-shot extracts entities according to 34 custom entity labels (seven harmful domains), serializes them into a fixed-format [ENTITIES] block appended to the original prompt, and then a fine-tuned MARBERT performs seven-class classification; trained for 3 epochs, with the checkpoint selected by development-set macro-F1.
    • Main results: Development set (2,405 items) macro-F1 0.886, accuracy 0.897 (Table 2); F1 for adult_content is 0.9871, hate_speech 0.9225, and harm-to-others is lowest at 0.8145 (Table 3); the authors report subtask 1 blind-test accuracy 0.793 and subtask 2 blind-test Macro-F 0.754.
    • Error analysis: Confusions concentrate in semantically adjacent categories—harm-to-others and self-harm are misclassified in both directions 28 and 27 items, Bully and harassment in both directions 12 and 14 items; the authors hold that the presence of an entity alone cannot determine the target of harm and the communicative intent, and that contextual evidence beyond entities is needed.
    • Conclusion and implications: The authors state that the results support the feasibility of combining general NER with Arabic pretrained Transformers for fine-grained harmful content classification; they also emphasize that the complete numbers of the ablation comparison (including a prompt-only baseline) have not yet been reported, that the net benefit of entity augmentation remains to be confirmed, and that generalization, semantic overlap modeling and NER quality are directions for follow-up work.
Read originalarxiv.org