On this page
- Why tables are where document AI fails
- Label structure, not boxes
- Rules for merged and spanning cells
- Multi-level headers and header relationships
- The hard cases: borderless, multi-page and nested
- Empty cells, totals and footnotes
- Measuring table annotation quality
- Choosing a table schema before labeling
- Tooling that makes table labeling faster
- Running a table annotation program
- ✓Label tables as structures, not boxes: rows, columns, cells, spans and headers.
- ✓Write explicit rules for merged cells, multi-level headers, blank cells and tables that cross pages.
- ✓Test guidelines on the hardest tables first and measure agreement before scaling.
- ✓Report table errors separately from other document labels so model teams can target them.
The short answer: Good table annotation guidelines define tables as structures: the table region, rows, columns, individual cells, spanning cells, header hierarchy and how cells relate to headers. They include explicit rules for merged cells, multi-level headers, empty cells, tables without borders, tables that continue across pages and nested tables, with examples of each. Programs that label documents for AI usually run these guidelines through specialist document annotation teams and measure cell-level accuracy.
Why tables are where document AI fails
Text on a page has an obvious reading order; tables do not. A model must understand which values belong to which row and column, which headers apply, where cells span several columns and where a table ends. Small structural mistakes produce large errors: a shifted column turns a quantity into a price, a missed span assigns a subtotal to the wrong group.
Invoices, financial statements, lab reports, insurance schedules and research papers all depend on tables. Better table labels are often the highest-return improvement a document AI team can make.
Label structure, not boxes
A single bounding box around a table tells a model where the table is but nothing about how it is built. Structural labels mark the table region, every row and column, every cell with its row and column indices, and any cells that span several rows or columns. Header cells are marked as headers, with their level where headers are nested.
With structure labeled, a table can be rebuilt exactly as data. That is what extraction models need to learn, and what evaluation needs to measure.
Rules for merged and spanning cells
Merged cells are the most common source of disagreement. Guidelines should say how to label a cell that visually spans several columns, whether to record it once with a span or repeat it in each covered cell, and how to treat cells that look merged because a border is missing. Examples of each case remove most ambiguity.
The same rules apply to vertical spans, such as a category label that covers several rows. Consistency matters more than which convention is chosen, because models learn whatever pattern the labels show.
Multi-level headers and header relationships
Financial and statistical tables often have several header levels: a year above quarters, a region above countries. Guidelines should define how to label header levels and how each data cell relates to its headers, including row headers on the left. Some schemas record the full header path for each cell.
Headers that repeat on each page of a long table should be recognized as repeats rather than new headers. Guidelines should show what a repeated header looks like and how to label it.
The hard cases: borderless, multi-page and nested
Borderless tables rely on alignment and spacing, and annotators must infer columns from layout. Tables that continue across pages need linking so the model learns they are one table. Nested tables, small tables inside cells, need their own structure. Tables with images, checkboxes or handwritten entries need rules for those cell types.
Each hard case deserves examples in the guideline and a place in the gold set. See intelligent document processing for how production pipelines deal with the same cases.
Empty cells, totals and footnotes
Empty cells should still be labeled as cells, so the structure stays intact. Totals and subtotals may need a cell type label, especially in financial tables. Footnote markers inside cells, and footnotes below the table, should be labeled so models can connect them.
Units and currency often appear in headers or captions rather than cells. Guidelines should say whether and how to capture them, because extraction is useless if the model does not know whether a number is in dollars or thousands of dollars. See financial data annotation for statement-specific rules.
Measuring table annotation quality
Table quality needs its own metrics. Cell-level accuracy compares labeled cells and their positions with a reference; structure metrics compare row, column and span assignments; header accuracy checks header levels and relationships. Agreement between annotators on the same tables shows where guidelines are unclear.
Report table errors separately from other document labels, broken down by table type and difficulty. Model teams can then see whether more data is needed for borderless tables, financial statements or multi-page tables.
Choosing a table schema before labeling
Before writing guidelines, decide what the output schema should be. Some teams label cells with row and column indices and spans; others label HTML-like structures; others label only header-to-value relationships needed for extraction. The choice depends on how the model and downstream systems will use the data. Changing schemas mid-project is expensive, because earlier labels must be converted or redone.
A short schema document, agreed between the ML team, product team and annotation lead, prevents later surprises. It should include examples of the exact output expected for several table types, including at least one hard case.
Tooling that makes table labeling faster
Table labeling is slow in tools built for boxes. Good tools let annotators draw grid lines, merge and split cells, set header levels and see the reconstructed table as they work. Pre-labels from a table detection model speed things up, as long as annotators correct them carefully rather than accepting them.
Measure throughput and accuracy together. A faster tool that lowers accuracy is not an improvement, and annotators should be rewarded for correct structure, not speed alone.
Running a table annotation program
Start with a pilot on the hardest tables you have, not the easiest. Measure agreement, refine the guideline and build a gold set before scaling. Keep guideline versions on every labeled page so later changes can be traced.
Our document annotation outsourcing page explains how vetted Philippine teams label document layout, key-value pairs and table structure, and building a transaction categorization taxonomy covers another financial data task in the same cluster.
Frequently asked questions
How should tables be labeled for document AI?
As structures: table region, rows, columns, cells with indices, spanning cells and header levels.
How are merged cells handled?
With explicit guideline rules, usually a single cell with a recorded row or column span, applied consistently.
What about tables that continue across pages?
They should be linked as one table, with repeated headers recognized as repeats.
How is table annotation quality measured?
With cell-level accuracy, structure and span accuracy, header accuracy and annotator agreement.
