状态空间模型与基于Transformer和BiLSTM的历史报纸OCR基准测试
A Benchmark of State-Space Models vs. Transformers and BiLSTM-based Models for Historical Newspaper OCR
AI总结:
提出基于状态空间模型(Mamba)的OCR架构,在历史报纸数据集上与Transformer和BiLSTM模型对比,在保持精度的同时推理时间减半且内存扩展更优。
摘要:
端到端OCR用于历史报纸仍然具有挑战性,因为模型必须处理长文本序列、退化的打印质量和复杂的布局。虽然基于Transformer的识别器主导了当前研究,但其二次复杂度限制了高效的段落级转录和大规模部署。我们研究了线性时间状态空间模型(SSMs),特别是Mamba,作为Transformer序列建模的可扩展替代方案用于OCR。我们提出了据我们所知的第一个基于SSM的OCR架构,结合CNN视觉编码器与双向和自回归Mamba序列建模,并进行了大规模基准测试,比较SSMs与基于Transformer和BiLSTM的识别器。在相同训练条件下,与强神经基线(VAN、DAN、DANIEL)和广泛使用的现成OCR引擎(PERO-OCR、Tesseract OCR、TrOCR、Gemini)一起评估了多种解码策略(CTC、自回归和非自回归)。在卢森堡国家图书馆的历史报纸上进行的实验,使用新发布的>99%验证的金标准注释,以及在Fraktur和Antiqua行上的跨数据集测试表明,所有神经模型都实现了低错误率(约2% CER),使得计算效率成为主要区分因素。基于Mamba的模型在保持竞争性精度的同时,推理时间减半,并表现出优越的内存扩展(在1000字符时增长1.26倍对比2.30倍),在严重退化的段落级别达到6.07% CER,而DAN为5.24%,同时速度快2.05倍。我们发布了代码、训练模型和标准化评估协议,以实现可重复研究并指导从业者进行大规模文化遗产OCR,可从此https URL获取。
英文摘要:
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 Bibliotheque 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 available at https://github.com/MarcoPerson/ssm-ocr-benchmark.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。