Skip to main content
QUICK REVIEW

[论文解读] SeqGenSQL -- A Robust Sequence Generation Model for Structured Query Language

Ning Li, Bethany Keller|arXiv (Cornell University)|Nov 7, 2020
Natural Language Processing Techniques参考文献 12被引用 4
一句话总结

该论文提出 SeqGenSQL,一种基于 T5 微调的鲁棒序列到序列模型,用于直接从自然语言生成 SQL,结合了指针-生成解码机制和表模式增强的问题数据。在 WikiSQL 上,其执行准确率达到 90.5%,在弱监督文本到 SQL 生成任务中创下新的 SOTA 记录,相较于之前的工作绝对提升 6.6%。

ABSTRACT

We explore using T5 (Raffel et al. (2019)) to directly translate natural language questions into SQL statements. General purpose natural language that interfaces to information stored within databases requires flexibly translating natural language questions into database queries. The best performing text-to-SQL systems approach this task by first converting questions into an intermediate logical form (LF) (Lyu et al. (2020)). While LFs provide a convenient intermediate representation and simplify query generation, they introduce an additional layer of complexity and annotation requirements. However, weakly supervised modeling that directly converts questions to SQL statements has proven more difficult without the scaffolding provided by LFs (Min et al. (2019)). We approach direct conversion of questions to SQL statements using T5 (Raffel et al. (2019)), a pre-trained textto-text generation model, modified to support pointer-generator style decoding (See et al. (2017)). We explore using question augmentation with table schema information and the use of automatically generated silver training data. The resulting model achieves 90.5% execution accuracy on the WikiSQL (Zhong et al. (2017)) test data set, a new state-of-the-art on weakly supervised SQL generation. The performance improvement is 6.6% absolute over the prior state-of-the-art (Min et al. (2019)) and approaches the performance of state-ofthe-art systems making use of LFs.

研究动机与目标

  • 开发一种无需依赖中间逻辑形式的直接、弱监督文本到 SQL 生成方法。
  • 通过预训练的序列到序列模型提升文本到 SQL 翻译的执行准确率。
  • 通过利用模式增强的问题数据和银色训练数据,降低对昂贵逻辑形式标注的依赖。
  • 在弱监督文本到 SQL 生成任务中实现最先进性能。
  • 证明直接生成方法可以接近使用中间逻辑形式的系统性能。

提出的方法

  • 使用自然语言问题和对应 SQL 查询对 T5 模型进行微调,实现端到端的文本到 SQL 生成。
  • 通过指针-生成风格解码机制改进 T5 模型,以更好地处理 SQL 中的 OOV(词汇外)标记。
  • 将相关表模式信息注入训练问题中,以增强上下文感知能力。
  • 通过模型蒸馏生成银色训练数据,以扩大训练数据规模并提升多样性。
  • 采用具有共享注意力机制的序列到序列架构,提升生成鲁棒性。
  • 应用数据增强和模式注入技术,以提升泛化能力并减少对标注数据的依赖。

实验结果

研究问题

  • RQ1一个弱监督、端到端的序列到序列模型是否可以在不使用中间逻辑形式的情况下,在文本到 SQL 生成中实现高执行准确率?
  • RQ2在问题编码中引入表模式信息如何影响模型性能?
  • RQ3银色训练数据在多大程度上能够提升模型的泛化能力和执行准确率?
  • RQ4与标准自回归解码相比,指针-生成解码是否能有效缓解 SQL 生成中的 OOV 问题?
  • RQ5在执行准确率方面,直接生成方法与使用中间逻辑形式的最先进系统相比表现如何?

主要发现

  • SeqGenSQL 在 WikiSQL 测试集上实现了 90.5% 的执行准确率,创下弱监督文本到 SQL 模型的新 SOTA 记录。
  • 与之前 SOTA 方法(Min 等,2019)相比,执行准确率提升了 6.6 个百分点,后者也采用了类似的弱监督设置。
  • 使用模式增强的问题数据和银色训练数据显著提升了模型的泛化能力和鲁棒性。
  • 指针-生成解码有效减少了 SQL 生成中的 OOV 标记错误,提升了输出保真度。
  • SeqGenSQL 的性能已接近使用中间逻辑形式的最先进系统,证明了直接生成方法的可行性。
  • 该模型在未见过的数据库模式上表现出强大的泛化能力,表明其对分布偏移具有鲁棒性。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。