RYANSQL: Recursively Applying Sketch-based Slot Fillings for Complex Text-to-SQL in Cross-Domain Databases

DongHyun Choi, Myeong Cheol Shin, EungGyun Kim, Dong Ryeol Shin


Abstract
Text-to-SQL is the problem of converting a user question into an SQL query, when the question and database are given. In this article, we present a neural network approach called RYANSQL (Recursively Yielding Annotation Network for SQL) to solve complex Text-to-SQL tasks for cross-domain databases. Statement Position Code (SPC) is defined to transform a nested SQL query into a set of non-nested SELECT statements; a sketch-based slot-filling approach is proposed to synthesize each SELECT statement for its corresponding SPC. Additionally, two input manipulation methods are presented to improve generation performance further. RYANSQL achieved competitive result of 58.2% accuracy on the challenging Spider benchmark. At the time of submission (April 2020), RYANSQL v2, a variant of original RYANSQL, is positioned at 3rd place among all systems and 1st place among the systems not using database content with 60.6% exact matching accuracy. The source code is available at https://github.com/kakaoenterprise/RYANSQL.
Anthology ID:
2021.cl-2.12
Volume:
Computational Linguistics, Volume 47, Issue 2 - June 2021
Month:
June
Year:
2021
Address:
Cambridge, MA
Venue:
CL
SIG:
Publisher:
MIT Press
Note:
Pages:
309–332
Language:
URL:
https://aclanthology.org/2021.cl-2.12
DOI:
10.1162/coli_a_00403
Bibkey:
Cite (ACL):
DongHyun Choi, Myeong Cheol Shin, EungGyun Kim, and Dong Ryeol Shin. 2021. RYANSQL: Recursively Applying Sketch-based Slot Fillings for Complex Text-to-SQL in Cross-Domain Databases. Computational Linguistics, 47(2):309–332.
Cite (Informal):
RYANSQL: Recursively Applying Sketch-based Slot Fillings for Complex Text-to-SQL in Cross-Domain Databases (Choi et al., CL 2021)
Copy Citation:
PDF:
https://aclanthology.org/2021.cl-2.12.pdf
Video:
 https://aclanthology.org/2021.cl-2.12.mp4
Code
 kakaoenterprise/RYANSQL
Data
Spider-RealisticWikiSQL