QU-NLP at QIAS 2026: Multi-Stage QLoRA Fine-Tuning for Arabic Islamic Inheritance Reasoning
Paper · 2026 · Mohammad ALSmadi
Summary
The paper describes QU-NLP's entry to the QIAS 2026 shared task. The task asks a model to solve Arabic Islamic inheritance (ilm al-mawarith) cases and return a full JSON reasoning trace, not just pick a multiple-choice answer. A solution has to name the eligible heirs, decide which heirs are blocked, assign fixed shares, detect whether an ʿawl or radd adjustment applies, and give the final distribution. The author fine-tunes Qwen3-4B with QLoRA in two stages. The first stage is causal language modelling on Islamweb fatwa texts, to absorb legal vocabulary. The second stage is supervised training on the 12,000 MAWARITH training cases, with JSON-only output. Light rule-based post-processing follows. On the 500-case test set, the multi-component MIR-E metric reaches 90.0%. This essentially ties Gemini-2.5-flash (90.1%) and far exceeds much larger open-weight baselines. A detailed error analysis finds that most remaining mistakes come from generating the final arithmetic or choosing between notations, not from misunderstanding the law. This matters because it suggests a small, cheaply adapted model can handle rule-heavy legal reasoning. It also points to fixes, such as constrained decoding, that need no retraining.
Key points
- Training setup:
- Model and adapters: Qwen3-4B, 4-bit NF4 QLoRA, rank 128, α = 256, adapters on all projection layers.
- Stage 1: 3,166 fatwa records, lr 2e-4, 2 epochs.
- Stage 2: 12,000 cases, lr 3e-5, 6 epochs, output keys heirs / blocked / shares / awl_or_radd / post_tasil.
- MAWARITH data: 12,500 cases covering 36 heir categories. 92.3% are simple, 4.9% ʿawl and 2.8% radd.
- MIR-E weighting: heirs, shares and final allocation each count 0.30, and adjustment counts 0.10. The adjustment score is credited only when heirs and shares are both fully correct.
- Main scores:
- Component scores: S_h 97.1%, S_s 94.3%, S_a 84.6%.
- Best open baseline: Qwen3-32B at 43.7%.
- Fully correct cases: only 65.5%. The largest drop in the pipeline (−13.9pp) occurs at the final-allocation step.
- Error profile:
- Calculation errors: 29 cases (−1.7pp).
- Residue label: the model uses it in only 24.7% of the 417 cases that require it. It usually writes an explicit fraction instead, and 83.1% of those fractions are numerically correct (cost −0.85pp).
- Post-processing adds only +0.2pp.
Interesting ideas
- I1. Conservative repair: The post-processor replaces only labels it cannot recognise and never overwrites a valid label using sums computed from possibly wrong fractions, since doing so risks corrupting an output that was already correct.
- I2. Cumulative stage success: The authors count the share of cases that are perfect at every stage up to step k, which shows exactly where errors first enter a sequential pipeline.
- I3. Separating notation from computation: For each mismatch, they check whether the model's substituted value equals what a symbolic calculator would derive, which distinguishes representational failures from computational ones.
- I4. Difficulty versus rarity: ʿawl cases score lower than the rarer radd cases, so the authors attribute the gap to multi-step arithmetic rather than data scarcity. Slicing results by both frequency and operational complexity avoids blaming the wrong cause.
- I5. Domain-text adaptation first: Before teaching the structured output format, the model is first adapted on raw domain text so it learns the vocabulary separately from the format.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (learn): Self-induced repair rules could be restricted to firing on malformed or unknown outputs, never on well-formed ones whose evidence is itself unverified.
- I2 (answer): Reporting the fraction of test items correct through tree, then frames, then world, then answer would reveal which stage loses the most items end to end.
- I3 (world): When a derived quantity or holding disagrees with gold, comparing it against a recomputed symbolic value would tell whether the reasoning or only the surface form went wrong.
- I4 (answer): Maths word-problem evaluation could be split by the number and type of operations, not only by problem frequency, before deciding to add more training data.
- I5 (tree): gparse could be briefly pre-adapted on unlabeled in-domain text, such as fables or school texts, before treebank fine-tuning, to help with domain vocabulary.
Institutions
Fields, topics and concepts
📚 Shelves 6The field of science this work belongs to (OpenAlex fields).Computer Science · 18,614 worksArtificial Intelligence · 17,965 worksArts and Humanities · 17,450 worksLanguage and Linguistics · 17,296 worksSocial Sciences · 1,954 worksPolitical Science and International Relations · 206 works
🧭 Topics 2Research subjects and languages the work is about.Reasoning · 1,685 worksSemitic languages · 3,066 works
Cite
Cite as Mohammad ALSmadi. 2026. QU-NLP at QIAS 2026: Multi-Stage QLoRA Fine-Tuning for Arabic Islamic Inheritance Reasoning. The 7th Workshop on Open-Source Arabic Corpora and Processing Tools (OSACT7) with 5 Shared Tasks.
@inproceedings{alsmadi2026qu,
title = {{QU-NLP at QIAS 2026: Multi-Stage QLoRA Fine-Tuning for Arabic Islamic Inheritance Reasoning}},
author = {Mohammad ALSmadi},
booktitle = {The 7th Workshop on Open-Source Arabic Corpora and Processing Tools (OSACT7) with 5 Shared Tasks},
year = {2026},
doi = {10.63317/2xw2ocj47xav},
url = {https://doi.org/10.63317/2xw2ocj47xav}
}References
- Mohammad AL-Smadi. 2025. QU-NLP at QIAS 2025 shared task: A two-phase LLM fine-tuning and retrieval-augmented generation approach for islamic inheritance reasoning. In Proceedings of The Third Arabic Natural Language Processing Conference: Shared Tasks, pages 892–898, Suzhou, China. Association for Computational Linguistics.
- Ameera Almasoud, Sharefah Al-Ghamdi, Reem Alqifari, Noof Alfear, and Hend Al-Khalifa. 2026. Mirathqa: A dataset for evaluating large language models on hanbali islamic inheritance reasoning tasks. Data in Brief, 65:112589. find
- Gagan Bhatia, Hamdy Mubarak, Mustafa Jarrar, George Mikros, Fadi Zaraket, Mahmoud Alhirthani, Mutaz Al-Khatib, Logan Cochrane, Kareem Darwish, Rashid Yahiaoui, and Firoj Alam. 2026. From RAG to agentic RAG for faithful islamic question answering. ↗
- Abdessalam Bouchekif, Shahd Gaben, Samer Rashwani, Somaya Eltanbouly, Mutaz Al-Khatib, Heba Sbahi, Mohammed Ghaly, and Emad Mohamed. 2026. MAWARITH: A dataset and benchmark for legal inheritance reasoning with llms. ↗
- Abdessalam Bouchekif, Samer Rashwani, Emad Soliman Ali Mohamed, Mutaz Alkhatib, Heba Sbahi, Shahd Gaben, Wajdi Zaghouani, Aiman Erbad, and Mohammed Ghaly. 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: Shared Tasks, pages 851–860, Suzhou, China. Association for Computational Linguistics.
- 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, pages 246–257, Suzhou, China. Association for Computational Linguistics.
- Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, and Luke Zettlemoyer. 2023. QLORA: efficient finetuning of quantized llms. In Proceedings of the 37th International Conference on Neural Information Processing Systems, NIPS ’23, Red Hook, NY, USA. Curran Associates Inc.
- Eman Elrefai, Mohamed Lotfy Elrefai, and Aml Hassan Esmail. 2025. Gumball at QIAS 2025: Arabic LLM automated reasoning in islamic inheritance. In Proceedings of The Third Arabic Natural Language Processing Conference: Shared Tasks, pages 953–959, Suzhou, China. Association for Computational Linguistics.
- Rana Malhas, Watheq Mansour, and Tamer Elsayed. 2022. find
- Qur’an QA 2022: Overview of the first shared task on question answering over the holy qur’an. In Proceedinsg of the 5th Workshop on Open-Source Arabic Corpora and Processing Tools with Shared Tasks on Qur’an QA and Fine-Grained Hate Speech Detection, pages 79– 87, Marseille, France. European Language Resources Association.
- Hamdy Mubarak, Rana Malhas, Watheq Mansour, Abubakr Mohamed, Mahmoud Fawzi, Majd Hawasly, Tamer Elsayed, Kareem Mohamed Darwish, and Walid Magdy. 2025. Islamiceval 2025: The first shared task of capturing llms hallucination in islamic content. In Proceedings of The Third Arabic Natural Language Processing Conference: Shared Tasks, pages 480–493, Suzhou, China. Association for Computational Linguistics.
- OpenAI, Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, Red Avila, Igor Babuschkin, Suchir Balaji, Valerie Balcom, Paul Baltescu, Haiming Bao, Mohammad Bavarian, et al. 2024. Gpt-4 technical report. ↗
- Qwen Team. 2025. Qwen3 technical report. arXiv preprint arXiv:2505.09388. ↗
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/alsmadi-2026-qu-nlp-qias-2026-multi/