- Phoenix — Arabic Manuscript HTR Model
- ملخص عربي
- Evidence at a glance
- Model summary
- Sealed evaluation
- Preliminary additional benchmark: Phoenix vs Baseer__Nakba
- Same-protocol diagnostic comparison
- Training data
- Intended use
- Out-of-scope use
- Inference
- Language-model policy in Athar
- Athar system capabilities
- Limitations
- Reproducibility
- Citation
- Ethical and scholarly note
- ملخص عربي
Phoenix — Arabic Manuscript HTR Model
Phoenix is a compact Arabic handwritten-text recognizer for Maghrebi manuscripts, historical manuscripts, and archival documents. Its internal checkpoint identifier is exp9; that identifier describes this release checkpoint, not the public model name. Phoenix is the recognizer deployed in the Athar human-in-the-loop manuscript investigation system.
Phoenix uses a deliberately small CNN + BiLSTM + CTC architecture: convolutional layers extract visual features, bidirectional LSTMs model the character sequence, and CTC aligns image features to text without requiring character-level segmentation. It has 4,988,946 parameters and a 19.94 MB model file. Depending on manuscript domain and evaluation protocol, observed CER is roughly 7–18%. In one local batch rehearsal it recognized 288 pre-segmented lines in 32 seconds (about 9 lines/s); this timing is hardware- and pipeline-specific, not a universal latency guarantee.
The model is not presented as a universal Arabic OCR system. Its strongest evidence is a preregistered comparison with the preceding exp8 checkpoint on 22,442 sealed lines: it substantially improved two large external domains and showed a small regression on a third domain. Across the two large sealed sets together (22,278 lines), character-weighted CER fell from 19.98% to 14.93%, a 25.3% relative reduction in character errors.
ملخص عربي
Phoenix — Arabic Manuscript HTR Model نموذج صغير للتعرّف على الكتابة العربية اليدوية، وبنيته CNN + BiLSTM + CTC بحوالي 5 ملايين معامل وملف حجمه نحو 20 ميغابايت. حقق CER يتراوح تقريباً بين 7% و18% باختلاف المجال والبروتوكول. معرّف exp9 اسم داخلي لنقطة الحفظ الحالية، وليس الاسم العام للنموذج. في مجموعتي Agapet وOmar المختومتين معاً (22,278 سطراً) انخفض CER الموزون بالمحارف من 19.98% إلى 14.93% مقارنةً بنقطة الحفظ السابقة، أي خفض نسبي للأخطاء قدره 25.3%. النموذج جزء من منظومة «أثر» التي تعرض القراءات البديلة وشواهد المصادر وقرار الباحث، لكن هذه الميزات ليست مخزنة داخل الأوزان نفسها.
النموذج بحثي وغير تجاري وفق الترخيص المحافظ CC BY-NC-SA 2.0 بسبب أحد مصادر التدريب. لا يُستخدم لإنتاج تحقيق علمي نهائي بلا مراجعة بشرية.
Evidence at a glance
| Evidence level | What it measures | Status and headline |
|---|---|---|
| Sealed evaluation | Frozen exp8 vs current exp9 checkpoint on data opened once after selection |
Strongest release evidence: 17.86% Agapet, 11.84% Omar, 10.72% TariMa raw CER |
| Development diagnostics | Same-protocol comparisons used for diagnosis and model selection | Useful but not independent final evidence: Phoenix CER spans 7.67–12.31% across four listed guards |
| Additional server benchmark | Phoenix vs Baseer__Nakba VLM aggregates supplied from a server run | Preliminary: Phoenix macro CER 9.71% vs 28.67%, but Baseer wins Omar and exact-line accuracy |
Model summary
| Field | Value |
|---|---|
| Public model name | Phoenix — Arabic Manuscript HTR Model |
| Internal checkpoint ID | exp9 |
| Framework | Kraken / PyTorch |
| Parameters | 4,988,946 |
| Input | One-channel line image; Kraken resizes to model height 120 |
| Output codec | 81 symbols + CTC blank |
| Architecture | CNN + BiLSTM + CTC |
| Main layers | 4 convolutional blocks + 4 bidirectional LSTM layers + linear CTC output |
| Model file | model.mlmodel |
| SHA-256 | 2896fef9d9665cbb82fba8faa3bf0c628ac6a5cc62eb678f40c707db833aebea |
| Intended use | Research-assisted transcription of Arabic handwriting with human review |
Sealed evaluation
All values below use the same images, references, and greedy decoder for exp8 and exp9. No language model is included in these figures. The sealed sets were opened once after the two arms were frozen; exp9 was not tuned after seeing these results.
| Sealed set | Lines | exp8 raw CER | exp9 raw CER | Change | exp8 → exp9 word accuracy |
|---|---|---|---|---|---|
| Agapet: Sin423 + BnF Arabe 76 | 10,594 | 22.12% | 17.86% | −4.26 pp | 23.91% → 33.23% |
| Omar: 11 held-out documents | 11,684 | 17.72% | 11.84% | −5.88 pp | 33.40% → 46.83% |
| TariMa manuscript test | 164 | 10.39% | 10.72% | +0.33 pp | 51.32% → 49.23% |
Both Agapet manuscripts improved, and all eleven Omar documents improved. TariMa is the declared exception: exp9 regressed by 0.33 CER percentage points, within the 0.5-point tolerance registered before opening the sealed results.
Preliminary additional benchmark: Phoenix vs Baseer__Nakba
In a preliminary owner-run server comparison, Phoenix achieved a substantially lower four-domain macro CER and overall WER than the multi-billion-parameter Baseer__Nakba VLM while using roughly three orders of magnitude fewer parameters. The comparison also exposes an important counter-result: Baseer__Nakba had higher exact-line accuracy and was markedly better on Omar. These aggregate values are reported as supplied; the raw per-line predictions, sample counts, preprocessing manifest, and executable evaluation bundle are not yet included in this repository. This is therefore preliminary supporting evidence, not a sealed or independently reproduced benchmark.
| Metric | Phoenix | Baseer__Nakba | Result |
|---|---|---|---|
| Four-domain unweighted macro CER | 9.71% | 28.67% | Phoenix: 66.1% relative CER reduction |
| Overall WER | 34.37% | 59.52% | Phoenix: −25.15 pp, 42.3% relative reduction |
| Exact-line accuracy | 13.38% | 26.38% | Baseer__Nakba higher |
| Parameters | 4,988,946 | ≈3.75B | Phoenix ≈752× smaller |
| Model file | 19.94 MB | ≈7.53 GB | Phoenix ≈378× smaller |
Raw CER by dataset
| Dataset | Phoenix | Baseer__Nakba | Lower CER |
|---|---|---|---|
| Agapet | 11.13% | 35.65% | Phoenix (68.8% relative reduction) |
| Muharaf | 11.93% | 25.51% | Phoenix (53.2% relative reduction) |
| Omar | 6.88% | 0.48% | Baseer__Nakba |
| RASAM | 8.90% | 53.06% | Phoenix (83.2% relative reduction) |
The macro CER is an unweighted mean of the four dataset CER values, so each dataset contributes equally regardless of line or character count. The four displayed Baseer values average to 28.675%; the supplied 28.67% display is retained, while the unrounded recomputation is recorded in baseer_server_benchmark.json. The supported conclusion is therefore: under this server protocol, Phoenix has lower CER on three of four datasets and a much lower macro CER at a fraction of the model size; Baseer__Nakba remains stronger on Omar and exact-line accuracy.
Same-protocol diagnostic comparison
All models below were decoded on the same pre-cropped line images and raw references with Kraken greedy decoding, without an LM or normalization. Each cell is CER / word accuracy.
| Development guard | Lines | Original Muharaf | exp6 | exp8 | exp9 |
|---|---|---|---|---|---|
| Agapet | 991 | 33.15 / 16.62 | 23.82 / 24.71 | 20.08 / 33.58 | 9.47 / 67.40 |
| Omar | 1,143 | 9.26 / 60.08 | 26.88 / 21.25 | 12.06 / 53.90 | 8.91 / 63.95 |
| RASAM | 1,789 | 39.01 / 12.06 | 9.04 / 66.78 | 7.95 / 69.90 | 7.67 / 70.46 |
| Muharaf | 920 | 13.28 / 64.15 | 36.47 / 15.74 | 12.72 / 58.30 | 12.31 / 59.32 |
| Four-domain unweighted macro | 4,843 | 23.68 / 38.23 | 24.05 / 32.12 | 13.20 / 53.92 | 9.59 / 65.28 |
Under this exact diagnostic protocol, exp9 had the lowest CER on 4/4 comparable guards and the highest word accuracy on 3/4. Its macro CER was 9.59% versus 23.68% for the original Muharaf model, a 59.5% relative reduction in character errors. On the Muharaf guard itself, exp9 had lower CER (12.31% vs 13.28%) but lower word accuracy (59.32% vs 64.15%); both metrics are reported to avoid hiding the trade-off.
The 369-line TariMa manuscript guard is excluded from this macro because it was independent for exp9 but not for exp6/exp8. Its scores are retained in BENCHMARKS.md as a non-ranked diagnostic.
This table is a development diagnostic, not an independent final test: some of the guard sets participated in exp9 selection. Its purpose is to compare muharaf_rec_best, exp6, exp8, and exp9 under one raw-reference protocol. It must not be mixed with published Muharaf numbers obtained from a different split, codec, or normalization policy.
Training data
exp9 used document-aware training/replay from five sources:
| Dataset | Role | Recorded license |
|---|---|---|
| Muharaf public line images | Archival handwriting | CC BY-NC-SA 2.0 |
| RASAM | Maghrebi manuscripts | Apache-2.0 in the local dataset repository |
| TariMa | Maghrebi/historical manuscripts | Apache-2.0 |
| Agapet SA-418 | 13th-century historical manuscript | CC BY 4.0 |
| Omar Al-Saleh manuscripts | Diverse archival documents | CC BY 4.0; access-gated at download time |
Training and guard splits were separated at document or manuscript level where the source allowed it. The Agapet sealed manuscripts and the eleven Omar sealed documents did not enter training.
Because Muharaf is CC BY-NC-SA 2.0, this release uses the same non-commercial ShareAlike license as the conservative publication choice. Users are responsible for checking whether their intended use and jurisdiction are compatible with every upstream dataset license.
Intended use
- Research and non-commercial transcription assistance for Arabic manuscripts and archival documents.
- Producing initial transcriptions for expert review.
- Generating multiple CTC candidates for a human-in-the-loop workflow.
- Use with PAGE-XML line polygons when layout segmentation is supplied externally.
Out-of-scope use
- Fully automatic scholarly editions without expert review.
- Claims of universal accuracy across all Arabic scripts, periods, or image conditions.
- Automatic attribution of text to a unique source without a separate retrieval/attribution layer.
- Commercial use without a separate legal review of the training-data obligations.
- Treating decoder scores as calibrated probabilities of correctness.
Inference
Install a Kraken version compatible with PyTorch 2.4, then use the model as a Kraken recognition model. A typical page command is:
kraken -i page.jpg output.txt segment ocr -m model.mlmodel
For complex pages, the recommended Athar workflow supplies PAGE-XML polygons and runs recognition on the human-defined line regions. This avoids mixing segmentation failure with recognition error.
Language-model policy in Athar
The published CER/WER values are greedy recognition values. The complete Athar system can additionally:
- preserve the raw visual reading for every line;
- generate up to eight visual candidates;
- rerank candidates with a small local character n-gram model;
- apply the general/Maghrebi LM automatically only in a conservative confidence band;
- show an archival LM as advisory evidence instead of silently replacing the text;
- protect numbers and punctuation from destructive LM changes.
On a 1,789-line RASAM development guard, the deployed conservative general-LM policy produced only a small change (about −0.003 CER points and −0.141 WER points). The large exp9 gains therefore come from the visual recognizer, not from post-hoc language correction.
Athar system capabilities
The .mlmodel file is one component of the larger architecture. The application adds:
- visual and language-ranked alternatives;
- source retrieval with unique/ambiguous attribution states;
- a review queue with reasons;
- optional external-LLM suggestions labelled as advisory;
- auditable human accept/edit/reject decisions;
- PAGE-XML and TEI export;
- a training package that excludes unreviewed automatic output by default.
These are system capabilities, not properties encoded inside the model weights.
Limitations
- Raw CER remains 17.86% on the difficult Agapet sealed set; human review is still necessary.
- TariMa sealed performance is 0.33 CER points worse than exp8.
- The model is optimized for Arabic handwriting, not modern printed OCR.
- Layout/segmentation quality can dominate full-page performance.
- The 81-symbol codec does not cover every possible Arabic-script or Latin character.
- Confidence values and beam scores are not globally calibrated probabilities.
- The same-protocol Muharaf comparison in this repository is a development comparison, not a new sealed benchmark.
Reproducibility
- Model SHA-256:
2896fef9d9665cbb82fba8faa3bf0c628ac6a5cc62eb678f40c707db833aebea - Python used in the verified local environment: 3.10.11
- PyTorch: 2.4.1+cu121
- Evaluation decoder: greedy, without LM
- Raw and Arabic-normalized metrics are stored separately; the model card reports raw metrics unless explicitly labelled otherwise.
The essential benchmark definitions and limitations are included directly in this model card so the public repository can remain minimal.
Citation
Until a final paper record is available, cite the project and this model version as:
@misc{athar_htr_exp9_2026,
title = {Phoenix: Arabic Manuscript HTR Model},
author = {Athar Project Team},
year = {2026},
note = {Internal checkpoint exp9; Kraken CNN-BiLSTM-CTC model; SHA-256 2896fef9d9665cbb82fba8faa3bf0c628ac6a5cc62eb678f40c707db833aebea}
}
Ethical and scholarly note
The output is a research aid, not an authoritative edition. Manuscript transcription and source attribution require domain expertise. Preserve the image, the raw reading, the evidence trail, and the researcher's final decision.
- Downloads last month
- 7
Evaluation results
- Raw CER (%) on Agapet sealed manuscriptsself-reported17.860
- Raw WER (%) on Agapet sealed manuscriptsself-reported58.800
- Raw CER (%) on Omar document-level sealed splitself-reported11.840
- Raw WER (%) on Omar document-level sealed splitself-reported42.920
- Raw CER (%) on TariMa sealed manuscript testself-reported10.720
- Raw WER (%) on TariMa sealed manuscript testself-reported38.890