[Paper Review] Pay Attention to What You Read: Non-recurrent Handwritten Text-Line Recognition
This paper introduces the first non-recurrent, transformer-based approach for handwritten text-line recognition, leveraging multi-head self-attention at both visual and textual stages to jointly perform character recognition and language modeling without recurrence. It achieves state-of-the-art performance on the IAM dataset, including strong few-shot learning results and full out-of-vocabulary word support, by training end-to-end at the character level without a predefined lexicon.
The advent of recurrent neural networks for handwriting recognition marked an important milestone reaching impressive recognition accuracies despite the great variability that we observe across different writing styles. Sequential architectures are a perfect fit to model text lines, not only because of the inherent temporal aspect of text, but also to learn probability distributions over sequences of characters and words. However, using such recurrent paradigms comes at a cost at training stage, since their sequential pipelines prevent parallelization. In this work, we introduce a non-recurrent approach to recognize handwritten text by the use of transformer models. We propose a novel method that bypasses any recurrence. By using multi-head self-attention layers both at the visual and textual stages, we are able to tackle character recognition as well as to learn language-related dependencies of the character sequences to be decoded. Our model is unconstrained to any predefined vocabulary, being able to recognize out-of-vocabulary words, i.e. words that do not appear in the training vocabulary. We significantly advance over prior art and demonstrate that satisfactory recognition accuracies are yielded even in few-shot learning scenarios.
Motivation & Objective
- To overcome the training inefficiency and sequential bottlenecks of recurrent models in handwritten text recognition.
- To enable end-to-end recognition without relying on a predefined closed vocabulary, supporting out-of-vocabulary (OOV) words.
- To demonstrate that self-attention mechanisms can effectively model both visual features and language dependencies in a non-recurrent architecture.
- To validate the method's performance under low-data regimes using synthetic pre-training.
- To show that the model inherently captures language modeling capabilities, reducing the need for external language models.
Proposed method
- The model uses a vision transformer encoder to extract visual features from handwritten text-line images, replacing traditional convolutional or recurrent encoders.
- A multi-head self-attention mechanism processes the visual tokens to learn spatial and sequential dependencies across the image.
- The decoder uses another multi-head self-attention module to autoregressively generate characters, attending to both visual features and previously generated tokens.
- The entire architecture is trained end-to-end using cross-entropy loss on character-level predictions, enabling joint visual and language modeling.
- A pre-training step on synthetic data is employed to improve few-shot generalization, especially when real annotated data is limited.
- The model operates at the character level, eliminating the need for a fixed lexicon and enabling recognition of unseen OOV words.

Experimental results
Research questions
- RQ1Can a non-recurrent transformer-based architecture achieve competitive performance in handwritten text-line recognition compared to recurrent models?
- RQ2Does the proposed method effectively model language dependencies without relying on external language models?
- RQ3Can the model generalize well in few-shot learning scenarios, especially with limited real annotated data?
- RQ4To what extent does pre-training on synthetic data improve performance on real-world handwritten text recognition tasks?
- RQ5Can the model recognize out-of-vocabulary words without requiring a predefined lexicon?
Key findings
- The proposed transformer-based method achieves a character error rate (CER) of 4.67% and word error rate (WER) of 15.45% on the IAM dataset, setting a new state-of-the-art for open-vocabulary HTR.
- Even with only 20% of the real training data, the model outperforms sequence-to-sequence baselines when pre-trained on synthetic data, demonstrating strong few-shot generalization.
- The addition of an external language model as a post-processor yields no performance gain (CER: 4.66% vs. 4.67%), indicating that the model already captures sufficient language context internally.
- The model significantly outperforms previous SOTA methods that rely on closed vocabularies, especially in the open-vocabulary setting, where it surpasses all prior approaches.
- The ablation study confirms that both visual and textual self-attention mechanisms are essential for optimal performance, with the visual encoder playing a key role in feature representation.
- The use of synthetic data for pre-training enables the model to achieve high performance even with limited real data, highlighting its scalability for low-resource scenarios.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.