CLMLOct 20, 2019

Byte-Pair Encoding for Text-to-SQL Generation

arXiv:1910.08962v23 citations
AI Analysis

This work addresses the problem of efficient and accurate natural language to SQL query conversion for database interaction, presenting an incremental improvement over existing methods.

The authors tackled text-to-SQL generation by adapting Byte-Pair Encoding (BPE) with a novel stopping criterion and AST-guided version to prevent overfitting and improve generalization, resulting in improved accuracy on five out of six tasks, reduced training time by over 50% on four tasks, and exceeded previous accuracies on two tasks.

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.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes