Elamur Research⌕
☰
home / papers / 2026 / ArabicMedicalBERT-QA-82 at AbjadMed: Fighting Class Imbalance in Arabic Medical Text Classification

ArabicMedicalBERT-QA-82 at AbjadMed: Fighting Class Imbalance in Arabic Medical Text Classification

Paper · 2026 · Gleb Shanshin

Summary

This system paper, written for the AbjadMed shared task, addresses classification of Arabic medical question-answer pairs into 82 categories. The label distribution is very skewed, and several categories overlap in meaning. The author compares three Arabic BERT-style backbones under the same fine-tuning recipe. The recipe uses class-weighted cross-entropy, separate learning rates for the head and the backbone, and 10 epochs. The strongest starting point is an AraBERTv2 checkpoint already trained on a related 89-class Arabic medical classification task, with its labels partially remapped to the shared-task categories. Even without further training, this checkpoint beats the general-purpose models. It improves most when the backbone is updated only gently, which suggests that preserving its prior knowledge matters more than heavy adaptation. The submitted 10-fold majority-vote ensemble reaches a macro F1 of about 0.51 on the private test split, well above the official baseline. Cheap LLMs prompted in zero-shot and few-shot modes perform far worse and often invent category names outside the allowed list. The work shows that transferring supervision from a related task is a practical way to handle low-resource, imbalanced medical domains.

Key points

  • Data: 27,951 labelled training pairs and 18,634 test pairs, split evenly between the public and private leaderboards. Class sizes range from about 600 examples down to 7 (In vitro fertilization).
  • Backbones compared: CAMeL-Lab/bert-base-arabic-camelbert-da, aubmindlab/bert-base-arabertv2 and AymanElbery/arabic-medical-classifier-arabertv2. The last one scores 0.4848 private macro F1 with remapping alone, against 0.2896 for the baseline.
  • Best configuration: a backbone learning rate of 1e-6 with a head learning rate of 5e-4.
    • The 10-fold ensemble scores 0.5071 public and 0.5139 private.
    • A single model trained on all the data does slightly better, at 0.5165 public and 0.5153 private.
    • Over 88% of test instances receive the same prediction from at least 9 of the 10 folds.
  • LLM comparison: gpt-4.1-nano and deepseek-v3.2 were tested with constrained re-prompting of up to 100 attempts, falling back to "General Medicine" if no valid label appeared. The best result was deepseek-v3.2 few-shot at 0.3157 private.
  • Released model: the final model is available on HuggingFace as gleb-shnshn/arabic-medical-bert-qa-82.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Fields, topics and concepts

Cite

Cite as Gleb Shanshin. 2026. ArabicMedicalBERT-QA-82 at AbjadMed: Fighting Class Imbalance in Arabic Medical Text Classification. Proceedings of the 2nd Workshop on NLP for Languages Using Arabic Script.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2026.abjadnlp-1.15

@inproceedings{shanshin2026arabicmedicalbert,
  title = {{ArabicMedicalBERT-QA-82 at AbjadMed: Fighting Class Imbalance in Arabic Medical Text Classification}},
  author = {Gleb Shanshin},
  booktitle = {Proceedings of the 2nd Workshop on NLP for Languages Using Arabic Script},
  year = {2026},
  doi = {10.18653/v1/2026.abjadnlp-1.15},
  url = {https://doi.org/10.18653/v1/2026.abjadnlp-1.15}
}

References

6 references, 3 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Wissam Antoun, Fady Baly, and Hazem Hajj. 2020. AraBERT: Transformer-based Model for Arabic Language Understanding. In LREC 2020 Workshop Language Resources and Evaluation Conference 11– 16 May 2020, page 9. ↗
  2. DeepSeek-AI and many contributors. 2025. find
  3. DeepSeek-Go Inoue, Bashar Alhafni, Nurpeiis Baimukan, Houda Bouamor, and Nizar Habash. 2021. The interplay of variant, size, and task type in Arabic pre-trained language models. In Proceedings of the Sixth Arabic Natural Language Processing Workshop, pages 92–104, Kyiv, Ukraine (Virtual). Association for Computational Linguistics.
  4. Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollár. 2017. Focal Loss for Dense Object Detection. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 2980–2988. ↗
  5. OpenAI. 2025. Introducing the GPT-4.1 Model Series Including GPT-4.1-nano. https://openai.com/ index/gpt-4-1/. ↗
  6. Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, and Zbigniew Wojna. 2016. Rethinking the Inception Architecture for Computer Vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2818–2826. ↗

Updated

This page in Markdown → https://md.research.elamur.ai/free/en/papers/shanshin-2026-arabicmedicalbert-qa-82-abjadmed-fighting/