Introduction
Extracting structured information from "visually-rich documents" (VRDs)—such as receipts, invoices, and technical forms—is a critical task for automating business workflows. While Transformer-based models like LayoutLM have set new benchmarks in this field, they often struggle with two primary issues: high data hunger and a fundamental mismatch between standard training objectives and real-world evaluation metrics.
This paper introduces a reinforcement learning (RL) finetuning framework designed to address these limitations. By treating information extraction (IE) as a sequential decision-making process and optimizing against a multi-faceted reward function, the proposed method achieves substantial performance gains, particularly in low-data scenarios where traditional supervised learning often fails.
The Limitations of Supervised Learning in IE
Standard Supervised Learning (SL) approaches for document understanding typically rely on sequence labeling or extractive Question Answering (QA) objectives. However, these methods face significant hurdles:
- Data Scarcity: Achieving high accuracy often requires thousands of annotated examples. In specialized business domains or for multi-lingual applications, such data is expensive and time-consuming to acquire.
- Objective Mismatch: The cross-entropy loss used in SL does not always correlate perfectly with human preferences or evaluation metrics like the F1 score.
- Static Learning: SL models lack a straightforward mechanism to incorporate real-time feedback from domain experts once the initial training phase is complete.
Methodology: Reinforcement Finetuning
The authors propose a finetuning stage using Proximal Policy Optimization (PPO) to refine a pre-trained backbone, framing the extraction task as an RL problem.
The Policy Network
The framework utilizes SpanIE-Recur, a model built upon the LayoutLM architecture. Instead of traditional sequence labeling, the task is framed as extractive QA. For a given field (e.g., "What is the total price?"), the model acts as a policy network to predict the start and end positions of the corresponding text span within the document.
The Unified Reward Function
The core innovation is a "Unified Reward" function ($r$) that provides a scalar signal to the agent based on the quality of its extraction. This reward is a weighted combination of four distinct components:
- String Matching: Measures the lexical similarity between the predicted text and the ground truth using Levenshtein distance.
- Location Reward: Uses Intersection over Union (IoU) to evaluate how well the predicted bounding box physically overlaps with the actual data location on the document.
- Label Reward: Penalizes the model for misidentifying the semantic category of a field, ensuring the model distinguishes between similar-looking data (e.g., distinguishing a "date" from a "total").
- Semantic Reward: Employs a multilingual sentence encoder to assess the semantic proximity of the prediction to the truth. This allows the model to receive positive reinforcement even if the exact character sequence differs slightly, provided the meaning remains the same.
Human-In-The-Loop (HITL) Integration
To further align the model with human expectations, the researchers designed an interface where experts review the top five candidates generated by the model. The expert's selection acts as the "ground truth" for the RL reward, enabling the model to learn directly from human preference and adapt to specific domain nuances with minimal interaction.
Experimental Evaluation
The framework was evaluated on public datasets (SROIE and CORD) and private Japanese datasets consisting of technical documents and invoices.
Performance in Low-Data Regimes
The most striking finding was the model's efficiency when training data was scarce. On the CORD dataset (Indonesian receipts with 30 complex labels), using only 2% of the available training data, the RL finetuning improved the F1 score from a baseline of 3.04% (SL) to 21.23% (+18.19%).
Similar trends were observed across other splits and datasets:
- CORD (5% data): Performance increased by +6.35%.
- Japanese Technical Documents (2% data): Observed a +4.27% F1 improvement.
- Expert Feedback: Even on models trained on 100% of the data, just three interactions with a human expert provided measurable improvements, proving the system's ability to "fine-tune" itself to specific user preferences.
The Power of Semantic Rewards
Ablation studies highlighted that the semantic reward was the most critical component. Without it, performance dropped significantly, suggesting that capturing the underlying meaning of document text is more vital for successful extraction than perfect character-level matching.
Conclusion and Future Work
Reinforcement finetuning offers a robust path forward for document image understanding, particularly for industries where labeled data is a bottleneck. By optimizing for non-differentiable rewards that reflect actual task success, the framework bridges the gap between training objectives and deployment needs.
Future research will focus on automating the weighting of reward components, which currently requires manual tuning. Additionally, the authors aim to incorporate "negative learning" from rejected candidates in the HITL system and refine the user interface to support large-scale human-AI collaborative training.
Summary updated