TL;DR
Large Language Models (LLMs) are revolutionizing document understanding, but current datasets for training them often use simplistic, uniform templates that don't reflect real-world query complexity. This paper introduces K2Q, a new collection of diverse, rich prompt-response datasets derived from existing Key Information Extraction (KIE) datasets, demonstrating that training on these more complex templates significantly improves LLM performance and robustness.
What Problem Does This Paper Address?
Visually Rich Document Understanding (VRDU) is a critical field for automating tasks across industries. While LLMs are showing great promise in this area, their effectiveness hinges on the quality and diversity of training data. A common practice for creating instruction-tuning datasets is to convert existing KIE datasets into a prompt-response format using simple, templated questions like "What is the value for the {key}?". However, the authors argue that these uniform templates are insufficient for building robust models that can handle the wide variety of questions encountered in real-world scenarios. This lack of diversity can lead to models that perform poorly when faced with slightly different question formulations or document structures.
Methods
The core contribution of this paper is the K2Q dataset, a collection of five KIE datasets transformed into a prompt-response format using a diverse suite of bespoke templates. The generation pipeline involved:
- Template Design: A large number of diverse templates (over 100) were manually designed by VRDU researchers for each specific KIE dataset. These templates aim to capture more complex query structures, including multiple entities, extractive and boolean questions, and domain-specific jargon.
- Data Transformation: Existing KIE annotations were populated into these diverse templates to create over 300,000 questions across more than 12,000 documents.
- Data Cleaning: A rigorous data cleaning process was applied to the original KIE annotations to ensure natural-sounding questions and answers.
- Evaluation: The authors conducted extensive experiments to compare the performance of various models (including LLMs) trained on K2Q versus simpler template-based datasets (referred to as SD). They used metrics like Average Normalized Levenshtein Similarity (ANLS) and analyzed error types (groundedness, mis-extractions, misprints) to demonstrate the benefits of K2Q.
Datasets
The paper introduces the K2Q dataset, which is derived from five existing KIE datasets:
- CORD (Park et al., 2019)
- Docile (Simsa et al., 2023)
- Kleister Charity (Stanislawek et al., 2021)
- VRDU Ad-Buy (Ad-Buy)
- Registration Form (Reg. Form)
The authors also created a baseline dataset (SD) using a single, simple template ("What is the value for the {key}?") for comparison.
Key Insights and Ideas
- Template Diversity is Crucial: The most significant insight is that the diversity and complexity of templates used for generating instruction-tuning data directly impact the performance and robustness of VRDU models. Simple, uniform templates lead to models that struggle with variations in real-world queries.
- K2Q Mimics Human Queries Better: K2Q exhibits closer characteristics to human-generated VQA datasets than simpler templated datasets, as evidenced by lower perplexity and higher self-BLEU scores when compared to human-generated question distributions.
- Beyond Simple Extraction: The K2Q templates go beyond basic "what is the value for X?" questions, incorporating multi-entity questions, boolean queries, and domain-specific language, which better reflects practical use cases.
- Robustness to Template Change: Models trained on the diverse K2Q templates demonstrate better generalization and robustness when tested on different question formulations compared to models trained on simple templates.
Key Results
- Training on K2Q consistently improved model performance compared to training on the simpler SD dataset. For instance, models trained on K2Q showed a 40% improvement in relative ANLS performance over simple templates.
- The K2Q dataset is significantly larger and more diverse than existing templated datasets, containing over 300,000 questions across more than 12,000 documents.
- Error analysis revealed that models trained on K2Q generally exhibit higher groundedness and a better understanding of the questions, leading to more accurate and contextually relevant answers.
- The paper highlights that even with advanced models, the quality of the training data (specifically template diversity) plays a pivotal role in achieving robust performance.
Limitations and Future Work
- Human Intervention Still Needed: While K2Q alleviates the burden of data collection by leveraging existing KIE datasets, it still requires significant human effort to curate high-quality, diverse templates.
- LLM-Generated Templates: The authors suggest that a future iteration of K2Q could explore using LLMs like GPT-4 to generate templates, potentially further scaling the process.
- Broader Model Evaluation: Due to resource limitations, the experiments were conducted with a limited set of models. Future work could include a more comprehensive evaluation with state-of-the-art OCR-free LLMs.
- Data Contamination: Some models used in the experiments (e.g., mPlugDocOwl, UDOP, GPT-4) may have seen some of the K2Q datasets during their pretraining, which could affect zero-shot and fine-tuning performance.
- Future Template Expansion: The authors plan to expand templates to cover a wider range of question types, few-shot instances, chain-of-thought answers with layout-informed explanations, and multi-round instructions.
Summary updated