Prior work in semantic parsing has shown that conventional seq2seq models fail at compositional generalization tasks. This limitation led to a resurgence of methods that model alignments between sentences and their corresponding meaning representations, either implicitly through latent variables or explicitly by taking advantage of alignment annotations. We take the second direction and propose TPOL, a two-step approach that first translates input sentences monotonically and then reorders them to obtain the correct output. This is achieved with a modular framework comprising a Translator and a Reorderer component. We test our approach on two popular semantic parsing datasets. Our experiments show that by means of the monotonic translations, TPOL can learn reliable lexico-logical patterns from aligned data, significantly improving compositional generalization both over conventional seq2seq models, as well as over other approaches that exploit gold alignments.
翻译:既往语义解析研究表明,传统序列到序列模型在组合泛化任务中存在不足。这一局限催生了新的方法——通过隐变量隐式建模或利用对齐标注显式建模句子与对应语义表示之间的对齐关系。本文采用显式对齐路径,提出TPOL两步法:首先对输入句子进行单调翻译,然后通过重排序获得正确输出。该方案基于包含翻译器与重排序器的模块化框架实现。我们在两个主流语义解析数据集上验证该方法。实验表明,借助单调翻译机制,TPOL能够从对齐数据中学习可靠的词汇-逻辑模式,在组合泛化能力上显著超越传统序列到序列模型及其他利用黄金对齐的方法。