UniRec-0.1B: Unified Text and Formula Recognition with 0.1B Parameters

Yongkun Du, Zhineng Chen, Yazhen Xie, Weikang Baiand, Hao Feng, Wei Shi, Yuchen Su, Can Huang, Yu-Gang JiangarXiv 2025 · DOI

Introduction

Document parsing—the conversion of document images into machine-readable text—is fundamental to digital information retrieval. Historically, this task has been bifurcated into Optical Character Recognition (OCR) for standard text and Mathematical Expression Recognition (MER) for formulas. While large Vision-Language Models (VLMs) have recently unified these tasks, their massive parameter counts (often in the billions) impose a significant "parameter tax," making them computationally prohibitive for high-throughput production environments.

Smaller models, while more efficient, typically face two hurdles: structural variability (managing different granularities like lines vs. paragraphs) and semantic entanglement (where tokenizers confuse text and math symbols, such as the word "sum" vs. the $\sum$ operator). UniRec-0.1B addresses these challenges with a lightweight 100-million-parameter architecture that rivals models 30 times its size.

Methodology

UniRec-0.1B utilizes an encoder-decoder framework comprising a FocalNet encoder and a Transformer decoder. Its performance stems from two key architectural innovations:

  1. Hierarchical Supervision Training (HST): To capture document structure, the model is trained with explicit structural tokens: <|ln|> for line breaks and <|pn|> for paragraph endings. This forces the model to learn spatial layouts and hierarchical dependencies rather than treating content as a flat string.
  2. Semantic-Decoupled Tokenizer (SDT): To prevent semantic confusion, the researchers developed independent tokenizers for plain text and LaTeX formulas. These are merged into a unified vocabulary where math-specific tokens are treated as unique special tokens, ensuring distinct representations for different modalities.
UniRec-0.1B architecture featuring HST and SDT

Data and Benchmarking

The model's success is underpinned by UniRec40M, a comprehensive dataset of 40 million samples. This includes 2 million TeX source files from arXiv and Wikipedia, digital-born PDFs from industry reports, and diverse public datasets covering scene text and handwriting.

To evaluate the model, the authors introduced UniRec-Bench, a fine-grained benchmark derived from OmniDocBench. It categorizes performance across five hierarchical levels (character to multi-paragraph) and nine distinct document domains, providing a rigorous test of both recognition accuracy and structural understanding.

Results and Efficiency

UniRec-0.1B demonstrates that high-quality data and specialized tokenization can compensate for reduced model capacity. It significantly outperforms specialized formula models like Mathpix (by 18.8%) and Pix2Tex (by 20.3%), while matching or exceeding the performance of much larger general-purpose models like Dolphin-0.3B and DeepSeek-OCR-3B.

UniRec-0.1B performance and efficiency comparison

Crucially, the model offers a 2–9× speedup over existing expert models. In practical applications, such as the MinerU2.5 parsing pipeline, integrating UniRec-0.1B resulted in a 4× increase in overall processing speed. By using only 3% to 33% of the parameters of its competitors, UniRec-0.1B sets a new standard for efficient, unified document recognition.

Conclusion and Future Work

UniRec-0.1B proves that small models can achieve state-of-the-art results in unified OCR and MER tasks through structural supervision and semantic decoupling. While the model currently faces minor challenges with subscripts in plain-text contexts due to data extraction artifacts, future iterations aim to refine these fine-grained elements and expand the framework to include tables and charts, further optimizing for low-latency edge deployment.

Summary updated

BibTeX
@misc{du2025unirec,
  author = {Yongkun Du and Zhineng Chen and Yazhen Xie and Weikang Baiand and Hao Feng and Wei Shi and Yuchen Su and Can Huang and Yu-Gang Jiang},
  title = {{UniRec-0.1B: Unified Text and Formula Recognition with 0.1B Parameters}},
  year = {2025},
  eprint = {2512.21095},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.21095},
}
Figure