Neural sequence models exhibit limited compositional generalization ability in semantic parsing tasks. Compositional generalization requires algebraic recombination, i.e., dynamically recombining structured expressions in a recursive manner. However, most previous studies mainly concentrate on recombining lexical units, which is an important but not sufficient part of algebraic recombination. In this paper, we propose LeAR, an end-to-end neural model to learn algebraic recombination for compositional generalization. The key insight is to model the semantic parsing task as a homomorphism between a latent syntactic algebra and a semantic algebra, thus encouraging algebraic recombination. Specifically, we learn two modules jointly: a Composer for producing latent syntax, and an Interpreter for assigning semantic operations. Experiments on two realistic and comprehensive compositional generalization benchmarks demonstrate the effectiveness of our model. The source code is publicly available at https://github.com/microsoft/ContextualSP.
翻译:神经序列模型在语义分解任务中表现出有限的共性概括化能力。 合成一般化需要代数再组合, 也就是说, 以循环的方式动态重组结构表达式。 但是, 以前的多数研究主要集中于重新组合词汇单位, 这是代数再组合的一个重要部分, 但并不足够。 在本文中, 我们提议 LeAR, 是一个端到端的神经模型, 用于学习组成一般化的代数再组合。 关键洞察力是将语义分解任务建为潜在合成代数和语义代数的同质化, 从而鼓励代数再组合。 具体地说, 我们共同学习了两个模块: 生成潜在语法的合成器, 和 分配语义操作的互译器 。 在两个现实和全面的合成一般化基准上进行实验, 证明了我们模型的有效性。 源代码在 https://github.com/ microftextusual SP 上公开提供 。