blue-preaicuons Dy labierorer

2

1 Ohsenver 1

analigna benign malignant

13

2

10

11

14

18

a. Picture or a table.

3

3

4

2

benign

9

malignant

13

# [ 17

Total ohserver 1

13

62

64

Total

Total

7

observer 2

15

12

62

77

15

19

16

20

## TableFormer: Table Structure Understanding with Transformers

Ahmed Nassar, Nikolaos Livathinos, Maksym Lysak, Peter Staar IBM Research

{ ahn,nli,mly,taa } @zurich.ibm.com

## Abstract

Tables organize valuable content in a concise and compact representation. This content is extremely valuable for systems such as search engines, Knowledge Graph's, etc, since they enhance their predictive capabilities. Unfortunately, tables come in a large variety of shapes and sizes. Furthermore, they can have complex column/row-header configurations, multiline rows, different variety of separation lines, missing entries, etc. As such, the correct identification of the table-structure from an image is a nontrivial task. In this paper, we present a new table-structure identification model. The latter improves the latest end-toend deep learning model (i.e. encoder-dual-decoder from PubTabNet) in two significant ways. First, we introduce a new object detection decoder for table-cells. In this way, we can obtain the content of the table-cells from programmatic PDF's directly from the PDF source and avoid the training of the custom OCR decoders. This architectural change leads to more accurate table-content extraction and allows us to tackle non-english tables. Second, we replace the LSTM decoders with transformer based decoders. This upgrade improves significantly the previous state-of-the-art tree-editing-distance-score (TEDS) from 91% to 98.5% on simple tables and from 88.7% to 95% on complex tables.

## 1. Introduction

The occurrence of tables in documents is ubiquitous. They often summarise quantitative or factual data, which is cumbersome to describe in verbose text but nevertheless extremely valuable. Unfortunately, this compact representation is often not easy to parse by machines. There are many implicit conventions used to obtain a compact table representation. For example, tables often have complex columnand row-headers in order to reduce duplicated cell content. Lines of different shapes and sizes are leveraged to separate content or indicate a tree structure. Additionally, tables can also have empty/missing table-entries or multi-row textual table-entries. Fig. 1 shows a table which presents all these issues.

## a. Picture of a table

| 1   |
| --- |

7

| 0    | 1 2 1 | 1 2 1 | 1 2 1 |
| ---- | ----- | ----- | ----- |
| 3 4  | 5     | 6     | 7     |
| 9 13 | 10    | 11    | 12    |
| 8 2  | 14    | 15    | 16    |
| 17   | 18    | 19    | 20    |

Figure 1: Picture of a table with subtle, complex features such as (1) multi-column headers, (2) cell with multi-row text and (3) cells with no content. Image from PubTabNet evaluation set, filename: 'PMC2944238 004 02'.

<!-- image -->

Recently, significant progress has been made with vision based approaches to extract tables in documents. For the sake of completeness, the issue of table extraction from documents is typically decomposed into two separate challenges, i.e. (1) finding the location of the table(s) on a document-page and (2) finding the structure of a given table in the document.

The first problem is called table-location and has been previously addressed [30, 38, 19, 21, 23, 26, 8] with stateof-the-art object-detection networks (e.g. YOLO and later on Mask-RCNN [9]). For all practical purposes, it can be

Observer 2

8.

considered as a solved problem, given enough ground-truth data to train on.

The second problem is called table-structure decomposition. The latter is a long standing problem in the community of document understanding [6, 4, 14]. Contrary to the table-location problem, there are no commonly used approaches that can easily be re-purposed to solve this problem. Lately, a set of new model-architectures has been proposed by the community to address table-structure decomposition [37, 36, 18, 20]. All these models have some weaknesses (see Sec. 2). The common denominator here is the reliance on textual features and/or the inability to provide the bounding box of each table-cell in the original image.

In this paper, we want to address these weaknesses and present a robust table-structure decomposition algorithm. The design criteria for our model are the following. First, we want our algorithm to be language agnostic. In this way, we can obtain the structure of any table, irregardless of the language. Second, we want our algorithm to leverage as much data as possible from the original PDF document. For programmatic PDF documents, the text-cells can often be extracted much faster and with higher accuracy compared to OCR methods. Last but not least, we want to have a direct link between the table-cell and its bounding box in the image.

To meet the design criteria listed above, we developed a new model called TableFormer and a synthetically generated table structure dataset called SynthTabNet 1 . In particular, our contributions in this work can be summarised as follows:

- We propose TableFormer , a transformer based model that predicts tables structure and bounding boxes for the table content simultaneously in an end-to-end approach.
- Across all benchmark datasets TableFormer significantly outperforms existing state-of-the-art metrics, while being much more efficient in training and inference to existing works.
- We present SynthTabNet a synthetically generated dataset, with various appearance styles and complexity.
- An augmented dataset based on PubTabNet [37], FinTabNet [36], and TableBank [17] with generated ground-truth for reproducibility.

The paper is structured as follows. In Sec. 2, we give a brief overview of the current state-of-the-art. In Sec. 3, we describe the datasets on which we train. In Sec. 4, we introduce the TableFormer model-architecture and describe

1 <https://github.com/IBM/SynthTabNet>

its results &amp; performance in Sec. 5. As a conclusion, we describe how this new model-architecture can be re-purposed for other tasks in the computer-vision community.

## 2. Previous work and State of the Art

Identifying the structure of a table has been an outstanding problem in the document-parsing community, that motivates many organised public challenges [6, 4, 14]. The difficulty of the problem can be attributed to a number of factors. First, there is a large variety in the shapes and sizes of tables. Such large variety requires a flexible method. This is especially true for complex column- and row headers, which can be extremely intricate and demanding. A second factor of complexity is the lack of data with regard to table-structure. Until the publication of PubTabNet [37], there were no large datasets (i.e. &gt; 100 K tables) that provided structure information. This happens primarily due to the fact that tables are notoriously time-consuming to annotate by hand. However, this has definitely changed in recent years with the deliverance of PubTabNet [37], FinTabNet [36], TableBank [17] etc.

Before the rising popularity of deep neural networks, the community relied heavily on heuristic and/or statistical methods to do table structure identification [3, 7, 11, 5, 13, 28]. Although such methods work well on constrained tables [12], a more data-driven approach can be applied due to the advent of convolutional neural networks (CNNs) and the availability of large datasets. To the best-of-our knowledge, there are currently two different types of network architecture that are being pursued for state-of-the-art tablestructure identification.

Image-to-Text networks : In this type of network, one predicts a sequence of tokens starting from an encoded image. Such sequences of tokens can be HTML table tags [37, 17] or LaTeX symbols[10]. The choice of symbols is ultimately not very important, since one can be transformed into the other. There are however subtle variations in the Image-to-Text networks. The easiest network architectures are 'image-encoder → text-decoder' (IETD), similar to network architectures that try to provide captions to images [32]. In these IETD networks, one expects as output the LaTeX/HTML string of the entire table, i.e. the symbols necessary for creating the table with the content of the table. Another approach is the 'image-encoder → dual decoder' (IEDD) networks. In these type of networks, one has two consecutive decoders with different purposes. The first decoder is the tag-decoder , i.e. it only produces the HTML/LaTeX tags which construct an empty table. The second content-decoder uses the encoding of the image in combination with the output encoding of each cell-tag (from the tag-decoder ) to generate the textual content of each table cell. The network architecture of IEDD is certainly more elaborate, but it has the advantage that one can pre-train the

10

Publabnet + rin labet

10K

8K

tag-decoder which is constrained to the table-tags.

In practice, both network architectures (IETD and IEDD) require an implicit, custom trained object-characterrecognition (OCR) to obtain the content of the table-cells. In the case of IETD, this OCR engine is implicit in the decoder similar to [24]. For the IEDD, the OCR is solely embedded in the content-decoder. This reliance on a custom, implicit OCR decoder is of course problematic. OCR is a well known and extremely tough problem, that often needs custom training for each individual language. However, the limited availability for non-english content in the current datasets, makes it impractical to apply the IETD and IEDD methods on tables with other languages. Additionally, OCR can be completely omitted if the tables originate from programmatic PDF documents with known positions of each cell. The latter was the inspiration for the work of this paper.

Graph Neural networks : Graph Neural networks (GNN's) take a radically different approach to tablestructure extraction. Note that one table cell can constitute out of multiple text-cells. To obtain the table-structure, one creates an initial graph, where each of the text-cells becomes a node in the graph similar to [33, 34, 2]. Each node is then associated with en embedding vector coming from the encoded image, its coordinates and the encoded text. Furthermore, nodes that represent adjacent text-cells are linked. Graph Convolutional Networks (GCN's) based methods take the image as an input, but also the position of the text-cells and their content [18]. The purpose of a GCN is to transform the input graph into a new graph, which replaces the old links with new ones. The new links then represent the table-structure. With this approach, one can avoid the need to build custom OCR decoders. However, the quality of the reconstructed structure is not comparable to the current state-of-the-art [18].

Hybrid Deep Learning-Rule-Based approach : Apopular current model for table-structure identification is the use of a hybrid Deep Learning-Rule-Based approach similar to [27, 29]. In this approach, one first detects the position of the table-cells with object detection (e.g. YoloVx or MaskRCNN), then classifies the table into different types (from its images) and finally uses different rule-sets to obtain its table-structure. Currently, this approach achieves stateof-the-art results, but is not an end-to-end deep-learning method. As such, new rules need to be written if different types of tables are encountered.

## 3. Datasets

We rely on large-scale datasets such as PubTabNet [37], FinTabNet [36], and TableBank [17] datasets to train and evaluate our models. These datasets span over various appearance styles and content. We also introduce our own synthetically generated SynthTabNet dataset to fix an im-

Figure 2: Distribution of the tables across different table dimensions in PubTabNet + FinTabNet datasets

<!-- image -->

balance in the previous datasets.

The PubTabNet dataset contains 509k tables delivered as annotated PNG images. The annotations consist of the table structure represented in HTML format, the tokenized text and its bounding boxes per table cell. Fig. 1 shows the appearance style of PubTabNet. Depending on its complexity, a table is characterized as 'simple' when it does not contain row spans or column spans, otherwise it is 'complex'. The dataset is divided into Train and Val splits (roughly 98% and 2%). The Train split consists of 54% simple and 46% complex tables and the Val split of 51% and 49% respectively. The FinTabNet dataset contains 112k tables delivered as single-page PDF documents with mixed table structures and text content. Similarly to the PubTabNet, the annotations of FinTabNet include the table structure in HTML, the tokenized text and the bounding boxes on a table cell basis. The dataset is divided into Train, Test and Val splits (81%, 9.5%, 9.5%), and each one is almost equally divided into simple and complex tables (Train: 48% simple, 52% complex, Test: 48% simple, 52% complex, Test: 53% simple, 47% complex). Finally the TableBank dataset consists of 145k tables provided as JPEG images. The latter has annotations for the table structure, but only few with bounding boxes of the table cells. The entire dataset consists of simple tables and it is divided into 90% Train, 3% Test and 7% Val splits.

Due to the heterogeneity across the dataset formats, it was necessary to combine all available data into one homogenized dataset before we could train our models for practical purposes. Given the size of PubTabNet, we adopted its annotation format and we extracted and converted all tables as PNG images with a resolution of 72 dpi. Additionally, we have filtered out tables with extreme sizes due to small

amount of such tables, and kept only those ones ranging between 1*1 and 20*10 (rows/columns).

The availability of the bounding boxes for all table cells is essential to train our models. In order to distinguish between empty and non-empty bounding boxes, we have introduced a binary class in the annotation. Unfortunately, the original datasets either omit the bounding boxes for whole tables (e.g. TableBank) or they narrow their scope only to non-empty cells. Therefore, it was imperative to introduce a data pre-processing procedure that generates the missing bounding boxes out of the annotation information. This procedure first parses the provided table structure and calculates the dimensions of the most fine-grained grid that covers the table structure. Notice that each table cell may occupy multiple grid squares due to row or column spans. In case of PubTabNet we had to compute missing bounding boxes for 48% of the simple and 69% of the complex tables. Regarding FinTabNet, 68% of the simple and 98% of the complex tables require the generation of bounding boxes.

As it is illustrated in Fig. 2, the table distributions from all datasets are skewed towards simpler structures with fewer number of rows/columns. Additionally, there is very limited variance in the table styles, which in case of PubTabNet and FinTabNet means one styling format for the majority of the tables. Similar limitations appear also in the type of table content, which in some cases (e.g. FinTabNet) is restricted to a certain domain. Ultimately, the lack of diversity in the training dataset damages the ability of the models to generalize well on unseen data.

Motivated by those observations we aimed at generating a synthetic table dataset named SynthTabNet . This approach offers control over: 1) the size of the dataset, 2) the table structure, 3) the table style and 4) the type of content. The complexity of the table structure is described by the size of the table header and the table body, as well as the percentage of the table cells covered by row spans and column spans. A set of carefully designed styling templates provides the basis to build a wide range of table appearances. Lastly, the table content is generated out of a curated collection of text corpora. By controlling the size and scope of the synthetic datasets we are able to train and evaluate our models in a variety of different conditions. For example, we can first generate a highly diverse dataset to train our models and then evaluate their performance on other synthetic datasets which are focused on a specific domain.

In this regard, we have prepared four synthetic datasets, each one containing 150k examples. The corpora to generate the table text consists of the most frequent terms appearing in PubTabNet and FinTabNet together with randomly generated text. The first two synthetic datasets have been fine-tuned to mimic the appearance of the original datasets but encompass more complicated table structures. The third

Table 1: Both 'Combined-Tabnet' and 'CombinedTabnet' are variations of the following: (\*) The CombinedTabnet dataset is the processed combination of PubTabNet and Fintabnet. (\*\*) The combined dataset is the processed combination of PubTabNet, Fintabnet and TableBank.

|                     | Tags | Bbox | Size | Format |
| ------------------- | ---- | ---- | ---- | ------ |
| PubTabNet           | 3    | 3    | 509k | PNG    |
| FinTabNet           | 3    | 3    | 112k | PDF    |
| TableBank           | 3    | 7    | 145k | JPEG   |
| Combined-Tabnet(\*) | 3    | 3    | 400k | PNG    |
| Combined(\*\*)      | 3    | 3    | 500k | PNG    |
| SynthTabNet         | 3    | 3    | 600k | PNG    |

one adopts a colorful appearance with high contrast and the last one contains tables with sparse content. Lastly, we have combined all synthetic datasets into one big unified synthetic dataset of 600k examples.

Tab. 1 summarizes the various attributes of the datasets.

## 4. The TableFormer model

Given the image of a table, TableFormer is able to predict: 1) a sequence of tokens that represent the structure of a table, and 2) a bounding box coupled to a subset of those tokens. The conversion of an image into a sequence of tokens is a well-known task [35, 16]. While attention is often used as an implicit method to associate each token of the sequence with a position in the original image, an explicit association between the individual table-cells and the image bounding boxes is also required.

## 4.1. Model architecture

We now describe in detail the proposed method, which is composed of three main components, see Fig. 4. Our CNN Backbone Network encodes the input as a feature vector of predefined length. The input feature vector of the encoded image is passed to the Structure Decoder to produce a sequence of HTML tags that represent the structure of the table. With each prediction of an HTML standard data cell (' &lt; td &gt; ') the hidden state of that cell is passed to the Cell BBox Decoder. As for spanning cells, such as row or column span, the tag is broken down to ' &lt; ', 'rowspan=' or 'colspan=', with the number of spanning cells (attribute), and ' &gt; '. The hidden state attached to ' &lt; ' is passed to the Cell BBox Decoder. A shared feed forward network (FFN) receives the hidden states from the Structure Decoder, to provide the final detection predictions of the bounding box coordinates and their classification.

CNN Backbone Network. A ResNet-18 CNN is the backbone that receives the table image and encodes it as a vector of predefined length. The network has been modified by removing the linear and pooling layer, as we are not per-

Figure 3: TableFormer takes in an image of the PDF and creates bounding box and HTML structure predictions that are synchronized. The bounding boxes grabs the content from the PDF and inserts it in the structure.

<!-- image -->

Figure 4: Given an input image of a table, the Encoder produces fixed-length features that represent the input image. The features are then passed to both the Structure Decoder and Cell BBox Decoder . During training, the Structure Decoder receives 'tokenized tags' of the HTML code that represent the table structure. Afterwards, a transformer encoder and decoder architecture is employed to produce features that are received by a linear layer, and the Cell BBox Decoder. The linear layer is applied to the features to predict the tags. Simultaneously, the Cell BBox Decoder selects features referring to the data cells (' &lt; td &gt; ', ' &lt; ') and passes them through an attention network, an MLP, and a linear layer to predict the bounding boxes.

<!-- image -->

forming classification, and adding an adaptive pooling layer of size 28\*28. ResNet by default downsamples the image resolution by 32 and then the encoded image is provided to both the Structure Decoder , and Cell BBox Decoder .

Structure Decoder. The transformer architecture of this component is based on the work proposed in [31]. After extensive experimentation, the Structure Decoder is modeled as a transformer encoder with two encoder layers and a transformer decoder made from a stack of 4 decoder layers that comprise mainly of multi-head attention and feed forward layers. This configuration uses fewer layers and heads in comparison to networks applied to other problems (e.g. 'Scene Understanding', 'Image Captioning'), something which we relate to the simplicity of table images.

The transformer encoder receives an encoded image from the CNN Backbone Network and refines it through a multi-head dot-product attention layer, followed by a Feed Forward Network. During training, the transformer decoder receives as input the output feature produced by the transformer encoder, and the tokenized input of the HTML ground-truth tags. Using a stack of multi-head attention layers, different aspects of the tag sequence could be inferred. This is achieved by each attention head on a layer operating in a different subspace, and then combining altogether their attention score.

Cell BBox Decoder. Our architecture allows to simultaneously predict HTML tags and bounding boxes for each table cell without the need of a separate object detector end to end. This approach is inspired by DETR [1] which employs a Transformer Encoder, and Decoder that looks for a specific number of object queries (potential object detections). As our model utilizes a transformer architecture, the hidden state of the &lt; td &gt; ' and ' &lt; ' HTML structure tags become the object query.

The encoding generated by the CNN Backbone Network along with the features acquired for every data cell from the Transformer Decoder are then passed to the attention network. The attention network takes both inputs and learns to provide an attention weighted encoding. This weighted at-

tention encoding is then multiplied to the encoded image to produce a feature for each table cell. Notice that this is different than the typical object detection problem where imbalances between the number of detections and the amount of objects may exist. In our case, we know up front that the produced detections always match with the table cells in number and correspondence.

The output features for each table cell are then fed into the feed-forward network (FFN). The FFN consists of a Multi-Layer Perceptron (3 layers with ReLU activation function) that predicts the normalized coordinates for the bounding box of each table cell. Finally, the predicted bounding boxes are classified based on whether they are empty or not using a linear layer.

Loss Functions. We formulate a multi-task loss Eq. 2 to train our network. The Cross-Entropy loss (denoted as l s ) is used to train the Structure Decoder which predicts the structure tokens. As for the Cell BBox Decoder it is trained with a combination of losses denoted as l box . l box consists of the generally used l 1 loss for object detection and the IoU loss ( l iou ) to be scale invariant as explained in [25]. In comparison to DETR, we do not use the Hungarian algorithm [15] to match the predicted bounding boxes with the ground-truth boxes, as we have already achieved a one-toone match through two steps: 1) Our token input sequence is naturally ordered, therefore the hidden states of the table data cells are also in order when they are provided as input to the Cell BBox Decoder , and 2) Our bounding boxes generation mechanism (see Sec. 3) ensures a one-to-one mapping between the cell content and its bounding box for all post-processed datasets.

The loss used to train the TableFormer can be defined as following:

<!-- formula-not-decoded -->

where λ ∈ [0, 1], and λ iou , λ l 1 ∈ R are hyper-parameters.

## 5. Experimental Results

## 5.1. Implementation Details

TableFormer uses ResNet-18 as the CNN Backbone Network . The input images are resized to 448*448 pixels and the feature map has a dimension of 28*28. Additionally, we enforce the following input constraints:

<!-- formula-not-decoded -->

Although input constraints are used also by other methods, such as EDD, ours are less restrictive due to the improved runtime performance and lower memory footprint of TableFormer. This allows to utilize input samples with longer sequences and images with larger dimensions.

The Transformer Encoder consists of two 'Transformer Encoder Layers', with an input feature size of 512, feed forward network of 1024, and 4 attention heads. As for the Transformer Decoder it is composed of four 'Transformer Decoder Layers' with similar input and output dimensions as the 'Transformer Encoder Layers'. Even though our model uses fewer layers and heads than the default implementation parameters, our extensive experimentation has proved this setup to be more suitable for table images. We attribute this finding to the inherent design of table images, which contain mostly lines and text, unlike the more elaborate content present in other scopes (e.g. the COCO dataset). Moreover, we have added ResNet blocks to the inputs of the Structure Decoder and Cell BBox Decoder. This prevents a decoder having a stronger influence over the learned weights which would damage the other prediction task (structure vs bounding boxes), but learn task specific weights instead. Lastly our dropout layers are set to 0.5.

For training, TableFormer is trained with 3 Adam optimizers, each one for the CNN Backbone Network , Structure Decoder , and Cell BBox Decoder . Taking the PubTabNet as an example for our parameter set up, the initializing learning rate is 0.001 for 12 epochs with a batch size of 24, and λ set to 0.5. Afterwards, we reduce the learning rate to 0.0001, the batch size to 18 and train for 12 more epochs or convergence.

TableFormer is implemented with PyTorch and Torchvision libraries [22]. To speed up the inference, the image undergoes a single forward pass through the CNN Backbone Network and transformer encoder. This eliminates the overhead of generating the same features for each decoding step. Similarly, we employ a 'caching' technique to preform faster autoregressive decoding. This is achieved by storing the features of decoded tokens so we can reuse them for each time step. Therefore, we only compute the attention for each new tag.

## 5.2. Generalization

TableFormer is evaluated on three major publicly available datasets of different nature to prove the generalization and effectiveness of our model. The datasets used for evaluation are the PubTabNet, FinTabNet and TableBank which stem from the scientific, financial and general domains respectively.

We also share our baseline results on the challenging SynthTabNet dataset. Throughout our experiments, the same parameters stated in Sec. 5.1 are utilized.

## 5.3. Datasets and Metrics

The Tree-Edit-Distance-Based Similarity (TEDS) metric was introduced in [37]. It represents the prediction, and ground-truth as a tree structure of HTML tags. This similarity is calculated as:

<!-- formula-not-decoded -->

where T a and T b represent tables in tree structure HTML format. EditDist denotes the tree-edit distance, and | T | represents the number of nodes in T .

## 5.4. Quantitative Analysis

Structure. As shown in Tab. 2, TableFormer outperforms all SOTA methods across different datasets by a large margin for predicting the table structure from an image. All the more, our model outperforms pre-trained methods. During the evaluation we do not apply any table filtering. We also provide our baseline results on the SynthTabNet dataset. It has been observed that large tables (e.g. tables that occupy half of the page or more) yield poor predictions. We attribute this issue to the image resizing during the preprocessing step, that produces downsampled images with indistinguishable features. This problem can be addressed by treating such big tables with a separate model which accepts a large input image size.

| Model       | Dataset | Simple | TEDS Complex | All   |
| ----------- | ------- | ------ | ------------ | ----- |
| EDD         | PTN     | 91.1   | 88.7         | 89.9  |
| GTE         | PTN     | -      | -            | 93.01 |
| TableFormer | PTN     | 98.5   | 95.0         | 96.75 |
| EDD         | FTN     | 88.4   | 92.08        | 90.6  |
| GTE         | FTN     | -      | -            | 87.14 |
| GTE (FT)    | FTN     | -      | -            | 91.02 |
| TableFormer | FTN     | 97.5   | 96.0         | 96.8  |
| EDD         | TB      | 86.0   | -            | 86    |
| TableFormer | TB      | 89.6   | -            | 89.6  |
| TableFormer | STN     | 96.9   | 95.7         | 96.7  |

Table 2: Structure results on PubTabNet (PTN), FinTabNet (FTN), TableBank (TB) and SynthTabNet (STN).

FT: Model was trained on PubTabNet then finetuned.

Cell Detection. Like any object detector, our Cell BBox Detector provides bounding boxes that can be improved with post-processing during inference. We make use of the grid-like structure of tables to refine the predictions. A detailed explanation on the post-processing is available in the supplementary material. As shown in Tab. 3, we evaluate our Cell BBox Decoder accuracy for cells with a class label of 'content' only using the PASCAL VOC mAP metric for pre-processing and post-processing. Note that we do not have post-processing results for SynthTabNet as images are only provided. To compare the performance of our proposed approach, we've integrated TableFormer's Cell BBox Decoder into EDD architecture. As mentioned previously, the Structure Decoder provides the Cell BBox Decoder with the features needed to predict the bounding box predictions. Therefore, the accuracy of the Structure Decoder directly influences the accuracy of the Cell BBox Decoder . If the Structure Decoder predicts an extra column, this will result in an extra column of predicted bounding boxes.

Table 3: Cell Bounding Box detection results on PubTabNet, and FinTabNet. PP: Post-processing.

| Model       | Dataset     | mAP  | mAP (PP) |
| ----------- | ----------- | ---- | -------- |
| EDD+BBox    | PubTabNet   | 79.2 | 82.7     |
| TableFormer | PubTabNet   | 82.1 | 86.8     |
| TableFormer | SynthTabNet | 87.7 | -        |

Cell Content. In this section, we evaluate the entire pipeline of recovering a table with content. Here we put our approach to test by capitalizing on extracting content from the PDF cells rather than decoding from images. Tab. 4 shows the TEDs score of HTML code representing the structure of the table along with the content inserted in the data cell and compared with the ground-truth. Our method achieved a 5.3% increase over the state-of-the-art, and commercial solutions. We believe our scores would be higher if the HTML ground-truth matched the extracted PDF cell content. Unfortunately, there are small discrepancies such as spacings around words or special characters with various unicode representations.

Table 4: Results of structure with content retrieved using cell detection on PubTabNet. In all cases the input is PDF documents with cropped tables.

| Model       | Simple | TEDS Complex | All  |
| ----------- | ------ | ------------ | ---- |
| Tabula      | 78     | 57.8         | 67.9 |
| Traprange   | 60.8   | 49.9         | 55.4 |
| Camelot     | 80     | 66           | 73   |
| Acrobat Pro | 68.9   | 61.8         | 65.3 |
| EDD         | 91.2   | 85.4         | 88.3 |
| TableFormer | 95.4   | 90.1         | 93.6 |

Japanese language (previously unseen by TableFormer):

Ground Truth ourti

Juarte shember

ssociation for

- ==--7=2

thousands revenues Quarter

In millions High

Total

Fint millions

Year Ended December 31, omputational Linguistics(COLING2002)

10003 Cage barr

1102 0÷79 2003]

Shares

Faded us.

- 79\1*07* (2003

howard

December ex

EXAMMAN

Thereafter s

146~155 B

Red - PDF cells, Green - predicted bounding boxes

Nonvested on January 1

Granted

Vested

Canceled or forfeited

Weighted Average

Grant Date Fair Value

RSUS

PSUS

90.10

117.44

87.087

102.01

91.19

81.14

92.18

- a. Red - PDF cells, Green - predicted bounding boxes, Blue - post-processed predictions matched to PDF cells

<!-- image -->

Text is aligned to match original for ease of viewing

Figure 5: One of the benefits of TableFormer is that it is language agnostic, as an example, the left part of the illustration demonstrates TableFormer predictions on previously unseen language (Japanese). Additionally, we see that TableFormer is robust to variability in style and content, right side of the illustration shows the example of the TableFormer prediction from the FinTabNet dataset.

<!-- image -->

Figure 6: An example of TableFormer predictions (bounding boxes and structure) from generated SynthTabNet table.

## 5.5. Qualitative Analysis

We showcase several visualizations for the different components of our network on various 'complex' tables within datasets presented in this work in Fig. 5 and Fig. 6 As it is shown, our model is able to predict bounding boxes for all table cells, even for the empty ones. Additionally, our post-processing techniques can extract the cell content by matching the predicted bounding boxes to the PDF cells based on their overlap and spatial proximity. The left part of Fig. 5 demonstrates also the adaptability of our method to any language, as it can successfully extract Japanese text, although the training set contains only English content. We provide more visualizations including the intermediate steps in the supplementary material. Overall these illustrations justify the versatility of our method across a diverse range of table appearances and content type.

## 6. Future Work &amp; Conclusion

In this paper, we presented TableFormer an end-to-end transformer based approach to predict table structures and bounding boxes of cells from an image. This approach enables us to recreate the table structure, and extract the cell content from PDF or OCR by using bounding boxes. Additionally, it provides the versatility required in real-world scenarios when dealing with various types of PDF documents, and languages. Furthermore, our method outperforms all state-of-the-arts with a wide margin. Finally, we introduce 'SynthTabNet' a challenging synthetically generated dataset that reinforces missing characteristics from other datasets.

## References

- [1] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-

siamiliest lebe

ayab

Example table from FinTabNet:

Shares in millions

RSUs

PSUs

end object detection with transformers. In Andrea Vedaldi, Horst Bischof, Thomas Brox, and Jan-Michael Frahm, editors, Computer Vision - ECCV 2020 , pages 213-229, Cham, 2020. Springer International Publishing. 5

- [2] Zewen Chi, Heyan Huang, Heng-Da Xu, Houjin Yu, Wanxuan Yin, and Xian-Ling Mao. Complicated table structure recognition. arXiv preprint arXiv:1908.04729 , 2019. 3
- [3] Bertrand Couasnon and Aurelie Lemaitre. Recognition of Tables and Forms , pages 647-677. Springer London, London, 2014. 2
- [4] Herv´ e D´ ejean, Jean-Luc Meunier, Liangcai Gao, Yilun Huang, Yu Fang, Florian Kleber, and Eva-Maria Lang. ICDAR 2019 Competition on Table Detection and Recognition (cTDaR), Apr. 2019. <http://sac.founderit.com/>. 2
- [5] Basilios Gatos, Dimitrios Danatsas, Ioannis Pratikakis, and Stavros J Perantonis. Automatic table detection in document images. In International Conference on Pattern Recognition and Image Analysis , pages 609-618. Springer, 2005. 2
- [6] MaxG¨ obel, Tamir Hassan, Ermelinda Oro, and Giorgio Orsi. Icdar 2013 table competition. In 2013 12th International Conference on Document Analysis and Recognition , pages 1449-1453, 2013. 2
- [7] EA Green and M Krishnamoorthy. Recognition of tables using table grammars. procs. In Symposium on Document Analysis and Recognition (SDAIR'95) , pages 261-277. 2
- [8] Khurram Azeem Hashmi, Alain Pagani, Marcus Liwicki, Didier Stricker, and Muhammad Zeshan Afzal. Castabdetectors: Cascade network for table detection in document images with recursive feature pyramid and switchable atrous convolution. Journal of Imaging , 7(10), 2021. 1
- [9] Kaiming He, Georgia Gkioxari, Piotr Dollar, and Ross Girshick. Mask r-cnn. In Proceedings of the IEEE International Conference on Computer Vision (ICCV) , Oct 2017. 1
- [10] Yelin He, X. Qi, Jiaquan Ye, Peng Gao, Yihao Chen, Bingcong Li, Xin Tang, and Rong Xiao. Pingan-vcgroup's solution for icdar 2021 competition on scientific table image recognition to latex. ArXiv , abs/2105.01846, 2021. 2
- [11] Jianying Hu, Ramanujan S Kashi, Daniel P Lopresti, and Gordon Wilfong. Medium-independent table detection. In Document Recognition and Retrieval VII , volume 3967, pages 291-302. International Society for Optics and Photonics, 1999. 2
- [12] Matthew Hurst. A constraint-based approach to table structure derivation. In Proceedings of the Seventh International Conference on Document Analysis and Recognition - Volume 2 , ICDAR '03, page 911, USA, 2003. IEEE Computer Society. 2
- [13] Thotreingam Kasar, Philippine Barlas, Sebastien Adam, Cl´ ement Chatelain, and Thierry Paquet. Learning to detect tables in scanned document images using line information. In 2013 12th International Conference on Document Analysis and Recognition , pages 1185-1189. IEEE, 2013. 2
- [14] Pratik Kayal, Mrinal Anand, Harsh Desai, and Mayank Singh. Icdar 2021 competition on scientific table image recognition to latex, 2021. 2
- [15] Harold W Kuhn. The hungarian method for the assignment problem. Naval research logistics quarterly , 2(1-2):83-97, 1955. 6
- [16] Girish Kulkarni, Visruth Premraj, Vicente Ordonez, Sagnik Dhar, Siming Li, Yejin Choi, Alexander C. Berg, and Tamara L. Berg. Babytalk: Understanding and generating simple image descriptions. IEEE Transactions on Pattern Analysis and Machine Intelligence , 35(12):2891-2903, 2013. 4
- [17] Minghao Li, Lei Cui, Shaohan Huang, Furu Wei, Ming Zhou, and Zhoujun Li. Tablebank: A benchmark dataset for table detection and recognition, 2019. 2, 3
- [18] Yiren Li, Zheng Huang, Junchi Yan, Yi Zhou, Fan Ye, and Xianhui Liu. Gfte: Graph-based financial table extraction. In Alberto Del Bimbo, Rita Cucchiara, Stan Sclaroff, Giovanni Maria Farinella, Tao Mei, Marco Bertini, Hugo Jair Escalante, and Roberto Vezzani, editors, Pattern Recognition. ICPR International Workshops and Challenges , pages 644-658, Cham, 2021. Springer International Publishing. 2, 3
- [19] Nikolaos Livathinos, Cesar Berrospi, Maksym Lysak, Viktor Kuropiatnyk, Ahmed Nassar, Andre Carvalho, Michele Dolfi, Christoph Auer, Kasper Dinkla, and Peter Staar. Robust pdf document conversion using recurrent neural networks. Proceedings of the AAAI Conference on Artificial Intelligence , 35(17):15137-15145, May 2021. 1
- [20] Rujiao Long, Wen Wang, Nan Xue, Feiyu Gao, Zhibo Yang, Yongpan Wang, and Gui-Song Xia. Parsing table structures in the wild. In Proceedings of the IEEE/CVF International Conference on Computer Vision , pages 944-952, 2021. 2
- [21] Shubham Singh Paliwal, D Vishwanath, Rohit Rahul, Monika Sharma, and Lovekesh Vig. Tablenet: Deep learning model for end-to-end table detection and tabular data extraction from scanned document images. In 2019 International Conference on Document Analysis and Recognition (ICDAR) , pages 128-133. IEEE, 2019. 1
- [22] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high-performance deep learning library. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alch´ e-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32 , pages 8024-8035. Curran Associates, Inc., 2019. 6
- [23] Devashish Prasad, Ayan Gadpal, Kshitij Kapadni, Manish Visave, and Kavita Sultanpure. Cascadetabnet: An approach for end to end table detection and structure recognition from image-based documents. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops , pages 572-573, 2020. 1
- [24] Shah Rukh Qasim, Hassan Mahmood, and Faisal Shafait. Rethinking table recognition using graph neural networks. In 2019 International Conference on Document Analysis and Recognition (ICDAR) , pages 142-147. IEEE, 2019. 3
- [25] Hamid Rezatofighi, Nathan Tsoi, JunYoung Gwak, Amir Sadeghian, Ian Reid, and Silvio Savarese. Generalized intersection over union: A metric and a loss for bounding box regression. In Proceedings of the IEEE/CVF Conference on

- Computer Vision and Pattern Recognition , pages 658-666, 2019. 6
- [26] Sebastian Schreiber, Stefan Agne, Ivo Wolf, Andreas Dengel, and Sheraz Ahmed. Deepdesrt: Deep learning for detection and structure recognition of tables in document images. In 2017 14th IAPR International Conference on Document Analysis and Recognition (ICDAR) , volume 01, pages 11621167, 2017. 1
- [27] Sebastian Schreiber, Stefan Agne, Ivo Wolf, Andreas Dengel, and Sheraz Ahmed. Deepdesrt: Deep learning for detection and structure recognition of tables in document images. In 2017 14th IAPR international conference on document analysis and recognition (ICDAR) , volume 1, pages 1162-1167. IEEE, 2017. 3
- [28] Faisal Shafait and Ray Smith. Table detection in heterogeneous documents. In Proceedings of the 9th IAPR International Workshop on Document Analysis Systems , pages 6572, 2010. 2
- [29] Shoaib Ahmed Siddiqui, Imran Ali Fateh, Syed Tahseen Raza Rizvi, Andreas Dengel, and Sheraz Ahmed. Deeptabstr: Deep learning based table structure recognition. In 2019 International Conference on Document Analysis and Recognition (ICDAR) , pages 1403-1409. IEEE, 2019. 3
- [30] Peter W J Staar, Michele Dolfi, Christoph Auer, and Costas Bekas. Corpus conversion service: A machine learning platform to ingest documents at scale. In Proceedings of the 24th ACM SIGKDD , KDD '18, pages 774-782, New York, NY, USA, 2018. ACM. 1
- [31] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. Attention is all you need. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems 30 , pages 5998-6008. Curran Associates, Inc., 2017. 5
- [32] Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. Show and tell: A neural image caption generator. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) , June 2015. 2
- [33] Wenyuan Xue, Qingyong Li, and Dacheng Tao. Res2tim: reconstruct syntactic structures from table images. In 2019 International Conference on Document Analysis and Recognition (ICDAR) , pages 749-755. IEEE, 2019. 3
- [34] Wenyuan Xue, Baosheng Yu, Wen Wang, Dacheng Tao, and Qingyong Li. Tgrnet: A table graph reconstruction network for table structure recognition. arXiv preprint arXiv:2106.10598 , 2021. 3
- [35] Quanzeng You, Hailin Jin, Zhaowen Wang, Chen Fang, and Jiebo Luo. Image captioning with semantic attention. In Proceedings of the IEEE conference on computer vision and pattern recognition , pages 4651-4659, 2016. 4
- [36] Xinyi Zheng, Doug Burdick, Lucian Popa, Peter Zhong, and Nancy Xin Ru Wang. Global table extractor (gte): A framework for joint table identification and cell structure recognition using visual context. Winter Conference for Applications in Computer Vision (WACV) , 2021. 2, 3
- [37] Xu Zhong, Elaheh ShafieiBavani, and Antonio Jimeno Yepes. Image-based table recognition: Data, model,
- and evaluation. In Andrea Vedaldi, Horst Bischof, Thomas Brox, and Jan-Michael Frahm, editors, Computer Vision ECCV 2020 , pages 564-580, Cham, 2020. Springer International Publishing. 2, 3, 7
- [38] Xu Zhong, Jianbin Tang, and Antonio Jimeno Yepes. Publaynet: Largest dataset ever for document layout analysis. In 2019 International Conference on Document Analysis and Recognition (ICDAR) , pages 1015-1022, 2019. 1

## TableFormer: Table Structure Understanding with Transformers

## Supplementary Material

## 1. Details on the datasets

## 1.1. Data preparation

As a first step of our data preparation process, we have calculated statistics over the datasets across the following dimensions: (1) table size measured in the number of rows and columns, (2) complexity of the table, (3) strictness of the provided HTML structure and (4) completeness (i.e. no omitted bounding boxes). A table is considered to be simple if it does not contain row spans or column spans. Additionally, a table has a strict HTML structure if every row has the same number of columns after taking into account any row or column spans. Therefore a strict HTML structure looks always rectangular. However, HTML is a lenient encoding format, i.e. tables with rows of different sizes might still be regarded as correct due to implicit display rules. These implicit rules leave room for ambiguity, which we want to avoid. As such, we prefer to have 'strict' tables, i.e. tables where every row has exactly the same length.

We have developed a technique that tries to derive a missing bounding box out of its neighbors. As a first step, we use the annotation data to generate the most fine-grained grid that covers the table structure. In case of strict HTML tables, all grid squares are associated with some table cell and in the presence of table spans a cell extends across multiple grid squares. When enough bounding boxes are known for a rectangular table, it is possible to compute the geometrical border lines between the grid rows and columns. Eventually this information is used to generate the missing bounding boxes. Additionally, the existence of unused grid squares indicates that the table rows have unequal number of columns and the overall structure is non-strict. The generation of missing bounding boxes for non-strict HTML tables is ambiguous and therefore quite challenging. Thus, we have decided to simply discard those tables. In case of PubTabNet we have computed missing bounding boxes for 48% of the simple and 69% of the complex tables. Regarding FinTabNet, 68% of the simple and 98% of the complex tables require the generation of bounding boxes.

Figure 7 illustrates the distribution of the tables across different dimensions per dataset.

## 1.2. Synthetic datasets

Aiming to train and evaluate our models in a broader spectrum of table data we have synthesized four types of datasets. Each one contains tables with different appear- ances in regard to their size, structure, style and content. Every synthetic dataset contains 150k examples, summing up to 600k synthetic examples. All datasets are divided into Train, Test and Val splits (80%, 10%, 10%).

The process of generating a synthetic dataset can be decomposed into the following steps:

1. Prepare styling and content templates: The styling templates have been manually designed and organized into groups of scope specific appearances (e.g. financial data, marketing data, etc.) Additionally, we have prepared curated collections of content templates by extracting the most frequently used terms out of non-synthetic datasets (e.g. PubTabNet, FinTabNet, etc.).
2. Generate table structures: The structure of each synthetic dataset assumes a horizontal table header which potentially spans over multiple rows and a table body that may contain a combination of row spans and column spans. However, spans are not allowed to cross the header - body boundary. The table structure is described by the parameters: Total number of table rows and columns, number of header rows, type of spans (header only spans, row only spans, column only spans, both row and column spans), maximum span size and the ratio of the table area covered by spans.
3. Generate content: Based on the dataset theme , a set of suitable content templates is chosen first. Then, this content can be combined with purely random text to produce the synthetic content.
4. Apply styling templates: Depending on the domain of the synthetic dataset, a set of styling templates is first manually selected. Then, a style is randomly selected to format the appearance of the synthesized table.
5. Render the complete tables: The synthetic table is finally rendered by a web browser engine to generate the bounding boxes for each table cell. A batching technique is utilized to optimize the runtime overhead of the rendering process.

## 2. Prediction post-processing for PDF documents

Although TableFormer can predict the table structure and the bounding boxes for tables recognized inside PDF documents, this is not enough when a full reconstruction of the original table is required. This happens mainly due the following reasons:

Figure 7: Distribution of the tables across different dimensions per dataset. Simple vs complex tables per dataset and split, strict vs non strict html structures per dataset and table complexity, missing bboxes per dataset and table complexity.

<!-- image -->

- TableFormer output does not include the table cell content.
- There are occasional inaccuracies in the predictions of the bounding boxes.

However, it is possible to mitigate those limitations by combining the TableFormer predictions with the information already present inside a programmatic PDF document. More specifically, PDF documents can be seen as a sequence of PDF cells where each cell is described by its content and bounding box. If we are able to associate the PDF cells with the predicted table cells, we can directly link the PDF cell content to the table cell structure and use the PDF bounding boxes to correct misalignments in the predicted table cell bounding boxes.

Here is a step-by-step description of the prediction postprocessing:

1. Get the minimal grid dimensions - number of rows and columns for the predicted table structure. This represents the most granular grid for the underlying table structure.
2. Generate pair-wise matches between the bounding boxes of the PDF cells and the predicted cells. The Intersection Over Union (IOU) metric is used to evaluate the quality of the matches.
3. Use a carefully selected IOU threshold to designate the matches as 'good' ones and 'bad' ones.
4. 3.a. If all IOU scores in a column are below the threshold, discard all predictions (structure and bounding boxes) for that column.
5. Find the best-fitting content alignment for the predicted cells with good IOU per each column. The alignment of the column can be identified by the following formula:

<!-- formula-not-decoded -->

where c is one of { left, centroid, right } and x c is the xcoordinate for the corresponding point.

5. Use the alignment computed in step 4, to compute the median x -coordinate for all table columns and the me-
6. dian cell size for all table cells. The usage of median during the computations, helps to eliminate outliers caused by occasional column spans which are usually wider than the normal.
7. Snap all cells with bad IOU to their corresponding median x -coordinates and cell sizes.
8. Generate a new set of pair-wise matches between the corrected bounding boxes and PDF cells. This time use a modified version of the IOU metric, where the area of the intersection between the predicted and PDF cells is divided by the PDF cell area. In case there are multiple matches for the same PDF cell, the prediction with the higher score is preferred. This covers the cases where the PDF cells are smaller than the area of predicted or corrected prediction cells.
9. In some rare occasions, we have noticed that TableFormer can confuse a single column as two. When the postprocessing steps are applied, this results with two predicted columns pointing to the same PDF column. In such case we must de-duplicate the columns according to highest total column intersection score.
10. Pick up the remaining orphan cells. There could be cases, when after applying all the previous post-processing steps, some PDF cells could still remain without any match to predicted cells. However, it is still possible to deduce the correct matching for an orphan PDF cell by mapping its bounding box on the geometry of the grid. This mapping decides if the content of the orphan cell will be appended to an already matched table cell, or a new table cell should be created to match with the orphan.
11. 9a. Compute the top and bottom boundary of the horizontal band for each grid row (min/max y coordinates per row).
12. 9b. Intersect the orphan's bounding box with the row bands, and map the cell to the closest grid row.
13. 9c. Compute the left and right boundary of the vertical band for each grid column (min/max x coordinates per column).
14. 9d. Intersect the orphan's bounding box with the column bands, and map the cell to the closest grid column.

9e. If the table cell under the identified row and column is not empty, extend its content with the content of the or-

PDF Cells

PDF Cells

PDF Cells

Name

Variable

KRAS-F

KRAS R

PNA clamp probe

Sum Sq

E

5745.2

cond

Major vascular complications

2191.39

Renal failure required CRRT

182 cond

2648.33

Residuals severe bleeding

3.91

18.98

236.91

Name

KRAS-F

KRAS-R

PNA clamp probe

(Variable

(Donc

Pux conc

Name

Residuals

KRASE

ARANTR

TableFormer predicted bounding boxes

15.86

DEL

phan cell.

pivalue

Odds ratio

95%

ANOVA

Sequences

Đf

5-TGTGTGACATGTTCTAATATAGTCACATTT-3"

confidence interval

E Value

Pr (&gt;F)

5-ATCGTCAAGGCACTCTTGCCTAC-3

D-TACGCCACCAGCTCC-3|

266.75

1064 = 18) 1314

50.87

(2.67-9.14

0.013

2976 za 1293

61.48

021-19.41

7007 c D6)334

9°

3.61-69.63

238-34.80

40.001

40.001

Sequences

[220.001

9f. Otherwise create a new structural cell and match it wit the orphan cell. P value Pr (&gt;F)

Aditional images with examples of TableFormer predictions and post-processing can be found below.

(Renal failure required CRRI

Severe bleeding

ENA clamp probe

150.98

15.80

Post-processed bounding boxes deurologic complications

Sum Sg

Post-processed bounding boxes

TableFormer predicted structure

Name

E745.2

sarable

Sequences tand

KRAS-F

5'-TGTGTGACATGTTCTAATATAGTCACATTT-3'

E5A8K35

4(p,21

22a cong

Residuals

KRAS-R

5'-ATCGTCAAGGCACTCTTGCCTAC-3'

256.91

6 10, 3

PNA clamp probe 5'-TACGCCACCAGCTCC-3'

Major vascular complications

Renal failure required CRRU

3avere bleeding

TableFormer predicted structure

0° (0.01)

eurologic complications

ANOVA

3\* (0. 1)

Sum Sq

8(0.21

9(1. 2)

TableFormer predicted structure

P

5745.2

13 (p. 31

0 10. 01)

14(1, 31)

conc

Variable

Pxconc

23 (0. 5)

Odds ratio

2191.39

18 10. 4)

19 (1. 4)

2648.33

24 [1. 5)

4 (0. 1)

Major vascular

3.91

Residuals complications

236.91

8 (0. 21)

Renal failure

10.98

required CRRT

12 (0. 3)

| 15.86

Severe bleeding

16 (0. 4)

Neurologic complications

13.68

D-ATCGTCAAGGCACTCTTGCCTAC-5)

(6o21-19.41

3461-69.63]

(10.001

(10.001

E-TACGCCACCAGCTCC-3

Figure 8: Example of a table with multi-line header.

<!-- image -->

4 (1, 1)

Figure 9: Example of a table with big empty distance between cells.

<!-- image -->

Figure 10: Example of a complex table with empty cells.

<!-- image -->

PDF Cells

PDF Cells

Treatment

Control

PDF Cells

B6 control

Be vildagliptin treated

Control

Variable

Medium

KA #bontrol

4KA \*wildagliptin treated

Medium

Total Bilirubin

High

Tank number

3 mM

FCO, (Latm)

16.7 mM

(ng/ml/islet)

pH

Fold-increase

(high GLC/

(ng/ml/islet)

Bpt7 110307

891 6 211.006

low GLC)

296 14027

0918 200306

384 39058

878 260.006

814 5276.6

6u63

123423028225 23(282j25tal327

234.  120.04

DOG 150107 37 3013 33

030307

608 =76.5

8:00 $60.009

Sensitivity (%)

981473801 6421

8100 730.009

60

896 =674.6

7986 $50.006

TableFormer predicted bounding boxes

High

201

Direct Bilirubin

387 2084.4

(- Reactive Protein

3 mM.

TableFormer predicted bounding boxes

7997 108:006

Fold-increase

16.7 mM

(ng/ml/islet)

TableFormer predicted bounding boxes

(ng/mi/islet)

Treatment

Tank number

Bo control!

096 = 0.27

Bo vildagliptin treated

Variable

KAY control

Control

[Total Bilirubin)

Control

AKA vildagliptin treated

Medium

·Direct Bilirubin

Post-processed bounding boxes

Medium

°C- Reactive Protein

High

Bigh

Post-processed bounding boxes

Is citrol

Post-processed bounding boxes

Be Vidaguptin treated

Variable

RIKAl bentrol

RAW Wilda intin treated

Treatment

Fotal Bilirubin

Lank number

Sontrol

Direct Billnubin

36ntrol

Medium

" Reactive Protein

TableFormer predicted structure medium

TableFormer predicted structure

Variable

Sensitivity (%)

4 p. 11|

TableFormer predicted structure

Total Bilirubin

60

Treatment

B6control

8 0. 21

Direct Bilirubin

60

B6vildagliptin treated

C- Reactive

Control

47

Protein

14 р. 2/

Control

KKAycontrol

Medium

0317-0.07

PCO, (uatm)

8&gt;18=0.06

073-E=0.0-1

(high GLC/

Icw GLC, pH

8834 ==0.323

93l3-

816€ 0.006

Sensitivity (%)

0206==0.073

¡otal alkalinity

2145 2027

2145 30F.7

2095 38.1

2095 2375.1

2079 18.3

2079 185

‹Total alkalinity

(umol kg ")

2145 = 47

Salinity (ppt)

35.6 200.07

35.6 0.07

Specificity (%)

35.9 0.07

35.9 760.07

95

36.0 380.03

38:0 18:03

95

85

Salinity (ppt)

Temperature (C)

28.6 =x0.05

28.4 $00.04

28.7 60.05

28.6 310.05

28.7 23.03

28:7 138:04

" Temperature (\*C)

(Specificity (%)

135.6 = 0.07

28.6 ÷ 0.05

Eut off

1,3 mg/dl

0,85

98

Cut off

Figure 11: Simple table with different style and empty cells.

<!-- image -->

PDF Cells

Molecular

Burkine niformly thick and

Well populated with peramidal neurons

histologically intact

Granule

Enitormly thick and densely cellular

TableFormer predicted bounding boxes

Cortical Layer

Grade 4

Molecular

Murkinje cellular

· Uniformly thick and

Well populated with pyramidal neurons

instologically intact

Granule

алтолну mick andl densely cellular

Post-processed bounding boxes

Sortical Layer bradez

Solenute!

Enitomly thick ant bellular

Matt poputated with histologically intact

brianca neurons I

Erranute wiitormly thick and

lensely cellula

TableFormer predicted structure

Cortical Layer

Grade 4

500.18

Molecular

Purkinje

Granule

Uniformly thick and cellular

10 р. 2)

Well populated with histologically intact

pyramidal neurons

Uniformly thick and densely

Grade 3

Manable thinning, normal

Imlated neuronal loss or resole arche aton

[necrosis)

laregular thinning but densely cellular

EGrade 3

Wariable thinning, normal

Grade 2

Nanable thinning and

Moderate gaps and sattered loss of neurons

aregular thinning with density

modest reductions in cell

Grade 2

·Variable thinning and

Figure 13: Table predictions example on colorful table.

<!-- image -->

Figure 12: Simple table predictions and post processing.

<!-- image -->

reduced cellularity cellularity

(397 ÷ 65

21 p. x

KKAyvildagliptin treated

28 p. 4

Medium

High

High

42 р. c|

15 g. 3

Grade 1

Uniformly thin barge gaps and

auronal necrosis conspicuously increased

megular thinning and all density

censpicuous reductions in

Grade 1

(Uniformly thin

Figure 14: Example with multi-line text.

43 mo

54 me. 4.

85 10. =

87(0:

PDF Cells

PDF Cells

Size

Grade

Parameter

(Aevalue)

lymph node

Gain

(Bevalue)

(arvalue)

Aze (a49/&gt;50 years

3236

3058

32195

sire (#010/21-507&gt;50 mm

Low Cut-Oft Frequency

(solved lymph node (071-3/&gt;3)

High Cut-Off Frequency

Boogesterone ryceptor

Input-Referred Noise tatus (PR-/PR+)

[169-2 status

1202K-2 -/HCK-2+)

CMRR

He67 proliferative activity

10sw Ki-67/High Ki-67

Number of Analog Channels

Gis (Absent/Present)

(NeD (tertiles 1, 2. 3)

Power Consumption maeo-regional treatment

Precision

(lumpectomy + radiotherapy/

(mastectomy + radiotherapy.

TableFormer predicted bounding boxes

TableFormer predicted bounding boxes

Age (≤507&gt;50 years)

9ze (≤20/21-50/&gt;50 mm)

Grade (VIVII)

Low Cut-Off Frequency

Involved lymph

Ino0P (W-S&gt;5

High Cut-Off Frequency

Progesterone - receptor

Input-Referred Noise status (PR-/PR+)

HER-2 status

(HER-2 -/HER-2+)

- 67 profferative activity

Number of Analog Chafinels

(Low Ki-67/High Ki 67)

EM (Absent/Present)

tD (tertile 4, 2, 3)

Power Consumption

Loco-regidial treatment

(ampectomy + radiotherapy mastectomy + radiotherapy)

Post-processed bounding boxes

Post-processed bounding boxes faze (34957&gt;50 years)

we (E100721-507&gt;50 mm

Low Cut-Off Frequency made (VIVI)

## volved lympi

High Cut-Off Frequency made 10/1-3/531

mogesterong Facep

Imput-Referred Noise

Status (PR-/PR+)

1ER-2 status!

NER-2 -/HER-2+

tab/ proliterative activit

Number of Analog Channels aw Ki-67/Hlch K1-67

5s(Absent/Present)

Power Consumption

(2i90 (tertiles 1,2,3)

(ato-regional treatment

Lumpectomy + radiotherapy?

(mastectomy + radiotherapy)

TableFormer predicted structure

Size

11° R. 1)

kP-value)

Age (550/&gt;50 years) 0.058

Size (s20/21-50/&gt;50

mm)

Grade (VIIII)

55 me

Involved lymphnode

(0/1-3/&gt;3)

Progesterone- recentoretatus (PR.

(PR+)

HER-2 status(HER-2 -

THER 241

Ki-67 proliferative

Ki-67)

activity (Low Ki-67/High

LVI (Absent/Present)

MVD (tertiles 1, 2, 3)

121 р. 17)

Loco-regional reatment Lumnec omy

- radiotherapy/

Gain

Ki-67

MVD

6VI

MER-2

status

Value status

palmen

(Bevalue)

3-054

2851 V/V (69.09 dB)

(Revalue)

(Rovalue)

(Revalue)

35641

3238

3013

(Arvalue)

3261

8626

8041.

&lt;0.001

0568

20.001

20.001

0.002

20.001

20.001

0072

1285 Hz

0035

6580 Hz

=0.001

0607

3340

2.1 pV (rms)]

0997

B692

3020.

0.001

9256

31863

110 dB @ | KHz

3627

Bob 9

0049

3,698

BWI5

## MA @ 3.0 V (3 mW)

3.331

Selectable, 12 or 8 bits

Systemic real ment

(Revalue)

&lt;0.001

0013

34603

31855

33602

37357

Figure 15: Example with triangular table.

<!-- image -->

CMRR

BR

(Savalue)

3297

45/9

34 53)

0X57

Ta

Figure 16: Example of how post-processing helps to restore mis-aligned bounding boxes prediction artifact.

PDF Cells

Kem

Age (96)

30x (95)

racation (%)

Relationship

Stetus (%)

Work status (90.

Level of enucation (%)

Household income

(es)

Socio-economic

18-29 yIE

30-49 yrs

98+ yrs stajor metropolitan

Hemainder of State

Married

1l-time

Aart-time

Hot in paid work

Siplomal

Bear 11)

Bear 10

Fear 9 or below

($30,000

$30,000,279.998

780,000#

Satisfaction

Overall (M, SD)

Domain (M, SD)

ammunity

Relationships

Standard of living

Fature security

Health

Achieving in life

Retigion/spintuality

Farmers

9.20

47.80

14.00

12.80

20:20

24

220.00

35.80

34.20

39.60

19.40

$4.20

58.80

(80.60)

[57.20

920

57.40

50.20

35.40

74.55891 83)

1878663641

83.17946/63)

93.51(746 54)

1A5i(2090791)

88375434.

150304568677

12436 (73534)

150411(2241

General community

12.59

38.4T

49.05

26.35

48.69

56.19

48.81

38.65

31.75

33.83

50 31

15373

04.03

93.81

76.16

77.25 (i6.64)

56.57 (bi 92)

36.49 (32.79)

16294 (38334)

7966999065.

11539

12133

140991754

a333 iafas2T

TableFormer predicted bounding boxes

Item

Farmers

Socio economic

Age (96:

EBcation (94

Belationship status (90)

Work status (96)

Level of education (0)

Fibusehold income

Satisfaction

Overal:(M SĐ)

(0omain (M. SD)|

Community connectedness

atationships

Bafety seandard of living

(puture security

[Health

Achieving in life

Religion/spirituali

18-29 yrs

Male

Single itan

tate

27

100,00

19.40

(39.60

17.20

73,20

79.40

[General community

12.55

58.35

49.65

98.19

81

143.

49.23

39.75

55183

2P.03

42.81

32.40

36.16

(4955° (1783) 77.25 (16.64)

18987(18,64

69.530 (19.92)

83.17° (17.63)

8361° (1654)

74446° (1691

20580\* 12134)

20080(17621

13 18371

8334° (26.24)

75049 (22.79)

78194 (17.84)

7766(1665)

79839(20.72)

74.33 (19.22)

3830 2621)

44.09 (185)

Post-processed bounding boxes

Rem

Socio-economic major metropolitar

hemainder of State single

Work status 10l revel off

Household income

780,000+

Satisfaction averall (M, SD)

Domain (M, SDI

Hondard ni lind

Thieving in lita

Fatigion/spintuality

Farmers

1220

14.00

ET 120

0D 80

36.20

64.20

G380

0220

W40

00.20

35.40

TR 509(16 83)

18.878688.64

93.179(67.63

33.5138B5 54

78346 hd.91

10037032

080 136 67

12736 (18534)

8573434 D6 24

General community

10.08

$8.63

88.63

65.83

76 16

B7.25 ((16.64)

150.57 (15.92)

58294 035384

7866102065

E0830185512

TableFormer predicted structure

Age (%)

18-29 yrs

30-49 yrs

10° в. =)

14° р. «)

18 р. к)

50+ yrs

Sex (%)

Safety

Standard of living

100 27

Future security

107° В.3

Health

Achievina in life

115° B. ×

Religion/spirituality

Farmers

8.20

11 р. 3

47.80

44.00

72.80

23 m. c

Male

20 m

Location (%)

FemaleMajor metropolitan 27.20

Remainder of State

30° р. к)

Relationshipstatus Married

(%)

Single

Work status (%)

42 р. 10))

Part-time

Not in paid work

54 = 10

Level ofeducation Degree

58° A 1)

Diploma

Year 11

Year 10

66° г. т

Year 9 or below

&lt; $30,000

74 g. 77

78° g. S

$30.000-$79 999

Satisfaction

Overall (M. SD)

Domain (M, SD)

55m Me

38.80

63 г. м

20.60

|17.20

9.20

75 г. т)

|17.40

50.20

84 г. 3)

74.55(17.83)

Communityconnectedness 73.87a(18.64)

85 р. та

43.81

42.23

48 p. 12)

19.12

52 р. 1

38.65

56 p. 1e)

31.75

60 g. 1

33.83

64 2, 18)

16.38

68. 1

11.31

72 р. 1)

6.73

76 p. T

21.03

80 g. 22)

13 р. л

21° p.г

25 g. c

29 р. г

33 р. к

37 p. a

41 р. 1l

57 р. не

65 р. не)

69 р. тр)

73 г. ти

77 p. т

119 р. s0

85 р. 22)

77.25(16.64)

90 р. 77

83 p. 2e)

69.57(19.92)

Relationships

83.17a(17.63)

97 g.2

79.49(22.79)

98 р. =

83.61a(16.54)

178 04117 841

488.3

74.46b(16.91)66.8977.66a(16.65)

104 1 27

106 р. тт

106 р. тт

b(21.34)76.80

la(17.67)

7236(18, 34)

65.34b(26.24)

71.39(20.12)

194.

74.33(19.22)

74.09a(18.54)

68.23b(26.21)

Figure 17: Example of long table. End-to-end example from initial PDF cells to prediction of bounding boxes, post processing and prediction of structure.

<!-- image -->

117 р. х

118 a s

(%)|

Household income(%) |

31 р. к)

0700.00

75.80

24.20

80.60

43 г. го)

47 г. U)

19.40

11An-

Generalcommunity

9 p. =

12.55

38.41

16 р. 4

49.05

280 m

50.0458.35

41.65

36 p.m.

56.19

An a se
