SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learning

11/13/2017
by   Xiaojun Xu, et al.
0

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 on the WikiSQL task.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/30/2017

Bidirectional Attention for SQL Generation

Generating structural query language (SQL) queries from natural language...
research
08/31/2017

Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learning

A significant amount of the world's knowledge is stored in relational da...
research
09/10/2018

Learning to Generate Structured Queries from Natural Language with Indirect Supervision

Generating structured query language (SQL) from natural language is an e...
research
07/28/2019

A Translate-Edit Model for Natural Language Question to SQL Query Generation on Multi-relational Healthcare Data

Electronic health record (EHR) data contains most of the important patie...
research
12/15/2020

Generation of complex database queries and API calls from natural language utterances

Generating queries corresponding to natural language questions is a long...
research
02/04/2020

Using Positional Sequence Patterns to Estimate the Selectivity of SQL LIKE Queries

With the dramatic increase in the amount of the text-based data which co...
research
01/24/2019

FANDA: A Novel Approach to Perform Follow-up Query Analysis

Recent work on Natural Language Interfaces to Databases (NLIDB) has attr...

Please sign up or login with your details

Forgot password? Click here to reset