Abstract
LASER (Label-Aware SEquence-to-sequence Recognition) is a novel framework designed to address the challenges of entity recognition in document images, particularly in low-resource "few-shot" settings. Traditional methods rely on rigid sequence labeling (e.g., IOBES tagging), which often ignores the semantic meaning of labels and requires extensive annotated data. LASER reformulates entity recognition as a generative sequence-to-sequence task. By incorporating label surface names into the output sequence and mapping them to a 2D spatial embedding space via trainable spatial identifiers, the model leverages the inherent semantic knowledge of pre-trained language models. Experimental results on the FUNSD and CORD-Lv1 benchmarks show that LASER significantly outperforms state-of-the-art models like LayoutLM, achieving substantial gains in precision and F1-score with as few as one training example.
Introduction
Extracting structured information from document images—such as receipts, forms, and invoices—is a cornerstone of document AI. Traditionally, this is framed as a sequence labeling task where every word is assigned a tag (e.g., "B-Header"). However, this approach suffers from two primary limitations: semantic blindness and data hunger.
Semantic blindness occurs because traditional models treat labels as abstract class IDs, ignoring the rich semantic information inherent in label names like "Question" or "Total." Data hunger arises because the label space expands significantly with tagging schemes, requiring thousands of annotated examples to learn the relationships between text, layout, and labels. In real-world scenarios, collecting such data is often prohibitively expensive or restricted by privacy concerns, making robust few-shot learning a critical necessity.
Methodology: The LASER Framework
LASER addresses these challenges by moving away from tagging and toward a Sequence-to-Sequence (seq2seq) approach. The framework introduces three key innovations:
- Generative Labeling Scheme: Instead of tagging words in place, the model generates a new sequence that includes entity boundaries and the actual surface names of labels (e.g., "menu," "void"). This allows the model to leverage the semantic knowledge already present in pre-trained language models.
- Spatial Identifiers: While document text has coordinates, abstract labels do not. LASER introduces trainable "spatial identifiers" that map these labels into the same 2D coordinate space as the text. This enables the model to learn that certain labels are spatially correlated with specific regions, such as headers appearing at the top of a page.
- Multi-modal Prefix LM: Built on a transformer architecture, LASER uses a partially-triangle attention mask. This allows the source document text to be fully visible (bidirectional attention) while the target sequence is generated autoregressively.
Experimental Setup and Results
The model was evaluated on two primary document benchmarks in few-shot settings (1, 3, 5, and 7 shots):
- FUNSD: 199 noisy, scanned forms with labels like header, question, and answer.
- CORD-Lv1: ~1,000 receipts with complex hierarchies, simplified to labels like menu, subtotal, and total.
LASER demonstrated superior performance across all few-shot configurations. Most notably, in the 1-shot FUNSD test, LASER achieved an F1-score of 32.36, compared to LayoutLM’s 15.18. This represents a massive gain in scenarios where data is extremely scarce. The model also showed a remarkable ability to maintain high precision, indicating it is highly reliable when it identifies an entity.
Key Insights and Conclusion
The success of LASER highlights that labels are data. Using human-readable names allows the model to apply "common sense" from its pre-training to the document extraction task. Furthermore, the generative approach is more efficient in its use of the label space, as it does not need to learn separate output dimensions for every possible tag in a scheme.
While LASER sets a new state-of-the-art for few-shot document entity recognition, future work will focus on automating the selection of informative label names and exploring the model's performance in zero-shot scenarios where categories are entirely unseen during training.
Summary updated