论文标题
神经程序合成中的组成概括和分解
Compositional Generalization and Decomposition in Neural Program Synthesis
论文作者
论文摘要
在编写程序时,人们可以通过将其分解为较小,更熟悉的子任务来解决新的复杂任务。虽然很难衡量神经程序合成方法是否具有相似的功能,但我们可以衡量的是它们是否在组成上概括,也就是说,是否已在简单的子任务上进行了训练的模型是否随后能够解决更复杂的任务。在本文中,我们专注于衡量学到的程序合成器在构图上概括的能力。我们首先表征了几个不同的轴,需要将程序合成方法概括为概括,例如长度的概括或以新的方式与训练数据中未发生的新方式组合已知子例程的能力。基于此特征,我们引入了一套基准的任务套件,以根据两个流行的现有数据集(扫描和鲁棒填充)评估这些能力。最后,我们首次尝试通过从类似人类的分解策略中汲取灵感的新型注意机制来提高变压器模型的组成概括能力。从经验上讲,我们发现我们的修改后的变压器模型通常比天然基线更好,但是任务仍然具有挑战性。
When writing programs, people have the ability to tackle a new complex task by decomposing it into smaller and more familiar subtasks. While it is difficult to measure whether neural program synthesis methods have similar capabilities, what we can measure is whether they compositionally generalize, that is, whether a model that has been trained on the simpler subtasks is subsequently able to solve more complex tasks. In this paper, we focus on measuring the ability of learned program synthesizers to compositionally generalize. We first characterize several different axes along which program synthesis methods would be desired to generalize, e.g., length generalization, or the ability to combine known subroutines in new ways that do not occur in the training data. Based on this characterization, we introduce a benchmark suite of tasks to assess these abilities based on two popular existing datasets, SCAN and RobustFill. Finally, we make first attempts to improve the compositional generalization ability of Transformer models along these axes through novel attention mechanisms that draw inspiration from a human-like decomposition strategy. Empirically, we find our modified Transformer models generally perform better than natural baselines, but the tasks remain challenging.