Modeling Layout Reading Order as Ordering Relations for Visually-rich Document Understanding

Chong Zhang, Yi Tu, Yixi Zhao, Chenshu Yuan, Huan Chen, Yue Zhang, Mingxu Chai, Ya Guo, Huijia Zhu, Qi Zhang, Tao Gui

Abstract

Traditional Visually-rich Document Understanding (VrD) models often treat reading order as a linear sequence, a simplification that fails to capture the complexity of real-world documents. This paper argues that modeling reading order as a set of ordering relations—represented as directed acyclic graphs—is a more robust approach. By introducing the Reading-Order-Relation-Enhanced (RORE) pipeline, the authors demonstrate that capturing non-linear reading paths leads to significant performance gains across diverse downstream tasks, including entity extraction and visual question answering.

Introduction

In Visually-rich Document Understanding, determining the correct reading order is a foundational challenge. Historically, this has been framed as a permutation problem: finding the single sequence that represents a human's reading path. However, complex documents such as forms, tables, and multi-column layouts often lack a single "correct" sequence. Elements like headers or watermarks may be independent of the main text body, and multiple reading paths can be equally valid.

Figure 1: Motivation for moving from sequences to relations. Complex layouts allow for multiple valid reading paths, which a single sequence cannot capture.

Forcing models to predict a single permutation ignores these structural nuances and introduces noise during training, ultimately limiting the performance of downstream models. This research proposes a shift from linear sequences to relational graphs to better reflect the non-linear nature of human reading.

Methodology

To address the limitations of linear modeling, the authors propose two primary innovations:

  1. Reading Order as Relations: Reading order is modeled using Immediate Succession During Reading (ISDR), a binary relation where element $B$ is read immediately after element $A$. This forms a Directed Acyclic Graph (DAG). They also define Generalized Succession During Reading (GSDR) as the transitive closure of ISDR, representing the global "before/after" relationship.
  2. RORE Pipeline: The Reading-Order-Relation-Enhanced (RORE) pipeline integrates these relations into the attention mechanism of transformer-based models. By modifying the self-attention formula with a learnable bias term based on the reading order matrix, the model explicitly accounts for document structure: $$a_{ij} = \text{softmax}\left(\frac{Q_i K_j^T}{\sqrt{d_k}} + \lambda \rho_{ij}\right)$$ where $\rho_{ij}$ represents the binary relation between tokens $i$ and $j$.
Figure 2: The RORE pipeline (right) vs. the standard pipeline (left). The RORE version explicitly injects a reading order matrix into the task model.

Experimental Setup and Benchmarks

The authors established a new benchmark, ROOR (Reading Order as Ordering Relations), containing 199 samples from the EC-FUNSD dataset manually annotated with over 10,000 ISDR linking pairs. To evaluate the universal applicability of the RORE pipeline, the authors tested it against several downstream benchmarks:

  • Information Extraction (IE): FUNSD, CORD, and SROIE.
  • Question Answering (QA): DocVQA, InfoVQA, WTQ, and TextVQA.

Key Insights and Results

Analysis of the ROOR dataset confirmed the "non-linear" reality of documents, revealing that 23.76% of segments are involved in non-linear reading orders. Treating Reading Order Prediction (ROP) as a relation extraction task using a global pointer network significantly outperformed traditional sequence-based methods.

The RORE pipeline demonstrated "universal improvement" across different architectures, including LayoutLMv3 and GeoLayoutLM. Notable results include:

  • State-of-the-Art Performance: RORE-enhanced GeoLayoutLM achieved SOTA results on FUNSD, CORD, and SROIE.
  • Entity Linking (EL) Gains: On the EC-FUNSD dataset, RORE improved EL performance by an average of +2.86 F1 points, highlighting its effectiveness in capturing logical document structure.
  • Visual QA Improvements: Generative QA tasks saw broad improvements, specifically a +6.48 point increase on the InfoVQA benchmark.

Furthermore, the authors found that using "pseudo-labels" generated by their ROP model—even in the absence of ground-truth reading order—still led to substantial gains, proving the model's strong generalization capabilities.

Conclusion and Future Work

While the shift from permutations to relations increases computational complexity, the authors argue this is a necessary trade-off for precision in complex document understanding. Current limitations include an occasional over-reliance on spatial proximity at the expense of textual semantics. Future research will focus on more efficient fusion methods for relational information and improving the balance between visual layout and textual meaning in ROP models.

Summary updated

BibTeX
@inproceedings{zhang2024modeling,
  author = {Chong Zhang and Yi Tu and Yixi Zhao and Chenshu Yuan and Huan Chen and Yue Zhang and Mingxu Chai and Ya Guo and Huijia Zhu and Qi Zhang and Tao Gui},
  title = {{Modeling Layout Reading Order as Ordering Relations for Visually-rich Document Understanding}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.540},
}
Figure