Weakly Supervised Text-to-SQL Parsing through Question Decomposition
Tomer Wolfson, Daniel Deutch, Jonathan Berant
TL;DR
This work introduces a weakly supervised approach to train Text-to-SQL parsers without SQL annotations by leveraging QDMR as an intermediate representation and question-answer supervision. It presents a complete SQL synthesis pipeline consisting of phrase-DB linking, join-path inference, and a QDMR-to-SQL mapper, followed by execution-guided candidate selection to ensure correctness. Across five benchmarks, the method achieves 77.8% SQL synthesis coverage and enables training of competitive NL-to-SQL models, including strong cross-database generalization, with only annotated or predicted QDMRs and answers. The results demonstrate that near-gold performance is attainable with zero SQL annotations, underscoring the practicality and scalability of crowd-sourced supervision for semantic parsing in databases.
Abstract
Text-to-SQL parsers are crucial in enabling non-experts to effortlessly query relational data. Training such parsers, by contrast, generally requires expertise in annotating natural language (NL) utterances with corresponding SQL queries. In this work, we propose a weak supervision approach for training text-to-SQL parsers. We take advantage of the recently proposed question meaning representation called QDMR, an intermediate between NL and formal query languages. Given questions, their QDMR structures (annotated by non-experts or automatically predicted), and the answers, we are able to automatically synthesize SQL queries that are used to train text-to-SQL models. We test our approach by experimenting on five benchmark datasets. Our results show that the weakly supervised models perform competitively with those trained on annotated NL-SQL data. Overall, we effectively train text-to-SQL parsers, while using zero SQL annotations.
