Feeding a Bad OCR Guess to an AI Corrector: When It Helps and When It Wrecks the Page
Based on: When Do VLMs Help Arabic Manuscript OCR? A Cross-Dataset Study — Moshiur Farazi, Firoj Alam, Abderrahmane Maaradji, Zakaria Maamar, Hamdy Mubarak, Wajdi Zaghouani
Picture a digitization project at a North African library. Someone scans a few thousand pages of centuries-old manuscripts and runs them through the usual pipeline: OCR, then an AI model to clean up the mistakes. On some pages, the AI catches exactly what the OCR fumbled and hands back clean, readable text. On others, the AI takes the OCR's garbled guess, treats it as a hint about what the page says, and confidently produces a worse transcription than if it had never seen the OCR output at all.
That second outcome is the twist buried in a new paper out of Qatar, When Do VLMs Help Arabic Manuscript OCR? A Cross-Dataset Study. The researchers tested traditional OCR, general-purpose AI vision models, Arabic-specialized versions of those models, and a hybrid approach where the AI "corrects" an OCR draft, across eight different kinds of Arabic documents. Nothing wins across the board. But the paper does something more useful than crowning a winner: it explains why the correction approach helps on some documents and actively hurts on others, and it gives a name to the pattern.

Illuminated Manuscript Koran, The right side of a double-page illumination, Walters Art Museum MS. W.575, fol. 2b — by Walters Art Museum Illuminated Manuscripts via flickr, CC0 1.0.
Why Arabic manuscripts are a genuinely hard OCR problem
Arabic OCR carries a longer list of headaches than Latin-script OCR, and manuscripts pile more on top.
Arabic is written in a cursive, connected script, so letters change shape depending on where they sit in a word. There isn't one "Arabic script" either. Modern printed Arabic mostly uses Naskh, a clean, rounded style. But historical manuscripts were often copied in regional styles with very different letterforms, and this paper leans hard on the contrast between Naskh and Maghribi, a script family used across North Africa and Islamic Spain with distinct letter shapes, spacing, and dotting conventions. A recognition system trained mostly on Naskh can genuinely struggle to read Maghribi, the way someone fluent in one alphabet variant can still be thrown by an unfamiliar regional handwriting style.
Then there are diacritics: small marks above and below the letters that indicate short vowels and other pronunciation details. They're often omitted in casual writing, but when they appear in a manuscript, getting them right or wrong changes the meaning of a word, and the paper found that AI models are notably sensitive to whether these marks are present or garbled.
Add the ordinary problems of old paper: faded ink, water damage, inconsistent line spacing, and handwriting that ranges from a trained scribe's careful hand to a student's rushed notes. The eight datasets in this study span exactly that range, from historical manuscripts and aged printed books to clean modern print, mixed-domain documents, and handwriting samples.
The four approaches they actually tested
The paper isn't proposing one new method. It's a comparison of four existing strategies, run against the same set of documents so the results are actually comparable.
Traditional OCR here means Tesseract, the open-source OCR engine that recognizes characters using pattern matching trained on font and script shapes. It doesn't understand the text it's reading; it matches shapes to characters.
General-purpose vision-language models (VLMs) are AI models that take an image and a text prompt together and produce text output, the same family of technology behind tools like GPT-4 with vision or Gemini. You show it the manuscript page and ask it to transcribe what it sees. Unlike Tesseract, a VLM has some understanding of language, so it can use context to guess a smudged word from the words around it.
Arabic-specialized VLMs are versions of that same technology fine-tuned specifically on Arabic text and script, the idea being that general models trained mostly on English and Latin-script documents may not have seen enough Arabic manuscript material to do well.
OCR-conditioned correction is the hybrid: run Tesseract first, then hand its output to a VLM alongside the original image and ask it to fix the OCR's mistakes. The theory is that the VLM gets a head start, a rough draft to edit rather than a blank page to transcribe from scratch.
What actually won, and where
The headline result is refreshingly honest: no single approach dominates. But the pattern shifts in a specific way depending on what kind of document you're looking at.
On line-level historical manuscripts, meaning the images show just one line of text at a time rather than a full page, VLMs perform about on par with Tesseract. Neither pulls ahead by much. But move to page-level manuscript images, where the model has to handle a whole page of layout and context at once, and VLMs pull ahead of traditional OCR. That gap makes sense: a VLM can use surrounding words and overall page structure to disambiguate a hard character, while Tesseract is working shape by shape without that context.
The OCR-conditioned corrector is where things get interesting. In several settings, it beats both standalone OCR and standalone VLMs. Handing the VLM a rough draft to edit, rather than asking it to transcribe cold, produces the best results of the three approaches, but only in some settings. In others, the same trick makes results worse than either component alone. That inconsistency is the real subject of the paper.
The core idea: the OCR prior has to be recoverable
The researchers call this the OCR-prior recoverability principle, and it's the most useful idea in the paper for anyone building a real pipeline.
Think of the OCR's rough draft as a sketch you hand to an artist before they paint from a reference photo. If the sketch roughly captures the right shapes, even if some details are wrong, it gives the artist useful anchors to work from. But if the sketch is confidently wrong, showing a house where the photo shows a boat, it doesn't help the artist. It actively misleads them, because now they're trying to reconcile a wrong starting point with what they actually see.
That's what's happening with OCR-conditioned correction. When the OCR's mistakes are visually and textually recoverable, meaning the wrong characters it guessed still resemble the right ones, or the wrong words are still in the right ballpark, the VLM can use that draft as scaffolding and correct it against the actual image. The paper found this held for aged printed books, clean print, mixed-domain Arabic documents, and some Naskh manuscripts. All of these are cases where the OCR, even when wrong, is wrong in a way related to what's actually on the page.
The principle breaks in the opposite case: when the OCR draft is wrong in a way that has nothing to do with the real text, correction gets worse, not better. Two examples make this concrete. On Maghribi manuscripts, the OCR system, tuned mostly for Naskh-style script, produces a script-mismatched garble that doesn't meaningfully resemble what's on the page, so the VLM ends up anchored to noise. And on realistic student handwriting samples, the OCR draft turns out to be systematically misleading rather than just imprecise, close enough in appearance to seem trustworthy but wrong in ways the VLM can't detect and correct against. In both cases, the model would likely have done better ignoring the OCR entirely and just reading the image.
Smaller failure modes worth knowing about
Beyond the main finding, the paper flags a handful of practical gremlins in how Arabic VLM-OCR behaves, the kind of thing that looks like a mysterious accuracy drop until you know to check for it.
Diacritic sensitivity is one: since those small vowel marks carry real meaning, how the image handles them, present, faded, or stripped out during preprocessing, measurably shifts output quality. Preprocessing choices in general (contrast adjustment, cropping, binarization) also move results more than you might expect for a task that's supposedly just "read the text."
Two other issues are specific to how VLMs generate text at all. Generation budget refers to the maximum number of tokens the model is allowed to output before it's cut off; set it too low and the model truncates a manuscript page mid-sentence. And repetition loops are a known failure mode in language models where the model gets stuck generating the same word, character, or phrase over and over instead of moving on, something that shows up in Arabic VLM-OCR specifically and quietly wrecks a transcription if nobody's checking output length.
Why it matters if you're building or choosing an OCR pipeline
The practical lesson here goes beyond Arabic manuscripts. Bolting a VLM correction step onto your OCR output is not a free upgrade. It's a bet that your OCR's mistakes are the recoverable kind, wrong but in the right neighborhood, rather than the systematically misleading kind. Whether that bet pays off depends on the script, the document condition, and how your particular OCR engine tends to fail on that material.
The researchers' proposed fix is an adaptive workflow: route each page to a different strategy based on signals like which script it's written in, whether the OCR output looks recoverable, how the VLM's output length compares to what's expected, and known failure-mode indicators like repetition loops. In plain terms: don't pick one method and run it on everything. Check what kind of document you're looking at and what your OCR tends to do with it, and route accordingly.
That's the same reasoning behind benchmarking OCR engines across document types rather than picking a single "best" one and calling it done. A model that's excellent on clean printed forms can be the wrong choice for handwritten notes or degraded scans, and the failure isn't always visible unless you're checking output against ground truth on the specific kind of document you actually need to process.
What this study doesn't settle
A few honest caveats. This is Arabic-specific work, and while the recoverability principle is intuitive enough that it probably generalizes to other scripts, the paper doesn't test that. Eight datasets is a solid spread, but Arabic manuscript traditions span more script families and centuries than any eight collections can fully represent, so treat the specific Maghribi-versus-Naskh finding as a strong data point rather than a universal law.
There's also a gap between "here are the diagnostic signals that predict when correction fails" and "here's a system that reliably detects that in real time before it wastes a correction pass." The paper identifies the relevant signals, script mismatch, prior recoverability, output length, repetition patterns, but building an adaptive router that catches these automatically and cheaply, at production scale, is a follow-on engineering problem the paper points to rather than solves.
The larger takeaway holds regardless: an AI correction step inherits the failure modes of whatever you feed it. Before you wire OCR output into a VLM as a "helpful hint," it's worth checking whether your OCR is wrong in a way that's actually worth listening to.