arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2104.04689cs.CLcs.HC
收藏

ShadowGNN:用于文本到SQL解析器的图投影神经网络

ShadowGNN: Graph Projection Neural Network for Text-to-SQL Parser

Shanghai Jiao Tong University(上海交通大学);State Key Lab of Media Convergence Production Technology and Systems(媒体融合生产技术与系统国家重点实验室)

Zhi Chen, Lu Chen, Yanbin Zhao, Ruisheng Cao, Zihan Xu, Su Zhu, Kai Yu

摘要:

给定数据库模式,Text-to-SQL旨在将自然语言问题转换为相应的SQL查询。在跨域环境下,传统的语义解析模型难以适应不可见的数据库模式。为了提高模型的泛化能力,罕见的和看不见的模式,我们提出了一个新的架构,ShadowGNN,在抽象和语义层面上处理模式。通过忽略数据库中的语义项名称,抽象模式被利用在一个设计良好的图投影神经网络中,以获得问题和模式的非词汇化表示。基于领域无关的表示,关系感知的Transformer被用来进一步提取问题和模式之间的逻辑链接。最后,采用上下文无关文法的SQL解码器。在具有挑战性的Text-to-SQL基准测试Spider上,实证结果表明ShadowGNN的性能优于最先进的模型。当标注的数据非常有限时(只有10%的训练集),ShadowGNN获得了超过5%的绝对性能增益,这表明它具有强大的泛化能力。我们的实现将在\url{https://github.com/WowCZ/shadowgnn}上开源。

英文摘要:

Given a database schema, Text-to-SQL aims to translate a natural language question into the corresponding SQL query. Under the setup of cross-domain, traditional semantic parsing models struggle to adapt to unseen database schemas. To improve the model generalization capability for rare and unseen schemas, we propose a new architecture, ShadowGNN, which processes schemas at abstract and semantic levels. By ignoring names of semantic items in databases, abstract schemas are exploited in a well-designed graph projection neural network to obtain delexicalized representation of question and schema. Based on the domain-independent representations, a relation-aware transformer is utilized to further extract logical linking between question and schema. Finally, a SQL decoder with context-free grammar is applied. On the challenging Text-to-SQL benchmark Spider, empirical results show that ShadowGNN outperforms state-of-the-art models. When the annotated data is extremely limited (only 10\% training set), ShadowGNN gets over absolute 5\% performance gain, which shows its powerful generalization ability. Our implementation will be open-sourced at \url{https://github.com/WowCZ/shadowgnn}.

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

↑