Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representation
arXiv:1905.08205
Abstract
We present a neural approach called IRNet for complex and cross-domain Text-to-SQL. IRNet aims to address two challenges: 1) the mismatch between intents expressed in natural language (NL) and the implementation details in SQL; 2) the challenge in predicting columns caused by the large number of out-of-domain words. Instead of end-to-end synthesizing a SQL query, IRNet decomposes the synthesis process into three phases. In the first phase, IRNet performs a schema linking over a question and a database schema. Then, IRNet adopts a grammar-based neural model to synthesize a SemQL query which is an intermediate representation that we design to bridge NL and SQL. Finally, IRNet deterministically infers a SQL query from the synthesized SemQL query with domain knowledge. On the challenging Text-to-SQL benchmark Spider, IRNet achieves 46.7% accuracy, obtaining 19.5% absolute improvement over previous state-of-the-art approaches. At the time of writing, IRNet achieves the first position on the Spider leaderboard.
To appear in ACL 2019
References in corpus (7)
- Adam: A Method for Stochastic Optimization
- Neural Machine Translation by Jointly Learning to Align and Translate
- Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learning
- SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learning
- Improving Text-to-SQL Evaluation Methodology
- Lambda Dependency-Based Compositional Semantics
- A Comprehensive Exploration on WikiSQL with Table-Aware Word Contextualization
Cited by in corpus (13)
- Compositional Generalization in Semantic Parsing: Pre-training vs. Specialized Architectures
- GraPPa: Grammar-Augmented Pre-Training for Table Semantic Parsing
- Semantic Evaluation for Text-to-SQL with Distilled Test Suites
- DBTagger: Multi-Task Learning for Keyword Mapping in NLIDBs Using Bi-Directional Recurrent Neural Networks
- Text-to-SQL Generation for Question Answering on Electronic Medical Records
- MT-Teql: Evaluating and Augmenting Consistency of Text-to-SQL Models with Metamorphic Testing
- End-to-End Cross-Domain Text-to-SQL Semantic Parsing with Auxiliary Task
- Self-supervised Text-to-SQL Learning with Header Alignment Training
- mRAT-SQL+GAP:A Portuguese Text-to-SQL Transformer
- Prefix-to-SQL: Text-to-SQL Generation from Incomplete User Questions
- Dual Reader-Parser on Hybrid Textual and Tabular Evidence for Open Domain Question Answering
- Context Dependent Semantic Parsing: A Survey
- Few-Shot Semantic Parsing for New Predicates