Structured Prediction for Scalable Spreadsheet Table Understanding: From Cell Types to Table Ranges (Extended Version)
Organizations: DI ENS, ENS, CNRS, PSL, Inria Paris, France
Abstract
Spreadsheets are a primary medium for publishing tabular data, yet automatically extracting structured content from them remains difficult due to heterogeneous layouts, diverse file formats, and inconsistent organizational conventions. We address two core tasks in spreadsheet understanding: Cell-Type Classification (CTC), which assigns roles to cells, and Table Detection (TD), which identifies table bounding boxes within sheets. We propose an efficient two-stage pipeline in which a learned CTC model feeds a deterministic TD algorithm. For CTC, we use a LightGBM classifier over 65 structured features together with a pairwise CRF enforcing spatial consistency across the cell grid. Our TD method extracts table ranges from predicted cell types by a deterministic five-stage procedure. For evaluation, we built and share StatSheets, a multilingual benchmark of 737 manually annotated sheets from 14 public data providers across multiple countries and file formats. Under 5-fold cross-validation, our CRF-LightGBM system achieves a Mean File-Macro F1 score of 0.937 on CTC, within 0.6 percentage points of the GPU-based TUTA Transformer, while requiring substantially fewer computational resources. For TD, our deterministic approach outperforms region-based baselines and remains competitive with recent LLM-based systems such as SpreadsheetLLM. These results demonstrate that combining non-linear structured prediction with deterministic range extraction provides a competitive, scalable, and computationally efficient approach to spreadsheet table understanding.
Figures & tables
| ID | Name | Description | ID | Name | Description | ID | Name | Description | |
| Group A | 1 | IsEmpty | No cell content | 8 | #Chars | Character count | 15 | RowPosRatio | Relative row index in grid |
| 2 | IsNum | Value is numeric | 9 | #Digits | Digit count | 16 | ColPosRatio | Relative column index in grid | |
| 3 | IsStr | Value is a string | 10 | #Alpha | Alphabetic character count | 17 | IsSheetBorder | Cell on non-empty boundary | |
| 4 | IsDate | Value is a date | 11 | #Spaces | Space count | 18 | #Neighbors | Non-empty 4-neighbor count | |
| 5 | IsFormula | Cell contains a formula | 12 | #Other | Other character count | 19 | IsIsolated | All 4-neighbors are empty | |
| 6 | IsInt | Integer value | 13 | StartsAlpha | First char. is alphabetic | 20 | IsOds | File format is ODS |
| HP | Default | Stage | Description |
|---|---|---|---|
| 1 | Min. DATA cells in a seed | ||
| 1,3 | Min. HEADER cells in a header-only seed | ||
| 2,4 | Header-density threshold along rows | ||
| 4 | Header-density threshold along columns | ||
| 2 | Min. separator rows to keep two seeds apart | ||
| 2 | Min. EMPTY columns to keep two seeds apart |
| Source | Country | #Sheets |
|---|---|---|
| Australian Bureau of Statistics | Australia | 64 |
| French Ministry of Justice | France | 64 |
| OECD | International | 63 |
| Nat. Center for Education Statistics | USA | 61 |
| Bureau of Economic Analysis | USA | 58 |
| Ministry of Internal Affairs & Comm. | Japan | 58 |
| Model | NL | Seq. | Fmt. | Spat. | Sem. | GPU |
|---|---|---|---|---|---|---|
| CRF-Linear | ✗ | ✓ | ✓ | ✓ | ✗ | ✗ |
| RF-Koci | ✓ | ✗ | ✓ | ✗ | ✗ | ✗ |
| RF | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ |
| LightGBM | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ |
| CRF-RF | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ |
| CRF-LightGBM | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ |
| Model | Load (s) | Train (s) | Total (h) | Inst. | Cost ($) |
|---|---|---|---|---|---|
| RF-Koci | 256.7 | 31.6 | 0.08 | C | 0.12 |
| RF | 252.2 | 120.3 | 0.10 | C | 0.16 |
| LightGBM | 254.7 | 177.1 | 0.12 | C | 0.18 |
| CRF-Linear | 252.3 | 14 658.2 | 4.14 | C | 6.36 |
| CRF-RF | 250.5 | 15 848.4 | 4.47 | C | 6.87 |
| CRF-LightGBM | 254.3 | 14 952.5 | 4.22 | C | 6.49 |
| Model | Load (s) | Infer (s) | Total (h) | Inst. | Cost ($) |
|---|---|---|---|---|---|
| RF-Koci | 540.0 | 40.0 | 0.16 | C | 0.25 |
| RF | 555.2 | 49.0 | 0.17 | C | 0.26 |
| LightGBM | 541.8 | 95.9 | 0.18 | C | 0.27 |
| CRF-Linear | 540.1 | 268.5 | 0.22 | C | 0.35 |
| CRF-RF | 550.6 | 300.8 | 0.24 | C | 0.36 |
| CRF-LightGBM | 542.8 | 288.7 | 0.23 | C | 0.35 |
| Model | Train. (s) | Infer. (s) | Total (h) | Inst. | Cost ($) |
| SpreadsheetLLM (train) | 33 096.3 | — | 9.19 | G | 48.43 |
| SpreadsheetLLM (infer) | — | 1 954.8 | 0.54 | G | 2.86 |
| TD(RF-Koci) | 580.0 | 301.5 | 0.24 | C | 0.38 |
| TD(CRF-LightGBM) | 831.5 | 326.3 | 0.32 | C | 0.49 |
| TD(Oracle) † | — | 355.9 | 0.10 | C | 0.15 |
| CC | — | 2 723.7 | 0.76 | C | 1.16 |
Table Structure Recognition
Table structure recognition recovers rows, columns, cells, spans, and hierarchy from table images and documents.
See all 32 papers