Improving Compositional Generalization in Semantic Parsing

Inbar Oren, Jonathan Herzig, Nitish Gupta, Matt Gardner, Jonathan Berant
10/12/2020
cs.CL

Official code: inbaroren/improving-compgen-in-semparse (17 stars, Python, MIT, last commit 2020-10-04).

Abstract

Generalization of models to out-of-distribution (OOD) data has captured tremendous attention recently. Specifically, compositional generalization, i.e., whether a model generalizes to new structures built of components observed during training, has sparked substantial interest.

Show full abstract

In this work, we investigate compositional generalization in semantic parsing, a natural test-bed for compositional generalization, as output programs are constructed from sub-components. We analyze a wide variety of models and propose multiple extensions to the attention module of the semantic parser, aiming to improve compositional generalization. We find that the following factors improve compositional generalization: (a) using contextual representations, such as ELMo and BERT, (b) informing the decoder what input tokens have previously been attended to, (c) training the decoder attention to agree with pre-computed token alignments, and (d) downsampling examples corresponding to frequent program templates. While we substantially reduce the gap between in-distribution and OOD generalization, performance on OOD compositions is still substantially lower.

View on arXivView PDF

Code Implementations(1)

MIT
171Python, JsonnetSep 29, 20206 years agoMIT

Similar Papers

Cite this paper

@article{oren2020improving,
  title  = {Improving Compositional Generalization in Semantic Parsing},
  author = {Inbar Oren and Jonathan Herzig and Nitish Gupta and Matt Gardner and Jonathan Berant},
  year   = {2020},
  eprint = {2010.05647},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2010.05647}
}

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

Discussion