Abstract
End-to-end OCR for historical newspapers remains challenging, as models must handle long text sequences, degraded print quality, and complex layouts. While Transformer-based recognizers dominate current research, their quadratic complexity limits efficient paragraph-level transcription and large-scale deployment. We investigate linear-time State-Space Models (SSMs), specifically Mamba, as a scalable alternative to Transformer-based sequence modeling for OCR. We present to our knowledge, the first OCR architecture based on SSMs, combining a CNN visual encoder with bi-directional and autoregressive Mamba sequence modeling, and conduct a large-scale benchmark comparing SSMs with Transformer- and BiLSTM-based recognizers. Multiple decoding strategies (CTC, autoregressive, and non-autoregressive) are evaluated under identical training conditions alongside strong neural baselines (VAN, DAN, DANIEL) and widely used off-the-shelf OCR engines (PERO-OCR, Tesseract OCR, TrOCR, Gemini). Experiments on historical newspapers from the Bibliothèque nationale du Luxembourg, with newly released >99% verified gold-standard annotations, and cross-dataset tests on Fraktur and Antiqua lines, show that all neural models achieve low error rates (~2% CER), making computational efficiency the main differentiator. Mamba-based models maintain competitive accuracy while halving inference time and exhibiting superior memory scaling (1.26x vs 2.30x growth at 1000 chars), reaching 6.07% CER at the severely degraded paragraph level compared to 5.24% for DAN, while remaining 2.05x faster. We release code, trained models, and standardized evaluation protocols to enable reproducible research and guide practitioners in large-scale cultural heritage OCR.
Abstract (translated)
端到端历史报纸OCR仍具挑战性,因为模型需处理长文本序列、印刷质量退化及复杂版式。尽管基于Transformer的识别器主导当前研究,但其二次方复杂度限制了段落级转录的高效性与大规模部署。我们研究了线性时间复杂度的状态空间模型(SSMs),特别是Mamba,将其作为OCR中基于Transformer序列建模的可扩展替代方案。据我们所知,本文首次提出基于SSMs的OCR架构,该架构结合CNN视觉编码器与双向及自回归Mamba序列建模,并开展大规模基准测试,将SSMs与基于Transformer及BiLSTM的识别器进行对比。在相同训练条件下,评估了多种解码策略(CTC、自回归与非自回归),并与强神经基线模型(VAN、DAN、DANIEL)及广泛使用的现成OCR引擎(PERO-OCR、Tesseract OCR、TrOCR、Gemini)进行比较。基于卢森堡国家图书馆历史报纸的实验(采用新发布的>99%验证黄金标准标注)及跨数据集测试(Fraktur与Antiqua字体行),表明所有神经模型均达到低错误率(约2%字符错误率),使得计算效率成为主要区分因素。基于Mamba的模型在保持竞争力的准确率同时,将推理时间减半,并展现出更优的内存扩展性(1000字符时增长率为1.26倍 vs 2.30倍),在严重退化的段落级达到6.07%字符错误率,而DAN为5.24%,但速度快2.05倍。我们发布代码、训练模型及标准化评估协议,以支持可复现研究,并为文化遗产OCR领域从业者提供指导。
URL
https://arxiv.org/abs/2604.00725