Manuscript Offprint

arXiv:2608.22366

When Do VLMs Help Arabic Manuscript OCR? A Cross-Dataset Study

Moshiur Farazi, Firoj Alam, Abderrahmane Maaradji, Zakaria Maamar, Hamdy Mubarak, Wajdi Zaghouani

ABSTRACT

Vision-language models (VLMs) are increasingly being used for document understanding, yet their role in Arabic and Islamic manuscript recognition remains underexplored. To address such a gap in this paper, we evaluate traditional OCR, general-purpose VLMs, Arabic-specialized VLMs, and OCR-conditioned VLM correction across eight Arabic text datasets spanning historical manuscripts, aged printed books, clean print, multi-domain documents, and handwriting. The results show that no single approach dominates across setups. On line-level historical manuscripts, VLMs are close to Tesseract; on page-level manuscript images, they perform better; and in several settings, an OCR-conditioned corrector improves over both standalone OCR and standalone VLMs. The central finding is an OCR-prior recoverability principle: OCR conditioning helps when the OCR output remains visually and textually recoverable, providing anchors that the VLM can refine against the image. It improves recognition on aged print, clean print, mixed-domain Arabic, and some Naskh manuscripts, but degrades performance when the prior is script-mismatched or systematically misleading, as in Maghribi manuscripts and realistic student handwriting. Additional diagnostics show that Arabic VLM-OCR is sensitive to diacritics, preprocessing, generation budget, and repetition loops. These findings support an adaptive OCR-VLM workflow that routes pages according to script, OCR-prior recoverability, length diagnostics, and failure-mode indicators.

Keywords Islamic manuscripts, Arabic handwriting recognition, vision-language models, document understanding, metadata extraction, digital humanities, OCR correction

1 Introduction

Vision-Language Models (VLMs) are changing how document understanding systems are designed. Text recognition is moving from OCR-dependent pipelines toward OCR-free and end-to-end models that can read visually rich pages and reason over their content (Kim et al., 2022; Wei et al., 2024; Bai et al., 2025a). Recent work on historical documents shows that multimodal LLMs can transcribe archival records competitively, and in some Latin-script settings they can outperform conventional OCR and Handwritten Text Recognition (HTR) systems (Greif et al., 2025; Semnani et al., 2025). The main question is therefore no longer only whether VLMs can read historical documents. It is also when they should be used, whether they should replace or complement OCR, and how their outputs should be evaluated (Greif et al., 2025; Kanerva et al., 2025). For Islamic manuscripts, these deployment questions remain largely unanswered. Existing Arabic OCR and VLM work focuses mainly on modern Arabic OCR, handwriting, and document understanding, while historical Arabic work has focused mainly on datasets and supervised HTR rather than zero-shot VLM-based manuscript recognition (Bhatia et al., 2024; Heakl et al., 2025; Saeed et al., 2024; Chan et al., 2024).

∗^{*}This is a preprint of a manuscript currently under peer review. It has not yet been peer-reviewed and may differ substantially from later versions.

This gap matters for cultural heritage. Islamic manuscripts preserve one of the world's richest textual traditions. They span Qur'anic sciences, hadith, jurisprudence, theology, medicine, astronomy, philosophy, literature, and the transmission of scholarly knowledge across centuries (Gruber, 2010; Gacek, 2009). Major libraries and digital initiatives have invested heavily in preservation and access. Large collections are held by the British Library, the Qatar Digital Library, the Bibliothèque nationale de France, the Bodleian Library, and institutions across the Middle East and North Africa. The Qatar Digital Library alone contains more than two million digitised pages (Qatar National Library, 2026). These efforts have made high-resolution manuscript images increasingly available. Yet digitised images alone do not make these collections computationally searchable, linkable, or analysable.

The main bottleneck is the lack of reliable machine-readable structure extracted from the images. Researchers, curators, and collection users still rely heavily on catalogue descriptions and keyword search. Manuscript pages contain much richer evidence, including transcribed text, layout, marginalia, colophons, script styles, dates, places, names, and subject cues (Gacek, 2009; Quiring-Zoche, 2013). Recovering this evidence requires systems that can move from pixels to text and from text to structured knowledge (Abdallah et al., 2024; Borchmann et al., 2021).

Figure

(a) Ink fading

Text-line degradations

(b) Bleedthrough

Figure

(c) Faded diacritics

Page-level degradation

Figure

(d) Water damage / staining

(e) Foxing/ Yellowing

Figure

(f) Tears, binding loss

Figure 1: Representative data-level degradation modes in Arabic manuscript scans, drawn from samples in our evaluation corpora. Each mode corresponds to a failure pattern that traditional OCR and VLM systems handle differently.

This transfer from image to machine-readable text is not guaranteed for Islamic manuscripts. Arabic is cursive and context-sensitive. Letter shapes depend on position, and small dots or diacritics can change character identity, pronunciation, or meaning (Faizullah et al., 2023; Bhatia et al., 2024). Manuscript images add further difficulty (Figure 1). They often contain marginal glosses, commentary around a base text, rubrication, colophons, paratextual notes, degraded paper, faded ink, and script traditions such as Naskh and Maghribi (Gacek, 2009; Quiring-Zoche, 2013). These visual and linguistic properties make it unclear whether VLM gains reported for Latin-script historical OCR will transfer to Arabic-script manuscript collections (Greif et al., 2025; Semnani et al., 2025).

The missing piece is not Arabic OCR itself. Recent Arabic-specific systems such as Qalam, QARI-OCR, and Baseer show rapid progress on Arabic OCR, handwriting recognition, and document-to-Markdown conversion (Bhatia et al., 2024; Wasfy et al., 2025; Hennara et al., 2025). KITAB-Bench and SARD provide modern multi-domain and synthetic printed Arabic benchmarks (Heakl et al., 2025; Nacar et al., 2025). Historical Arabic work has mainly produced datasets and supervised HTR systems, including Muharaf and HATFormer (Saeed et al., 2024; Chan et al., 2024). What remains unclear is whether current VLMs can serve as standalone recognisers or OCR-conditioned correctors for Islamic manuscript digitisation. It is also unclear which document settings favour each strategy.

This paper addresses that gap through a cross-domain zero-shot evaluation of traditional OCR, general-purpose VLMs, Arabic-specialised VLMs, and OCR-conditioned VLM correction. We evaluate eight Arabic text datasets with more than 7,700 samples. The datasets cover historical manuscripts, aged printed books, modern handwriting, multi-domain Arabic documents, and synthetic clean print. We treat these datasets as distinct document settings rather than as one pooled benchmark, since each setting tests a different deployment condition.

Research questions. We ask five questions.

• RQ1. How do zero-shot VLMs compare with traditional OCR and supervised HTR baselines on Arabic manuscript recognition.

• RQ2. When does OCR-conditioned VLM correction improve recognition, and when does the OCR prior mislead the model.

• RQ3. Do common image preprocessing operations improve VLM recognition on historical Arabic manuscript lines.

• RQ4. Which failure modes shape Arabic VLM-OCR, especially for diacritics, hallucination, truncation, and repetition.

• RQ5. What does a zero-shot metadata extraction pilot reveal about prompt sensitivity and compliance-bias hallucination.

Contributions. The paper makes five contributions.

• We provide a cross-domain zero-shot benchmark of traditional OCR, general-purpose VLMs, Arabic-specialised VLMs, and OCR-conditioned VLM correction across eight Arabic text datasets.

• We introduce a hybrid OCR-corrector pipeline in which a VLM receives both the source image and noisy Tesseract output, and we show through ablations that both signals are necessary for its gains.

• We identify an OCR-prior recoverability principle. OCR conditioning helps when the OCR output remains visually and textually recoverable, but it can hurt when the prior is script-mismatched or systematically misleading.

• We analyse deployment-critical failure modes, including diacritics sensitivity, preprocessing effects, generation-budget truncation, repetition-loop failures, and metadata compliance bias.

• We provide an exploratory metadata extraction study showing that null-enforcing prompt calibration can reduce schema-filling behaviour on manuscript pages.

Main findings. The experiments answer the research questions directly. For RQ1, zero-shot VLMs are not yet replacements for supervised HTR, but they are competitive with traditional OCR in several manuscript settings. On line-level Muharaf manuscripts, Qwen2.5-VL-7B is close to Tesseract after diacritics normalisation. On page-level Madinah images, VLMs perform better than Tesseract, suggesting that page context can help VLM recognition. For RQ2, OCR-conditioned correction helps only when the OCR prior remains recoverable. On Muharaf, Tesseract→Qwen reduces CER from 69.2% to 60.6%. The corrector also improves SARD, KITAB-Bench, and QNL Books. In contrast, it hurts or gives little benefit on RASAM 2, KHATT, and Students Essays, where the OCR prior is less reliable or script-mismatched.

For RQ3, common OCR preprocessing does not uniformly help VLM recognition. On Muharaf, sharpening is the only tested operation that improves Qwen, reducing CER from 70.4% to 67.2%. Binarisation, denoising, contrast enhancement, and combined pipelines degrade performance, suggesting that aggressive preprocessing can damage small Arabic-script cues. For RQ4, Arabic VLM-OCR is shaped by failure modes that CER alone does not fully explain. Diacritics add a large CER penalty for the main VLMs, while Tesseract often avoids this penalty by omitting tashkeel. Page-level generation is also sensitive to decoding settings. A small generation budget causes truncation on SARD, while greedy decoding causes repetition loops on about 28% of Students Essays pages. For RQ5, the metadata pilot shows that zero-shot structured extraction is highly prompt-sensitive. A permissive prompt makes the VLM fill metadata fields with body text, while a null-enforcing prompt reduces this compliance-bias behaviour. We therefore treat this experiment as a failure-mode study rather than as a full metadata benchmark.

Overall, the findings support an adaptive OCR-VLM workflow. A target collection should first be tested on a small annotated probe sample. The probe should compare traditional OCR, standalone VLMs, and OCR-conditioned correction, and it should inspect CER, length ratio, repetition, script type, and qualitative OCR-prior recoverability. When the OCR prior remains readable and recoverable, the corrector is useful. When the prior is distorted, script-mismatched, or dominated by systematic errors, a standalone VLM is safer.

The remainder of this paper is organised as follows. Section 2 reviews existing approaches to text recognition, layout analysis, and metadata extraction for Arabic manuscripts, and presents a taxonomy of challenges. Section 3 describes the datasets. Section 4 describes the experimental design. Section 5 reports the results. Section 6 discusses deployment implications, limitations, and future directions. Section 7 concludes the paper.

References (34)