We present a generative model to map natural language questions into SQL queries . Existing neural network based approaches typically generate a SQL query wordby-word , however , a large portion of the generated results is incorrect or not executable due to the mismatch between question words and table contents . Our approach addresses this problem by considering the structure of table and the syntax of SQL language . The quality of the generated SQL query is significantly improved through ( 1 ) learning to replicate content from column names , cells or SQL keywords ; and ( 2 ) improving the generation of WHERE clause by leveraging the column-cell relation . Experiments are conducted on WikiSQL , a recently released dataset with the largest question-SQL pairs . Our approach significantly improves the state-of-the-art execution accuracy from 69.0 % to 74.4 % . We focus on semantic parsing that maps natural language utterances to executable programs ( Zelle and Mooney , 1996 ; Wong and Mooney , 2007 ; Zettlemoyer and Collins , 2007 ; Kwiatkowski et al . , 2011 ; Pasupat and Liang , 2015 ; Iyer et al . , 2017 ; Iyyer et al . , 2017 ) . In this work , we regard SQL as the programming language , which could be executed on a table or a relational database to obtain an outcome . Datasets are the main driver of progress for statistical approaches in semantic parsing ( Liang , 2016 ) . Recently , Zhong et al . ( 2017 ) release WikiSQL , the largest handannotated semantic parsing dataset which is an order of magnitude larger than other datasets in terms of both the number of logical forms and the number of tables . Pointer network ( Vinyals et al . , 2015 ) based approach is developed , which generates a SQL query word-by-word through replicating from a word sequence consisting of question words , column names and SQL keywords . However , a large portion of generated results is incorrect or not executable due to the mismatch between question words and column names ( or cells ) . This also reflects the real scenario where users do not always use exactly the same column name or cell content to express the question . To address the aforementioned problem , we present a generative semantic parser that considers the structure of table and the syntax of SQL language . The approach is partly inspired by the success of structure / grammar driven neural network approaches in semantic parsing ( Xiao et al . , 2016 ; Krishnamurthy et al . , 2017 ) . Our approach is based on pointer networks , which encodes the question into continuous vectors , and synthesizes the SQL query with three channels . The model learns when to generate a column name , a cell or a SQL keyword . We further incorporate columncell relation to mitigate the ill-formed outcomes . We conduct experiments on WikiSQL . Results show that our approach outperforms existing systems , improving state-of-the-art execution accuracy to 74.4 % and logical form accuracy to 60.7 % . An extensive analysis reveals the advantages and limitations of our approach . In this work , we develop STAMP , a Syntax-and Table-Aware seMantic Parser that automatically maps natural language questions to SQL queries , which could be executed on web table or relational dataset to get the answer . STAMP has three channels , and it learns to switch to which channel at each time step . STAMP considers cell information and the relation between cell and column name in the generation process . Experiments are conducted on the WikiSQL dataset . Results show that STAMP achieves the new state-of-the-art performance on WikiSQL . We conduct extensive experiment analysis to show advantages and limitations of our approach , and where is the room for others to make further improvements . SQL language has more complicated queries than the cases included in the WikiSQL dataset , including ( 1 ) querying over multiple relational databases , ( 2 ) nested SQL query as condition value , ( 3 ) more operations such as " group by " and " order by " , etc . In this work , the STAMP model is not designed for the first and second cases , but it could be easily adapted to the third case through incorporating additional SQL keywords and of course the learning of which requires dataset of the same type . In the future , we plan to improve the accuracy of the column prediction component . We also plan to build a large-scale dataset that considers more sophisticated SQL queries . We also plan to extend the approach to low-resource scenarios ( Feng et al . , 2018 ) .

Challenge: Because existing text-to-SQL models generate queries word-by-word, they are often not executable due to the mismatch between question words and column names.
Approach: They propose pointer network-based methods which can take the structure of the table and SQL syntax into account.
Outcome: The proposed model significantly outperforms existing models in execution accuracy and logical form accuracy on the WikiSQL dataset.