SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learning
arXiv:1711.04436
Abstract
Synthesizing SQL queries from natural language is a long-standing open problem and has been attracting considerable interest recently. Toward solving the problem, the de facto approach is to employ a sequence-to-sequence-style model. Such an approach will necessarily require the SQL queries to be serialized. Since the same SQL query may have multiple equivalent serializations, training a sequence-to-sequence-style model is sensitive to the choice from one of them. This phenomenon is documented as the "order-matters" problem. Existing state-of-the-art approaches rely on reinforcement learning to reward the decoder when it generates any of the equivalent serializations. However, we observe that the improvement from reinforcement learning is limited. In this paper, we propose a novel approach, i.e., SQLNet, to fundamentally solve this problem by avoiding the sequence-to-sequence structure when the order does not matter. In particular, we employ a sketch-based approach where the sketch contains a dependency graph so that one prediction can be done by taking into consideration only the previous predictions that it depends on. In addition, we propose a sequence-to-set model as well as the column attention mechanism to synthesize the query based on the sketch. By combining all these novel techniques, we show that SQLNet can outperform the prior art by 9% to 13% on the WikiSQL task.
Submitting to ICLR 2018
References in corpus (2)
Cited by in corpus (24)
- Hybrid Ranking Network for Text-to-SQL
- Grammar-based Neural Text-to-SQL Generation
- Introduction to Neural Network based Approaches for Question Answering over Knowledge Graphs
- TaBERT: Pretraining for Joint Understanding of Textual and Tabular Data
- Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representation
- TableQA: a Large-Scale Chinese Text-to-SQL Dataset for Table-Aware SQL Generation
- Semantic Evaluation for Text-to-SQL with Distilled Test Suites
- One-Shot Learning for Text-to-SQL Generation
- DBTagger: Multi-Task Learning for Keyword Mapping in NLIDBs Using Bi-Directional Recurrent Neural Networks
- LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relations
- Encoding Database Schemas with Relation-Aware Self-Attention for Text-to-SQL Parsers
- Relation Aware Semi-autoregressive Semantic Parsing for NL2SQL
- A Hybrid Semantic Parsing Approach for Tabular Data Analysis
- CLTR: An End-to-End, Transformer-Based System for Cell Level Table Retrieval and Table Question Answering
- A Pilot Study for Chinese SQL Semantic Parsing
- MT-Teql: Evaluating and Augmenting Consistency of Text-to-SQL Models with Metamorphic Testing
- Tracking Interaction States for Multi-Turn Text-to-SQL Semantic Parsing
- IGSQL: Database Schema Interaction Graph Based Neural Model for Context-Dependent Text-to-SQL Generation
- Model-based Interactive Semantic Parsing: A Unified Framework and A Text-to-SQL Case Study
- "What Do You Mean by That?" A Parser-Independent Interactive Approach for Enhancing Text-to-SQL
- Natural SQL: Making SQL Easier to Infer from Natural Language Specifications
- Metaknowledge Extraction Based on Multi-Modal Documents
- Syntactic Question Abstraction and Retrieval for Data-Scarce Semantic Parsing
- Recent Advances in SQL Query Generation: A Survey