RESDSQL:解耦 Text-to-SQL 中的模式链接与骨架解析
RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQL
AI总结:
本文提出 RESDSQL 框架,通过排序增强编码和骨架感知解码将模式链接与骨架解析解耦,显著提升了 Text-to-SQL 的解析准确性与鲁棒性。
摘要:
近期 Text-to-SQL 的最佳尝试之一是预训练语言模型。由于 SQL 查询的结构特性,seq2seq 模型承担了同时解析模式项(即表和列)与骨架(即 SQL 关键字)的责任。这种耦合目标增加了解析正确 SQL 查询的难度,特别是当查询涉及大量模式项和逻辑运算符时。本文提出了一种排序增强编码与骨架感知解码框架,以解耦模式链接与骨架解析。具体而言,对于 seq2seq 编码器-解码器模型,向其编码器注入最相关的模式项而非全部无序项,可减轻 SQL 解析时的模式链接负担;其解码器先生成骨架再生成实际 SQL 查询,从而隐式约束 SQL 解析。我们在 Spider 及其三个鲁棒性变体:Spider-DK、Spider-Syn 和 Spider-Realistic 上评估了该框架。实验结果表明,该框架具有出色的性能与鲁棒性。代码见 https://github.com/RUCKBReasoning/RESDSQL。
英文摘要:
One of the recent best attempts at Text-to-SQL is the pre-trained language model. Due to the structural property of the SQL queries, the seq2seq model takes the responsibility of parsing both the schema items (i.e., tables and columns) and the skeleton (i.e., SQL keywords). Such coupled targets increase the difficulty of parsing the correct SQL queries especially when they involve many schema items and logic operators. This paper proposes a ranking-enhanced encoding and skeleton-aware decoding framework to decouple the schema linking and the skeleton parsing. Specifically, for a seq2seq encoder-decode model, its encoder is injected by the most relevant schema items instead of the whole unordered ones, which could alleviate the schema linking effort during SQL parsing, and its decoder first generates the skeleton and then the actual SQL query, which could implicitly constrain the SQL parsing. We evaluate our proposed framework on Spider and its three robustness variants: Spider-DK, Spider-Syn, and Spider-Realistic. The experimental results show that our framework delivers promising performance and robustness. Our code is available at https://github.com/RUCKBReasoning/RESDSQL.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。