Improving Text-to-SQL with Schema Dependency Learning
Binyuan Hui, Xiang Shi, Ruiying Geng, Binhua Li, Yongbin Li, Jian Sun, Xiaodan Zhu
TL;DR
This work tackles Text-to-SQL by reducing reliance on execution-guided decoding through explicit schema–question interactions. It introduces SDSQL, which enforces Schema Dependency Learning via a biaffine predictor and an adaptive multi-task loss to jointly optimize dependency and SQL generation. On WikiSQL, SDSQL achieves state-of-the-art results both with and without EG, and the non-EG variant significantly reduces inference time with only modest performance loss. The approach highlights the practical significance of improved schema linking for faster, flexible deployment in real-world applications.
Abstract
Text-to-SQL aims to map natural language questions to SQL queries. The sketch-based method combined with execution-guided (EG) decoding strategy has shown a strong performance on the WikiSQL benchmark. However, execution-guided decoding relies on database execution, which significantly slows down the inference process and is hence unsatisfactory for many real-world applications. In this paper, we present the Schema Dependency guided multi-task Text-to-SQL model (SDSQL) to guide the network to effectively capture the interactions between questions and schemas. The proposed model outperforms all existing methods in both the settings with or without EG. We show the schema dependency learning partially cover the benefit from EG and alleviates the need for it. SDSQL without EG significantly reduces time consumption during inference, sacrificing only a small amount of performance and provides more flexibility for downstream applications.
