Éclair -- Extracting Content and Layout with Integrated Reading Order for Documents
Ilia Karmanov, Amala Sanjay Deshmukh, Lukas Voegtle, Philipp Fischer, Kateryna Chumachenko, Timo Roman, Jarno Seppänen, Jupinder Parmar, Joseph Jennings, Andrew Tao, Karan Sapra
TL;DR
Éclair addresses the challenge of extracting richly structured text from diverse documents by learning an end-to-end model that outputs formatted text, bounding boxes, and semantic labels in reading order. It introduces arXiv-5M, a LaTeX-grounded data generation pipeline, and DROBS, a human-labeled benchmark for document-level OCR and semantic classification. The model uses a ViT-based vision encoder and a MBART-style decoder, with a flexible prompt system including a maximal-information prompt, enabling outputs that range from plain text to fully labeled content. Experimental results show state-of-the-art performance on DROBS, competitive results on existing OCR and layout benchmarks, and practical gains for downstream LLM training, with notable speedups from multi-token inference.
Abstract
Optical Character Recognition (OCR) technology is widely used to extract text from images of documents, facilitating efficient digitization and data retrieval. However, merely extracting text is insufficient when dealing with complex documents. Fully comprehending such documents requires an understanding of their structure -- including formatting, formulas, tables, and the reading order of multiple blocks and columns across multiple pages -- as well as semantic information for detecting elements like footnotes and image captions. This comprehensive understanding is crucial for downstream tasks such as retrieval, document question answering, and data curation for training Large Language Models (LLMs) and Vision Language Models (VLMs). To address this, we introduce Éclair, a general-purpose text-extraction tool specifically designed to process a wide range of document types. Given an image, Éclair is able to extract formatted text in reading order, along with bounding boxes and their corresponding semantic classes. To thoroughly evaluate these novel capabilities, we introduce our diverse human-annotated benchmark for document-level OCR and semantic classification. Éclair achieves state-of-the-art accuracy on this benchmark, outperforming other methods across key metrics. Additionally, we evaluate Éclair on established benchmarks, demonstrating its versatility and strength across several evaluation standards.
