Synthesizing Realistic Data for Table Recognition

Qiyu Hou, Jun Wang, Meixuan Qiao, Lujun Tian

Abstract

Table recognition remains a significant challenge in document AI due to the vast diversity of layouts and the scarcity of high-quality, accurately annotated training data. This paper presents a novel synthesis pipeline that "re-skins" real-world table structures with diverse visual styles. By leveraging the structural complexity of existing documents and applying varied style profiles, we generate large-scale, error-free datasets. Our approach, validated on Chinese financial reports, demonstrates that models trained on this realistic synthetic data significantly outperform those trained on traditional automated datasets, particularly in handling complex spanning cells.

Introduction

Converting table images into structured formats like HTML or Excel—a process known as table recognition—is essential for digitizing the vast amount of information locked in PDFs and scanned documents. Despite its importance, it remains a "dark matter" problem. While humans can easily navigate complex headers and spanning cells, machines often struggle with the immense variety of styling conventions and structural nuances found in professional documents.

The primary bottleneck in advancing table recognition is not the lack of sophisticated models, but the lack of high-quality training data. Current datasets often suffer from significant annotation noise or fail to capture the semantic logic of real-world tables. To address this, we propose a "Structure + Content + Style" synthesis method that bridges the gap between synthetic generation and real-world complexity.

The "re-skinning" process: transforming a single source table structure into multiple realistic visual styles.

The Data Bottleneck: Errors and the "Uncanny Valley"

Existing large-scale table datasets are typically created through automated alignment between PDF documents and their corresponding HTML source code. However, this process is prone to errors. Our analysis of popular datasets like FinTabNet revealed that approximately 9% of tables contain obvious annotation flaws, such as misaligned cells or incorrect spanning information.

Furthermore, traditional synthetic data generators often rely on random table generation. While these can produce large volumes of data, they frequently fall into an "uncanny valley." They lack the logical flow, hierarchical headers, and domain-specific content found in actual financial or scientific reports. Models trained on such "lorem ipsum" tables often fail when deployed on real-world "wild" tables that possess inherent structural logic.

Methodology: The Synthesis Pipeline

Our proposed pipeline avoids the pitfalls of random generation by harvesting the "skeletons" of real, complex tables. The process consists of five key stages:

  1. Extraction: We utilize PDF parsing tools to extract the underlying structure and text content from bordered tables found in a vast repository of Chinese financial reports.
  2. Categorization: Extracted tables are clustered into functional categories (e.g., Balance Sheets, Cash Flow Statements). This ensures that the synthetic data maintains the semantic and structural logic appropriate for its domain.
  3. Style Profiling: We developed a library of "Style Profiles" that define visual attributes including font types, line spacing, border styles, background colors, and cell padding.
  4. Synthesis and Rendering: To generate a new training sample, the system selects a real table structure and applies a randomly chosen, category-appropriate Style Profile. We use advanced image rendering techniques to produce high-fidelity images that include realistic artifacts common in PDFs.
  5. Precise Coordinate Calculation: A sophisticated bottom-up and top-down approach is used to calculate exact coordinates for every text line and cell, ensuring that the ground-truth labels are 100% accurate.
The complete "Structure + Content + Style" synthesis and rendering pipeline.

Datasets and Benchmarking

Using this pipeline, we introduced several resources for the research community:

  • Chinese Financial Table Dataset: A large-scale synthetic dataset containing 105,600 tables derived from over 5,000 annual reports.
  • Chinese Financial Benchmark: A manually verified "gold standard" benchmark consisting of 2,290 real-world tables to provide a rigorous evaluation of model performance.
  • Augmented FinTabNet: We applied our synthesis method to the English FinTabNet dataset, specifically increasing the density of complex tables with multiple spanning cells to better train models for difficult edge cases.

Results and Discussion

We evaluated our synthetic data using state-of-the-art models such as TableMaster and TableFormer. The results were compelling:

  • Superior Performance: Models trained on our synthetic data achieved a TEDS-Struct score of 0.9579 on the Chinese benchmark, indicating high structural accuracy.
  • Detection Accuracy: Augmenting FinTabNet with our synthetic complex tables led to a massive leap in AP-50 (detection accuracy), rising from 0.619 to 0.789. This demonstrates a significantly improved ability to locate text blocks within cells.
  • Handling Spanning Cells: We observed that spanning cells are the "boss fight" of table recognition. By intentionally synthesizing more "spanning-heavy" tables, we were able to boost model robustness in these challenging scenarios.

Conclusion

By focusing on realism over randomness, we have demonstrated that the key to better table recognition lies in the intelligent reuse of real-world structures. Our "re-skinning" approach eliminates annotation noise and provides models with the structural complexity they need to succeed in the wild. Future work will involve expanding this methodology to other domains, such as legal and scientific documents, and exploring its benefits for a wider variety of recognition architectures.

Summary updated

BibTeX
@inproceedings{hou2024synthesizing,
  author = {Qiyu Hou and Jun Wang and Meixuan Qiao and Lujun Tian},
  title = {{Synthesizing Realistic Data for Table Recognition}},
  booktitle = {ICDAR},
  year = {2024},
  doi = {10.1007/978-3-031-70533-5\_22},
}
Figure