Measuring and Improving Compositional Generalization in Text-to-SQL via Component Alignment

Yujian Gan, Xinyun Chen, Qiuping Huang, Matthew Purver
5/4/2022
cs.CL

Official code: ygan/SpiderSS-SpiderCG (11 stars, Python, last commit 2022-06-04).

Abstract

In text-to-SQL tasks -- as in much of NLP -- compositional generalization is a major challenge: neural networks struggle with compositional generalization where training and test distributions differ. However, most recent attempts to improve this are based on word-level synthetic data or specific dataset splits to generate compositional biases.

Show full abstract

In this work, we propose a clause-level compositional example generation method. We first split the sentences in the Spider text-to-SQL dataset into sub-sentences, annotating each sub-sentence with its corresponding SQL clause, resulting in a new dataset Spider-SS. We then construct a further dataset, Spider-CG, by composing Spider-SS sub-sentences in different combinations, to test the ability of models to generalize compositionally. Experiments show that existing models suffer significant performance degradation when evaluated on Spider-CG, even though every sub-sentence is seen during training. To deal with this problem, we modify a number of state-of-the-art models to train on the segmented data of Spider-SS, and we show that this method improves the generalization performance.

View on arXivView PDF

Code Implementations(1)

110Python, ShellApr 16, 20224 years ago

Similar Papers

Cite this paper

@article{gan2022measuring,
  title  = {Measuring and Improving Compositional Generalization in Text-to-SQL via Component Alignment},
  author = {Yujian Gan and Xinyun Chen and Qiuping Huang and Matthew Purver},
  year   = {2022},
  eprint = {2205.02054},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.02054}
}

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/2205.02054.svg)](https://codeofpaper.com/paper/2205.02054)

Discussion