Robust Layout-aware IE for Visually Rich Documents with Pre-trained Language Models

Mengxi Wei, Yifan He, Qiong Zhang

TL;DR

This paper introduces a novel approach for extracting information from visually rich documents (like invoices and resumes) by combining powerful pre-trained language models with graph neural networks to understand both text and layout. They also propose new fine-tuning techniques that significantly reduce the need for labeled data, making information extraction more efficient and accessible.

What Problem Does This Paper Address?

Modern business documents are often more than just plain text; they contain crucial semantic information embedded in their visual structure – how text is laid out, formatted, and presented. Traditional Information Extraction (IE) systems, which primarily rely on textual content, struggle to leverage these visual cues. This limitation hinders their performance on visually rich documents (VRDs) like invoices, resumes, and job postings, where layout often dictates meaning (e.g., a price listed under an "Amount" column). The authors aim to bridge this gap by developing a model that can effectively integrate both textual and visual information for more robust and accurate IE, especially in scenarios with limited labeled data.

Methods

The core of the proposed method is a hybrid architecture that combines two powerful components:

  • Pre-trained Language Model (RoBERTa): This serves as the text encoder, leveraging the strong contextual understanding of text learned from massive unlabeled datasets. The authors use RoBERTa as their baseline, noting its superior performance over BERT in their experiments.
  • Graph Neural Network (GCN): This module is designed to capture the visual layout information. Each text box in a document is treated as a node in a graph. The GCN then learns relationships between these nodes based on their spatial proximity and other layout features (like font type and size). The authors explore different edge types to represent various layout relationships, including connections to section titles in resumes. They also incorporate skip connections for better information flow between GCN layers.

Beyond the architecture, the paper introduces two novel unsupervised fine-tuning objectives to adapt the pre-trained model to specific document domains using unlabeled data:

  • Sequence Positional Relationship Classification (SPRC): This task trains the model to predict the spatial relationship (e.g., left-right, up-down) between adjacent text boxes. This helps the model learn domain-specific layout patterns.
  • Masked Language Model (MLM): This is a standard pre-training objective adapted for fine-tuning, encouraging the model to learn semantic context from the text.

Datasets

The authors evaluate their approach on two real-world, visually rich document datasets:

  • Invoice Dataset: A large collection of over 10,000 international invoices from a multinational corporation. This dataset exhibits significant variability in layout due to different departments and vendors. A subset of 2,000 invoices was manually labeled for four entity types: SellerName, PurchaserName, InvoiceNo, and Amount.
  • Resume Dataset: A collection of hundreds of international resumes with diverse layouts. This dataset contains 472 labeled documents and 2,130 unlabeled documents, with 11 annotated entity types (e.g., Degree, Position, School).

Key Insights and Ideas

  • Layout is Crucial for VRDs: The experiments strongly suggest that visual layout information is not just supplementary but essential for accurately extracting entities from documents like invoices, especially for ambiguous fields like "Amount."
  • GCNs Excel at Capturing Layout: The graph-based approach effectively models the complex spatial and formatting relationships between text elements, outperforming text-only baselines.
  • Unsupervised Fine-tuning is Powerful: The proposed SPRC and MLM fine-tuning objectives significantly boost performance, particularly in low-data regimes, by leveraging readily available unlabeled documents. This dramatically reduces the annotation burden.
  • Domain Adaptation is Key: The ability to fine-tune on in-domain unlabeled data allows the model to adapt to the specific characteristics of different document types (invoices vs. resumes) and even variations within a type (e.g., different invoice formats).

Key Results

  • Invoice Extraction: The proposed RoBERTa+GCN model achieved a 94.37% F1-score, a significant improvement over the RoBERTa baseline (89.58%). Further fine-tuning with MLM and SPRC objectives pushed the F1-score to 95.87%. The improvement was most pronounced for the "Amount" entity, with a 21.87% increase in F1-score.
  • Resume Extraction: The RoBERTa+GCN model achieved a 71.31% F1-score, outperforming the RoBERTa baseline (67.40%). The full model with MLM and SPRC fine-tuning reached 72.13% F1-score.
  • Few-Shot Learning: In a few-shot setting on invoices, the model achieved a 90% F1-score with only about ten labeled instances, whereas the baseline required around 300 instances, demonstrating a 30x reduction in annotation cost.
  • Zero-Shot Learning: Even in zero-shot settings (no in-domain labeled data), the model showed a 3.9% improvement over the baseline on unseen invoice data.

Limitations and Future Work

  • Limitations: The paper acknowledges that while their model performs well, there's still room for improvement. The zero-shot performance, while better than baselines, is not as high as supervised settings. The resume dataset's SPRC fine-tuning faced challenges due to unbalanced relationship types.
  • Future Work: The authors suggest exploring better integration of text and layout features, incorporating more spatial and formatting features, and developing more sophisticated methods for modeling relationships between text boxes. They also plan to investigate how to better model the spatial relationships between text boxes.

Summary updated

Abstract

Many business documents processed in modern NLP and IR pipelines are visually rich: in addition to text, their semantics can also be captured by visual traits such as layout, format, and fonts. We study the problem of information extraction from visually rich documents (VRDs) and present a model that combines the power of large pre-trained language models and graph neural networks to efficiently encode both textual and visual information in business documents. We further introduce new fine-tuning objectives to improve in-domain unsupervised fine-tuning to better utilize large amount of unlabeled in-domain data.
BibTeX
@misc{wei2020robust,
  author = {Mengxi Wei and Yifan He and Qiong Zhang},
  title = {{Robust Layout-aware IE for Visually Rich Documents with Pre-trained Language Models}},
  year = {2020},
  eprint = {2005.11017},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2005.11017},
}
Figure