Scaling State-Space Models from Lines to Paragraphs: An Ablation of Mamba-based OCR
作者: Merveilles Agbeti-Messan, Pierrick Tranouez, Stéphane Nicolas, Clément Chatelain, Thierry Paquet
分类: cs.CV
发布日期: 2026-06-22
备注: Accepted at ICDAR 2026 Workshop on Machine Learning (WML)
💡 一句话要点
提出基于Mamba的OCR模型以提升长文本识别效率
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)
关键词: 状态空间模型 OCR技术 长文本识别 自回归模型 手写文本识别 超参数调优 Transformer对比
📋 核心要点
- 现有的OCR方法在处理长段落文本时效率低下,Transformer模型的计算复杂度限制了其应用。
- 本文提出了一种基于Mamba的状态空间模型,旨在实现线性时间解码以提高长文本的识别效率。
- 实验结果显示,Mamba模型在合成段落上表现优异,速度提升显著,但在真实手写文本上仍需改进。
📝 摘要(中文)
随着端到端OCR技术的发展,自回归序列模型的使用日益普遍。然而,Transformer注意力机制的二次成本限制了长段落文本的高效转录。状态空间模型(SSMs)如Mamba提供线性时间解码,并在印刷历史行的准确性上与Transformer相当,但其在短行到完整段落的扩展性及对手写文本的泛化能力尚不明确。本文系统探讨了Mamba-based OCR识别器在从行到段落的扩展性,识别出状态维度和扩展因子为长序列准确性的主要因素。实验表明,在干净的合成段落上,SSM的速度比Transformer快1.4到4.5倍,而在真实手写文本上,SSM的表现明显落后于Transformer。
🔬 方法详解
问题定义:本文旨在解决现有OCR技术在长段落文本转录中的效率问题,尤其是Transformer模型在计算复杂度上的限制。现有方法在处理长序列时表现不佳,尤其在手写文本识别上。
核心思路:论文提出基于Mamba的状态空间模型,利用其线性时间解码特性,旨在提高长文本的识别速度和准确性。通过系统探索超参数,识别出对长序列准确性影响最大的因素。
技术框架:整体架构包括四个核心模块:解码器深度、状态维度、扩展因子和连接器深度。通过对合成段落进行系统实验,评估模型在不同长度文本上的表现。
关键创新:最重要的创新在于识别出状态维度和扩展因子对长序列准确性的主导作用,且Mamba模型在速度上显著优于Transformer。
关键设计:在实验中,设置了不同的超参数组合,尤其关注状态维度和扩展因子的调节,确保模型在长文本上的高效解码和准确性。
🖼️ 关键图片
📊 实验亮点
实验结果显示,在干净的合成段落上,Mamba模型在每个长度下的字符错误率(CER)均低于1%,且速度比Transformer快1.4到4.5倍。尽管在真实手写文本上,Mamba模型的CER为8.2%和10.0%,明显高于Transformer的4.2%和3.5%,但仍揭示了数据稀缺对模型性能的影响。
🎯 应用场景
该研究的潜在应用领域包括大规模文档转录、历史文献数字化和手写文本识别等。通过提升长文本的识别效率,能够在教育、档案管理和信息检索等领域产生实际价值,推动相关技术的进一步发展。
📄 摘要(原文)
End-to-end OCR increasingly relies on autoregressive sequence models, where the quadratic cost of Transformer attention limits efficient transcription of long, paragraph-level text. State-Space Models (SSMs) such as Mamba offer linear-time decoding and have recently been shown to match Transformer accuracy on printed historical lines, but their behavior as sequences grow from short lines to full paragraphs, and their generalization to handwriting, remain poorly understood. We study how a Mamba-based OCR recognizer scales from lines to paragraphs. We first conduct a systematic exploration of its four core hyperparameters (decoder depth, state dimension, expansion factor, and connector depth) on synthetic paragraphs from 100 to 1,000 characters, identifying the recurrent state dimension and the expansion factor as the dominant levers for long-sequence accuracy. We then compare the recognizer against a Transformer baseline trained under an identical protocol. On clean synthetic paragraphs, both models stay below 1% CER at every length while the SSM runs 1.4 to 4.5 times faster, the speedup growing with sequence length. On real handwriting, however, the SSM lags clearly behind: it reaches 8.2% CER on IAM lines and 10.0% on IAM paragraphs, against 4.2% and 3.5% for the Transformer baseline. Through controlled experiments we show that a substantial part of this gap stems from data scarcity rather than from an intrinsic architectural limit: the autoregressive SSM decoder is markedly data-hungry on long sequences. Our study clarifies when SSMs are a practical choice for large-scale document transcription and when they are not.