Skip to content
← Blog

When Vision-Language Models Autocorrect: Benchmarking Arabic Children's Handwriting with ArEssays

Based on: ArEssays: Towards Robust Arabic Handwritten Text Understanding in Educational Settings — Hamdy Mubarak, Anas Madkoor, Ehsaneddin Asgari, Majd Hawasly

Suppose a fourth-grade student in Giza sits down to write an essay about playing soccer. He leaves off a hamza, crowds two words together, and lets a line of handwriting drift. A teacher takes a smartphone photo of the page and sends it to an OCR model.

Now imagine the model returns a neat transcript with the hamza restored, the words separated, and punctuation added. Each change makes the essay easier to read. Each also changes the record of what the child put on paper.

On paper, the model can look better for it. Score the transcript against an edited version of the essay and those changes may lower its Character Error Rate (CER). Score it against a verbatim transcript and the same edits count as errors. For a teacher trying to see where a student struggles with Arabic spelling, that difference matters.

This tension between literal transcription and language smoothing is at the heart of ArEssays: Towards Robust Arabic Handwritten Text Understanding in Educational Settings, a preprint posted November 24, 2026, by Hamdy Mubarak, Anas Madkoor, Ehsaneddin Asgari, and Majd Hawasly of Qatar Computing Research Institute at Hamad Bin Khalifa University. The team collected authentic school essays across Egypt and benchmarked 34 vision-language and OCR models using both verbatim and linguistically corrected references. Read the arXiv preprint

handwritten arabic student notebook

Why Arabic children's handwriting is hard for standard OCR

Arabic script is cursive, and letter shapes depend on where they appear in a word. Tiny dots known as iʿjām distinguish letters whose basic shapes can look alike. The number and placement of the dots distinguish baa (ب), taa (ت), and thaa (ث), for example. Arabic also makes extensive use of clitics, such as conjunctions and pronouns that attach to a word. The paper reports clitic attachment rates above 0.55 in many essays and above 0.80 in some secondary-school samples.

Children's writing adds another layer of variation:

  • Unstable baselines. Handwritten lines can drift, and strokes from adjacent lines can overlap.
  • Erratic spacing. Words can run together, while letters within a word may be separated by unusual gaps.
  • Irregular letter shapes. Stroke angles, letter sizes, and character junctions vary, making some letters harder to distinguish.
  • Persistent spelling errors. The essays include omitted hamzas and confusion between taa marbouta (ة) and haa (ه), or between final yaa (ي) and alif maqsoura (ى).

KHATT, an established Arabic handwriting benchmark, focuses on adult writing at the paragraph level. The earlier work on children's Arabic handwriting cited by the authors largely focuses on isolated characters under controlled conditions. To the authors' knowledge, ArEssays is the first public benchmark to pair verbatim and corrected transcripts of multi-paragraph handwritten Arabic essays from schoolchildren across grade bands.

Inside the ArEssays corpus: 800 authentic classroom papers

Two Egyptian schoolteachers coordinated the collection and recruited eight more teachers. The 800 essays in the release come from five governorates: Damietta (43%), Giza (22%), Qena (13%), Cairo (12%), and Qalyubia (10%).

Students in Grades 4 through 12 wrote by hand on one of 15 broad, age-appropriate topics. The paper shows examples on hobbies, technology, and homeland. Most students contributed one essay, typically about a handwritten page. They wrote in the presence of teachers without digital devices, spell checkers, or AI writing tools.

Teachers photographed the essays with mobile phones under everyday classroom and home conditions. The team used CamScanner to correct perspective, adjust rotation, and crop out surrounding objects while preserving the handwriting. The resulting images still varied in quality, legibility, and visual noise.

The team collected 1,200 essays and selected 800 for the release. The other 400 were excluded after manual review for issues such as low resolution, poor lighting, excessive visual artifacts, or highly illegible handwriting. The authors plan to include many of those harder samples in future releases. The 800 essays break down across three educational stages:

  • Primary (Grades 4 to 6). These account for 22% of essays and average 69 words. The paper reports 40 to 70 unique lemmas and describes the vocabulary as more repetitive.
  • Preparatory (Grades 7 to 9). These account for 47% of essays and average 124 words. The paper reports 80 to 120 lemmas, with more descriptive language and greater use of connectives.
  • Secondary (Grades 10 to 12). These account for 31% of essays and average 149 words. Some Grade 11 and 12 essays have dependency trees more than 12 levels deep. Some secondary essays contain sentences longer than 300 tokens, which the authors associate with narrative chaining and inconsistent punctuation.

The corpus analysis reports a writing error rate of 44% for Grade 4 and 29% for Grade 12. Those figures come from the analysis of student writing. The OCR benchmark reports model errors separately.

Four expert Arabic linguists processed the essays, and the annotation work took about seven months. The researchers obtained parental consent and used anonymized identifiers for students and teachers. Students received approximately $10 per essay, and teachers and linguists received $8 per hour. The authors say they set those rates above typical local rates for comparable work.

The dual ground-truth protocol and the delta-CER trap

The most consequential contribution of ArEssays is methodological. Each essay has two reference texts:

  1. Verbatim line-by-line transcription. Linguists transcribed the student's writing and preserved the line boundaries visible in the image.
  2. Linguistically corrected text. Linguists corrected spelling, orthography, and punctuation while preserving the student's intended meaning and writing style as much as possible.

The corpus also includes a sentence-segmented version for tasks that work with complete sentences. For recognition, the two references let the authors compare the mean Character Error Rate against the verbatim and corrected texts:

$$\Delta\text{CER} = \text{Exact CER} - \text{Corrected CER}$$

Under this formula, a positive gap means the output is closer to the corrected reference. A negative gap means it is closer to the verbatim reference. A gap near zero means the two error rates are similar.

The paper reports a gap of approximately −0.07 for Qwen3.6-35B-A3B and interprets it as evidence of language smoothing. The sign and interpretation conflict. Under the printed formula, −0.07 would put Exact CER about seven percentage points below Corrected CER. The word-level results in Table 2 give a clearer comparison for that model. Its Exact WER was 54.6%, and its Corrected WER was 52.3%, so its output scored 2.3 percentage points better against the corrected text at the word level.

That word-level gap is consistent with some language smoothing. Identifying which spelling or punctuation choices the model changed would require comparing individual outputs with both references. For educational software, the distinction is practical. Corrected text can help a system analyze what an essay says, while a faithful transcription preserves the spelling choices a teacher may want to examine.

Benchmarking 34 models: From dedicated OCR to 35B parameter giants

The authors evaluated 34 systems on a 200-essay test split. The other 600 essays were divided into 500 for training and 100 for development. Off-the-shelf systems were evaluated zero-shot, alongside six fine-tuned checkpoints. The common evaluation setup used greedy decoding with a beam size of 1 and a transcription prompt asking the model to preserve spelling and grammar. The paper also lists model-specific settings, including different prompts for PaddleOCR-VL, dots.ocr, and GLM-OCR.

Selected results from the paper's macro Word Error Rate (WER) leaderboard show how the systems performed against the two references:

Model Category Model Identifier Exact WER Corrected WER
Domain-Adapted Qwen3.5-4B (FT Stage 1 - v1) 46.9% 41.9%
Gemma4-26B-A4B (FT Stage 1 - v1) 49.2% 64.3%
Baseer-Nakba (FT Stage 1 - v1) 51.0% 69.1%
General Vision-Language Qwen3.6-35B-A3B 54.6% 52.3%
Qwen3.5-35B-A3B 59.7% 58.1%
gemma-4-31B-it 60.1% 59.1%
Qwen3.5-27B 64.5% 63.1%
Qwen3.5-4B (zero-shot) 81.8% 80.1%
Qwen2.5-VL-7B-Instruct 135.2% 154.1%
Arabic Regional Specialists Ketaba-OCR-LoRA 88.1% 89.6%
Baseer__Nakba 102.5% 115.4%
FanarOryx 105.4% 123.1%
Qari-OCR-0.4.0-VL-4B-Instruct 109.8% 118.5%
AIN 119.9% 146.9%
Specialized Document OCR olmOCR-2-7B-1025 74.0% 70.4%
PaddleOCR-VL-1.5 101.7% 94.2%
dots_ocr 121.3% 112.1%
GLM-OCR 115.4% 160.8%

WER counts substitutions, deletions, and insertions relative to the number of words in the reference. Insertions can push the total above 100%.

First, dedicated document OCR engines struggled. PaddleOCR-VL-1.5, dots_ocr, and GLM-OCR all exceeded 100% Exact WER. The strongest document OCR system on the test split was olmOCR-2-7B-1025, at 74.0% Exact WER.

Second, Arabic specialization alone yielded high error rates. Ketaba-OCR-LoRA was the only off-the-shelf Arabic specialist below 90% Exact WER. The other five systems in that category all exceeded 100%.

Third, the larger Qwen models had some of the strongest zero-shot scores. Qwen3.6-35B-A3B achieved 54.6% Exact WER, 27.2 percentage points below the zero-shot Qwen3.5-4B. That comparison spans both model size and model version. Even the best zero-shot score amounted to more than one word edit for every two reference words.

smartphone photo of homework sheet

The fine-tuning paradox: What happened after training on adult handwriting

The QCRI team fine-tuned three models: Baseer-3B, Qwen3.5-4B, and Gemma4-26B-A4B. They used a two-stage Low-Rank Adaptation (LoRA) recipe:

  • Stage 1 (Target-Domain Specialization). The team trained adapters with rank $r=64$ and $\alpha=128$ on the 500-essay ArEssays training split, with an image augmentation probability of 0.50.
  • Stage 2 (Curricular Regularization). The team merged the Stage 1 adapters into the base weights, then trained fresh, lower-rank adapters ($r=32$ or $r=16$) on adult handwriting from KHATT and printed text from Books-OCR. This stage used lower learning rates and an augmentation probability of 0.20. The authors designed it to limit forgetting and stabilize recognition.

The Stage 1 results were striking. With 1.8 GPU hours reported for its Stage 1 run, Qwen3.5-4B dropped from 81.8% to 46.9% Exact WER. Its Exact CER was 16.3%. Fine-tuning on 500 student essays put the 4B model ahead of the strongest off-the-shelf model, Qwen3.6-35B-A3B, on both word error metrics.

Then came the surprise. Stage 2 raised error rates on student essays for all three models.

  • Qwen3.5-4B rose from 46.9% to 107.2% Exact WER.
  • Baseer rose from 51.0% to 99.4% Exact WER.
  • Gemma4 rose from 49.2% to 86.8% Exact WER.

Corrected WER rose for all three models as well. The authors interpret the result as a tradeoff between specializing in children's handwriting and training on a broader mix of Arabic text. Stage 2 changed the training corpus, adapter rank, learning rate, and augmentation together. The leaderboard shows what happened with that combination. It leaves open which changes contributed most to the decline.

Where models break: Handwriting clarity versus visual noise

Two linguists independently rated the essays on three dimensions, each on a scale from 1 to 3. Average agreement across the dimensions was approximately 80%.

  1. Legibility. 1 means difficult to read, 2 means legible with effort, and 3 means very clear.
  2. Visual noise. 1 means heavy noise, 2 means some noise, and 3 means clean. Noise includes artifacts such as strike-throughs, smudges, and stray markings.
  3. Image quality. 1 means low quality or blurry, 2 means medium quality, and 3 means high quality. This rating covers sharpness, brightness, contrast, and resolution.

Handwriting clarity was a prominent source of variation in the results. In Figure 11, the Stage 1 Qwen3.5-4B had Exact WERs of 42.4% to 43.6% on essays rated legible with effort across the three school stages. For hard-to-read essays, Exact WER rose to 52.7% in primary school, 67.0% in preparatory school, and 50.5% in secondary school.

The authors report that lighting noise had a smaller effect within the benchmark. The released corpus had already been screened for poor lighting and other capture problems, and only 15% of its images were rated low quality or blurry. The hardest handwriting also produced different error rates across school stages, with just eight secondary essays in the hard-to-read group shown in Figure 11.

Some spelling errors persisted across grades. Hamza errors appeared at every school stage, and the authors report that some secondary-school essays needed more than 30 hamza corrections.

Why it matters for document AI and educational tech

1. The danger of silent autocorrect in assessment

A student who omits a hamza and a model that puts it back can produce a transcript that makes the student's spelling look better than it was. When the aim is to give feedback on spelling or punctuation, the verbatim reference preserves the evidence the teacher needs. A corrected transcript serves a different purpose, such as helping a system analyze the essay's meaning.

2. Domain data can beat parameter scaling

On this test split, Qwen3.5-4B fine-tuned on 500 student essays beat a 35B zero-shot model by 7.7 percentage points of Exact WER. The comparison gives teams working with similar documents a concrete reason to test a smaller model adapted to authentic examples from their own use case.

3. Measure capture quality and handwriting clarity

A sharp photo can still contain handwriting that is difficult to read. ArEssays rates the two separately, which helps pinpoint where recognition errors concentrate. The authors suggest exploring better image capture, more consistent paper, and lightweight preprocessing. Measuring the gains from those changes would require testing them directly.

Limitations and the road ahead

The authors note several boundaries in their work:

  • Geographic concentration. All 800 essays come from Egypt, and the sample is uneven across grades and genders. How well the results carry over to other countries, dialects, and school systems remains open.
  • Pre-filtered difficulty. The review excluded some essays with severe image degradation or highly illegible handwriting. The authors plan to include many of the excluded samples in a harder benchmark.
  • Cross-sectional design. The grade groups contain different students. The trends describe differences between groups at the time of collection.
  • Annotation and evaluation choices. Correcting ambiguous spelling or punctuation involves judgment. The benchmark scores also depend on the prompts, preprocessing, and decoding settings used in the study.

The paper describes an 800-essay release with paired verbatim and corrected annotations and outlines plans to share training and evaluation materials for research. The two references let researchers ask a question that a single error rate leaves unanswered. How closely did the model reproduce the student's writing, and how closely did it match the edited version? ===END===