Byte-Pair Encoding for Text-to-SQL Generation

Samuel Müller, Andreas Vlachos
10/20/2019
cs.CLstat.ML

Official code: SamuelGabriel/sqlbpe (14 stars, Python, last commit 2020-02-26).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

The implementation for the paper `Byte-Pair Encoding for Text-to-SQL Generation`.

141PythonOct 20, 20196 years ago

Similar Papers

Cite this paper

@article{mller2019bytepair,
  title  = {Byte-Pair Encoding for Text-to-SQL Generation},
  author = {Samuel Müller and Andreas Vlachos},
  year   = {2019},
  eprint = {1910.08962},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1910.08962}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1910.08962.svg)](https://codeofpaper.com/paper/1910.08962)

Discussion