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

Yujian Gan, Xinyun Chen, Qiuping Huang, Matthew Purver


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. 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.
Anthology ID:
2022.findings-naacl.62
Volume:
Findings of the Association for Computational Linguistics: NAACL 2022
Month:
July
Year:
2022
Address:
Seattle, United States
Editors:
Marine Carpuat, Marie-Catherine de Marneffe, Ivan Vladimir Meza Ruiz
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
831–843
Language:
URL:
https://aclanthology.org/2022.findings-naacl.62
DOI:
10.18653/v1/2022.findings-naacl.62
Bibkey:
Cite (ACL):
Yujian Gan, Xinyun Chen, Qiuping Huang, and Matthew Purver. 2022. Measuring and Improving Compositional Generalization in Text-to-SQL via Component Alignment. In Findings of the Association for Computational Linguistics: NAACL 2022, pages 831–843, Seattle, United States. Association for Computational Linguistics.
Cite (Informal):
Measuring and Improving Compositional Generalization in Text-to-SQL via Component Alignment (Gan et al., Findings 2022)
Copy Citation:
PDF:
https://aclanthology.org/2022.findings-naacl.62.pdf
Software:
 2022.findings-naacl.62.software.zip
Video:
 https://aclanthology.org/2022.findings-naacl.62.mp4
Code
 ygan/spiderss-spidercg