VRDU: A Benchmark for Visually-rich Document Understanding

Understanding visually-rich business documents to extract structured data and automate business workflows has been receiving attention both in academia and industry. Although recent multi-modal language models have achieved impressive results, we find that existing benchmarks do not reflect the complexity of real documents seen in industry. In this work, we identify the desiderata for a more comprehensive benchmark and propose one we call Visually Rich Document Understanding (VRDU). VRDU contains two datasets that represent several challenges: rich schema including diverse data types as well as hierarchical entities, complex templates including tables and multi-column layouts, and diversity of different layouts (templates) within a single document type. We design few-shot and conventional experiment settings along with a carefully designed matching algorithm to evaluate extraction results. We report the performance of strong baselines and offer three observations: (1) generalizing to new document templates is still very challenging, (2) few-shot performance has a lot of headroom, and (3) models struggle with hierarchical fields such as line-items in an invoice. We plan to open source the benchmark and the evaluation toolkit. We hope this helps the community make progress on these challenging tasks in extracting structured data from visually rich documents.


INTRODUCTION
Visually-rich documents, such as forms, receipts, invoices, are ubiquitous in various business workflows.Distinct from plain text documents, visually-rich documents have layout information that is critical to the understanding of documents.Given the potential to automate business workflows across procurement, banking, insurance, retail lending, healthcare, etc., understanding these documents, and in particular extracting structured objects from them has recently received a lot of attention from both industry and academia [1,2,5,13,17,26].
While tasks such as classification [6] and Visual-QA [15] have been posed to study the understanding of such documents, in this paper, we focus on the task of extracting structured information.Optical character recognition engines (OCR) are typically used to extract the textual content and the bounding boxes of each of the words from the documents.Existing models rely on language models with multi-modal features to solve the task, where features from textual contents, images, and structural templates are jointly encoded through self-supervised training [1,5,11,17,24,25].Although recent models achieved impressive results [9,10,16,19], we argue that existing benchmarks do not reflect the challenges encountered in practice, such as having to generalize to unseen templates, complex target schema, hierarchical entities, and small training sets.
We identify five desiderata (Section 2) for benchmarks on this topic based on our observations of drawbacks of existing datasets.First, most existing benchmarks suffer from the fact that they lack richness in labeling schema [9,10,19].Entities are roughly considered as simple text strings while practical document types have a variety of types like numerical IDs, dates, addresses, currency amounts, etc. Further, real-world docs frequently have hierarchical and repeated fields like componentized addresses and line-items in invoices.Second, some benchmarks contain documents with limited layout complexity.Pages that are mostly organized in long paragraphs and sentences are more similar to plain text documents [19] and are not helpful evaluating our understanding of visually-rich documents.Third, the documents in some benchmarks may share the same template [9].This makes it trivial for the models to deal with these document by simply memorizing the structure even if the single template is complex.Next, existing datasets use different OCR engines [9,16].The large variety of OCR engines make it  We warrant that the actual broadcast information shown on this invoice was taken from the program log.The station does not discriminate in its advertising contracts, and it will not accept advertising intended to discriminate on the basis of race or ethnicity.Advertiser hereto affirms that nothing in this Agreement is intended to discriminate on the basis of race or ethnicity.This Agreement is subject to the Standard Terms and Conditions available at the link located above on this invoice.
powered by WideOrbit

Unrepeated Entity
Registration Form

Ad-buy Form
Entity i: -Entity Name: Flight Date From -Contents: "05/07/20" -BBox: (x0, x1, y0, y1) -Match Function: hard to tell whether the improvements come from the advanced models or more accurate OCR results.Finally, some benchmarks only provide the textual contents for each entity without further annotating the specific tokens in the document that are involved in the entities [9,19,20], which means the models cannot be supervised with the token-level annotation.While this seems minor, it is very difficult to re-construct the token-level annotation only with textual contents of entities since the same text (e.g."0.0") may appear multiple times in the document but only one of them may correspond to the target entity.It is necessary to involve human annotators to fix the issue by relabeling the documents with precise token spans.Also note that most existing approaches on this topic are based on sequence labeling models [1,5,8,8,22,[24][25][26] that require token-level annotations to work.
Based on these observations, we propose a new benchmark, VRDU, for Visually-Rich Document Understanding task.VRDU is designed to reflect the challenges encountered in practice and eliminate the unnecessary factors affecting the research.We hope that this benchmark helps bridge the gap between academic research and practical scenarios to facilitate future study on this topic.As shown in Figure 1, we collected political ad-buy forms from the Federal Communications Commission (FCC) 1 and registration forms from the Foreign Agents Registration Act (FARA) 2 , and constructed two datasets.We describe the annotated data, and the labeling protocol in Section 4.
Based on the two datasets, we then design three tasks of increasing difficulty.The tasks are designed to be similar to real applications.In Task 1 Single Template Learning, documents in the train and test sets are drawn from a single template.In Task 2 Mixed Template Learning, we increase the diversity of templates, but train and test sets for each document type are drawn from the same set of templates.In Task 3 Unseen Template Learning, the train and test sets are drawn from disjoint sets of templates to measure how well a model generalizes to unseen templates.Within each task, we compare the model performance with different number of training samples to understand the data efficiency for each approach.Finally, we evaluate the model performance with a type-aware match algorithm, where we use different matching functions for each entity according to its data type instead of simply using string matching when comparing the prediction results with the groundtruth.For example, when comparing numerical entities, we may want "4" and "4.0" to be considered equivalent, while for address fields, "4, Main St. " and "40 Main St. " ought not to be considered equivalent.
We report the performance of commonly-used baseline models, LayoutLM [24], LayoutLMv2 [25], LayoutLMv3 [8], and Form-Net [11] in each task.Our work is not meant to be a comparison of these model architectures.Through our experiments, we highlight three areas of opportunity for all these models.First, while the models are great at extracting from new instances of documents with a layout that matches one seen during training (Task 1 Single Template Learning and Task 2 Mixed Template Learning), they do worse on new layouts (Task 3 Unseen Template Learning).Second, few-shot performance continues to be hard with substantial room for improvement.Third, extracting hierarchical or repeated entities is really challenging, and all models perform worse on this compared to simple fields.
We summarize our contribution as follows.• We identify desiderata for benchmarks in the visually-rich document understanding task, arguing that the current datasets do not meet these requirements.• We propose VRDU, a new comprehensive benchmark for visuallyrich document understanding.We open-source the dataset with high-quality OCR results and annotations.We also define three tasks corresponding to different application scenarios, and opensource an evaluation toolkit with a type-aware matching algorithm.The toolkit and dataset can be found at https://github.com/google-research/google-research/tree/master/vrdu.
• VRDU satisfies all of our proposed desiderata and reflects practical challenges in extracting structured data from visually rich documents.It bridges the gap between academic research and practical scenarios to facilitate future study on this topic.• Through experiments on multiple commonly-used baseline models, we show that there is substantial room for progress on the tasks in VRDU with regard to template transfer learning, few-shot settings, and hierarchical entity extractions.

BENCHMARK DESIDERATA
We identify five key desiderata for a benchmark that reflects practical challenges in extracting structured data from visually rich documents.A benchmark on the visually-rich document understanding topic should involve rich schema, layout-rich documents, diverse template, high-quality OCR results, and token-level annotation.

Rich Schema
The structured data we need to extract from in practice reflect a rich diversity of schemas.Entities extracted have various types such as numerical IDs, names, addresses, dates, currency amounts, etc.They can be required, optional, or repeated for a given document.
In several cases, we also see hierarchical entities.For example, a US address field contains address lines, city, state, and zip code.A hierarchical entity is composed of all these components.Considering the heterogeneity of schema we encounter in practical settings, we believe a useful benchmark should reflect a rich schema.Contrast this with a dataset (see Figure 2) where the entities to be extracted are all treated as simple text strings named header, question, and answer.

Proprietary + Confidential Proprietary + Confidential
What makes a good benchmark?Rich Schema

Layout-rich Documents
The documents should have complex layout elements.Challenges in practical settings come from the fact that documents may contain tables, key-value pairs, switch between single-column and double-column layout, have varying font-sizes for different sections, include pictures with captions, and even footnotes.Contrast this with datasets where most documents are organized in sentences, paragraphs, and chapters with section headers.Figure 3 shows an example of a document with rich layout and contrasts it with a more traditional document that is the focus of classic NLP literature on long inputs.
What makes a good benchmark?Rich S (b) (a)

Diverse Templates
A benchmark collection should involve different structural layouts or templates as shown in Figure 4.It is trivial to extract from a particular template by memorizing the structure.However, in practice one needs to be able to generalize to new templates.Consider, for instance, an invoice parser.If a company starts working with a new vendor (and enterprises routinely work with new vendors every year), a model that memorized the set of templates corresponding to existing vendors is likely to break since the new vendor may send invoices with a different template.In order to reflect this real-world requirement, a useful benchmark for extraction from visually-rich documents should have diverse templates and test a model's ability to generalize to unseen templates.

High-quality OCR Results
Documents should have high-quality OCR results.Our aim with this benchmark is to focus on the VRDU task itself and we want to exclude the variability brought on by the choice of OCR engine.Existing benchmarks use different OCR engines, which makes the evaluation results inconsistent and the comparison unfair.It is confusing whether the performance improvements come from the  more advanced model design or are simply because of more accurate OCR results.Therefore, a benchmark should use the same highquality engine ensuring the quality of OCR is satisfactory and the choice of OCR engine is not a factor influencing the results when comparing the performance.

Token-level Annotation
A good benchmark ought to provide the token spans in the document that correspond to each entity in the target schema rather than simply provide text strings and leave the task of mapping the values to the corresponding token ranges open.Existing approaches solve the extraction task using sequence labeling models and tend to build their models through extending BERT-like language models with multi-modal features [1,5,8,22,[24][25][26].They use the hidden states from the language models to classify tokens into the BIO tags [14,18], i.e., Begin, Inside, Outside of an entity, and then extract entities accordingly.Thus token spans are required to construct training and evaluation sets.It is non-trivial to re-construct the token-level annotation only with the entity text.The possible ways are either labor-intensive or prone to errors.A intuitive approach is to find the phrases in the documents with the same textual contents with the entities, but these phrases are not necessarily to be the actual entity, as shown in Figure 5. [21] points out simply doing such value matching may result in worse F-1 scores in the We warrant that the actual broadcast information shown on this invoice was taken from the program log.The station does not discriminate in its advertising contracts, and it will not accept advertising intended to discriminate on the basis of race or ethnicity.Advertiser hereto affirms that nothing in this Agreement is intended to discriminate on the basis of race or ethnicity.This Agreement is subject to the Standard Terms and Conditions available at the link located above on this invoice.We warrant that the actual broadcast information shown on this invoice was taken from the program log.The station does not discriminate in its advertising contracts, and it will not accept advertising intended to discriminate on the basis of race or ethnicity.Advertiser hereto affirms that nothing in this Agreement is intended to discriminate on the basis of race or ethnicity.This Agreement is subject to the Standard Terms and Conditions available at the link located above on this invoice.
powered by WideOrbit Billing:

P.O. Box 14200 Tallahassee, FL 32317-4200
Send Payment To: We warrant that the actual broadcast information shown on this invoice was taken from the program log.The station does not discriminate in its advertising contracts, and it will not accept advertising inten discriminate on the basis of race or ethnicity.Advertiser hereto affirms that nothing in this Agreement is intended to discriminate on the basis of race or ethnicity.This Agreement is subject to the Standard and Conditions available at the link located above on this invoice.performance.For instance, a dataset annotates the total amount field in a grocery store receipt as "10", but "10" may also appear in the receipt as the number of purchased items.Human annotators are needed to annotate the documents again to create the accurate token-level annotation.Therefore, token-level annotation is necessary to properly train and evaluate current baseline models and future works.

RELATED WORK
Several benchmarks are available to evaluate the performance of models in visually-rich document understanding.The properties of these benchmarks and the comparison with our proposed benchmark are shown in Table 1.
FUNSD [10] is a dataset widely used in the form understanding task, which contains 199 fully annotated forms with three different entity types, Header, Question, and Answer.This simple schema is too limited to reflect the rich schemas we encounter in practical scenarios.CORD [16] is a receipt dataset where the document images are photos of grocery receipts.While it does have a rich schema with different types including hierarchical and repeated fields, there is fairly limited template diversity.Furthermore, image artifacts (tilt, lighting, distortion) result in OCR errors.In our work, the focus is not on challenging OCR scenarios, but rather on benchmarks that help us understand how well models are able to extract information after high-quality OCR.SROIE [9] is another receipt dataset.A few key fields are labeled, such as Company Name, Address, and Total Price -a fairly simple target schema.Further, the receipts in the dataset use the same template, failing to satisfy the requirement for diverse templates.Kleister-NDA [19] collects non-disclosure agreements and labels important fields but the documents are full of plain text paragraphs and chapters and show few layout elements.
Kleister-Charity [19] and DeepForm [3,20] collect charity financial reports and political ad-buy documents respectively.Compared with the datasets above, DeepForm and Kleister-Charity involve layout-rich documents of various templates.However, both of them fail to provide token-level annotation.Further, both datasets have a target schema with multiple types, but lacking hierarchical and repeated fields.As we describe in Section 2.5, token-level annotations are critical to properly training and evaluating sequence labeling models.Upon investigation, we found that the source documents for DeepForm do contain many more fields including hierarchical and repeated fields.We based one of the two dataset in VRDU, the ad-buy forms on the same source and designed the labeling task to include bounding boxes and token-level annotations.This paper proposes VRDU, composed of two datasets of Registration Form and Ad-buy Form, both of which have rich schema, layout-rich documents, diverse templates, high-quality OCR outputs, and token-level annotations.The Ad-buy Forms provide hierarchical entity annotations, introducing a practical structural extraction task that has not been explored in any of the existing benchmarks.

VRDU BENCHMARK
Based on the desiderata outlined in Section 2, we introduce VRDU, a new public benchmark for visually-rich document understanding.This benchmark includes two datasets: Ad-buy Forms and Registration Forms.These documents contain structured data with rich schema including hierarchical repeated fields, have complex layouts that clearly distinguish them from long text documents, have a mix of different templates, and have high-quality OCR results.We provide token-level annotations for the ground truth ensuring there is no ambiguity when mapping the annotations to the input text.In the remainder of this section, we describe: (1) the process used for collecting and annotating the datasets, ( 2) the three extraction tasks we designed along with the prescribed train/validation/test splits, and (3) the design and implementation of the type-aware matching algorithm used to compare the extracted entities with the ground-truth

Data Collection
Visually-rich documents are common in various business workflows.However, there are still a large proportion of documents that fail to meet our proposed desiderata.To make things worse, documents with sensitive information can only be used as in-house datasets due to privacy issues, so they are unsuitable for public academic research.To find visually-rich documents that satisfy our desiderata and are available to the public, we crawl political ad-buy forms from the same resource as the DeepForm dataset, the Federal Communications Commission, and construct a new dataset, the Ad-buy Forms.DeepForm includes documents of high quality but fails to provide token-level annotation with rich schema so we collect the documents from the same source and annotate them from scratch.We also crawl documents from the Foreign Agents Registration Act and construct a separate dataset, the Registration Form.We use the state-of-the-art commercial OCR engines to recognize the raw data in the documents 3 .
4.1.1Ad-buy Forms.The Ad-buy Forms consist of 641 documents about political advertisements.Each document is an invoice or receipt signed between a TV station and a campaign group.The documents use tables, multi-columns, and key-value pairs to record the advertisement information, such as the product name, the flight dates, and the total price.They also have a large table showing more details of the advertisements including the specific release date and time.

Registration
Forms.The Registration Forms consist of 1915 documents about foreign agents registering with the US government.Each document records essential information about foreign agents involved in activities that require public disclosure.Contents include the name of the registrant, the address of related bureaus, the purpose of activities, and other details.We include three forms in the dataset, so the documents have three different templates, Amendment, Short Form, and Dissemination Report.All these forms are on the same topic so we label them using the same schema.

Human Annotation
After we collect visually-rich documents for the two datasets, we hire human annotators to annotate entities in the documents using a rich labeling schema.We describe the labeling schema, the labeling team, and the label protocol as follows.

Labeling Schema.
The documents in our proposed benchmark present structured data with fairly rich schema, where entities can be repeated, unrepeated, or hierarchical, and the data types can be numerical strings, price values, etc.After examining a subset of the documents, we decide the target schema with 6 unrepeated entity names for Registration Forms, and 9 unrepeated entity names and 1 hierarchical repeated entity name for Ad-buy Forms.The entity names and their numbers are shown in Table 2 and Table 3. • The unrepeated entities are the entities that only have one unique value in each document.Sometimes they may be present multiple times on a document, but with each instance having the exact same value.For example, a document may have several fields showing the contract ID but all these fields have the same content.• The repeated entities are the entities that belong to the same type but have different values.For example, the names of purchased items are common repeated entities in grocery receipts.People may buy several items so there will be multiple values for the entity type, purchased_item_name. • The hierarchical entities are the entities containing several repeated entities as components.For example, in Ad-buy Form, we design the line_item as a hierarchical entity, which corresponds to each TV program.Each line_item contains description, start/end_date, and sub_price of TV programs and all of these are repeated entities.In practice, we group the repeated entities that belong to a specific TV program as a line_item.
4.2.2Labeling Team.We hired a labeling team of 30 annotators and 3 experts.All annotators and experts are experienced in labeling English documents and all of our data are in English.In our labeling task, the documents were first labeled by the annotators and then checked by the experts to guarantee the labeling quality.We acquired stats from our team of annotators on how long the classic annotation takes for various document types.We found it averaged 6-8 min for an annotator to label a single-page document with fewer than 20 fields while it averaged 10-30 min for an annotator to label a multi-page document with 25 fields.So we picked a conservative value (6 min) as the estimated time of labeling one document in this paper.

Labeling Protocol.
During the annotation, a pool of experienced annotators were provided with the previously annotated documents as reference and the labeling instruction as guidance.They drew bounding boxes to highlight the entities and labeled each entity into different categories.The system would collect the OCR results of the token span in the bounding box to construct token-level annotation, including the coordinates of the bounding box, the textual contents of entity, and the index in the sequence.If  unrepeated entities occurred multiple times, they were instructed to identify all instances and the model only needs to extract one of them in the evaluation.When labeling the hierarchical entities, the annotators labeled the component entities as well as drew a larger bounding box that grouped the components together into a hierarchical entity.The system would use the entities in the larger box to compose hierarchical entities in our dataset.After the first pass of annotation, a pool of experts were assigned to review the results labeled by the first pool.We took the final corrected results from the expert pool and used them in our experiments.This is the dataset we published.

Common Labeling Errors.
To better understand the labeling protocol, we further study the annotators' common error types.
• Confusion of similar entities: In Ad-buy Form, the annotators are sometimes confused between the start/end dates of the flight and other time periods in the documents (e.g. the invoice period).• Incomplete multi-line entities: In the Ad-buy Form dataset, the annotators sometimes ignore the last line of the address field since the address field usually contains multiple lines.To cope with these errors, we give annotators previous annotated documents as reference and ask another expert annotator to double check all the annotation results.We believe our labeling protocol can well prevent the annotation mistakes and produce a highquality benchmark.

Task Settings
We design three tasks with increasing difficulty: 4.3.1 Task 1: Single Template Learning (STL).This is the simplest scenario where the training, testing, and validation sets only contain a single template.This simple task is designed to evaluate a model's ability to deal with a fixed template.Naturally, we expect very high F1 scores for this task.

Task 2: Mixed Template Learning (MTL)
. This task is similar to the task that most related papers use: the training, testing, and validation sets all contain documents belonging to the same set of templates.We randomly sample documents from the datasets and construct the splits to make sure the distribution of the each template is not changed during the sampling.

Task 3: Unseen Template Learning (UTL)
. This is the hardest setting, where we evaluate if the model is able to generalize to unseen templates.For example, in the Registration Forms dataset, we train the model with two of the three templates and test the model with the remaining one.The documents in the training, testing, and validation sets are drawn from disjoint sets of templates.To our knowledge, previous benchmarks and datasets do not explicitly provide such a task designed to evaluate the model's ability to generalize to templates not seen during training.

Dataset Splits.
In each of the task mentioned above, we include 300 documents in the testing set.We build 4 different training sets with 10, 50, 100, 200 samples respectively.The objective is to evaluate models on their data efficiency.The prescribed dataset splits are published along with the datasets to enable and apples-toapples comparison between different models using this benchmark.

Evaluation Toolkit
To evaluate extraction performance, we propose a type-aware fuzzy matching algorithm for each of the entities in our benchmark and report both the macro and micro F1 score for the dataset.It is common practice to compare the extracted entity with the ground-truth using strict string matching [23].However, such a simple approach may lead to unreasonable results in many scenarios.For example, "$ 40,000" does not match with "40,000" because of the missing dollar sign when extracting the total price from a receipt, and "July 1, 2022" does not match with "07/01/2022".Dates may be present in different formats in different parts of the document, and a model should not be arbitrarily penalized for picking the wrong instance.We implement different matching functions for each entity name based on the data type.In the examples mentioned before, we will convert all price values into a numeric type before comparison.Similarly, date strings are parsed, and a standard date-equality function is used to determine equality.

Post-processing for Evaluation Toolkit
We include repeated, unrepeated, or hierarchical entity names in our proposed VRDU benchmark.Our benchmark requires the model to predict a unique value for unrepeated entity names and group component entities into a hierarchical entity.However, such constraints are usually ignored by existing models.For example, the series ID is an unrepeated entity and each document should only have one unique value for it, so the model is expected to extract a single string with the highest confidence instead of providing a number of candidates for the users to choose from.When there is no confidence score provided by the model, we simply keep the first extracted entity as the answer for the unrepeated entity names.
The hierarchical entity is a new kind of entity name proposed by our benchmark.Since existing works only focus on the extraction of individual entities, we propose a heuristic method to group the related individual entities into hierarchical ones and evaluate the result accordingly.The method is shown in Algorithm 1. Specifically, the repeated entities are first extracted from the document by the extraction model.Then, we list all these entities according to their index in the reading order extracted by the OCR engine.Then, we run our algorithm to split the list into several spans and each span corresponds to a hierarchical entity.The split point is decided by the occurrence of entity types.Briefly, when an entity type appears the second time, we split the list and build a hierarchical entity with the span.For example, supposing we have 3 entity types, A, B, and C, the extracted list, [A, B, C, B, C], would be divided into [A, B, C] and [B, C] where the split point is the second B in the list.

EXPERIMENTS
We conduct experiments on VRDU and evaluate baseline models on the three proposed tasks.We report the micro-F1 and the macro-F1 scores across the training sizes proposed.Our primary goal with these experiments is to demonstrate that several challenges remain open in this space.In fact, while performance on other datasets discussed in Section 3 might indicate that this is a solved problem, our results show all models fare worse on VRDU highlighting substantial room for improvements.However, comprehensive comparison between existing models is an explicit non-goal for this paper.
• LayoutLM: LayoutLM is a layout-aware pre-trained language model which encodes the absolute coordinates of bounding boxes in the embedding layers of BERT [4] to inform the model of the structural information.Although the visual features from ResNet [7] are appended to the hidden states of LayoutLM to solve the task by the authors, we ignore them since they are not incorporated in the pre-training stage and only serve as add-on features to enhance performance.Thus, LayoutLM is a multimodal language model with text and layout features.• LayoutLMv2: LayoutLMv2 further improves the layout embedding in LayoutLM by considering the relative distance between different bounding boxes and proposes the two-stream multimodal Transformer encoder to learn the correlation between the image and the text.The visual features are properly integrated in the Transformer framework, so LayoutLMv2 is a multi-modal language model with text, layout, and visual features.• LayoutLMv3: LayoutLMv3 improves the modeling with image features.Cross-modality pre-training tasks are also incorporated to enhance the performance.• FormNet: FormNet first uses the attention mechanism to model the 2D spatial relationship between words and further goes beyond simply sequence labeling approach by leveraging the graphs constructed by the layout elements in the documents to aggregate semantically meaningful information from neighboring tokens.Although we acknowledge there are many other approaches to solving structured extractions from such documents [1,2,5,8,12,17,22,26], we only consider these three commonly-used ones to highlight the challenges common to all three models and inspire possible directions for future study.As we said previously, a comprehensive comparison is outside the scope of this paper.

Experiment Results
We report the micro-F1 score and macro-F1 score of the three tasks, Single Template Learning (STL), Mixed Template Learning (MTL), and Unseen Template Learning (UTL), under different number of training samples in Table 4. Since Ad-buy Form dataset contains a variety of templates and there are only a limited number of documents for each template, we skip the STL task for it.We denote the number of training samples as |D|.Under each setting, we build three training sets of the same size using different random seeds, and the reported numbers are the average result of each model on the three training sets.
First, comparing the results on VRDU and on other benchmarks in Table 4, it is clear that there is ample room for improvement.Even when |D | = 200, the highest micro-F1 score is around 90% on Registration Form and around 45% on Ad-buy Form.In contrast, FormNet achieves 97.21% micro-F1 score and LayoutLMv2 achieves 96.01%micro-F1 score on CORD [11,25].LayoutLMv2 achieves 97.81% micro-F1 score on SROIE [25].One might think that results on CORD and SROIE indicate that this is a solved problem.As results on VRDU show, a dataset that reflects challenges in practical settings shows that there is much room for improvement.The performance of FormNet on FUNSD is 84.69% micro-F1 score, and that of LayoutLmv2 is 84.20% micro-F1 score [11,25].Although there is still room to improve, the simplistic labeling schema used in FUNSD makes the results less representative of practical tasks.
We also observe consistent improvement as training data size increases.Even for the simplest task, STL (on Registration Forms), the micro-F1 score of FormNet when |D| = 10 is lower than that when |D| = 50 by 15.16 points.This 15+ point gap remains across all tasks for both datasets between the |D| = 10 and |D | = 50 settings.This holds true for all three models, underscoring that few-shot performance is difficult for all models, even for the simple STL setting getting to micro-F1 scores of just 74.22%.
We then compare the performance of different tasks, STL, MTL, and UTL.The tasks are designed to study the template generalization of each model.From the results, we can see all models performs well in STL and MTL and achieve micro-F1 and macro-F1 scores higher than 80% in both datasets with 200 training samples.We attribute the performance to the fact that there are no unseen layout structures involved when generalizing to the testing set in STL and MTL.However, there is a noticeable gap between the performance of MTL and UTL.At 200 training documents, micro-F1 for UTL is 13-17 percentage points worse than the micro-F1 for MTL across the three models.The performance of UTL on Ad-buy Form is worse than MTL by about 3 points.Recall that the test set in UTL contains documents with templates (layouts) not seen in the training set.We believe techniques that allow models to generalize to new layouts even with modest training sets are of practical importance.
Studying the performance in Ad-buy Form, we see the macro-F1 scores are much higher than the micro-F1 scores.The micro-F1 score weighs every instance of an entity equally, while the macro-F1 scores average the F1 score for each entity.The huge difference between these scores for Ad-buy Form is because of the presence of hierarchical repeated entities with a very low F1 score.

Performance on Hierarchical Entities
We next study the performance of hierarchical entities in Ad-buy Form dataset.Consider the performance of FormNet on MTL.The performance of extracting hierarchical entities vs. other entities is plotted in Figure 7.As we can see, there is a huge gap of 60 -70 points across different sizes of training sets when comparing the micro-F1 score of hierarchical entities and other entities.In contrast to unrepeated entities, the hierarchical entity requires the model not only to correctly extract the corresponding entities, but also to group the components together.Currently, a heuristic method is used as a simple baseline to deal with the hierarchical entity since no existing models take the hierarchical entity type into consideration.We describe the method in detail in Section 4.5.However, such a heuristic results in very low F1 scores for the entity.It is still an open question for future research how to properly extract the hierarchical entities from visually-rich documents.

Case Study
We select four loss cases in the experiments of FormNet and visualize the errors in Figure 6.We hope this spurs ideas for future improvements.

CONCLUSIONS AND FUTURE STUDY
In this paper, we identify five benchmark desiderata to measure progress on solving structured extractions from visually-rich documents in real application.We argue that existing benchmarks fall short on these and propose a new comprehensive benchmark, VRDU, including the dataset with high-quality OCR results and annotations, the tasks corresponding to different application scenarios, and the evaluation toolkit using the type-aware matching algorithm.Based on the novel task settings and extensive experiments, we highlight three areas of opportunity in the visually-rich document understanding task, including the generalization to new templates, the extraction under few-shot scenarios, and the extraction of complex hierarchical-repeated fields.We make the two datasets, all train/validation/test splits, and the evaluation toolkit publicly available.We hope this facilitates progress in this area.In future study, we would further evaluate the existing models using our benchmark to understand how models perform when incorporating multi-modal features into the language models and explore whether there are any potential directions of new frameworks solving the task.We will also focus on the three areas of opportunity discovered in this paper, and explore approaches that can solve the visually-rich document understanding task in the scenarios with unknown templates, limited number of training samples, and hierarchical entities.

(
Extract the Year/Month/Day fields using format strings)

Figure 1 :
Figure 1: Overview of the VRDU benchmark: (a) high-quality annotation of rich labeling schema; (b) tasks of different difficulty levels and different number of training samples; (c) type-aware matching algorithm for entities of different data types.

Figure 2 :
Figure 2: Examples of labeling schema: (a) specifies data types for each text fields, such as date strings, address lines, price values, and hierarchical entities (denoted with Bl , Bl , Bl , Bl , respectively); (b) treats all text fields as simple text strings ignoring the specific data type (denoted with Bl ).

Figure 3 :
Figure 3: Examples of layout elements in the documents: (a) involves rich layout elements, such as images, tables, keyvalue pairs, and multi-columns (denoted with Bl , Bl , Bl , Bl , respectively); (b) largely contains natural language like paragraphs, sentences, chapters (denoted with Bl ).

Figure 4 :
Figure 4: Examples of document templates: (a) two examples of the same document type with different templates (entities denoted with Bl , Bl , Bl for address, contract ID, and TV station name, respectively); (b) example of different documents that share the same template.

Figure 5 :
Figure 5: Examples of token-level annotation in visually-rich documents: (a) the dataset without token-level annotation where only the textual contents of entities are provided, and it is non-trivial to tell which "05/13/20" in the page is the value of flight end date; (b) the dataset with token-level annotation where all tokens are labeled with BIO tags.

Figure 7 :
Figure 7: Comparison of FormNet on hierarchical and other entities in Mixed Template Learning, where |D| denotes the number of training samples.

5. 4 . 1
Incomplete Extraction.Example 1 and 4 suffer from the incomplete extraction, i.e., the model can correctly locate the groundtruth entity but fails to include all the necessary information.In Example 1, the TV_address field is hidden in complex context, which makes it hard to recognize the P.O.Box as part of the address.In Example 4, the error of Registrant_name is because of the handwritten characters in different sizes and fonts.The models cannot group the characters together to extract the right entity.

5. 4 . 2
Misleading Key Words.The errors in Example 2 and 3 result from misleading key words.Specifically, in Example 2, the model is confused by the similar key word, "Invoice #", and extract the Invoice ID instead of the Order ID, although there are cases in the training set where the key word for contract_ID field is "Order #".In Example 3, the model fails to extract any entity as Property since the document is in a new template where "Station" is used as the key word for Property field.To solve the rare case in Example 3, it is useful to take into consideration that "WBTW" is common in the training set as Property field.

Table 1 :
The statistics of VRDU and other existing benchmarks.* denotes the number of hierarchical entities in the dataset, where VRDU-Ad-buy Form involves 1 hierarchical entity and the hierarchical entity has 5 entities as components.

Table 2 :
The labeling schema of VRDU.

Table 3 :
The statistics of entity numbers in VRDU.The italic entity names are hierarchical entities, which includes several repeat entities as components.

Table 4 :
Experiment results of Single Template Learning, Mixed Template Learning, Unseen Template Learning on Registration Form and Ad-buy Form.