Skip to main content
QUICK REVIEW

[Paper Review] Recent Advances in Text-to-SQL: A Survey of What We Have and What We Expect

Naihao Deng, Yulong Chen|arXiv (Cornell University)|Aug 22, 2022
Data Quality and ManagementDecision Sciences12 citations
TL;DR

This survey provides a comprehensive review of recent advances in text-to-SQL, covering datasets, methods, and evaluation techniques. It systematically analyzes encoding, decoding, and schema linking challenges, offering insights into state-of-the-art models and identifying key gaps and future research directions in the field.

ABSTRACT

Text-to-SQL has attracted attention from both the natural language processing and database communities because of its ability to convert the semantics in natural language into SQL queries and its practical application in building natural language interfaces to database systems. The major challenges in text-to-SQL lie in encoding the meaning of natural utterances, decoding to SQL queries, and translating the semantics between these two forms. These challenges have been addressed to different extents by the recent advances. However, there is still a lack of comprehensive surveys for this task. To this end, we review recent progress on text-to-SQL for datasets, methods, and evaluation and provide this systematic survey, addressing the aforementioned challenges and discussing potential future directions. We hope that this survey can serve as quick access to existing work and motivate future research.

Motivation & Objective

  • To provide a systematic and up-to-date survey of text-to-SQL research, addressing the lack of comprehensive overviews in the literature.
  • To analyze the core challenges in text-to-SQL: encoding natural language utterances, translating semantics, and decoding to accurate SQL queries.
  • To evaluate existing datasets, methods, and evaluation protocols to identify strengths, limitations, and trends in model performance.
  • To highlight open problems and suggest future research directions, including domain generalization, schema linking, and robustness to out-of-distribution examples.
  • To serve as a quick reference and catalyst for future research by consolidating recent progress across NLP and database communities.

Proposed method

  • Categorizes and reviews 14+ major text-to-SQL datasets, including cross-domain (e.g., Spider, WikiSQL) and single-domain (e.g., IMDB, MIMICSQL) benchmarks, with analysis of size, schema diversity, and domain coverage.
  • Classifies and compares 40+ encoding methods, such as sequence-to-tree, self-attention, graph neural networks, and pre-trained language models (e.g., TaBERT, BERT), focusing on their ability to model question and schema semantics.
  • Reviews 20+ decoding strategies, including constrained decoding, copy mechanisms, hierarchical decoding, and execution-guided decoding, to improve structural and syntactic correctness of generated SQL.
  • Analyzes intermediate representations (e.g., ASTs, sketches, logical forms) used to bridge natural language and SQL, enhancing generalization and interpretability.
  • Examines training objectives and fine-tuning techniques, including pre-training on external data and multi-task learning, to improve zero-shot and few-shot generalization.
  • Evaluates model performance across benchmarks using standard metrics (e.g., exact set match, execution accuracy), and discusses evaluation pitfalls such as data leakage and schema mismatch.

Experimental results

Research questions

  • RQ1What are the key challenges in text-to-SQL, and how have recent methods addressed encoding, translation, and decoding issues?
  • RQ2How do different text-to-SQL datasets vary in size, domain diversity, and schema complexity, and what implications do these differences have for model generalization?
  • RQ3What are the most effective encoding and decoding architectures for improving accuracy and robustness in text-to-SQL systems?
  • RQ4How do pre-trained models and intermediate representations enhance zero-shot or few-shot performance on unseen databases?
  • RQ5What are the major open problems and future research directions in text-to-SQL, particularly regarding domain generalization and schema alignment?

Key findings

  • Cross-domain datasets like Spider and CoSQL remain the most widely used benchmarks, with Spider achieving a 50.3% exact set match and 67.4% execution accuracy on the test set as of 2023.
  • Graph-based and pre-trained language model approaches (e.g., RAT-SQL, UnifiedSKG) significantly outperform earlier sequence-to-sequence models, especially in complex schema linking tasks.
  • Execution-guided decoding and constrained decoding strategies improve generalization and reduce syntactic errors, with execution accuracy gains of up to 10–15% on challenging examples.
  • Intermediate representations such as ASTs and sketches help bridge the gap between natural language and SQL, improving model interpretability and performance on rare or complex queries.
  • Despite progress, models still struggle with out-of-domain generalization, rare schema patterns, and ambiguous natural language, indicating a need for better data augmentation and inductive biases.
  • The survey identifies a lack of standardization in evaluation protocols and highlights the importance of execution accuracy over exact match in assessing real-world usability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.