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

面向复杂文本到SQL的架构感知多任务学习

Schema-Aware Multi-Task Learning for Complex Text-to-SQL

Zhejiang University(浙江大学)

Yangjun Wu, Han Wang

AI总结:

提出架构感知多任务学习框架MTSQL,通过架构链接判别器和操作符中心三元组提取器增强复杂文本到SQL的架构对齐与生成,在Spider基准上表现优异。

摘要:

传统的文本到SQL解析器在合成涉及多个表或列的复杂SQL查询时表现不佳,这源于识别正确架构项以及执行问题与架构项之间精确对齐的内在挑战。为解决上述问题,我们提出了一种用于复杂SQL查询的架构感知多任务学习框架(命名为MTSQL)。具体而言,我们设计了一个架构链接判别器模块,用于区分有效的问题-架构链接,该模块通过独特的链接关系明确指导编码器,以增强对齐质量。在解码器侧,我们定义了6种关系类型来描述表与列之间的连接(例如,WHERE_TC),并引入了一个以操作符为中心的三元组提取器,用于识别具有预定义关系的关联架构项。此外,我们通过预测的三元组建立了一套语法约束规则,以在SQL生成过程中过滤合适的SQL操作符和架构项。在Spider(一个跨领域的具有挑战性的文本到SQL基准)上,实验结果表明,MTSQL比基线方法更有效,尤其是在极其困难的场景中。此外,进一步的分析验证了我们的方法对复杂SQL查询带来了有前景的改进。

英文摘要:

Conventional text-to-SQL parsers are not good at synthesizing complex SQL queries that involve multiple tables or columns, due to the challenges inherent in identifying the correct schema items and performing accurate alignment between question and schema items. To address the above issue, we present a schema-aware multi-task learning framework (named MTSQL) for complicated SQL queries. Specifically, we design a schema linking discriminator module to distinguish the valid question-schema linkings, which explicitly instructs the encoder by distinctive linking relations to enhance the alignment quality. On the decoder side, we define 6-type relationships to describe the connections between tables and columns (e.g., WHERE_TC), and introduce an operator-centric triple extractor to recognize those associated schema items with the predefined relationship. Also, we establish a rule set of grammar constraints via the predicted triples to filter the proper SQL operators and schema items during the SQL generation. On Spider, a cross-domain challenging text-to-SQL benchmark, experimental results indicate that MTSQL is more effective than baselines, especially in extremely hard scenarios. Moreover, further analyses verify that our approach leads to promising improvements for complicated SQL queries.

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

↑