Capturing Row and Column Semantics in Transformer Based Question Answering over Tables

Michael Glass, Mustafa Canim, Alfio Gliozzo, Saneem Chemmengath, Vishwajeet Kumar, Rishav Chakravarti, Avi Sil, Feifei Pan, Samarth Bharadwaj, Nicolas Rodolfo Fauceglia

This paper from IBM Research AI, titled "Capturing Row and Column Semantics in Transformer Based Question Answering over Tables," challenges the current trend of massive, specialized pre-training for table-based tasks. While models like TAPAS and TaBERT rely on pre-training on millions of web tables, the authors show that a clever decomposition of the problem using standard language models can actually yield superior results.

TL;DR

The authors introduce Row-Column Intersection (RCI), a method that treats table question answering as two independent classification tasks: picking the right row and picking the right column. By simply intersecting these predictions, they outperform state-of-the-art models on major benchmarks like WikiSQL, achieving up to 98% accuracy on lookup questions without any specialized table pre-training.

What Problem Does This Paper Address?

Answering natural language questions over tables (TableQA) is significantly harder than standard text-based QA. Tables are two-dimensional structures where meaning is derived from the relationship between headers, rows, and columns.

Traditional approaches often "flatten" tables into text sequences, but this loses structural information. Recent SOTA models have tried to fix this by pre-training Transformers on massive corpora of tables to learn "table-speak." However, this is computationally expensive and often requires complex semantic parsers. The authors ask: Can we achieve high accuracy by simply leveraging the inherent grid structure of tables using off-the-shelf language models?

Methods

The core idea is the RCI Model Architecture. Instead of trying to find an answer span in a flattened table, the model independently predicts the probability that each row contains the answer and the probability that each column contains the answer. The probability of a specific cell being the answer is the product of its row and column probabilities.

The authors propose two versions of this architecture:

  1. RCI Interaction: This model concatenates the question with a textual representation of a row (or column) and feeds it into an ALBERT encoder. It uses cross-attention to "interact" the question with the table data. This is highly accurate but computationally expensive because the table must be re-processed for every new question.
  2. RCI Representation: To improve efficiency, this model encodes the question and the table components (rows/columns) independently into vectors. At query time, it performs a fast comparison between the question vector and the pre-computed table vectors.
Figure 2: RCI Representation Model

To represent rows and columns as text, they use a simple but effective formatting: Header1 : Value1 | Header2 : Value2 | ...

Datasets

The models were evaluated on three major TableQA benchmarks, focusing primarily on "lookup" questions (where the answer is a specific cell value):

  • WikiSQL: A large-scale dataset based on Wikipedia tables.
  • WikiTableQuestions (WTQ): A dataset featuring more complex reasoning over Wikipedia tables.
  • TabMCQ: A dataset of general science tables, often with unusual formats.
Comparison of dataset sizes used for training and testing.

Key Insights and Ideas

  • Decomposition is Key: Finding a cell is much easier when you break it into two simpler 1D selection problems.
  • Semantic Roles: The authors observed that identifying the correct column is usually about matching the "type" of the answer (e.g., a question asking for a "date" matches a column header like "Year"), while identifying the row is about matching specific entities mentioned in the question.
  • Heatmap Visualization: Because RCI produces probabilities for every cell, it can generate a "heatmap" to help users quickly verify answers in large tables.
Figure 1: Answering a question “What is the Clemson Tiger’s enrollment?” over a table with a heatmap
  • Efficiency vs. Accuracy: The Representation model is nearly 50x faster than the Interaction model (0.8s vs 40s for batch processing) while maintaining competitive accuracy, making it much more viable for real-world search engines.

Key Results

The RCI models set new performance bars across the board:

  • WikiSQL-Lookup: The RCIxxl model achieved a staggering 97.99% Hit@1 accuracy, outperforming TAPASlarge (89.43%) by a wide margin.
  • Generalization: Even on the full WikiSQL set (which includes math/aggregation questions like "SUM" or "AVERAGE"), RCIxxl reached 89.8% accuracy, beating the previous SOTA without any specialized table pre-training.
  • Structural Advantage: Decomposing the task into rows and columns proved far more effective than the "MRC Baseline," which treated the table as a flat passage and frequently suffered from "near-miss" errors (picking a cell in the right row but wrong column).
Detailed results showing RCI outperforming various baselines and SOTA models across three datasets.

Limitations and Future Work

The primary limitation of RCI is its independence assumption. Because it examines rows independently, it struggles with questions that require comparing multiple rows (e.g., "Which year did the team not win?"). In these cases, the model can't "see" the other rows to determine which one is the outlier.

For future work, the authors plan to explore domain-specific taxonomies (like finance or healthcare) to improve the model's understanding of specialized table headers and values.

Summary updated

BibTeX
@inproceedings{glass2021capturing,
  author = {Michael Glass and Mustafa Canim and Alfio Gliozzo and Saneem Chemmengath and Vishwajeet Kumar and Rishav Chakravarti and Avi Sil and Feifei Pan and Samarth Bharadwaj and Nicolas Rodolfo Fauceglia},
  title = {{Capturing Row and Column Semantics in Transformer Based Question Answering over Tables}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2021},
  doi = {10.18653/v1/2021.naacl-main.96},
}
Figure