通过推断文档模板实现高效精准的数据提取。
Visual Template Inference for Data Extraction from Documents
- 先分析文档中字段的固定位置模式,推断出底层模板结构。
- 在34个数据集上比现有工具精度和召回率高25%以上。
- 适合需要批量处理海量复杂模板文档的场景。
许多模板化文档(如发票、税务文件、财务报告和采购订单)是基于结构化数据按视觉模板自动生成的。从这些文档中有效提取数据对支持下游分析任务至关重要。当前数据提取工具常因复杂版式导致效果不佳,且在大规模数据上延迟高、成本高,还需大量人工干预。本文提出工具TWIX,核心思路是先推断生成文档的底层模板,再基于模板提取数据,而非直接解析文档。TWIX首先利用字段间一致的位置模式(如表格中列与列、键值对中键与值在多个记录中保持固定距离共现)识别出潜在字段;随后通过视觉约束(如表格行与其列头垂直对齐、键值对中键与值水平对齐)将字段组装成完整模板;最后基于该模板高效准确地提取数据。在包含34个真实世界数据集的基准测试中,TWIX在精度和召回率上均优于SOTA工具(Evaporate、Textract、Azure Document Intelligence)及基于视觉的LLM(GPT-4-Vision)25%以上。在包含30个大型数据集的另一基准测试中,其处理速度比最先进工具快520倍,成本降低3,786倍,适用于超2000页的大规模文档集合提取。
原文摘要 · Abstract (English)
Many templatized documents are programmatically generated from structured data following a visual template. Such documents include invoices, tax documents, financial reports, and purchase orders. Effective data extraction from these documents is crucial to support downstream analytical tasks. Current data extraction tools often struggle with complex document layouts, incur high latency and/or cost on large datasets, and require significant human effort. The key insight of our tool, TWIX, is to infer the underlying template used to create such documents, and then extract the data, rather than extracting directly from documents. To do so, TWIX first infers the underlying fields, such as columns of tabular portions or keys in co-located key-value pairs, by leveraging their consistent location patterns (e.g., two fields in the same template repeatedly co-occur within a fixed distance apart across multiple records). TWIX then assembles these fields into a template by enforcing visual constraints, such as vertically aligning table rows with their column headers for tabular regions, and horizontally aligning keys with their values for key-value pairs. TWIX then uses this inferred template to accurately and efficiently extract data from templatized documents at a low cost. On one benchmark with 34 diverse real-world datasets, TWIX outperforms state-of-the-art structured data extraction tools (Evaporate, Textract, and Azure Document Intelligence), and vision-based LLMs like GPT-4-Vision, by over 25% in precision and recall. Another benchmark with 30 large datasets demonstrates TWIX's scalability: it is 520X faster and 3,786X cheaper than the most competitive compared tool, for extracting data from large document collections with over 2000 pages.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。