Towards Generalizable and Robust Text-to-SQL Parsing

Chang Gao, Bowen Li, Wenxuan Zhang, Wai Lam, Binhua Li +3 more
10/23/2022
cs.CL

Official code: AlibabaResearch/DAMO-ConvAI (1,623 stars, Python, MIT, last commit 2026-01-22).

Abstract

Text-to-SQL parsing tackles the problem of mapping natural language questions to executable SQL queries. In practice, text-to-SQL parsers often encounter various challenging scenarios, requiring them to be generalizable and robust.

Show full abstract

While most existing work addresses a particular generalization or robustness challenge, we aim to study it in a more comprehensive manner. In specific, we believe that text-to-SQL parsers should be (1) generalizable at three levels of generalization, namely i.i.d., zero-shot, and compositional, and (2) robust against input perturbations. To enhance these capabilities of the parser, we propose a novel TKK framework consisting of Task decomposition, Knowledge acquisition, and Knowledge composition to learn text-to-SQL parsing in stages. By dividing the learning process into multiple stages, our framework improves the parser's ability to acquire general SQL knowledge instead of capturing spurious patterns, making it more generalizable and robust. Experimental results under various generalization and robustness settings show that our framework is effective in all scenarios and achieves state-of-the-art performance on the Spider, SParC, and CoSQL datasets. Code can be found at https://github.com/AlibabaResearch/DAMO-ConvAI/tree/main/tkk.

View on arXivView PDF

Code Implementations(1)

MIT

DAMO-ConvAI: The official repository which contains the codebase for Alibaba DAMO Conversational AI.

1,623253Python, Jupyter NotebookJul 15, 202210 months agoMIT
conversational-aideep-learningdialognatural-language-processing

Similar Papers

Cite this paper

@article{gao2022towards,
  title  = {Towards Generalizable and Robust Text-to-SQL Parsing},
  author = {Chang Gao and Bowen Li and Wenxuan Zhang and Wai Lam and Binhua Li and Fei Huang and Luo Si and Yongbin Li},
  year   = {2022},
  eprint = {2210.12674},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.12674}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2210.12674.svg)](https://codeofpaper.com/paper/2210.12674)

Discussion