arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1711.04436cs.CLcs.AIcs.DB
收藏

SQLNet:从自然语言生成结构化的语义,无需强化学习

SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learning

Shanghai Jiao Tong University(上海交通大学)

Xiaojun Xu, Chang Liu, Dawn Song

摘要:

从自然语言合成SQL查询是一个长期存在的开放性问题,最近引起了人们的极大兴趣。为了解决这个问题,事实上的方法是采用序列到序列风格的模型。这种方法必然要求SQL查询被序列化。由于同一个SQL查询可能有多个等价的序列化,因此训练序列到序列风格的模型对其中一个的选择很敏感。这种现象被称为“秩序问题”。现有的最先进的方法依赖于强化学习,以奖励解码器时,它产生任何等效的串行化。然而,我们观察到强化学习的改进是有限的。在本文中,我们提出了一种新的方法,即,SQLNet,从根本上解决了这个问题,避免了序列到序列结构时的顺序无关紧要。特别是,我们采用了一个基于草图的方法,草图包含一个依赖图,使一个预测可以只考虑以前的预测,它依赖于。此外,我们提出了一个序列集模型以及列注意力机制合成的查询草图的基础上。通过结合所有这些新技术,我们表明,SQLNet可以在WikiSQL任务上超过现有技术9%至13%。

英文摘要:

Synthesizing SQL queries from natural language is a long-standing open problem and has been attracting considerable interest recently. Toward solving the problem, the de facto approach is to employ a sequence-to-sequence-style model. Such an approach will necessarily require the SQL queries to be serialized. Since the same SQL query may have multiple equivalent serializations, training a sequence-to-sequence-style model is sensitive to the choice from one of them. This phenomenon is documented as the "order-matters" problem. Existing state-of-the-art approaches rely on reinforcement learning to reward the decoder when it generates any of the equivalent serializations. However, we observe that the improvement from reinforcement learning is limited. In this paper, we propose a novel approach, i.e., SQLNet, to fundamentally solve this problem by avoiding the sequence-to-sequence structure when the order does not matter. In particular, we employ a sketch-based approach where the sketch contains a dependency graph so that one prediction can be done by taking into consideration only the previous predictions that it depends on. In addition, we propose a sequence-to-set model as well as the column attention mechanism to synthesize the query based on the sketch. By combining all these novel techniques, we show that SQLNet can outperform the prior art by 9% to 13% on the WikiSQL task.

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

↑