{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,16]],"date-time":"2026-07-16T10:00:07Z","timestamp":1784196007293,"version":"3.55.0"},"reference-count":61,"publisher":"Association for Computing Machinery (ACM)","issue":"6","license":[{"start":{"date-parts":[[2025,12,5]],"date-time":"2025-12-05T00:00:00Z","timestamp":1764892800000},"content-version":"vor","delay-in-days":1,"URL":"http:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"funder":[{"DOI":"10.13039\/100000001","name":"National Science Foundation","doi-asserted-by":"publisher","award":["DGE-2243822, IIS-2129008, IIS-1940759, IIS-1955488, IIS-2027575, and IIS-1940757"],"award-info":[{"award-number":["DGE-2243822, IIS-2129008, IIS-1940759, IIS-1955488, IIS-2027575, and IIS-1940757"]}],"id":[{"id":"10.13039\/100000001","id-type":"DOI","asserted-by":"publisher"}]},{"name":"DOE award","award":["DE-SC0016260, AC02-05CH11231"],"award-info":[{"award-number":["DE-SC0016260, AC02-05CH11231"]}]},{"name":"DARPA Agreement No.","award":["HR00112590131"],"award-info":[{"award-number":["HR00112590131"]}]},{"name":"the State of California"},{"name":"NDSEG Fellowship"},{"DOI":"10.13039\/100000879","name":"Alfred P. Sloan Foundation","doi-asserted-by":"crossref","id":[{"id":"10.13039\/100000879","id-type":"DOI","asserted-by":"crossref"}]},{"name":"EPIC lab sponsors: Adobe, Bridgewater, Google, G-Research, Microsoft, PromptQL, Sigma Computing, and Snowflake"},{"name":"Azure, Modal, NSF (via NAIRR), and OpenAI"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Proc. ACM Manag. Data"],"published-print":{"date-parts":[[2025,12,4]]},"abstract":"<jats:p>\n                    Many\n                    <jats:italic toggle=\"yes\">templatized documents<\/jats:italic>\n                    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.\n                  <\/jats:p>","DOI":"10.1145\/3769840","type":"journal-article","created":{"date-parts":[[2025,12,6]],"date-time":"2025-12-06T04:32:13Z","timestamp":1764995533000},"page":"1-27","source":"Crossref","is-referenced-by-count":1,"title":["Visual Template Inference for Data Extraction from Documents"],"prefix":"10.1145","volume":"3","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-6792-2155","authenticated-orcid":false,"given":"Yiming","family":"Lin","sequence":"first","affiliation":[{"name":"UC Berkeley, Berkeley, CA, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0000-0608-6659","authenticated-orcid":false,"given":"Mawil","family":"Hasan","sequence":"additional","affiliation":[{"name":"UC Berkeley, Berkeley, CA, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0002-2422-9718","authenticated-orcid":false,"given":"Rohan","family":"Kosalge","sequence":"additional","affiliation":[{"name":"UC Berkeley, Berkeley, CA, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-6261-6263","authenticated-orcid":false,"given":"Alvin","family":"Cheung","sequence":"additional","affiliation":[{"name":"UC Berkeley, Berkeley, CA, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-4538-4752","authenticated-orcid":false,"given":"Aditya G.","family":"Parameswaran","sequence":"additional","affiliation":[{"name":"UC Berkeley, Berkeley, CA, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2025,12,5]]},"reference":[{"key":"e_1_2_1_1_1","unstructured":"2024. https:\/\/aws.amazon.com\/textract\/."},{"key":"e_1_2_1_2_1","unstructured":"2024. https:\/\/azure.microsoft.com\/en-us\/products\/ai-services\/ai-document-intelligence."},{"key":"e_1_2_1_3_1","unstructured":"2024. https:\/\/azure.microsoft.com\/en-us\/products\/ai-services\/ai-document-intelligence."},{"key":"e_1_2_1_4_1","unstructured":"2024. https:\/\/cloud.google.com\/document-ai."},{"key":"e_1_2_1_5_1","unstructured":"2024. https:\/\/github.com\/jsvine\/pdfplumber."},{"key":"e_1_2_1_6_1","unstructured":"2024. https:\/\/help.openai.com\/en\/articles\/8555496-gpt-4-vision-api."},{"key":"e_1_2_1_7_1","unstructured":"2024. https:\/\/openai.com\/api\/pricing\/."},{"key":"e_1_2_1_8_1","unstructured":"2024. https:\/\/pymupdf.readthedocs.io\/en\/latest\/."},{"key":"e_1_2_1_9_1","unstructured":"2024. https:\/\/www.gurobi.com\/resources\/ch4-linear-programming-with-python\/."},{"key":"e_1_2_1_10_1","unstructured":"2025. https:\/\/github.com\/tesseract-ocr\/tesseract."},{"key":"e_1_2_1_11_1","unstructured":"2025. https:\/\/mistral.ai\/news\/mistral-ocr."},{"key":"e_1_2_1_12_1","unstructured":"2025. https:\/\/www.ghx.com\/media\/02yp52j4\/billentis-report-the-e-invoicing-journey-2019-2025.pdf."},{"key":"e_1_2_1_13_1","unstructured":"2025. Technical Report of Visual Template Inference for Data Extraction from Documents; https:\/\/arxiv.org\/ abs\/ 2501.06659."},{"key":"e_1_2_1_14_1","volume-title":"Form2Seq: A framework for higher-order form structure extraction. arXiv preprint arXiv:2107.04419","author":"Aggarwal Milan","year":"2021","unstructured":"Milan Aggarwal, Hiresh Gupta, Mausoom Sarkar, and Balaji Krishnamurthy. 2021. Form2Seq: A framework for higher-order form structure extraction. arXiv preprint arXiv:2107.04419 (2021)."},{"key":"e_1_2_1_15_1","volume-title":"Proceedings of the fifth ACM conference on Digital libraries. 85-94","author":"Luis Gravano EugeneAgichtein","year":"2000","unstructured":"EugeneAgichtein and Luis Gravano. 2000. Snowball: Extracting relations from large plain-text collections. In Proceedings of the fifth ACM conference on Digital libraries. 85-94."},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/872757.872799"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.14778\/3626292.3626294"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/3132847.3133083"},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.1145\/3355610"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1145\/2213836.2213912"},{"key":"e_1_2_1_21_1","volume-title":"Proceedings of the Symposium on Document Image Understanding Technology","volume":"5","author":"Breuel Thomas M","year":"2003","unstructured":"Thomas M Breuel. 2003. High performance document layout analysis. In Proceedings of the Symposium on Document Image Understanding Technology, Vol. 5."},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/1519103.1519112"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.14778\/3476249.3476293"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/3242587.3242661"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1145\/2509908.2509909"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.14778\/3574245.3574276"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/2723372.2723725"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/1017460.1017462"},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/1559845.1559882"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1145\/1559795.1559797"},{"key":"e_1_2_1_31_1","volume-title":"Automatic wrappers for large scale web extraction. arXiv preprint arXiv:1103.2406","author":"Dalvi Nilesh","year":"2011","unstructured":"Nilesh Dalvi, Ravi Kumar, and Mohamed Soliman. 2011. Automatic wrappers for large scale web extraction. arXiv preprint arXiv:1103.2406 (2011)."},{"key":"e_1_2_1_32_1","volume-title":"An analysis of structured data on the web. arXiv preprint arXiv:1203.6406","author":"Dalvi Nilesh","year":"2012","unstructured":"Nilesh Dalvi, Ashwin Machanavajjhala, and Bo Pang. 2012. An analysis of structured data on the web. arXiv preprint arXiv:1203.6406 (2012)."},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/988672.988687"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/3183713.3183746"},{"key":"e_1_2_1_35_1","volume-title":"Chargrid: Towards understanding 2d documents. arXiv preprint arXiv:1809.08799","author":"Katti Anoop Raveendra","year":"2018","unstructured":"Anoop Raveendra Katti, Christian Reisswig, Cordula Guder, Sebastian Brarda, Steffen Bickel, Johannes H\u00f6hne, and Jean Baptiste Faddoul. 2018. Chargrid: Towards understanding 2d documents. arXiv preprint arXiv:1809.08799 (2018)."},{"key":"e_1_2_1_36_1","volume-title":"FiVaTech: Page-level web data extraction from template pages","author":"Kayed Mohammed","year":"2009","unstructured":"Mohammed Kayed and Chia-Hui Chang. 2009. FiVaTech: Page-level web data extraction from template pages. IEEE transactions on knowledge and data engineering 22, 2 (2009), 249-263."},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/2594291.2594333"},{"key":"e_1_2_1_38_1","volume-title":"Towards accurate and efficient document analytics with large language models. arXiv preprint arXiv:2405.04674","author":"Lin Yiming","year":"2024","unstructured":"Yiming Lin, Madelon Hulsebos, Ruiying Ma, Shreya Shankar, Sepanta Zeigham, Aditya G Parameswaran, and Eugene Wu. 2024. Towards accurate and efficient document analytics with large language models. arXiv preprint arXiv:2405.04674 (2024)."},{"key":"e_1_2_1_39_1","volume-title":"Zui Chen, Michael Franklin, Tim Kraska, Samuel Madden, and Gerardo Vitagliano.","author":"Liu Chunwei","year":"2024","unstructured":"Chunwei Liu, Matthew Russo, Michael Cafarella, Lei Cao, Peter Baille Chen, Zui Chen, Michael Franklin, Tim Kraska, Samuel Madden, and Gerardo Vitagliano. 2024. A declarative system for optimizing ai workloads. arXiv preprint arXiv:2405.14696 (2024)."},{"key":"e_1_2_1_40_1","volume-title":"Vide: A vision-based approach for deep web data extraction","author":"Liu Wei","year":"2009","unstructured":"Wei Liu, Xiaofeng Meng, and Weiyi Meng. 2009. Vide: A vision-based approach for deep web data extraction. IEEE transactions on knowledge and data engineering 22, 3 (2009), 447-460."},{"key":"e_1_2_1_41_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVPR52688.2022.00112"},{"key":"e_1_2_1_42_1","doi-asserted-by":"publisher","DOI":"10.1109\/MIS.2017.23"},{"key":"e_1_2_1_43_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-031-70533-5_7"},{"key":"e_1_2_1_44_1","first-page":"25","article-title":"DeepDive: Web-scale Knowledge-base Construction using Statistical Learning and Inference","volume":"12","author":"Niu Feng","year":"2012","unstructured":"Feng Niu, Che Zhang, Christopher R\u00e9, and Jude W Shavlik. 2012. DeepDive: Web-scale Knowledge-base Construction using Statistical Learning and Inference. VLDS 12 (2012), 25-28.","journal-title":"VLDS"},{"key":"e_1_2_1_45_1","volume-title":"Proc. Document Intell. Workshop KDD.","author":"Or Nerya","year":"2021","unstructured":"Nerya Or and Shlomo Urbach. 2021. Few-shot learning for structured information extraction from form-like documents using a diff algorithm. In Proc. Document Intell. Workshop KDD."},{"key":"e_1_2_1_46_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDAR.2019.00029"},{"key":"e_1_2_1_47_1","doi-asserted-by":"publisher","DOI":"10.14778\/3402707.3402735"},{"key":"e_1_2_1_48_1","doi-asserted-by":"publisher","DOI":"10.1145\/3519939.3523705"},{"key":"e_1_2_1_49_1","volume-title":"Lotus: Enabling semantic queries with llms over tables of unstructured and structured data. arXiv preprint arXiv:2407.11418","author":"Patel Liana","year":"2024","unstructured":"Liana Patel, Siddharth Jha, Carlos Guestrin, and Matei Zaharia. 2024. Lotus: Enabling semantic queries with llms over tables of unstructured and structured data. arXiv preprint arXiv:2407.11418 (2024)."},{"key":"e_1_2_1_50_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVPRW50498.2020.00280"},{"key":"e_1_2_1_51_1","doi-asserted-by":"crossref","unstructured":"Sunita Sarawagi et al. 2008. Information extraction. Foundations and Trends\u00ae in Databases 1 3 (2008) 261-377.","DOI":"10.1561\/1900000003"},{"key":"e_1_2_1_52_1","doi-asserted-by":"publisher","DOI":"10.14778\/3446095.3446104"},{"key":"e_1_2_1_53_1","volume-title":"DocETL: Agentic Query Rewriting and Evaluation for Complex Document Processing. arXiv preprint arXiv:2410.12189","author":"Shankar Shreya","year":"2024","unstructured":"Shreya Shankar, Tristan Chambers, Tarak Shah, Aditya G Parameswaran, and Eugene Wu. 2024. DocETL: Agentic Query Rewriting and Evaluation for Complex Document Processing. arXiv preprint arXiv:2410.12189 (2024)."},{"key":"e_1_2_1_54_1","volume-title":"International Conference on Document Analysis and Recognition. Springer, 147-166","author":"\u0160imsa \u0160tep\u00e1n","year":"2023","unstructured":"\u0160tep\u00e1n \u0160imsa, Milan \u0160ulc, Michal Uric\u00e1r, Yash Patel, Ahmed Hamdi, Matej Koci\u00e1n, Maty\u00e1\u0161 Skalicky, Jir\u00ed Matas, Antoine Doucet, Micka\u00ebl Coustaty, et al. 2023. Docile benchmark for document information localization and extraction. In International Conference on Document Analysis and Recognition. Springer, 147-166."},{"key":"e_1_2_1_55_1","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/D19-1348"},{"key":"e_1_2_1_56_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVPR52729.2023.01845"},{"key":"e_1_2_1_57_1","doi-asserted-by":"publisher","DOI":"10.14778\/3447689.3447703"},{"key":"e_1_2_1_58_1","doi-asserted-by":"publisher","DOI":"10.1145\/3394486.3403172"},{"key":"e_1_2_1_59_1","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2022.findings-acl.253"},{"key":"e_1_2_1_60_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVPR.2017.462"},{"key":"e_1_2_1_61_1","doi-asserted-by":"publisher","DOI":"10.3390\/app12199691"}],"container-title":["Proceedings of the ACM on Management of Data"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3769840","content-type":"application\/pdf","content-version":"vor","intended-application":"syndication"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3769840","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,6,13]],"date-time":"2026-06-13T04:40:55Z","timestamp":1781325655000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3769840"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,12,4]]},"references-count":61,"journal-issue":{"issue":"6","published-print":{"date-parts":[[2025,12,4]]}},"alternative-id":["10.1145\/3769840"],"URL":"https:\/\/doi.org\/10.1145\/3769840","relation":{},"ISSN":["2836-6573"],"issn-type":[{"value":"2836-6573","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,12,4]]}}}