Span-based Semantic Parsing for Compositional Generalization

Jonathan Herzig, Jonathan Berant


Abstract
Despite the success of sequence-to-sequence (seq2seq) models in semantic parsing, recent work has shown that they fail in compositional generalization, i.e., the ability to generalize to new structures built of components observed during training. In this work, we posit that a span-based parser should lead to better compositional generalization. we propose SpanBasedSP, a parser that predicts a span tree over an input utterance, explicitly encoding how partial programs compose over spans in the input. SpanBasedSP extends Pasupat et al. (2019) to be comparable to seq2seq models by (i) training from programs, without access to gold trees, treating trees as latent variables, (ii) parsing a class of non-projective trees through an extension to standard CKY. On GeoQuery, SCAN and CLOSURE datasets, SpanBasedSP performs similarly to strong seq2seq baselines on random splits, but dramatically improves performance compared to baselines on splits that require compositional generalization: from 61.0 → 88.9 average accuracy.
Anthology ID:
2021.acl-long.74
Volume:
Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)
Month:
August
Year:
2021
Address:
Online
Venues:
ACL | IJCNLP
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
908–921
Language:
URL:
https://aclanthology.org/2021.acl-long.74
DOI:
10.18653/v1/2021.acl-long.74
Bibkey:
Cite (ACL):
Jonathan Herzig and Jonathan Berant. 2021. Span-based Semantic Parsing for Compositional Generalization. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 908–921, Online. Association for Computational Linguistics.
Cite (Informal):
Span-based Semantic Parsing for Compositional Generalization (Herzig & Berant, ACL 2021)
Copy Citation:
PDF:
https://aclanthology.org/2021.acl-long.74.pdf
Video:
 https://aclanthology.org/2021.acl-long.74.mp4
Code
 jonathanherzig/span-based-sp
Data
CLEVRSCAN