A Survey on Text-to-SQL Parsing: Concepts, Methods, and Future Directions

Text-to-SQL parsing is an essential and challenging task. The goal of text-to-SQL parsing is to convert a natural language (NL) question to its corresponding structured query language (SQL) based on the evidences provided by relational databases. Early text-to-SQL parsing systems from the database community achieved a noticeable progress with the cost of heavy human engineering and user interactions with the systems. In recent years, deep neural networks have significantly advanced this task by neural generation models, which automatically learn a mapping function from an input NL question to an output SQL query. Subsequently, the large pre-trained language models have taken the state-of-the-art of the text-to-SQL parsing task to a new level. In this survey, we present a comprehensive review on deep learning approaches for text-to-SQL parsing. First, we introduce the text-to-SQL parsing corpora which can be categorized as single-turn and multi-turn. Second, we provide a systematical overview of pre-trained language models and existing methods for text-to-SQL parsing. Third, we present readers with the challenges faced by text-to-SQL parsing and explore some potential future directions in this field.

[1]  Yinpei Dai,et al.  Unified Dialog Model Pre-training for Task-Oriented Dialog Understanding and Generation , 2022, SIGIR.

[2]  Bailin Wang,et al.  Proton: Probing Schema Linking Information from Pre-trained Language Models for Text-to-SQL Parsing , 2022, KDD.

[3]  Dzmitry Bahdanau,et al.  Evaluating the Text-to-SQL Capabilities of Large Language Models , 2022, ArXiv.

[4]  B. Dong,et al.  HIE-SQL: History Information Enhanced Network for Context-Dependent Text-to-SQL Semantic Parsing , 2022, FINDINGS.

[5]  Yongbin Li,et al.  S^2SQL: Injecting Syntax to Question-Schema Interaction Graph Encoder for Text-to-SQL Parsers , 2022, FINDINGS.

[6]  Luheng He,et al.  TableFormer: Robust Transformer Modeling for Table-Text Encoding , 2022, ACL.

[7]  Dragomir R. Radev,et al.  UnifiedSKG: Unifying and Multi-Tasking Structured Knowledge Grounding with Text-to-Text Language Models , 2022, EMNLP.

[8]  Yinhe Zheng,et al.  GALAXY: A Generative Pre-trained Model for Task-Oriented Dialog with Semi-Supervised Learning and Explicit Policy Injection , 2021, AAAI.

[9]  Qian Liu,et al.  TAPEX: Table Pre-training via Learning a Neural SQL Executor , 2021, ICLR.

[10]  Zujie Wen,et al.  SeaD: End-to-end Text-to-SQL Generation with Schema-aware Denoising , 2021, NAACL-HLT.

[11]  Yanshuai Cao,et al.  Hierarchical Neural Data Synthesis for Semantic Parsing , 2021, ArXiv.

[12]  Jian-Guang Lou,et al.  Awakening Latent Grounding from Pretrained Language Models for Semantic Parsing , 2021, FINDINGS.

[13]  Matthew Purver,et al.  Exploring Underexplored Limitations of Cross-Domain Text-to-SQL Generalization , 2021, EMNLP.

[14]  Dzmitry Bahdanau,et al.  PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Models , 2021, EMNLP.

[15]  William W. Cohen,et al.  MATE: Multi-view Attention for Table Transformer Efficiency , 2021, EMNLP.

[16]  Mirella Lapata,et al.  Memory-Based Semantic Parsing , 2021, Transactions of the Association for Computational Linguistics.

[17]  Yanghua Xiao,et al.  Relation Aware Semi-autoregressive Semantic Parsing for NL2SQL , 2021, ArXiv.

[18]  Rui Zhang,et al.  Logic-Consistency Text Generation from Semantic Parses , 2021, FINDINGS.

[19]  Wojciech Zaremba,et al.  Evaluating Large Language Models Trained on Code , 2021, ArXiv.

[20]  Kai Yu,et al.  Decoupled Dialogue Modeling and Semantic Parsing for Multi-Turn Text-to-SQL , 2021, FINDINGS.

[21]  John R. Woodward,et al.  Towards Robustness of Text-to-SQL Models against Synonym Substitution , 2021, ACL.

[22]  Kai Yu,et al.  LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relations , 2021, ACL.

[23]  Jonathan Berant,et al.  MultiModalQA: Complex Question Answering over Text, Tables and Images , 2021, ICLR.

[24]  Wenpeng Yin,et al.  Learning to Synthesize Data for Semantic Parsing , 2021, NAACL.

[25]  Kai Yu,et al.  ShadowGNN: Graph Projection Neural Network for Text-to-SQL Parser , 2021, NAACL.

[26]  Yongbin Li,et al.  Improving Text-to-SQL with Schema Dependency Learning , 2021, ArXiv.

[27]  Luo Si,et al.  Dynamic Hybrid Relation Network for Cross-Domain Context-Dependent Semantic Parsing , 2021, ArXiv.

[28]  Jackie Chi Kit Cheung,et al.  Optimizing Deeper Transformers on Small Datasets , 2020, ACL.

[29]  Jun Wang,et al.  Learning Contextual Representations for Semantic Parsing with Generation-Augmented Pre-Training , 2020, AAAI.

[30]  Yu Hu,et al.  Tracking Interaction States for Multi-Turn Text-to-SQL Semantic Parsing , 2020, AAAI.

[31]  Ahmed Hassan Awadallah,et al.  Structure-Grounded Pretraining for Text-to-SQL , 2020, NAACL.

[32]  Ming-Wei Chang,et al.  Compositional Generalization and Natural Language Variation: Can a Semantic Parsing Approach Handle Both? , 2020, ACL.

[33]  Jonathan Berant,et al.  SmBoP: Semi-autoregressive Bottom-up Semantic Parsing , 2020, SPNLP.

[34]  Mirella Lapata,et al.  Meta-Learning for Domain Generalization in Semantic Parsing , 2020, NAACL.

[35]  Lingqiao Liu,et al.  Contextualize Knowledge Bases with Transformer for End-to-end Task-Oriented Dialogue Systems , 2020, EMNLP.

[36]  Dragomir R. Radev,et al.  GraPPa: Grammar-Augmented Pre-Training for Table Semantic Parsing , 2020, ICLR.

[37]  Dong Ryeol Shin,et al.  RYANSQL: Recursively Applying Sketch-based Slot Fillings for Complex Text-to-SQL in Cross-Domain Databases , 2020, CL.

[38]  Yu Wang,et al.  Chase: A Large-Scale and Pragmatic Chinese Dataset for Cross-Database Context-Dependent Text-to-SQL , 2021, ACL.

[39]  Alex Polozov,et al.  SCoRe: Pre-Training for Context Representation in Conversational Semantic Parsing , 2021, ICLR.

[40]  Ao Zhang,et al.  DuSQL: A Large-Scale and Pragmatic Chinese Text-to-SQL Dataset , 2020, EMNLP.

[41]  Richard Socher,et al.  Bridging Textual and Tabular Data for Cross-Domain Text-to-SQL Semantic Parsing , 2020, FINDINGS.

[42]  Yang Zhang,et al.  Mention Extraction and Linking for SQL Query Generation , 2020, EMNLP.

[43]  Xiaojun Wan,et al.  IGSQL: Database Schema Interaction Graph Based Neural Model for Context-Dependent Text-to-SQL Generation , 2020, EMNLP.

[44]  Weixin Wang,et al.  Re-examining the Role of Schema Linking in Text-to-SQL , 2020, EMNLP.

[45]  Luciano Floridi,et al.  GPT-3: Its Nature, Scope, Limits, and Consequences , 2020, Minds and Machines.

[46]  Jordan Boyd-Graber,et al.  On the Potential of Lexico-logical Alignments for Semantic Parsing to SQL Queries , 2020, FINDINGS.

[47]  Tao Yu,et al.  Semantic Evaluation for Text-to-SQL with Distilled Test Suite , 2020, EMNLP.

[48]  Sida I. Wang,et al.  Grounded Adaptation for Zero-shot Executable Semantic Parsing , 2020, EMNLP.

[49]  Graham Neubig,et al.  TaBERT: Pretraining for Joint Understanding of Textual and Tabular Data , 2020, ACL.

[50]  Diyi Yang,et al.  ToTTo: A Controlled Table-To-Text Generation Dataset , 2020, EMNLP.

[51]  Kai Wang,et al.  Relational Graph Attention Network for Aspect-based Sentiment Analysis , 2020, ACL.

[52]  Thomas Muller,et al.  TaPas: Weakly Supervised Table Parsing via Pre-training , 2020, ACL.

[53]  V. Bhardwaj,et al.  Bertrand-DR: Improving Text-to-SQL using a Discriminative Re-ranker , 2020, arXiv.org.

[54]  Bin Zhou,et al.  How Far are We from Effective Context Modeling ? An Exploratory Study on Semantic Parsing in Context , 2020, IJCAI.

[55]  Xiaodong Liu,et al.  RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parsers , 2019, ACL.

[56]  Omer Levy,et al.  BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension , 2019, ACL.

[57]  Colin Raffel,et al.  Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer , 2019, J. Mach. Learn. Res..

[58]  Yue Zhang,et al.  A Pilot Study for Chinese SQL Semantic Parsing , 2019, EMNLP.

[59]  Luyao Chen,et al.  CoSQL: A Conversational Text-to-SQL Challenge Towards Cross-Domain Natural Language Interfaces to Databases , 2019, EMNLP.

[60]  Tao Yu,et al.  Editing-Based SQL Query Generation for Cross-Domain Context-Dependent Questions , 2019, EMNLP.

[61]  Jonathan Berant,et al.  Global Reasoning over Database Structures for Text-to-SQL Parsing , 2019, EMNLP.

[62]  Omer Levy,et al.  RoBERTa: A Robustly Optimized BERT Pretraining Approach , 2019, ArXiv.

[63]  Tao Yu,et al.  SParC: Cross-Domain Semantic Parsing in Context , 2019, ACL.

[64]  Yan Gao,et al.  Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representation , 2019, ACL.

[65]  Jonathan Berant,et al.  Representing Schema Structure with Graph Neural Networks for Text-to-SQL Parsing , 2019, ACL.

[66]  Seunghyun Park,et al.  A Comprehensive Exploration on WikiSQL with Table-Aware Word Contextualization , 2019, ArXiv.

[67]  Zhoujun Li,et al.  Content-Based Table Retrieval for Web Queries , 2017, ArXiv.

[68]  Ming-Wei Chang,et al.  BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding , 2019, NAACL.

[69]  Tao Yu,et al.  SyntaxSQLNet: Syntax Tree Networks for Complex and Cross-Domain Text-to-SQL Task , 2018, EMNLP.

[70]  Tao Yu,et al.  Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Task , 2018, EMNLP.

[71]  SangKeun Lee,et al.  Dynamic Self-Attention : Computing Attention over Words Dynamically for Sentence Embedding , 2018, ArXiv.

[72]  Po-Sen Huang,et al.  Execution-Guided Neural Program Decoding , 2018, ArXiv.

[73]  Tao Yu,et al.  TypeSQL: Knowledge-Based Type-Aware Neural Text-to-SQL Generation , 2018, NAACL.

[74]  Ashish Vaswani,et al.  Self-Attention with Relative Position Representations , 2018, NAACL.

[75]  Richard Socher,et al.  Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learning , 2018, ArXiv.

[76]  Dawn Xiaodong Song,et al.  SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learning , 2017, ArXiv.

[77]  Tareq Abed Mohammed,et al.  Understanding of a convolutional neural network , 2017, 2017 International Conference on Engineering and Technology (ICET).

[78]  Lukasz Kaiser,et al.  Attention is All you Need , 2017, NIPS.

[79]  Alvin Cheung,et al.  Learning a Neural Semantic Parser from User Feedback , 2017, ACL.

[80]  Christopher D. Manning,et al.  Get To The Point: Summarization with Pointer-Generator Networks , 2017, ACL.

[81]  Dominique Ritze,et al.  A Large Public Corpus of Web Tables containing Time and Context Metadata , 2016, WWW.

[82]  Richard S. Zemel,et al.  Gated Graph Sequence Neural Networks , 2015, ICLR.

[83]  Keiron O'Shea,et al.  An Introduction to Convolutional Neural Networks , 2015, ArXiv.

[84]  Doug Downey,et al.  TabEL: Entity Linking in Web Tables , 2015, SEMWEB.

[85]  Christopher D. Manning,et al.  Effective Approaches to Attention-based Neural Machine Translation , 2015, EMNLP.

[86]  Percy Liang,et al.  Compositional Semantic Parsing on Semi-Structured Tables , 2015, ACL.

[87]  Jeffrey Pennington,et al.  GloVe: Global Vectors for Word Representation , 2014, EMNLP.

[88]  Quoc V. Le,et al.  Sequence to Sequence Learning with Neural Networks , 2014, NIPS.

[89]  Doug Downey,et al.  Methods for exploring and mining tables on Wikipedia , 2013, IDEA@KDD.

[90]  Luke S. Zettlemoyer,et al.  Learning to Map Sentences to Logical Form: Structured Classification with Probabilistic Categorial Grammars , 2005, UAI.

[91]  Andrew McCallum,et al.  Conditional Random Fields: Probabilistic Models for Segmenting and Labeling Sequence Data , 2001, ICML.

[92]  Jürgen Schmidhuber,et al.  Long Short-Term Memory , 1997, Neural Computation.

[93]  Kuldip K. Paliwal,et al.  Bidirectional recurrent neural networks , 1997, IEEE Trans. Signal Process..

[94]  Andrew W. Appel,et al.  The Zephyr Abstract Syntax Description Language , 1997, DSL.

[95]  Raymond J. Mooney,et al.  Learning to Parse Database Queries Using Inductive Logic Programming , 1996, AAAI/IAAI, Vol. 2.

[96]  Alexander I. Rudnicky,et al.  Expanding the Scope of the ATIS Task: The ATIS-3 Corpus , 1994, HLT.

[97]  P. J. Price,et al.  Evaluation of Spoken Language Systems: the ATIS Domain , 1990, HLT.

[98]  Robert E. Tarjan,et al.  Depth-First Search and Linear Graph Algorithms , 1972, SIAM J. Comput..