Abstract
Modern Table Question Answering (TableQA) systems often struggle with large tables that exceed the input token limits of Transformer-based models. Standard truncation methods lead to significant information loss when the answer resides in later rows or columns. We present the Inner Table Retriever (ITR), a neural component that dynamically extracts relevant sub-tables by ranking rows and columns based on their semantic similarity to the query. ITR achieves state-of-the-art results on WikiSQL and WikiTableQuestions, demonstrating high robustness even under severe token constraints and effectively mitigating position bias.
Introduction
Table Question Answering (TableQA) requires models to reason over structured data to answer natural language queries. Most state-of-the-art systems linearize tables into text sequences for processing by Transformers. However, these models have fixed input length budgets (typically 512 or 1024 tokens). When a table exceeds this budget—an "overflow table"—standard practice involves naive truncation, which often deletes the very information needed to answer the question.
As shown in Figure 4, naive truncation can lead the model to provide incorrect answers (e.g., "Mount Whitney") because the relevant row (e.g., "Mount Ritter") was discarded. ITR addresses this by treating rows and columns as individual items to be retrieved based on the specific question.
Methods
The Inner Table Retriever (ITR) is a general-purpose pre-processing step designed to extract the most relevant sub-tables. The process involves four key stages:
- Itemization: The table is decomposed into individual rows and columns.
- Dense Retrieval: Using a dual-encoder architecture (one for the question, $E_Q$, and one for table items, $E_T$), the system calculates the dot-product similarity between the query and each table item. These encoders are fine-tuned using contrastive loss.
- Sub-table Construction: At inference, ITR ranks all items and greedily selects the top-ranked rows and columns to form a compact sub-table that fits within the model's token budget.
- Flexible Integration: ITR can be used as a standalone "plug-in" during inference or integrated into the training phase to enhance model robustness.
Experimental Results
ITR was evaluated on the WikiSQL and WikiTableQuestions (WikiTQ) benchmarks. It consistently improved the performance of baseline models like TaPEx and TaPas, particularly on overflow tables.
As illustrated in Figure 6, ITR provides a significant accuracy boost across all token budgets. Notably, even when the budget is restricted to just 64 tokens—where standard models typically fail—ITR-enhanced models maintain high denotation accuracy. On WikiSQL, ITR achieved a new state-of-the-art accuracy of 92.1%, effectively closing the performance gap between compact and overflow tables.
Discussion and Conclusion
Beyond raw accuracy, ITR addresses the "position bias" trap, where models learn to expect answers at the top of a table. By ensuring relevant data is present regardless of its original position, ITR makes TableQA systems significantly more robust to data shuffling.
While highly effective for vertical relational tables, future work will explore applying ITR to more complex structures, such as multi-level headers or matrix tables. Additionally, addressing queries that require global aggregation (e.g., "How many rows...") when the sub-table cannot fit all relevant items remains an open challenge. Nonetheless, ITR represents a major step forward in making TableQA systems practical for real-world, large-scale datasets.
Summary updated