NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

OCR-Free Document Understanding Transformer

Geewook Kim, Teakgyu Hong, Moonbin Yim, JeongYeon Nam, Jinyoung Park, Jinyeong Yim, Wonseok Hwang, Sangdoo Yun, Dongyoon Han, Seunghyun Park

Introduction

Visual Document Understanding (VDU) involves extracting structured information from document images such as invoices, receipts, and business cards. Traditionally, this has been a two-stage process: first, an Optical Character Recognition (OCR) engine detects and recognizes text; second, a downstream model (e.g., LayoutLM) processes the text and layout to understand the document.

However, this OCR-dependent approach suffers from three critical flaws: high computational costs, inflexibility across languages or domains, and error propagation, where OCR mistakes cascade through the system and lead to extraction failure. To address these issues, the authors introduce Donut (Document nunderstanding transformer), an end-to-end model that eliminates the need for an external OCR engine.

Methods: The Donut Architecture

Donut utilizes a conceptually simple encoder-decoder architecture that maps document images directly to structured JSON outputs. By treating VDU as a sequence-to-sequence task (Image → JSON), the model leverages the power of modern generative Transformers.

Comparison of the traditional OCR-based pipeline vs. the end-to-end Donut model.
  • Visual Encoder (Swin Transformer): The model employs a Swin Transformer to convert input images into visual embeddings. Crucially, it does not require any pre-extracted text or layout information, allowing it to rely on visual cues like logos or layout that OCR-based models might ignore.
  • Text Decoder (BART): A multilingual BART decoder takes these visual embeddings and generates a sequence of subword tokens. Visualization of cross-attention maps reveals that the decoder implicitly "looks" at the correct physical area of the document when generating specific fields, despite not being given bounding boxes during training.
  • Direct JSON Generation: Instead of traditional tagging, Donut is trained to generate a structured JSON string directly (e.g., {"name": "Kyoto Choco Mochi", "price": 28000}).

Pre-training with SynthDoG

To enable the model to "read" without an OCR engine, the authors developed SynthDoG (Synthetic Document Generator). They generated 0.5 million samples per language (English, Chinese, Japanese, Korean) by overlaying Wikipedia text onto diverse backgrounds. This allowed the model to learn text recognition and visual context simultaneously. The model was further pre-trained on the massive IIT-CDIP dataset containing 11 million English document images.

Key Results and Benchmarks

Donut demonstrates significant improvements in both efficiency and accuracy over traditional pipelines across several benchmarks, including RVL-CDIP (classification), CORD (receipts), and DocVQA.

System benchmarks comparing Donut to traditional OCR-based models in terms of memory, speed, and accuracy.
  • State-of-the-Art Accuracy: Donut outperformed LayoutLMv2 on the RVL-CDIP classification task (95.3% vs 95.25%) and the CORD receipt extraction task (91.6 F1 vs 88.9 F1).
  • Speed and Efficiency: On the RVL-CDIP dataset, Donut achieved an inference time of 752ms, nearly twice as fast as the 1396ms–1489ms required by OCR-based competitors. It also demonstrated a lower memory footprint.
  • Robustness and Flexibility: The model is particularly effective on handwritten documents and remains robust in low-resource settings, outperforming LayoutLMv2 on CORD even when trained on only 10% of the data. Because it is OCR-free, it is inherently language-agnostic and can be easily extended to complex scripts (like CJK) by adjusting the pre-training data.

Conclusion

Donut represents a paradigm shift in VDU by removing the OCR bottleneck. By mapping pixels directly to structured data, it offers a faster, more accurate, and more flexible solution for automated document processing. While challenges remain regarding extremely high-resolution inputs with tiny text, the "holistic" approach of Donut sets a new standard for the field.

Summary updated

BibTeX
@inproceedings{kim2022ocr,
  author = {Geewook Kim and Teakgyu Hong and Moonbin Yim and JeongYeon Nam and Jinyoung Park and Jinyeong Yim and Wonseok Hwang and Sangdoo Yun and Dongyoon Han and Seunghyun Park},
  title = {{OCR-Free Document Understanding Transformer}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-19815-1\_29},
}
Figure