Piece of Table: A Divide-and-Conquer Approach for Selecting Sub-Tables in Table Question Answering

Wonjin Lee, Kyumin Kim, Sungjae Lee, Jihun Lee, Kwang In KimarXiv 2024 · OpenReview

Abstract

Large-scale tables often exceed the context limits of Large Language Models (LLMs), making Table Question Answering (Table QA) a significant challenge. PieTa (Piece of Table) introduces a divide-and-conquer framework that iteratively breaks large tables into small windows, selects relevant cells using a fine-tuned LM, and merges them into a concise subtable that fits perfectly within a standard model's reasoning window.

Introduction: The Challenge of Two-Dimensional Data

LLMs are inherently one-dimensional, processing text as a linear sequence. Tables, however, are two-dimensional, where meaning is derived from both horizontal (row) and vertical (column) relationships. When feeding large tables into an LLM, researchers encounter two major obstacles: token limits and contextual dilution. Linearizing a table with hundreds of rows quickly exceeds the token limits of many transformer-based models. Furthermore, even if the table fits, irrelevant data distracts the model, leading to lower accuracy—a phenomenon known as the "needle in a haystack" problem.

Overview of the PieTa framework selecting a subtable from a larger dataset.

The PieTa Framework: Divide and Conquer

The authors propose PieTa, a multi-resolution iterative approach based on three main steps:

  1. Divide: The input table is partitioned into small, overlapping windows (typically a $4 \times 4$ grid of cells).
  2. Conquer: A fine-tuned selector (specifically Llama 3.1-8B) examines each window. Instead of just picking rows, it identifies specific relevant cells using a novel coordinate-based approach.
  3. Combine: The selected cells from all windows are merged via a set union to form an intermediate subtable.

This process is iterative. The resulting subtable becomes the new input for the next round, allowing the model to capture dependencies across multiple rows and columns that were originally too far apart to be seen in a single small window. The process stops when the subtable remains unchanged.

Coordinate Representation

A key innovation in PieTa is the use of Coordinate Representation over simple indices. Most retrievers select entire rows or columns, which can still include significant noise. PieTa selects cells by outputting specific <row_index, column_index> pairs for relevant data and <empty, empty> for irrelevant ones.

Comparison of different table representations, highlighting the coordinate-based selection method.

By using coordinate tokens, the model preserves the 2D structure of the table while ignoring the "noise" of irrelevant neighboring cells. This multi-resolution iteration effectively "zooms out," allowing the model to see local details in the first pass and broader relationships in subsequent passes as the table is reduced.

Experimental Results

PieTa was evaluated on WikiTableQuestions (WikiTQ) and WikiSQL. On average, PieTa reduces the size of the table to just 13.91% of its original cell count while maintaining nearly 99% recall of the necessary information.

  • WikiTQ Performance: PieTa combined with the DP&Agent reader achieved an Exact Match (EM) score of 74.15%, surpassing the holistic baseline of 73.60%.
  • WikiSQL Performance: Using the TaPEx reader, PieTa reached 91.83% EM, a significant jump over the 89.31% achieved by the holistic model.
  • Precision Gains: Compared to the popular Inner Table Retriever (ITR), PieTa improved selection precision by 47.43%, proving it is much better at filtering out distractions.

Conclusion

PieTa offers a scalable, structural-aware way to handle massive tables. While current limitations include the independent optimization of the selector and reader, the framework demonstrates that a divide-and-conquer approach to table selection can significantly enhance the reasoning capabilities of LLMs on complex tabular data tasks.

Summary updated

Abstract

Applying language models (LMs) to tables is challenging due to the inherent structural differences between two-dimensional tables and one-dimensional text for which the LMs were originally designed. Furthermore, when applying linearized tables to LMs, the maximum token lengths often imposed in self-attention calculations make it difficult to comprehensively understand the context spread across large tables. To address these challenges, we present PieTa (Piece of Table), a new framework for subtable-based question answering (QA). PieTa operates through an iterative process of dividing tables into smaller windows, using LMs to select relevant cells within each window, and merging these cells into a subtable. This multi-resolution approach captures dependencies across multiple rows and columns while avoiding the limitations caused by long context inputs. Instantiated as a simple iterative subtable union algorithm, PieTa demonstrates improved performance over previous subtable-based QA approaches.
BibTeX
@misc{lee2024piece,
  author = {Wonjin Lee and Kyumin Kim and Sungjae Lee and Jihun Lee and Kwang In Kim},
  title = {{Piece of Table: A Divide-and-Conquer Approach for Selecting Sub-Tables in Table Question Answering}},
  year = {2024},
  eprint = {2412.07629},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.07629},
}
Figure