arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2210.12674cs.CL
收藏

一种通用的健壮的文本到SQL的解析方法

Towards Generalizable and Robust Text-to-SQL Parsing

The Chinese University of Hong Kong(香港中文大学);DAMO Academy, Alibaba Group(阿里巴巴集团达摩院)

Chang Gao, Bowen Li, Wenxuan Zhang, Wai Lam, Binhua Li, Fei Huang, Luo Si, Yongbin Li

摘要:

文本到SQL解析解决了将自然语言问题映射到可执行SQL查询的问题。在实践中,文本到SQL解析器经常遇到各种具有挑战性的场景,要求它们具有通用性和健壮性。虽然大多数现有的工作都解决了特定的泛化或鲁棒性挑战,但我们的目标是以更全面的方式研究它。具体来说,我们认为文本到SQL的解析器应该是(1)在三个泛化级别上可泛化的,即i.i.d.,zero-shot和组合,以及(2)对输入扰动的鲁棒性。为了提高这些能力的解析器,我们提出了一种新的TKK框架,包括任务分解,知识获取,知识组合学习文本到SQL解析的阶段。通过将学习过程划分为多个阶段,我们的框架提高了解析器获取一般SQL知识的能力,而不是捕获虚假模式,使其更具泛化性和鲁棒性。在各种泛化和鲁棒性设置下的实验结果表明,我们的框架在所有场景下都是有效的,并在Spider,SParC和CoSQL数据集上实现了最先进的性能。代码可以在https://github.com/AlibabaResearch/DAMO-ConvAI/tree/main/tkk上找到。

英文摘要:

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. 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑