arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1910.08962cs.CLstat.ML
收藏

用于文本到SQL生成的字节对编码

Byte-Pair Encoding for Text-to-SQL Generation

University of Cambridge(剑桥大学)

Samuel Müller, Andreas Vlachos

摘要:

神经序列到序列模型为将自然语言中的问题映射到SQL查询的任务提供了一种有竞争力的方法,也称为文本到SQL生成。字节对编码算法(BPE)先前已用于改进自然语言之间的机器翻译(MT)。在这项工作中,我们调整BPE的文本到SQL生成。由于与MT相比,该任务的数据集相当小,因此我们提出了一种新的停止标准,该标准可以防止BPE编码过度拟合到训练集。此外,我们还介绍了AST BPE,它是BPE的一个版本,使用SQL语句的抽象树(AST)来指导BPE合并,从而产生更好的泛化BPE编码。我们在六个英语文本到SQL任务中的五个上提高了强专注seq2seq基线的准确性,同时由于缩短了目标,其中四个任务的训练时间减少了50%以上。最后,在其中两个任务中,我们超过了以前报告的准确性。

英文摘要:

Neural sequence-to-sequence models provide a competitive approach to the task of mapping a question in natural language to an SQL query, also referred to as text-to-SQL generation. The Byte-Pair Encoding algorithm (BPE) has previously been used to improve machine translation (MT) between natural languages. In this work, we adapt BPE for text-to-SQL generation. As the datasets for this task are rather small compared to MT, we present a novel stopping criterion that prevents overfitting the BPE encoding to the training set. Additionally, we present AST BPE, which is a version of BPE that uses the Abstract Syntax Tree (AST) of the SQL statement to guide BPE merges and therefore produce BPE encodings that generalize better. We improved the accuracy of a strong attentive seq2seq baseline on five out of six English text-to-SQL tasks while reducing training time by more than 50% on four of them due to the shortened targets. Finally, on two of these tasks we exceeded previously reported accuracies.

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

↑