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 (73)
- Towards Natural Language Interfaces for Data Visualization: A Survey
- Database Meets Deep Learning: Challenges and Opportunities
- A Comprehensive Exploration on WikiSQL with Table-Aware Word Contextualization
- Compositional Generalization in Semantic Parsing: Pre-training vs. Specialized Architectures
- GraPPa: Grammar-Augmented Pre-Training for Table Semantic Parsing
- IncSQL: Training Incremental Text-to-SQL Parsers with Non-Deterministic Oracles
- X-SQL: reinforce schema representation with context
- Hybrid Ranking Network for Text-to-SQL
- Editing-Based SQL Query Generation for Cross-Domain Context-Dependent Questions
- Grammar-based Neural Text-to-SQL Generation
- CoSQL: A Conversational Text-to-SQL Challenge Towards Cross-Domain Natural Language Interfaces to Databases
- Introduction to Neural Network based Approaches for Question Answering over Knowledge Graphs
- Coarse-to-Fine Decoding for Neural Semantic Parsing
- TaBERT: Pretraining for Joint Understanding of Textual and Tabular Data
- An End-to-end Neural Natural Language Interface for Databases
- Improving Text-to-SQL with Schema Dependency Learning
- SyntaxSQLNet: Syntax Tree Networks for Complex and Cross-DomainText-to-SQL Task
- Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representation
- Metasql: A Generate-then-Rank Framework for Natural Language to SQL Translation
- Hierarchical Poset Decoding for Compositional Generalization in Language
- A Transfer-Learnable Natural Language Interface for Databases
- TRANX: A Transition-based Neural Abstract Syntax Parser for Semantic Parsing and Code Generation
- Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Task
- TableQA: a Large-Scale Chinese Text-to-SQL Dataset for Table-Aware SQL Generation
- A Discrete Hard EM Approach for Weakly Supervised Question Answering
- Knowledge Graph-based Question Answering with Electronic Health Records
- Semantic Parsing with Syntax- and Table-Aware SQL Generation
- One-Shot Learning for Text-to-SQL Generation
- Semantic Evaluation for Text-to-SQL with Distilled Test Suites
- HybridQA: A Dataset of Multi-Hop Question Answering over Tabular and Textual Data
- DBTagger: Multi-Task Learning for Keyword Mapping in NLIDBs Using Bi-Directional Recurrent Neural Networks
- Global Reasoning over Database Structures for Text-to-SQL Parsing
- Encoding Database Schemas with Relation-Aware Self-Attention for Text-to-SQL Parsers
- Bidirectional Attention for SQL Generation
- Relation Aware Semi-autoregressive Semantic Parsing for NL2SQL
- LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relations
- Text-to-SQL Generation for Question Answering on Electronic Medical Records
- Frameworks for Querying Databases Using Natural Language: A Literature Review
- ColloQL: Robust Cross-Domain Text-to-SQL Over Search Queries
- Generating Logical Forms from Graph Representations of Text and Entities
- Neural Semantic Parsing in Low-Resource Settings with Back-Translation and Meta-Learning
- The Three Pillars of Machine Programming
- Table2answer: Read the database and answer without SQL
- DBPal: Weak Supervision for Learning a Natural Language Interface to Databases
- Learning Semantic Parsers from Denotations with Latent Structured Alignments and Abstract Programs
- Zero-shot Transfer Learning for Semantic Parsing
- Question Generation from SQL Queries Improves Neural Semantic Parsing
- Zero-shot Text-to-SQL Learning with Auxiliary Task
- Using Database Rule for Weak Supervised Text-to-SQL Generation
- 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
- mRAT-SQL+GAP:A Portuguese Text-to-SQL Transformer
- Can Deep Neural Networks Predict Data Correlations from Column Names?
- IGSQL: Database Schema Interaction Graph Based Neural Model for Context-Dependent Text-to-SQL Generation
- Tracking Interaction States for Multi-Turn Text-to-SQL Semantic Parsing
- MT-Teql: Evaluating and Augmenting Consistency of Text-to-SQL Models with Metamorphic Testing
- Transferable Natural Language Interface to Structured Queries aided by Adversarial Generation
- Translating Natural Language to SQL using Pointer-Generator Networks and How Decoding Order Matters
- A Pilot Study for Chinese SQL Semantic Parsing
- Syntactic Question Abstraction and Retrieval for Data-Scarce Semantic Parsing
- Model-based Interactive Semantic Parsing: A Unified Framework and A Text-to-SQL Case Study
- Learning to Generate Structured Queries from Natural Language with Indirect Supervision
- Dual Reader-Parser on Hybrid Textual and Tabular Evidence for Open Domain Question Answering
- Metaknowledge Extraction Based on Multi-Modal Documents
- Answering Conversational Questions on Structured Data without Logical Forms
- A Sketch-Based System for Semantic Parsing
- Sequence to Logic with Copy and Cache
- Pragmatic approach to structured data querying via natural language interface
- XAlgo: a Design Probe of Explaining Algorithms' Internal States via Question-Answering
- "What Do You Mean by That?" A Parser-Independent Interactive Approach for Enhancing Text-to-SQL
- BF++: a language for general-purpose program synthesis
- Natural SQL: Making SQL Easier to Infer from Natural Language Specifications
- Recent Advances in SQL Query Generation: A Survey