Abstract
Information extraction from visually-rich documents (VRDs) like invoices and receipts presents unique challenges due to the heavy reliance on spatial layout. Traditional sequence labeling methods often struggle with class imbalance and multi-value entities. This paper proposes a query-based span extraction approach that utilizes a novel recursive link decoder to handle multiple values for a single field. Experimental results on the CORD dataset demonstrate that this method outperforms standard sequence labeling baselines, particularly in identifying rare data fields.
Introduction
Extracting information from Visually-Rich Documents (VRDs) is a complex task for standard Natural Language Processing (NLP). Unlike plain text, the meaning of elements in an invoice or receipt depends significantly on their 2D layout. For instance, the spatial relationship between a numerical value and a "Total" label is more informative than the sequence of words surrounding it.
Most existing models rely on sequence labeling, where each token is classified (e.g., as "Date," "Address," or "Background"). This approach suffers from significant drawbacks:
- Class Imbalance: Background text often accounts for over 95% of the document, making it difficult for models to learn rare, important fields.
- Rigid Tag Sets: Models trained on specific fields cannot easily adapt to new field types without full retraining.
- Multi-value Entities: Standard models struggle to extract multiple instances of the same field, such as multiple line items in a table.
Methodology
The proposed approach shifts from per-token classification to Extractive Question Answering (QA) logic. The model is provided with a "query" (a learnable embedding representing a specific field) and is tasked with identifying the start and end positions of the corresponding answer within the document context.
Recursive Link Decoder
To address the limitation of standard span extractors in finding multiple values, the authors introduced a recursive mechanism. After identifying the first span using the initial query, the model uses the hidden representation of that span as a new query to find the subsequent related span. This process continues until a "null" position is reached, effectively daisy-chaining all related entities.
Cross-Lingual Transfer and Spatial Intelligence
To overcome data scarcity in specific languages like Japanese, the researchers employed a cross-lingual initialization strategy. They utilized the spatial and encoder layers from an English-trained LayoutLM—leveraging its pre-existing "spatial intelligence"—and integrated word-embedding layers from a Japanese BERT model. This allows the model to understand local language nuances while maintaining a robust understanding of document layouts.
Experimental Results
The study evaluated the span extraction approach using three datasets: the public CORD benchmark (Indonesian receipts) and two internal Japanese datasets (BizDocs and shipping invoices).
Performance on CORD
The span extraction method demonstrated superior performance on the CORD dataset, achieving a 95.71% Micro F1-score. This result surpasses larger models such as LayoutLM-large and LayoutLMv2-base.
A significant improvement was observed in Macro F1 (83.46% compared to 80.08% for the baseline). Because Macro F1 weighs all fields equally, this gain highlights the model's enhanced ability to extract "rare" fields that are typically overlooked by sequence labeling models. On Japanese invoices, adding the span-based pre-training task further boosted the final F1 score by up to 2.4%.
Conclusion
By decoupling the query from the context and employing a recursive decoding mechanism, the proposed span extraction approach provides a flexible and high-performing alternative to traditional sequence labeling for VRDs. Future work includes integrating this approach with more advanced backbones like LayoutLMv2 and extending the recursive logic to handle more complex, nested document structures.
Summary updated