TLDR: Researchers developed Tex80M, the largest dataset of 80 million mathematical formulas, generated synthetically from LaTeX. Using this, they trained TexTeller, the first large-scale Handwritten Mathematical Expression Recognition (HMER) model, which achieves state-of-the-art performance, generalizes to other OCR tasks, and uses a new image-based evaluation metric.
The field of Handwritten Mathematical Expression Recognition (HMER) focuses on converting handwritten mathematical formulas into digital formats like LaTeX. This technology is vital for applications in education and the digitization of technical documents. A major hurdle in HMER has been the scarcity of large, diverse datasets, mainly because manually annotating handwritten formulas is both difficult and expensive. This limitation often forces researchers to work with smaller datasets, necessitating the incorporation of complex biases into their models to learn intricate patterns.
A recent research paper introduces an innovative method to address these data constraints. It combines a limited number of actual handwritten formulas with a vast collection of LaTeX-rendered formulas. Central to this approach is a scalable data engine capable of generating complex and consistent LaTeX sequences. Leveraging this engine, the researchers have compiled the largest formula dataset to date, named Tex80M, which boasts over 80 million high-quality training instances.
Based on this extensive dataset, the paper presents TexTeller, the first HMER model trained at scale. TexTeller was developed by integrating the massive Tex80M dataset with a relatively small set of handwritten mathematical expressions. Despite its straightforward architecture, TexTeller has achieved state-of-the-art performance across nearly all HMER benchmarks, significantly surpassing existing models. Its remarkable success is attributed to the expansive training dataset and a refined training pipeline.
TexTeller also demonstrates impressive generalization capabilities, extending its performance to related tasks such as table recognition and multilingual Optical Character Recognition (OCR). This versatility underscores the robustness of the scalable training methodology.
To overcome the limitations of traditional evaluation methods for HMER models, which often struggle with the ambiguity of LaTeX expressions and the varying importance of characters, the researchers propose a new challenging benchmark and an image-based evaluation methodology called Expanded Pixel Matching Ratio (EPMR). EPMR offers a more direct and efficient way to assess model accuracy, applying stricter penalties for LaTeX syntax errors and accounting for pixel misalignments.
The methodology behind Tex80M involves collecting mathematical PDF papers from sources like arXiv and converting them into Markdown using a tool called Nougat to extract coherent LaTeX sequences. These sequences are then enhanced through various transformations, including concatenation and operator replacement, to boost complexity and diversity. To further enhance realism, diffusion models are employed to generate paper textures, and multi-level data augmentation is applied to simulate real-world effects such as lighting variations and ink bleeding.
Key contributions of this work include the creation of Tex80M, the largest formula dataset generated without human intervention, and TexTeller, the first HMER model trained at scale to achieve commercial-level performance with a simple design. The researchers also introduce a new benchmark and an image-based evaluation method to better assess HMER models in real-world scenarios. The complete model, dataset, and codebase will be openly released to encourage further research in the field.
Also Read:
- VisCodex: A Unified System for Generating Code from Images
- AI Breakthrough in Generating Indian Sign Language Images
For more detailed information, you can refer to the full research paper available at this link: Towards Scalable Training for Handwritten Mathematical Expression Recognition.


