SynthDoc: Bilingual Documents Synthesis for Visual Document Understanding

Chuanghao Ding, Xuejing Liu, Wei Tang, Juan Li, Xiaoliang Wang, Rui Zhao, Cam-Tu Nguyen, Fei Tan · DOI · OpenReview

TL;DR

This paper introduces SynthDoc, a novel pipeline for generating synthetic bilingual (English and Chinese) documents that include text, images, tables, and charts. This approach tackles the critical challenge of data scarcity in Visual Document Understanding (VDU) by creating a diverse and comprehensive dataset, leading to improved performance in end-to-end document parsing models.

What Problem Does This Paper Address?

Visual Document Understanding (VDU) aims to enable machines to comprehend the content, structure, and context of documents. Existing VDU research often relies on either OCR-based methods (converting images to text) or end-to-end approaches that analyze document images directly. While end-to-end models show promise, they require vast amounts of high-quality, annotated data for pre-training. Acquiring such data is difficult due to the complexity of document layouts, the cost of manual annotation, and copyright restrictions. Current datasets often focus on specific document elements (like tables or charts) or lack diversity in layouts, limiting the robustness of trained models. This paper addresses this gap by proposing a synthetic data generation pipeline to create rich, diverse, and annotated document datasets.

Methods

The core of SynthDoc is a two-stage pipeline: Layout Design and Content Rendering.

  • Layout Design: This stage plans the document's structure at three hierarchical levels:
  • Page Controller: Manages overall layout elements, margins, and typography.
  • Region Controller: Segments the page into distinct areas for different content types (text, images, tables, charts).
  • Line Controller: Organizes text elements into coherent lines, applying typographical rules.
  • Content Rendering: This stage populates the designed layout with actual content:
  • Graphic Renderer: Generates images, tables, and charts. It uses publicly available image datasets, a modified table generation method, and libraries like Matplotlib for charts. It supports various chart types (bar, pie, line, scatter) and table styles (bordered, borderless).
  • Text Renderer: Creates word images for text content, ensuring legibility and aesthetic integration with the graphics.

The pipeline leverages publicly available corpora and advanced rendering tools to create a versatile dataset.

Datasets

  • Training Data: The pipeline utilizes publicly available text and image corpora, including datasets previously used for large language and multimodal models. Specific mention is made of the ROOTS dataset for French document generation.
  • Benchmark Dataset: The authors release a benchmark dataset of 5,000 image-text pairs generated by SynthDoc. This dataset is intended to showcase the pipeline's capabilities and serve as a resource for the VDU community.

Key Insights and Ideas

  • Synthetic Data for Robustness: Training VDU models on synthetic data, even with its inherent limitations, can lead to surprisingly robust performance, particularly in handling complex document elements and even inferring spatial relationships.
  • Bilingual Capability: The pipeline is designed to generate bilingual (English and Chinese) documents, addressing the need for multilingual VDU models.
  • End-to-End Advantage: The work emphasizes the benefits of end-to-end VDU models that directly process document images, bypassing the limitations of traditional OCR.
  • Spatial Understanding from Charts: Models trained on SynthDoc data demonstrated an ability to infer spatial relationships (like horizontal coordinates in scatter plots) even when labels were ambiguous, suggesting a deeper spatial understanding.
  • Complementing Real Data: Synthetic data can effectively complement expensive, manually labeled real datasets, bridging the gap in data availability.

Key Results

  • Models trained with SynthDoc data achieved superior performance in pre-training read tasks.
  • These models maintained robustness in downstream tasks, even when faced with language inconsistencies between pre-training and fine-tuning.
  • The proposed model (based on Donut architecture) achieved significantly improved performance on complex document images (with images, tables, and charts) compared to the "Vary" method, showing reductions in Average Edit Distance (AED) of 0.3933, 0.6832, and 0.5634 respectively.
  • The model showed strong performance on Chinese CORD dataset for receipt recognition, though it had less improvement on English CORD due to distribution bias.

Limitations and Future Work

  • Limited Variety of Document Types: The authors acknowledge that the current generation of documents through SynthDoc is somewhat limited in variety.
  • Future Work: They plan to expand the pipeline's capabilities to include more sophisticated intermingling of document elements and generate even more intricate and varied document types. This evolution aims to challenge and refine existing models and pave the way for more advanced VDU systems.

Summary updated

BibTeX
@misc{ding2024synthdoc,
  author = {Chuanghao Ding and Xuejing Liu and Wei Tang and Juan Li and Xiaoliang Wang and Rui Zhao and Cam-Tu Nguyen and Fei Tan},
  title = {{SynthDoc: Bilingual Documents Synthesis for Visual Document Understanding}},
  year = {2024},
  eprint = {2408.14764},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.14764},
}
Figure