Papers › LayoutReader: Pre-training of Text and Layout for Reading Order Detection

LayoutReader: Pre-training of Text and Layout for Reading Order Detection

26 Aug 2021EMNLP 2021 11arXiv:2108.11591archive 2025-07-28

Zilong Wang, Yiheng Xu, Lei Cui, Jingbo Shang, Furu Wei

Reading order detection is the cornerstone to understanding visually-rich documents (e.g., receipts and forms). Unfortunately, no existing work took advantage of advanced deep learning models because it is too laborious to annotate a large enough dataset. We observe that the reading order of WORD documents is embedded in their XML metadata; meanwhile, it is easy to convert WORD documents to PDFs or images. Therefore, in an automated manner, we construct ReadingBank, a benchmark dataset that contains reading order, text, and layout information for 500,000 document images covering a wide spectrum of document types. This first-ever large-scale dataset unleashes the power of deep neural networks for reading order detection. Specifically, our proposed LayoutReader captures the text and layout information for reading order prediction using the seq2seq model. It performs almost perfectly in reading order detection and significantly improves both open-source and commercial OCR engines in ordering text lines in their results in our experiments. We will release the dataset and model at \url{https://aka.ms/layoutreader}.

PaperPDFConference PDFCode

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

Code

microsoft/unilm officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Document Layout AnalysisOptical Character Recognition (OCR)Reading Order Detection

Datasets

Introduced by this paper, per the archive.

ReadingBank

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Reading Order Detection ROOR LayoutReader Segment-level F1 9.44 #4 of 4 Archive leaderboard report
Reading Order Detection ReadingBank LayoutReader Average Page-level BLEU 98.19 #2 of 2 Archive leaderboard report
Reading Order Detection ReadingBank LayoutReader Average Relative Distance (ARD) 1.75 #2 of 2 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Introduced by this paper: LayoutReader

AttentionDense ConnectionsLSTMLayer NormalizationLayoutReaderLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSeq2SeqSigmoid ActivationSoftmaxTanh Activation

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections