[Paper Review] TableQA: a Large-Scale Chinese Text-to-SQL Dataset for Table-Aware SQL Generation
This paper introduces TableQA, a large-scale Chinese text-to-SQL dataset with 64,891 questions and 20,311 unique SQL queries across 6,000 tables, emphasizing entity linking and answerability. It proposes two table-aware models that improve condition value accuracy by 4.7% and logic form accuracy by 3.4% over SOTA, demonstrating the dataset's challenge and utility.
Parsing natural language to corresponding SQL (NL2SQL) with data driven approaches like deep neural networks attracts much attention in recent years. Existing NL2SQL datasets assume that condition values should appear exactly in natural language questions and the queries are answerable given the table. However, these assumptions may fail in practical scenarios, because user may use different expressions for the same content in the table, and query information outside the table without the full picture of contents in table. Therefore we present TableQA, a large-scale cross-domain Natural Language to SQL dataset in Chinese language consisting 64,891 questions and 20,311 unique SQL queries on over 6,000 tables. Different from exisiting NL2SQL datasets, TableQA requires to generalize well not only to SQL skeletons of different questions and table schemas, but also to the various expressions for condition values. Experiment results show that the state-of-the-art model with 95.1% condition value accuracy on WikiSQL only gets 46.8% condition value accuracy and 43.0% logic form accuracy on TableQA, indicating the proposed dataset is challenging and necessary to handle. Two table-aware approaches are proposed to alleviate the problem, the end-to-end approaches obtains 51.3% and 47.4% accuracy on the condition value and logic form tasks, with improvement of 4.7% and 3.4% respectively.
Motivation & Objective
- Address the limitations of existing NL2SQL datasets that assume exact mention matching and guaranteed answerability.
- Create a large-scale, cross-domain Chinese NL2SQL dataset that includes unanswerable questions and diverse expressions for condition values.
- Enable research on entity linking and answerability in text-to-SQL generation, critical for real-world applications.
- Develop and evaluate table-aware models to improve generalization on condition value prediction and logic form accuracy.
Proposed method
- Construct a dataset of 64,891 natural language questions and 20,311 unique SQL queries on over 6,000 tables from diverse domains.
- Include over 5,000 unanswerable questions to evaluate answerability detection, ensuring realistic user scenarios.
- Design two table-aware approaches: one with an offline value recognition step and another with an end-to-end table-aware mechanism.
- Integrate table content and question semantics jointly to predict condition values, reducing mismatches due to expression variation.
- Use logic form accuracy and execution accuracy as evaluation metrics, aligning with WikiSQL and Spider benchmarks.
- Ensure train, validation, and test sets are disjoint at the table level to test generalization across schemas.
Experimental results
Research questions
- RQ1How does the performance of state-of-the-art NL2SQL models degrade on a dataset that requires entity linking and answerability detection?
- RQ2To what extent can table-aware mechanisms improve condition value and logic form accuracy in complex, real-world NL2SQL scenarios?
- RQ3What are the key failure modes in existing decoupled models when faced with expression variation and unanswerable questions?
- RQ4Can joint modeling of table content and question text significantly reduce errors in condition value prediction?
Key findings
- The SOTA model on WikiSQL (95.1% condition value accuracy) drops to only 46.8% on TableQA, indicating the dataset's significant challenge.
- Logic form accuracy on TableQA drops from 85.9% (on WikiSQL) to 43.0% for the best baseline, highlighting the difficulty of complex SQL skeletons and expression variation.
- The proposed end-to-end table-aware model achieves 51.3% condition value accuracy and 47.4% logic form accuracy, improving by 4.7% and 3.4% respectively over the baseline.
- Error analysis reveals that unit inconsistency in numerical conditions (e.g., '200K' vs. '10,000') is a major source of failure, requiring cross-modal understanding.
- Decoupled models suffer from error accumulation, especially in sequential condition prediction, where errors in column or operation prediction propagate to value prediction.
- Existing models achieve only ~0.6 F1 score on answerability detection, indicating a large gap in recognizing unanswerable questions.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.