RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQL

要約

タイトル: RESDSQL:テキストからSQLへのスキーマリンキングとスケルトン解析の分離

要約:
– テキストからSQLに変換する最近の手法の1つは、事前に学習された言語モデルである。
– SQLクエリの構造的な特性により、seq2seqモデルはスキーマアイテム(つまり、テーブルと列)とスケルトン(つまり、SQLキーワード)の両方を解析する責任を負っている。
– しかし、多数のスキーマアイテムや論理演算子を含む場合、正しいSQLクエリを解析することが困難となる。
– この論文では、スキーマリンキングとスケルトン解析を分離するためのランキングの強化されたエンコーディングとスケルトンに注意したデコーディングフレームワークを提案する。
– 具体的には、seq2seqエンコーダ・デコーダモデルのエンコーダ部分には、順序付けられていないすべてのスキーマアイテムではなく、最も関連性の高いスキーマアイテムが注入される。これはSQL解析中のスキーマリンキングの負担を軽減することができる。
– また、デコーダ部分は、まずスケルトンを生成し、その後実際のSQLクエリを生成する。これはSQL解析を暗黙的に制限することができる。
– この提案されたフレームワークは、Spiderとその3つの堅牢性のある変種(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.

arxiv情報

著者 Haoyang Li,Jing Zhang,Cuiping Li,Hong Chen
発行日 2023-04-10 14:58:49+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, OpenAI

カテゴリー: cs.CL パーマリンク