Relational Representation Learning in Visually-Rich Documents

Xin Li, Yan Zheng, Yiqing Hu, Haoyu Cao, Yunfei Wu, Deqiang Jiang, Yinsong Liu, Bo Ren

This academic paper introduces DocReL, a framework designed to bridge a significant gap in Visually-Rich Document (VRD) understanding: the explicit modeling of relationships between document entities.

TL;DR

DocReL is a novel pre-training framework that learns relational representations in documents through a self-supervised task called Relational Consistency Modeling (RCM). By ensuring that local and global entity relationships remain consistent across different augmented views of a document, DocReL achieves state-of-the-art performance on table recognition, information extraction, and reading order detection.

What Problem Does This Paper Address?

Visually-Rich Documents (VRDs)—like receipts, insurance forms, and financial reports—rely heavily on spatial and semantic relationships. To understand a receipt, a model must know which "Price" (key) belongs to which "Item" (value).

While recent multi-modal models (like LayoutLM) have excelled at capturing contextual knowledge (text + layout + image), they often struggle with explicit relational understanding. The authors identify a major hurdle: defining "relations" is subjective and task-dependent. A relation in a table (same row/column) is different from a relation in a form (key-value pair). Creating supervised datasets for every possible relation type is infeasible. DocReL aims to learn these relations in a self-supervised way, without needing manual labels for every specific link.

Methods

The core of DocReL is Relational Consistency Modeling (RCM), a pre-training task inspired by contrastive learning (specifically the BYOL paradigm).

  1. Feature Extraction: The model uses a multi-modal Transformer to fuse text, layout, and visual features into entity-level representations.
  2. RCM (The Core Innovation): Instead of comparing a document to "negative" samples, RCM creates two "positive" augmented views of the same document (e.g., changing colors or slightly resizing bounding boxes). It then enforces consistency through two modules:
  3. Local Relational Consistency (LRCM): This focuses on pairwise relations. It ensures that the representation of the relationship between two specific entities (Entity A and Entity B) remains the same regardless of the augmentation.
  4. Global Relational Consistency (GRCM): This captures the "big picture." It uses a similarity matrix to model how one entity relates to all other entities in the document, ensuring the global structure remains stable.
  5. Relational Feature Instantiation: Finally, the model converts these abstract relational features into a simple $N \times N$ matrix. This matrix acts as a "universal adapter" that downstream tasks (like table structure recognition) can easily use to classify links between entities.

Datasets

The authors utilized a mix of massive pre-training corpora and specialized evaluation benchmarks:

  • Pre-training: RVL-CDIP (400,000 document images) and DocBank (500,000 pages with fine-grained tokens).
  • Table Structure Recognition: SciTSR, ICDAR-2013, and ICDAR-2019.
  • Key Information Extraction (KIE): FUNSD and CORD.
  • Reading Order Detection: ReadingBank.

Key Insights and Ideas

  • Relations as Invariants: The "aha moment" here is treating relations as structural invariants. Even if you stretch a document or change its colors, the fact that a specific "Total" label points to a specific dollar amount is a fundamental truth that the model should capture.
  • Local + Global = Success: Pairwise links (Local) aren't enough for complex structures like tables. You need a global view (Global) to understand how an entity fits into the entire document's topology.
  • Efficiency via Matrix Operations: By treating relation detection as a matrix classification problem rather than a sequence-to-sequence generation problem, the model achieves massive speedups. It avoids the "autoregressive bottleneck" where a model has to predict one token at a time.

Key Results

DocReL achieved state-of-the-art (SOTA) results across all tested categories:

  • Table Recognition: Reached a 99.8% F1-score on SciTSR, outperforming previous specialized models like NCGM.
  • Reading Order: Achieved a 98.4 BLEU score on ReadingBank. Most impressively, it performed inference in 0.2 seconds, compared to 6.0 seconds for the previous SOTA (LayoutReader)—a 30x speedup.
  • Ablation Studies: The authors showed that RCM is "backbone-agnostic." Adding RCM to existing models like LayoutLMv2 or StrucText consistently boosted their performance, proving that relational learning is a missing piece in current architectures.

Limitations and Future Work

The authors note that DocReL relies on precise entity-level feature extraction. In their experiments, they used pre-conditioned OCR results or parsing results from electronic files (like PDFs).

  • OCR Dependency: If the initial OCR fails to group text into meaningful entities correctly, the relational modeling will likely struggle.
  • Future Direction: The authors suggest developing a more integrated "token-to-entity" labeling module to make the system more robust in "wild" scenarios where document structure is highly irregular or OCR quality is poor.

Summary updated

BibTeX
@inproceedings{li2022relational,
  author = {Xin Li and Yan Zheng and Yiqing Hu and Haoyu Cao and Yunfei Wu and Deqiang Jiang and Yinsong Liu and Bo Ren},
  title = {{Relational Representation Learning in Visually-Rich Documents}},
  booktitle = {ACM Multimedia},
  year = {2022},
  url = {https://openreview.net/forum?id=5cKAzNNGOC},
}

Loading related content...

Figure