Scaling State-Space Models from Lines to Paragraphs: An Ablation of Mamba-based OCR
On the map: State-space sequence models (S4, Mamba) → Core SSM architectures for language
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Core SSM architectures for language, one of 10 directions in State-space sequence models (S4, Mamba). Builds on 9 of its 16 references that are in the map. First posted on arXiv 22 Jun 2026.
Builds on
9 of 16 references.
Closest ancestors · 2
Same direction, newest first
- 2026A Benchmark of State-Space Models vs. Transformers and BiLSTM-based Models for Historical Newspaper OCR1 Apr
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spaces1 Dec
Other references · 7
- 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 613
- 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 532
- 2021TrOCR: Transformer-based Optical Character Recognition with Pre-trained Modelscited by 279
- 2022DAN: a Segmentation-free Document Attention Network for Handwritten Document Recognitioncited by 62
- 2020End-to-end Handwritten Paragraph Text Recognition Using a Vertical Attention Networkcited by 50
- 2024DANIEL: A fast Document Attention Network for Information Extraction and Labelling of handwritten documentscited by 9
- 2026DRetHTR: Linear-Time Decoder-Only Retentive Network for Handwritten Text Recognitioncited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026OmniHandwritingOCR: A Diagnostic Benchmark for Evaluating Multimodal LLMs in Handwritten OCR Scenarios
- 2026PP-OCRv5: A Specialized 5M-Parameter Model Rivaling Billion-Parameter Vision-Language Models on OCR Tasks
- 2025Achilles' Heel of Mamba: Essential difficulties of the Mamba architecture demonstrated by synthetic data
- 2026DharmaOCR: Specialized Small Language Models for Structured OCR that outperform Open-Source and Commercial Baselines
- 2024Mamba-ND: Selective State Space Modeling for Multi-Dimensional Data
- 2026A Free Lunch? Adapting PP-OCRv6 for Historical Text Recognition
- 2024An Empirical Study of Mamba-based Language Models
- 2026GlotOCR Bench: OCR Models Still Struggle Beyond a Handful of Unicode Scripts