Elamur Research⌕
☰
home / papers / 2025 / Gumball at QIAS 2025: Arabic LLM Automated Reasoning in Islamic Inheritance

Gumball at QIAS 2025: Arabic LLM Automated Reasoning in Islamic Inheritance

Paper · 2025 · Eman Elrefai, Mohamed Lotfy Elrefai and Aml Hassan Esmail

Summary

The paper describes the winning entry of QIAS 2025 SubTask 1, which tests Islamic inheritance (fara'id) reasoning. Each item is a formal Modern Standard Arabic question with six answer options. Solving it requires legal rules, handling of exception cases and share arithmetic. The authors compare four ways of adapting a small, quantized Qwen3-4B model trained with Unsloth and LoRA:

  • a RAG baseline over IslamWeb fatwas;
  • plain SFT on the annotated MCQ set;
  • instruction SFT followed by GRPO with custom rewards;
  • a two-stage pipeline: continued pretraining on domain text, then instruction-style MCQ fine-tuning.

A deterministic Arabic normalization script runs before training and again on model outputs before scoring. The two-stage pipeline reached 97.2% test accuracy and took first place. The other approaches scored well below it. Most remaining errors come from advanced cases with many heirs, distant kin or share correction (tas'hih). The work shows that a modest model on one consumer GPU can master a rule-heavy legal domain when domain adaptation comes before task tuning.

Key points

  • The data has 20,000 training questions and 1,000 each for dev and test, each split evenly between Beginner and Advanced. The answer labels are mildly skewed (C 21.7%, F 13.4%).
  • Test accuracy by approach:
    • RAG: 35.33% in the summary table; the text reports a 44.0% best run with Arabic-all-nli-triplet-Matryoshka embeddings.
    • SFT + GRPO: 57%.
    • SFT on the annotated set: 87%.
    • Two-stage pipeline: 97.2%.
  • GRPO applied directly to the base model gave only 15%. Starting GRPO from an MCQ-tuned checkpoint gave 57%.
  • In a matched pair of runs, cleaning the evaluation data raised test accuracy from 94.3% to 95.1%.
  • The error rate was 5.0% on Advanced questions versus 0.6% on Beginner ones. Training ran on a single RTX 3090 Ti (24GB).

Interesting ideas

  • I1. Adapting the model to the domain's register through plain next-token training on domain prose, before teaching the task format, beat task-only tuning by about ten points.
  • I2. The same deterministic normalizer is applied to training input and to model output before comparison with gold. This removes false mismatches that only reflect surface spelling.
  • I3. The GRPO reward is split into separate checks: structural template, valid option format, exact numeric match and fuzzy partial credit. Each failure type then gets its own signal.
  • I4. Reinforcement learning from a cold base model barely worked, while starting from a supervised checkpoint made it viable.
  • I5. Errors are reported by difficulty tier and traced to specific phenomena (many heirs, distant kinship, share correction), not just as one overall score.

For Mova

How these ideas could serve Mova, our small open language model — its files, stages and tests:

  • I1 (learn): Before training a reader on school tests or fables, first expose the gparse encoder to unlabeled in-genre text so it learns that register.
  • I2 (learn): Evaluation of answers and silver parses should canonicalize spelling, punctuation and number formats on both sides, so scores reflect meaning rather than orthography.
  • I3 (answer): A maths word-problem solver could be scored separately on well-formed derivation, a legal answer type and the correct number, which shows where a wrong answer actually broke.
  • I4 (learn): Self-play or repair-rule induction should start from a parser or reader already trained on silver data, not from scratch.
  • I5 (world): Error reports for holdings and quantities in the text world could be grouped by structural complexity, such as the number of entities or transfers, to find where state tracking fails.

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

 Institutions

 Fields, topics and concepts

Cite

Cite as Eman Elrefai, Mohamed Lotfy Elrefai and Aml Hassan Esmail. 2025. Gumball at QIAS 2025: Arabic LLM Automated Reasoning in Islamic Inheritance. Proceedings of The Third Arabic Natural Language Processing Conference: Shared Tasks.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2025.arabicnlp-sharedtasks.132

@inproceedings{elrefai2025gumball,
  title = {{Gumball at QIAS 2025: Arabic LLM Automated Reasoning in Islamic Inheritance}},
  author = {Eman Elrefai, Mohamed Lotfy Elrefai and Aml Hassan Esmail},
  booktitle = {Proceedings of The Third Arabic Natural Language Processing Conference: Shared Tasks},
  year = {2025},
  doi = {10.18653/v1/2025.arabicnlp-sharedtasks.132},
  url = {https://doi.org/10.18653/v1/2025.arabicnlp-sharedtasks.132}
}

References

8 references, 6 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. arXiv preprint arXiv:2003.00104. ↗
  2. Abdessalam Bouchekif, Samer Rashwani, Mohammed Ghaly, Mutaz Al-Khatib, Emad Mohamed, Wajdi Zaghouani, Heba Sbahi, Shahd Gaben, and Aiman Erbad. 2025a. Qias 2025: Overview of the shared task on islamic inheritance reasoning and knowledge assessment. In Proceedings of The Third Arabic Natural Language Processing Conference, ArabicNLP 2025, Suzhou, China, November 5–9. Association for Computational Linguistics.
  3. Abdessalam Bouchekif, Samer Rashwani, Heba Sbahi, Shahd Gaben, Mutaz Al-Khatib, and Mohammed Ghaly. 2025b. Assessing large language models on islamic legal reasoning: Evidence from inheritance law evaluation. In Proceedings of The Third Arabic Natural Language Processing Conference (Arabic-NLP 2025), Suzhou, China. Association for Computational Linguistics.
  4. Michael Han Daniel Han and Unsloth team. 2023. Unsloth. find
  5. Mahmoud Fawzi, Björn Ross, and Walid Magdy. 2025. Fabricating holiness: Characterizing religious misinformation circulators on arabic social media. Preprint, arXiv:2508.07845. ↗
  6. Liang Wang, Nan Yang, Xiaolong Huang, Linjun Yang, Rangan Majumder, and Furu Wei. 2024. Multilingual e5 text embeddings: A technical report. arXiv preprint arXiv:2402.05672. ↗
  7. An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, and Chenxu et al. Lv. 2025a. Qwen3 technical report. arXiv preprint arXiv:2505.09388. ↗
  8. An Yang, Bowen Yu, Chengyuan Li, Dayiheng Liu, Fei Huang, Haoyan Huang, Jiandong Jiang, Jianhong Tu, Jianwei Zhang, and Jingren et al. Zhou. 2025b. Qwen2. 5-1m technical report. arXiv preprint arXiv:2501.15383. — Qwen2.5-1M Technical Report ↗

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/elrefai-2025-gumball-qias-2025-arabic-llm/