Skip to main content
QUICK REVIEW

[Paper Review] Table2answer: Read the database and answer without SQL

Tong Guo, Huilin Gao|arXiv (Cornell University)|Feb 12, 2019
Topic ModelingComputer Science13 references4 citations
TL;DR

This paper proposes Table2answer, a BERT-based model that directly answers questions over database tables without requiring intermediate SQL or logic form generation. By treating question answering as a span prediction task over table cells, the model achieves 54.0% test accuracy on a simplified WikiSQL subset, demonstrating that end-to-end learning can bypass costly semantic parsing annotation while matching baseline performance.

ABSTRACT

Semantic parsing is the task of mapping natural language to logic form. In question answering, semantic parsing can be used to map the question to logic form and execute the logic form to get the answer. One key problem for semantic parsing is the hard label work. We study this problem in another way: we do not use the logic form any more. Instead we only use the schema and answer info. We think that the logic form step can be injected into the deep model. The reason why we think removing the logic form step is possible is that human can do the task without explicit logic form. We use BERT-based model and do the experiment in the WikiSQL dataset, which is a large natural language to SQL dataset. Our experimental evaluations that show that our model can achieves the baseline results in WikiSQL dataset.

Motivation & Objective

  • To address the high annotation cost of semantic parsing by eliminating the need for explicit logic forms or SQL labels.
  • To explore whether deep learning models can implicitly learn reasoning over databases without explicit logic form representation.
  • To develop an end-to-end question-answering system that directly maps questions and table schemas to answer cells.
  • To evaluate whether BERT-based models can achieve competitive performance on table-based QA without generating SQL.
  • To simplify the NL2SQL task by focusing only on single-condition queries and fixed tables, enabling faster training and evaluation.

Proposed method

  • The model inputs a concatenated sequence: [CLS], column headers, table cells, [SEP], question, [SEP], using BERT’s input format.
  • Each table cell’s word embeddings are averaged to form a single vector representation for that cell.
  • A single pointer head is appended after BERT’s final layer to predict the start and end positions of the answer cell in the flattened table.
  • The model is fine-tuned on a simplified WikiSQL dataset where only one condition is allowed in the WHERE clause.
  • Data augmentation is applied by randomly shuffling table rows to increase training diversity, while columns are kept fixed.
  • Position embeddings are used to preserve sequence order, and the model fine-tunes only the last three BERT layers for efficiency.

Experimental results

Research questions

  • RQ1Can a deep learning model bypass the need for explicit logic forms or SQL generation in table-based question answering?
  • RQ2Does end-to-end training on question, schema, and table data yield competitive performance compared to traditional semantic parsing?
  • RQ3How does data augmentation via row shuffling affect model generalization on table-based QA?
  • RQ4What is the impact of removing position embeddings or data augmentation on model performance?
  • RQ5Can BERT-based models directly predict answer cells without generating intermediate logic forms?

Key findings

  • The proposed model achieves 54.0% test accuracy on the Table2answer benchmark, significantly outperforming a non-pretrained transformer baseline (11.0%).
  • Data augmentation via row shuffling improves test accuracy from 17.7% (no augmentation) to 54.0%, demonstrating its effectiveness.
  • Removing position embeddings reduces performance to 20.5%, indicating that sequence order is crucial for accurate cell prediction.
  • The model without data augmentation still outperforms the baseline, achieving 17.7% accuracy, suggesting that pretraining provides strong inductive bias.
  • Using a SQuAD-style span prediction approach (concatenating all table cells) yields 2–3% lower performance, indicating that structured input format is more effective.
  • The model achieves 96% training accuracy, showing strong capacity to learn the simplified task, though generalization to the test set remains limited.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.