# Grammar-based Neural Text-to-SQL Generation

arXiv: https://arxiv.org/abs/1905.13326 · HTML: https://mlsanity.com/paper/1905.13326/

## Key facts

- Cited by 23 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 30 May 2019.

## Built on by (most cited first, 23 of 23)

- [PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Models](https://mlsanity.com/paper/2109.05093/) (2021)
- [Personal LLM Agents: Insights and Survey about the Capability, Efficiency and Security](https://mlsanity.com/paper/2401.05459/) (2024)
- [A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?](https://mlsanity.com/paper/2408.05109/) (2024)
- [ShadowGNN: Graph Projection Neural Network for Text-to-SQL Parser](https://mlsanity.com/paper/2104.04689/) (2021)
- [Awakening Latent Grounding from Pretrained Language Models for Semantic Parsing](https://mlsanity.com/paper/2109.10540/) (2021)
- [The Power of Prompt Tuning for Low-Resource Semantic Parsing](https://mlsanity.com/paper/2110.08525/) (2021)
- [Zero-Shot Cross-lingual Semantic Parsing](https://mlsanity.com/paper/2104.07554/) (2021)
- [End-to-End Table Question Answering via Retrieval-Augmented Generation](https://mlsanity.com/paper/2203.16714/) (2022)
- [CLTR: An End-to-End, Transformer-Based System for Cell Level Table Retrieval and Table Question Answering](https://mlsanity.com/paper/2106.04441/) (2021)
- [Total Recall: a Customized Continual Learning Method for Neural Semantic Parsers](https://mlsanity.com/paper/2109.05186/) (2021)
- [Few-Shot Semantic Parsing for New Predicates](https://mlsanity.com/paper/2101.10708/) (2021)
- [Memory-Based Semantic Parsing](https://mlsanity.com/paper/2110.07358/) (2021)
- [Valid Text-to-SQL Generation with Unification-based DeepStochLog](https://mlsanity.com/paper/2503.13342/) (2025)
- [Correcting Semantic Parses with Natural Language through Dynamic Schema Encoding](https://mlsanity.com/paper/2305.19974/) (2023)
- [ShopTalk: A System for Conversational Faceted Search](https://mlsanity.com/paper/2109.00702/) (2021)
- [Self-supervised Text-to-SQL Learning with Header Alignment Training](https://mlsanity.com/paper/2103.06402/) (2021)
- [Improving Text-to-SQL Semantic Parsing with Fine-grained Query Understanding](https://mlsanity.com/paper/2209.14415/) (2022)
- [Searching for Better Database Queries in the Outputs of Semantic Parsers](https://mlsanity.com/paper/2210.07201/) (2022)
- [GEMMA-SQL: A Novel Text-to-SQL Model Based on Large Language Models](https://mlsanity.com/paper/2511.04710/) (2025)
- [Bridging Global Intent with Local Details: A Hierarchical Representation Approach for Semantic Validation in Text-to-SQL](https://mlsanity.com/paper/2512.22744/) (2025)
- [Companion Agents: A Table-Information Mining Paradigm for Text-to-SQL](https://mlsanity.com/paper/2601.08838/) (2025)
- [LLMON: An LLM-native Markup Language to Leverage Structure and Semantics at the LLM Interface](https://mlsanity.com/paper/2603.22519/) (2026)
- [Natural Language Interfaces for Spatial and Temporal Databases: A Comprehensive Overview of Methods, Taxonomy, and Future Directions](https://mlsanity.com/paper/2603.23375/) (2026)

## Abstract (arXiv)

The sequence-to-sequence paradigm employed by neural text-to-SQL models typically performs token-level decoding and does not consider generating SQL hierarchically from a grammar. Grammar-based decoding has shown significant improvements for other semantic parsing tasks, but SQL and other general programming languages have complexities not present in logical formalisms that make writing hierarchical grammars difficult. We introduce techniques to handle these complexities, showing how to construct a schema-dependent grammar with minimal over-generation. We analyze these techniques on ATIS and Spider, two challenging text-to-SQL datasets, demonstrating that they yield 14--18% relative reductions in error.
