TableLab: An Interactive Table Extraction System with Adaptive Deep Learning

Yunyao Li, Nancy Xin Ru Wang, Douglas Burdick, Yunyao Li 0001

TL;DR

TableLab is an interactive system designed to solve the "last mile" problem of table extraction by allowing users to quickly customize deep learning models for specific document collections. By combining template-based clustering with an intuitive human-in-the-loop interface, TableLab enables users to achieve high-quality extraction results with only a handful of labeled examples.

What Problem Does This Paper Address?

Extracting tables from PDFs and images is a notoriously "messy" problem in data science. While general-purpose models exist, they often fail in production because:

  1. Extreme Diversity: An invoice looks nothing like a scientific paper or a 10-K financial report.
  2. Data Scarcity: Labeling table structures (rows, columns, cells) is incredibly tedious and expensive, making it hard to train custom models from scratch.
  3. Subjectivity: Different users have different definitions of what constitutes a table or how nested headers should be handled.

TableLab addresses these gaps by moving away from "one-size-fits-all" models toward a system that adapts to a specific user's document style through iterative, assisted labeling.

Methods

The TableLab workflow is built on a "Human-AI Collaboration" loop:

  • Base Extraction: The system starts with a pre-trained model based on the Global Table Extractor (GTE) framework. It detects table boundaries and cell structures.
  • Template Clustering: Instead of asking users to label random pages, TableLab uses visual embeddings from the detection model to cluster documents into "templates." This identifies groups of documents that share similar layouts.
  • Smart Label Selection: The system recommends specific pages for user feedback. It selects the lowest confidence pages (to provide the most information to the model) and highest confidence pages (to allow for quick, easy wins and rapid feedback).
  • Interactive UI: Users can adjust table borders or merge/split cells using a spreadsheet-like interface. Crucially, because the model is modular, correcting a table border can automatically improve the downstream cell detection.
  • Adaptive Finetuning: User corrections are fed back into the deep learning model to finetune its weights, which are then applied to the rest of the document collection.

Datasets

The authors utilized several large-scale datasets to demonstrate the system's versatility:

  • PubLayNet & PubTabNet: Used for pre-training the base models. these contain hundreds of thousands of tables from scientific medical papers.
  • FinTabNet: Used for the demo and evaluation. This dataset consists of complex tables from the annual reports of S&P 500 companies, representing a significant domain shift from the scientific pre-training data.

Key Insights and Ideas

  • The Power of Templates: Most business document collections (like a folder of invoices from one vendor) rely on a limited set of templates. By clustering these first, TableLab minimizes redundant labeling.
  • Modular Improvement: The system treats table detection and structure recognition as connected but distinct modules. A user's "low-effort" fix (like resizing a bounding box) can yield "high-impact" results by giving the cell-detection module a cleaner area to work within.
  • Efficiency over Exhaustion: The authors found that for many consistent collections, a single round of finetuning is often sufficient to correct the majority of extraction errors across the entire set.
  • Text-Chunk Editing: Instead of editing tables word-by-word, the UI allows users to manipulate content by "text chunks" (leveraging the underlying OCR/PDF layout), which significantly speeds up the correction of cell alignment errors.

Key Results

While this specific paper is a "Concrete Demo" summary, it highlights several qualitative successes:

  • Domain Adaptation: The system successfully adapted a model trained on scientific papers (PubTabNet) to work on financial reports (FinTabNet) with minimal user intervention.
  • Reduced Annotation Burden: By using the recommendation system (clustering + confidence scores), the system minimizes the number of pages a human needs to touch to achieve high accuracy.
  • User Empowerment: The system bridges the gap between AI researchers and end-users (like financial analysts), allowing the latter to "train" a model without writing code.

Limitations and Future Work

  • Diversity Sensitivity: The effectiveness of the clustering approach depends on the diversity of the collection. If every single document in a set has a unique, one-off layout, the efficiency gains from template clustering would be reduced.
  • OCR Dependency: For scanned documents, the system is still dependent on the quality of the initial OCR engine. If the OCR fails to recognize text correctly, the subsequent table structure extraction—no matter how well-tuned—will contain errors.
  • Scaling the Loop: Future work could involve exploring how these interactive updates scale to massive, multi-million document repositories where even "a few" labels per cluster might add up.

Summary updated

BibTeX
@inproceedings{li2021tablelab,
  author = {Yunyao Li and Nancy Xin Ru Wang and Douglas Burdick and Yunyao Li},
  title = {{TableLab: An Interactive Table Extraction System with Adaptive Deep Learning}},
  booktitle = {Iui Companion},
  year = {2021},
  doi = {10.1145/3397482.3450718},
}
Figure