# An Encoder-Decoder Framework Translating Natural Language to Database Queries

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

## Key facts

- Cited by 23 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 16 Nov 2017.

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

- [Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLs](https://mlsanity.com/paper/2305.03111/) (2023)
- [Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation](https://mlsanity.com/paper/2308.15363/) (2023)
- [RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQL](https://mlsanity.com/paper/2302.05965/) (2023)
- [Graphix-T5: Mixing Pre-Trained Transformers with Graph-Aware Layers for Text-to-SQL Parsing](https://mlsanity.com/paper/2301.07507/) (2023)
- [Before Generation, Align it! A Novel and Effective Strategy for Mitigating Hallucinations in Text-to-SQL Generation](https://mlsanity.com/paper/2405.15307/) (2024)
- [SADGA: Structure-Aware Dual Graph Aggregation Network for Text-to-SQL](https://mlsanity.com/paper/2111.00653/) (2021)
- [LinkAlign: Scalable Schema Linking for Real-World Large-Scale Multi-Database Text-to-SQL](https://mlsanity.com/paper/2503.18596/) (2025)
- [Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit](https://mlsanity.com/paper/2401.00288/) (2023)
- [STaR-SQL: Self-Taught Reasoner for Text-to-SQL](https://mlsanity.com/paper/2502.13550/) (2025)
- [Prompting GPT-3.5 for Text-to-SQL with De-semanticization and Skeleton Retrieval](https://mlsanity.com/paper/2304.13301/) (2023)
- [Retrieval-augmented GPT-3.5-based Text-to-SQL Framework with Sample-aware Prompting and Dynamic Revision Chain](https://mlsanity.com/paper/2307.05074/) (2023)
- [Text-to-SQL as Dual-State Reasoning: Integrating Adaptive Context and Progressive Generation](https://mlsanity.com/paper/2511.21402/) (2025)
- [Knowledge Base Construction for Knowledge-Augmented Text-to-SQL](https://mlsanity.com/paper/2505.22096/) (2025)
- [SQLfuse: Enhancing Text-to-SQL Performance through Comprehensive LLM Synergy](https://mlsanity.com/paper/2407.14568/) (2024)
- [Open-SQL Framework: Enhancing Text-to-SQL on Open-source Large Language Models](https://mlsanity.com/paper/2405.06674/) (2024)
- [SQLformer: Deep Auto-Regressive Query Graph Generation for Text-to-SQL Translation](https://mlsanity.com/paper/2310.18376/) (2023)
- [Fine-Tuning Language Models for Context-Specific SQL Query Generation](https://mlsanity.com/paper/2312.02251/) (2023)
- [KU-DMIS at EHRSQL 2024:Generating SQL query via question templatization in EHR](https://mlsanity.com/paper/2406.00014/) (2024)
- [MultiTEND: A Multilingual Benchmark for Natural Language to NoSQL Query Translation](https://mlsanity.com/paper/2502.11022/) (2025)
- [Pi-SQL: Enhancing Text-to-SQL with Fine-Grained Guidance from Pivot Programming Languages](https://mlsanity.com/paper/2506.00912/) (2025)
- [End-to-End Text-to-SQL with Dataset Selection: Leveraging LLMs for Adaptive Query Generation](https://mlsanity.com/paper/2508.06387/) (2025)
- [Knowledge Graph Question Answering via SPARQL Silhouette Generation](https://mlsanity.com/paper/2109.09475/) (2021)
- [Knowledge Distillation for Low-Resource Open-source Text-to-SQL Model](https://mlsanity.com/paper/2605.22843/) (2026)

## Abstract (arXiv)

Machine translation is going through a radical revolution, driven by the explosive development of deep learning techniques using Convolutional Neural Network (CNN) and Recurrent Neural Network (RNN). In this paper, we consider a special case in machine translation problems, targeting to convert natural language into Structured Query Language (SQL) for data retrieval over relational database. Although generic CNN and RNN learn the grammar structure of SQL when trained with sufficient samples, the accuracy and training efficiency of the model could be dramatically improved, when the translation model is deeply integrated with the grammar rules of SQL. We present a new encoder-decoder framework, with a suite of new approaches, including new semantic features fed into the encoder, grammar-aware states injected into the memory of decoder, as well as recursive state management for sub-queries. These techniques help the neural network better focus on understanding semantics of operations in natural language and save the efforts on SQL grammar learning. The empirical evaluation on real world database and queries show that our approach outperform state-of-the-art solution by a significant margin.
