Compositional Generalization for Neural Semantic Parsing via Span-level Supervised Attention - Yin, Pengcheng; Fang, Hao; Neubig, Graham; Pauls, Adam; Platanios, Emmanouil Antonios; Su, Yu; Thomson, Sam; Andreas, Jacob (NAACL 2021, 2021)
We describe a span-level supervised attention loss that improves compositional generalization in semantic parsers. Our approach builds on existing losses that encourage attention maps in neural sequence-to-sequence models to imitate the output of classical word alignment algorithms. Where past work has used word-level alignments, we focus on spans; borrowing ideas from phrase-based machine translation, we align subtrees in semantic parses to spans of input sentences, and encourage neural attention mechanisms to mimic these alignments. This method improves the performance of transformers, RNNs, and structured decoders on three benchmarks of compositional generalization.