NileUn at AbjadGenEval Shared Task: Contrastive Learning with Stacking Ensemble for Efficient Arabic AI-Generated Text Detection
Paper · 2026 · Mohamed Hussein Mohamed, Shrouk Shalaby and Nesreen Mohamed
Summary
The paper addresses binary classification of Arabic text as human-written or machine-generated, as a submission to the AbjadGenEval shared task. The main training data is the ARATECT dataset: 5,298 balanced samples, with the machine portion produced by Mistral, GPT-4 and LLaMA. The official test set contains 200 unlabeled items. The authors fine-tune two encoders, AraBERT and XLM-RoBERTa, each with a classifier head and a 256-dimensional projection head.
Training has three phases:
- cross-entropy only;
- cross-entropy plus a supervised contrastive term (λ=0.3, τ=0.1);
- additional low-learning-rate tuning on the Arabic Generated Abstracts dataset, which exposes the models to more generators and prompting styles.
A logistic-regression meta-learner then stacks the two models' probabilities. On an internal 530-sample split, the ensemble reaches F1=0.983. On the official test, it drops to F1=0.782 (4th place), with recall well above precision. The work shows that compact encoders can compete without LLMs, but it also reveals a sizeable train–test distribution shift.
Key points
- Data: ARATECT (5,298 samples, 50/50 human/machine) was split 80/10/10 into 4,238/530/530. For extra tuning, the authors used the Arabic Generated Abstracts dataset (KFUPM-JRCAI): 8,388 samples from Allam, Jais, LLaMA and OpenAI models, covering three generation strategies.
- Internal results: Before the third phase, the stacking ensemble scored F1=0.983. After the extra tuning it fell to 0.922 (AraBERT 0.912, XLM-R 0.788). The authors frame that phase as aimed at generalization to unseen generators.
- Official results: 4th place with F1=0.782, Accuracy=0.74, Precision=0.66 and Recall=0.95.
- Ablation: The contrastive loss raised stacking F1 from 0.56 to 0.61. The paper does not clearly specify the evaluation setting behind these much lower figures. It also claims stacking beats majority voting but gives no numbers for that comparison.
- Setup and efficiency: The system ran on Kaggle with dual T4 GPUs, batch size 16, learning rate 2×10⁻⁵, max length 512 and AdamW. Each encoder is reported at 136M parameters. The code is publicly available on Kaggle.
Institutions
Fields, topics and concepts
📚 Shelves 5The field of science this work belongs to (OpenAlex fields).Computer Science · 16,667 worksArtificial Intelligence · 16,194 worksArts and Humanities · 16,039 worksLanguage and Linguistics · 15,891 worksComputer Vision and Pattern Recognition · 2,869 works
🧭 Topics 1Research subjects and languages the work is about.Semitic languages · 2,908 works
Cite
Cite as Mohamed Hussein Mohamed, Shrouk Shalaby and Nesreen Mohamed. 2026. NileUn at AbjadGenEval Shared Task: Contrastive Learning with Stacking Ensemble for Efficient Arabic AI-Generated Text Detection. Proceedings of the 2nd Workshop on NLP for Languages Using Arabic Script.
@inproceedings{mohamed2026nileun,
title = {{NileUn at AbjadGenEval Shared Task: Contrastive Learning with Stacking Ensemble for Efficient Arabic AI-Generated Text Detection}},
author = {Mohamed Hussein Mohamed, Shrouk Shalaby and Nesreen Mohamed},
booktitle = {Proceedings of the 2nd Workshop on NLP for Languages Using Arabic Script},
year = {2026},
doi = {10.18653/v1/2026.abjadnlp-1.61},
url = {https://doi.org/10.18653/v1/2026.abjadnlp-1.61}
}References
- Shadi Abudalfa, Saad Ezzini, Ahmed Abdelali, Hamza Alami, Abdessamad Benlahbib, Salmane Chafik, Mo El-Haj, Abdelkader El Mahdaouy, Mustafa Jarrar, Salima Lamsiyah, and Hamzah Luqman. 2025. The AraGenEval shared task on Arabic authorship style transfer and AI generated text detection. In Proceedings of The Third Arabic Natural Language Processing Conference at EMNLP 2025, Suzhou, China. Association for Computational Linguistics.
- Noura Saad Alghamdi and Jalal Suliman Alowibdi. 2024. Distinguishing Arabic GenAI-generated tweets and human tweets utilizing machine learning. Engineering, Technology & Applied Science Research, 14(5):16720–16726. ↗
- Hamed Alshammari, Ahmed El-Sayed, and Khaled Elleithy. 2024. AI-generated text detector for Arabic language using encoder-based transformer architecture. Big Data and Cognitive Computing, 8(3). ↗
- Wissam Antoun, Fady Baly, and Hazem Hajj. 2020. AraBERT: Transformer-based model for Arabic language understanding. In Proceedings of the 4th Workshop on Open-Source Arabic Corpora and Processing Tools, pages 9–15, Marseille, France. European Language Resource Association. ↗
- Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettlemoyer, and Veselin Stoyanov. 2020. Unsupervised cross-lingual representation learning at scale. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8440–8451. Association for Computational Linguistics. We presented an efficient Arabic AI text detection system combining contrastive learning with stacking ensemble. Our system achieves F1=0.983 on our held-out test split and secured 4th place on the official AbjadGenEval workshop test data with F1=0.782. 491 find
- Xibin Dong, Zhiwen Yu, Wenming Cao, Yifan Shi, and Qianli Ma. 2020. A survey on ensemble learning. Frontiers of Computer Science, 14(2):241–258. ↗
- Saad Ezzini, Irfan Ahmed, Salmane Chafik, Shadi Abudalfa, Mo El-Haj, Ahmed Abdelali, Mustafa Jarrar, Nadir Durrani, Hassan Sajjad, and Farah Adeeba. 2026. AbjadGenEval: Abjad AI generated text detection shared task for languages using Arabic script at AbjadNLP 2026. In Proceedings of the 2nd Workshop on NLP for Languages Using Arabic Script (AbjadNLP 2026), co-located with the 19th Conference of the European Chapter of the Association for Computational Linguistics (EACL 2026), Rabat, Morocco.
- Imane Guellil, Houda Saâdane, Faical Azouaou, Billel Gueni, and Damien Nouvel. 2021. Arabic natural language processing: An overview. Journal of King Saud University - Computer and Information Sciences, 33(5):497–507.
- Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. 2020. Supervised contrastive learning. In Advances in Neural Information Processing Systems, volume 33, pages 18661–18673. ↗
- Salima Lamsiyah, Saad Ezzini, Abdelkader El Mahdaouy, Hamza Alami, Abdessamad Benlahbib, Samir El amrany, Salmane Chafik, and Hicham Hammouchi. 2025. M-DAIGT: A Shared Task on Multi-Domain Detection of AI-Generated Text. In Proceedings of the Shared Task on Multi-Domain Detection of AI-Generated Text, pages 1–9, Varna, Bulgaria. IN-COMA Ltd., Shoumen, Bulgaria. find
- Junchao Wu, Shu Yang, Runzhe Zhan, Yulin Yuan, Lidia Sam Chao, and Derek Fai Wong. 2025. A survey on LLM-generated text detection: Necessity, methods, and future directions. Computational Linguistics, 51(1):275–338. ↗
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/mohamed-2026-nileun-abjadgeneval-shared-task-contrastive/