REGLAT at AbjadMed: Handling Imbalanced Arabic Medical Text Classification via Hierarchical KNN-MLP Architecture
Paper · 2026 · Ahmed M. Fetouh, Mohammed Rahmath, Omer Dawood et al.
Summary
This paper describes the REGLAT team's entry to the AbjadMed shared task: assigning one of 82 medical categories to Arabic healthcare question–answer texts, where some categories have many examples and others very few. The authors clean and normalize the Arabic text. They rebalance the training data by capping frequent classes and adding examples for scarce ones from an external Arabic healthcare corpus. They then fine-tune ArabicBERT on this balanced set and use it only as an embedding encoder. Classification is two-stage. A cosine KNN makes a first guess. If that guess is a rare label, a separate MLP trained only on rare-class examples re-decides. On the blind test set the system reaches macro F1 0.46, ahead of the fine-tuned ArabicBERT, RAC, AraBERT and CAMeLBERT runs the authors also tried. The work shows that a light, reproducible pipeline built on domain-adapted embeddings can beat end-to-end fine-tuning when many classes are rare.
Key points
- The AbjadMed data has 27,951 labelled training texts and 18,633 blind test texts across 82 categories. The task is single-label and multi-class, and the official metric is macro-averaged F1.
- The Anchor-Cap balancing strategy keeps the original data as the anchor and caps each class at 600 samples. Only underrepresented classes are topped up, using a Kaggle Arabic healthcare dataset.
- ArabicBERT was fine-tuned for 8 epochs on the balanced data, and its normalized embeddings feed a scikit-learn KNN (k=25, distance weighting, cosine metric).
- A class counts as rare if it has fewer than 50 training instances. Rare predictions are passed to an MLP with layers 1024–512–256–128, StandardScaler, Adam, adaptive learning rate and early stopping, trained only on rare-class data.
- Macro F1 scores were:
- KNN+MLP (proposed): 0.46
- ArabicBERT: 0.38
- RAC: 0.3785
- AraBERT: 0.35
- CAMeLBERT: 0.3047
Interesting ideas
- I1. A cheap general classifier makes the first call, and a specialist trained only on rare labels re-judges any prediction that lands in a rare class, so scarce categories are not swamped by frequent ones.
- I2. The Anchor-Cap scheme caps frequent classes at a fixed ceiling and adds outside data only for underfilled classes, rather than oversampling everything.
- I3. The authors fine-tune an encoder on the target domain but classify by nearest neighbours in its embedding space, so each decision is backed by concrete similar training examples.
- I4. Choosing macro F1 as the headline metric makes failures on low-frequency classes visible instead of hiding them behind accuracy on common classes.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (frames): VerbNet class or semantic-role assignment could use a general picker, with a dedicated checker invoked only when the chosen frame is a rare one, logging both decisions for explanation.
- I2 (learn): when assembling silver treebank data, cap common constructions and deprels and pull extra agreed sentences only for rare relations or constructions.
- I3 (world): mapping mentions to ontology types or senses could cite the nearest annotated examples as evidence, which fits the requirement that every step be explainable.
- I4 (answer): score readers per question type and average equally, so rare test types such as multi-step word problems are not masked by easy frequent ones.
Institutions
Fields, topics and concepts
📚 Shelves 4The 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 works
🧭 Topics 1Research subjects and languages the work is about.Semitic languages · 2,908 works
Cite
Cite as Ahmed M. Fetouh, Mohammed Rahmath, Omer Dawood, Mariam Labib, Nsrin Ashraf and Hamada Nayel. 2026. REGLAT at AbjadMed: Handling Imbalanced Arabic Medical Text Classification via Hierarchical KNN-MLP Architecture. Proceedings of the 2nd Workshop on NLP for Languages Using Arabic Script.
@inproceedings{fetouh2026reglat,
title = {{REGLAT at AbjadMed: Handling Imbalanced Arabic Medical Text Classification via Hierarchical KNN-MLP Architecture}},
author = {Ahmed M. Fetouh, Mohammed Rahmath, Omer Dawood, Mariam Labib, Nsrin Ashraf and Hamada Nayel},
booktitle = {Proceedings of the 2nd Workshop on NLP for Languages Using Arabic Script},
year = {2026},
doi = {10.18653/v1/2026.abjadnlp-1.46},
url = {https://doi.org/10.18653/v1/2026.abjadnlp-1.46}
}References
- Bushra Al-Smadi, Bassam Hammo, Hossam Faris, and Pedro A. Castillo. 2025. Enhancing the classification of imbalanced arabic medical questions using deepsmote. AI, 6(4). questions using pre-trained models and deep learning. Computers in Biology and Medicine, 170:107921. ↗
- Rana Ehab, Ahmed El-Sawy, Mohammed Aldawsari, and Hamada Nayel. 2026. DEAST: A dataset for english-arabic scientific translation and vice versa. Data in Brief, 64:112381. find
- Hozayfa El Rifai, Leen Al Qadi, and Ashraf Elnagar. 2022. Arabic text classification: the need for multi-labeling systems. Neural Computing and Applications, 34(2):1135–1159. ↗
- Pranav Gupta, Niranjan Kumar M, Balaji Nagarajan, Imed Zitouni, and Mo El-Haj. 2026. Abjadmed: Arabic medical text classification 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.
- Jaafar Hammoud, Aleksandra Vatian, Natalia Dobrenko, Nikolai Vedernikov, Anatoly Shalyto, and Natalia Gusarova. 2021. New arabic medical dataset for diseases classification. In Intelligent Data Engineering and Automated Learning – IDEAL 2021, pages 196–203, Cham. Springer International Publishing.
- Hadi Mohammadi, Ehsan Nazerfard, and Mostafa Haghir Chehreghani. 2025. Anchor-based oversampling for imbalanced tabular data via contrastive and adversarial learning. ↗
- Hamada Nayel, Nourhan Marzouk, and Ahmed Elsawy. 2023. Named entity recognition for arabic medical texts using deep learning models. In 2023 Intelligent Methods, Systems, and Applications (IMSA), pages 281–285. find
- Ali Safaya, Moutasem Abdullatif, and Deniz Yuret. 2020. KUISAIL at SemEval-2020 task 12: BERT-CNN for offensive speech identification in social media. In Proceedings of the Fourteenth Workshop on Semantic Evaluation, pages 2054– 2059, Barcelona (online). International Committee for Computational Linguistics.
- Fatih Soygazi and Damla Oğuz. 2025. Medical text classification using semisupervised learning and bert-based models. Mühendislik Bilimleri ve Araştırmaları Dergisi, 7(1):60–69. ↗
- Yu Wang, Yuan Wang, Zhenwan Peng, Feifan Zhang, Luyao Zhou, and Fei Yang. 2023. Medical text classification based on the discriminative pre-training model and prompt-tuning. DIGITAL HEALTH, 9:20552076231193213. ↗
- Yujia Yuan and Guan Xi. 2025. Msa k-bert: A method for medical text intent classification. Applied Sciences, 15(12). ↗
- Bushra Salem Al-Smadi. 2024. Deberta-bilstm: A multi-label classification model of arabic medical find
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/fetouh-2026-reglat-abjadmed-handling-imbalanced-arabic/