SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learning
By Xiaojun Xu, Chang Liu, Dawn Song. 2017
508 citations recorded by the source corpus.
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.
Subfields: Artificial Intelligence, Management Science and Operations Research
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Luke S. Zettlemoyer
- Mohit Bansal
- Caiming Xiong
- Percy Liang
- Graham Neubig
- Jonathan Berant
- Jianfeng Gao
- Richard Socher
In Management Science and Operations Research
Citations in the corpus
- A Discrete Hard EM Approach for Weakly Supervised Question Answering (2019, neutral): “…MAPOX (Agarwal et al., 2019) 74.5 74.2 MAPOX+MeRL (Agarwal et al., 2019) 74.9 74.8 MML 70.6 70.5 Ours 84.4 83.9 Fully-supervised setting SQLNet (Xu et al., 2018) 69.8 68.0 TypeSQL (Yu et al., 2018b) 74.5 73.5 Coarse2Fine (Dong and Lapata, 2018) 79.0 78.5 SQLova (Hwang et al., 2019) 87.2 86.2…”
- Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Task (2018, methodology): “SQLNet introduced by (Xu et al., 2017) uses column attention and employs a sketch-based method and generates SQL as a slot-filling task.”
- Coarse-to-Fine Decoding for Neural Semantic Parsing (2018, background): “0% , respectively, which is comparable to SQLN ET (Xu et al., 2017).”
- HybridQA: A Dataset of Multi-Hop Question Answering over Tabular and Textual Data (2020, methodology): “We follow the SQLNet (Xu et al., 2017) to flatten the prediction of the whole SQL query into a slot filling procedure.”
- TypeSQL: Knowledge-Based Type-Aware Neural Text-to-SQL Generation (2018, methodology): “Implementation Details We implement our model based on SQLNet (Xu et al., 2017) in Py-”
- CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learning (2022, background): “…the emergence of program synthesis tasks in which output programs are extended to general-purpose programming languages [Yin and Neubig, 2017, Xu et al., 2018, Chen et al., 2021a] and program specifications are fully described in natural English text [Hendrycks et al., 2021, Austin et al.,…”
- Model-based Interactive Semantic Parsing: A Unified Framework and A Text-to-SQL Case Study (2019, methodology): “We experiment MISP-SQL with two base semantic parsers: SQLNet (Xu et al., 2017) and SQLova (Hwang et al., 2019).”
- SyntaxSQLNet: Syntax Tree Networks for Complex and Cross-Domain Text-to-SQL Task (2018, methodology): “Similarly to SQLNet (Xu et al., 2017), we employ a sketch-based approach for each module.”
- Natural language to SQL: Where are we today? (2020, methodology): “Accordingly, many studies [42, 24, 44, 21, 53, 46] have been conducted to improve accuracy on WikiSQL.”
- Execution-Guided Neural Program Synthesis (2018, background): “…information into consideration during program generation (Bunel et al., 2018; Rabinovich et al., 2017; Yin & Neubig, 2017; Parisotto et al., 2017; Xu et al., 2017), the semantic information, which is typically well-defined in the target DSL, is not effectively leveraged by existing work.”
- X-SQL: reinforce schema representation with context (2019, methodology): “Previous work either models them independently or builds crossattention between them (Xu et al., 2017; Shi et al., 2018).”
- SParC: Cross-Domain Semantic Parsing in Context (2019, background): “Recently, an increasing number of neural approaches (Zhong et al., 2017; Xu et al., 2017; Yu et al., 2018a; Dong and Lapata, 2018; Yu et al., 2018b) have started to use large and crossdomain text-to-SQL datasets such as WikiSQL (Zhong et al.”
- CoSQL: A Conversational Text-to-SQL Challenge Towards Cross-Domain Natural Language Interfaces to Databases (2019, methodology): “The label number prediction module is similar to the column number prediction module in SQLNet.”
- Global Reasoning over Database Structures for Text-to-SQL Parsing (2019, background): “The goal of zero-shot semantic parsing (Krishna-murthy et al., 2017; Xu et al., 2017; Yu et al., 2018b,a; Herzig and Berant, 2018) is to map language utterances into executable programs in a new environment, or database (DB).”
- DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction (2023, background): “For instance, the database schema for question “What are the average and maximum capacities for all stadiums?” included a column named “aver-age”, which was selected by the model instead of taking the average of the capacity column.”
- TRANX: A Transition-based Neural Abstract Syntax Parser for Semantic Parsing and Code Generation (2018, background): “…A CC EM A CC EX Seq2Seq (Zhong et al., 2017) 23.4 35.9 S EQ 2T REE (Dong and Lapata, 2016) 23.4 35.9 Seq2SQL (Zhong et al., 2017) 48.3 59.4 SQLNet (Xu et al., 2017) – 68.0 PT-MAML (Huang et al., 2018) 62.8 68.0 TypeSQL (Yu et al., 2018 two configurations, with or without parent feeding ( § 2.3).”
- Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLs (2023, background): “Text-to-SQL parsing [57, 52, 53, 2, 54, 37], which focuses on transforming natural language into SQL queries, has attracted significant research interests from both academia and industry.”