Modern Optical Character Recognition (OCR) systems are highly optimized for the "perfect" digital-first documents of the 21st century. However, they frequently falter when applied to historical archives from the 17th to 19th centuries. This paper introduces two key enhancements to generative OCR models—modeling text baseline "drift" and detecting font style changes—while achieving a 25x speedup in processing time through a streamlined inference procedure.
The Challenge of Historical Typesetting
Historical documents from the printing-press era present unique challenges that standard OCR engines like Tesseract or ABBYY FineReader struggle to resolve. Two primary issues stand out:
- Noisy Typesetting: In early printing presses, the physical grooves holding characters were often imperfectly aligned, and paper distortion over centuries causes the text baseline to "wander" or drift vertically across a line.
- Font Heterogeneity: Documents from this era frequently mix font styles (e.g., Roman and Italic) within a single line. The exact font parameters are often unknown, making it difficult for models to distinguish between a stylistic change and a character recognition error.
Previous generative systems, such as the authors' "Ocular" system, assumed vertical offsets were independent for each character and that only one font was used per document. These assumptions are physically unrealistic and lead to significant transcription errors.
Generative Modeling with Physical Constraints
The authors extend a generative model where a language model generates characters, which in turn generate glyph boxes and finally the observed pixels. To address the limitations of previous models, they introduce two Markov chain extensions:
- Slow-varying Offsets: Instead of treating vertical positions as independent, the model uses a Markov chain where a character's offset depends on the previous one, penalized by a Gaussian distribution. This forces the model to prefer baselines that drift smoothly, reflecting the physical reality of a printing press line.
- Italic Font Styles: A second Markov chain tracks font styles ($f_i$), allowing the model to switch between Roman and Italic variants. To maintain realism, these switches are constrained to occur only at space characters, mirroring how italics were historically used for emphasis or proper nouns.
Streamlined Inference via Hard-EM
A major bottleneck in previous generative OCR was the computational cost of inference. The original Ocular system relied on a slow "coarse-to-fine" Expectation-Maximization (EM) approach. The authors replaced this with a hard-EM procedure combined with beam search.
By treating the problem as a decoding task similar to machine translation, the system avoids "smearing" probability mass over unlikely typesetting layouts. Surprisingly, this move to hard-EM—typically a speed-for-accuracy trade-off—actually improved transcription accuracy while delivering a massive 25x speedup. A 30-line document that previously required over an hour to process can now be transcribed in under 2.5 minutes.
Experimental Results
The models were evaluated on two challenging historical datasets: Trove (historical Australian newspapers) and Old Bailey (London court proceedings rich in italics).
Accuracy Gains
On the Trove dataset, the system achieved a 22% relative reduction in Word Error Rate (WER), dropping from 33.0% to 25.6%. On the Old Bailey dataset, it achieved an 11% relative reduction. The model proved significantly more robust than commercial standards, particularly in its ability to follow the "wiggly" baselines of old archives.
Italic Detection
The model demonstrated high precision (93%) in detecting italicized words. However, the authors noted that transcribing these characters remains difficult because italics appear less frequently, providing fewer examples for the model to learn specific glyph shapes.
Conclusion and Future Work
This research demonstrates that incorporating physical realism—specifically the continuous nature of a printing press line—leads to more robust OCR. By acknowledging that baselines drift and fonts switch, and by utilizing an efficient hard-EM inference path, the authors have created a system that is both more accurate and significantly faster than previous state-of-the-art generative models. Future work may involve training language models specifically on 18th-century English to further refine recognition in these historically significant archives.
Summary updated