Parsing and Reasoning Over Hierarchical Tables

331 concepts245 papers5 proposals

Most machine learning models treat tables as flat, predictable grids—simple matrices where every cell belongs to exactly one row and one column. This assumption works perfectly for relational databases or clean CSV files. However, real-world documents like financial reports, scientific papers, and corporate spreadsheets are rarely so simple. Instead, they feature deeply nested headers, merged cells, and multi-level structural hierarchies designed for human eyes rather than machine consumption.

When standard language models or vision-language models attempt to read these complex layouts using traditional grid assumptions, their spatial reasoning breaks down. Understanding why this happens—and how researchers are fixing it—requires looking closely at how table structure dictates data meaning.

The Breakdown of Flat Assumptions

In a standard flat table, a cell's semantic meaning is determined entirely by its immediate row and column coordinates. In a hierarchical table, however, a single data cell is contextually tied to a chain of nested headers.

Consider a financial spreadsheet where a cell contains the value $150,000`. To understand this number, a reader must trace upward through a multi-level column header (`2024` $\rightarrow$ `Q3` $\rightarrow$ `Operating Expenses`) and leftward through a multi-level row header (`North America` $\rightarrow$Enterprise Division`).

+-------------------------------------------------------+
|                         2024                          |  <- Level 1 Header
+---------------------------+---------------------------+
|            Q3             |            Q4             |  <- Level 2 Header
+------------+--------------+------------+--------------+
| Revenue    | OpEx         | Revenue    | OpEx         |  <- Level 3 Header
+------------+--------------+------------+--------------+
| $500,000   | $150,000     | $600,000   | $175,000     |  <- Data Cells
+------------+--------------+------------+--------------+

As noted by Yannis Katsis in the creation of the AIT-QA: Question Answering Dataset over Complex Tables in the Airline Industry benchmark, naive approaches that simply concatenate these nested headers into a single string fail to capture the underlying relational dependencies. The model loses the explicit parent-child relationships between categories, leading to severe confusion when multiple columns share sub-headers (such as having an OpEx column under both Q3 and Q4).

The Extraction Bottleneck

When large language models (LLMs) process tables, they typically rely on linearizing the grid into a sequence of tokens, such as Markdown text, HTML tags, or raw CSV strings. Yilun Zhao et al. demonstrate in ReasTAP: Injecting Table Reasoning Skills During Pre-training via Synthetic Reasoning Examples that these standard serialization methods fail because basic row and column delimiters cannot inherently represent cells that span multiple rows or columns.

This structural distortion creates an extraction bottleneck. Intuition might suggest that models fail at table reasoning because they struggle with the underlying logic or arithmetic. However, empirical evidence shows the opposite. Work by Pragya Srivastava et al. on Evaluating LLMs' Mathematical Reasoning in Financial Document Question Answering reveals that the primary failure mode for LLMs is not incorrect mathematical calculation, but rather the incorrect retrieval of the data points themselves. Because the values are contextually buried beneath layers of nested headers, the model extracts the wrong numbers before the math even begins.

Preserving Structure via Trees and Graphs

To bypass the limitations of flat serialization, recent architectures treat tables as multi-dimensional trees or graphs rather than simple text strings. The core idea is to explicitly encode the spatial and logical paths that connect headers to data cells.

For example, the authors of TUTA: Tree-based Transformers for Generally Structured Table Pre-training (Zhiruo Wang et al.) introduced a framework that views a table as a bi-dimensional tree. By explicitly modeling parent-child relationships within the attention mechanism, the model can navigate the exact semantic path from a top-level category down to an individual data cell.

       [2024]
      /      \
   [Q3]      [Q4]
   /   \     /   \
[Rev] [OpEx]...  ...
         |
    [$150,000]  <- Context inherited directly through the tree path

Similarly, Pei Chen et al. proposed HyTrel: Hypergraph-enhanced Tabular Data Representation Learning, which maps cells as nodes and rows/columns as hyperedges. This graph-based framing ensures that the structural "rules" of the table—such as the fact that changing the visual order of rows should not change the underlying meaning of the data—are mathematically preserved.

Real-World Implications

The challenge of hierarchical table reasoning is a major bottleneck for automating high-stakes enterprise workflows. In the benchmark Finch: Benchmarking Finance & Accounting across Spreadsheet-Centric Enterprise Workflows, Pengkun Zhang et al. demonstrated that even frontier models frequently fail real-world workflows due to spatial reasoning errors caused by non-standard layouts.

To bridge this gap, modern frameworks are increasingly relying on code-augmented execution. For instance, Zhehao Zhang et al. developed E⁵: Zero-shot Hierarchical Table Analysis using Augmented LLMs via Explain, Extract, Execute, Exhibit and Extrapolate, which uses programmatic execution to handle bi-dimensional indexing. By prompting the model to generate code that explicitly traces the hierarchical structure, these systems bypass the fragile process of semantic text retrieval, allowing models to interact with complex tables with the same precision as a human analyst.

History & citationVersion 2 · 2026-10-04

Current · Permanent link

  1. Version 2 (latest) · 2026-10-04 · 256 papers
  2. Version 1 · 2026-10-04 · 415 papers
Cite this direction

Latest version (a living page):

@misc{lacuna_hierarchical_table_reasoning_1002bfcb,
  title = {hierarchical table reasoning},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/hierarchical-table-reasoning/rdr_1002bfcbc652421da941818da81ec41a},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-19},
}

This exact version (version 2, frozen text):

@misc{lacuna_hierarchical_table_reasoning_1002bfcb_v2,
  title = {hierarchical table reasoning},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/hierarchical-table-reasoning/rdr_1002bfcbc652421da941818da81ec41a/v/2},
  note = {Version 2, frozen 2026-10-04. Accessed 2026-11-19},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake