Abstract
The laws of model size, data volume, computation and model performance have been extensively studied in the field of Natural Language Processing (NLP). However, the scaling laws in Optical Character Recognition (OCR) have not yet been investigated. To address this, we conducted comprehensive studies that involved examining the correlation between performance and the scale of models, data volume and computation in the field of text recognition. Conclusively, the study demonstrates smooth power laws between performance and model size, as well as training data volume, when other influencing factors are held constant. Additionally, we have constructed a large-scale dataset called REBU-Syn, which comprises 6 million real samples and 18 million synthetic samples. Based on our scaling law and new dataset, we have successfully trained a scene text recognition model, achieving a new state-of-the-art on 6 common test benchmarks with a top-1 average accuracy of 97.42%.
Introduction
In the domain of Large Language Models (LLMs), scaling laws serve as a foundational principle: increasing model parameters, data volume, and compute leads to predictable improvements in performance following power laws. In contrast, Optical Character Recognition (OCR)—specifically scene text recognition—has traditionally focused on architectural refinements within fixed-scale benchmarks. This study from Huawei Noah’s Ark Lab bridges this gap by applying rigorous scaling analysis to OCR, determining whether the "bigger is better" paradigm holds true for identifying text in complex real-world images.
Methodology
The researchers conducted an empirical study by scaling two prominent Transformer-based architectures:
- TrOCR: Utilizes a pre-trained Vision Transformer (ViT) encoder and a pre-trained language model decoder, scaled from 43M to over 1 billion parameters.
- PARSeq: An encoder-decoder architecture optimized for text recognition.
The study systematically varied three dimensions:
- Model Scale: Adjusting layers and hidden dimensions (e.g., scaling PARSeq from 22M to 682M parameters).
- Data Scale: Training on datasets ranging from 1 million to 75 million samples.
- Compute Scale: Tracking performance against training hours (100 to 1000 hours).
The REBU-Syn Dataset
To push the limits of OCR scaling, the authors introduced REBU-Syn, a large-scale dataset consisting of:
- 6 Million Real Samples: Aggregated from 14 public datasets, including COCO-Text and Uber-Text.
- 18 Million Synthetic Samples: Generated using established methods (MJSynth, ST) and a new MJST+ generator to provide diverse text styles and backgrounds.
Evaluation was conducted across six standard benchmarks: IIIT5k, SVT, IC13, IC15, SVTP, and CUTE80.
Scaling Law Insights
The primary finding is that OCR performance follows a smooth power law ($E = a \cdot X^b$) across parameters, data, and compute. This indicates that performance gains are predictable and have not yet reached a plateau.
Key observations include:
- Sample Efficiency: Larger models are more efficient, achieving lower error rates than smaller models when trained on the same volume of data.
- The 1:3 Golden Ratio: A ratio of 1:3 real-to-synthetic data was found to be the optimal "sweet spot" for maximizing accuracy while maintaining a representative distribution.
- Pre-training Impact: Models pre-trained on domain-specific visual text tasks significantly outperform those pre-trained on general image datasets like ImageNet.
Key Results
The study culminated in the development of CLIP4STR-L, trained on the REBU-Syn dataset. The model achieved a new state-of-the-art 97.42% top-1 average accuracy* across the six common benchmarks, surpassing previous leaders such as ABINet and PARSeq.
The researchers successfully fitted power law equations for both TrOCR and PARSeq, enabling the prediction of error rates based on parameters ($N$), data volume ($D$), or compute ($C$).
Conclusion and Future Work
This research confirms that scaling laws are a powerful tool for OCR development. While scaling to billions of parameters involves significant computational costs, the predictability of gains justifies the investment. Future research should extend these scaling laws to more challenging domains, such as handwriting and historical documents, and address the limitations of text encoders in contextless scenarios.
Summary updated