The goal of program synthesis from examples is to find a computer program that is consistent with a given set of input-output examples. Most learning-based approaches try to find a program that satisfies all examples at once. Our work, by contrast, considers an approach that breaks the problem into two stages: (a) find programs that satisfy only one example, and (b) leverage these per-example solutions to yield a program that satisfies all examples. We introduce the Cross Aggregator neural network module based on a multi-head attention mechanism that learns to combine the cues present in these per-example solutions to synthesize a global solution. Evaluation across programs of different lengths and under two different experimental settings reveal that when given the same time budget, our technique significantly improves the success rate over PCCoder arXiv:1809.04682v2 [cs.LG] and other ablation baselines. The code, data and trained models for our work can be found at https://github.com/shrivastavadisha/N-PEPS.
翻译:从实例中进行程序综合的目的是找到一个符合特定一组投入-产出实例的计算机程序。大多数基于学习的方法都试图找到一个同时满足所有实例的程序。相比之下,我们的工作则考虑一种将问题分成两个阶段的方法:(a) 找到只满足一个实例的程序,和(b) 利用这些每个实例的单个解决方案来产生一个满足所有实例的程序。我们引入了跨聚合器神经网络模块,该模块基于一个多头关注机制,该模块学习如何结合这些每例解决方案中存在的提示,以合成一个全球解决方案。不同长度和两个不同实验环境下的不同方案的评估表明,如果在同一预算时间里,我们的技术大大提高了PCCoder arXiv:1809.04682vv2 [c.LG]和其他膨胀基线的成功率。我们工作的代码、数据和经过培训的模式可以在https://github.com/shrivastavadisha/N-PAPPS中找到。