论文标题
潜在程序员:程序合成的离散潜在代码
Latent Programmer: Discrete Latent Codes for Program Synthesis
论文作者
论文摘要
在许多序列学习任务(例如程序综合和文档摘要)中,一个关键问题是在可能的输出序列的大空间上进行搜索。我们建议学习专门用于搜索的输出的表示形式:足够丰富以指定所需的输出,但要紧凑以使搜索更有效。离散的潜在代码为此目的吸引人,因为它们自然允许复杂的组合搜索策略。使用自我监督的学习原理学习潜在代码,在该原则中,首先对输出序列进行了离散的自动编码器进行训练,然后将所得的潜在代码用作终端到端序列预测任务的中间目标。基于这些见解,我们介绍了\ emph {litegent proginmer},这是一种程序综合方法,该方法首先从输入/输出示例中预测离散的潜在代码,然后以目标语言生成程序。我们评估了两个领域的潜在程序员:弦乐转换程序的综合,以及从自然语言描述中生成程序。我们证明,离散的潜在表示可以显着提高综合精度。
In many sequence learning tasks, such as program synthesis and document summarization, a key problem is searching over a large space of possible output sequences. We propose to learn representations of the outputs that are specifically meant for search: rich enough to specify the desired output but compact enough to make search more efficient. Discrete latent codes are appealing for this purpose, as they naturally allow sophisticated combinatorial search strategies. The latent codes are learned using a self-supervised learning principle, in which first a discrete autoencoder is trained on the output sequences, and then the resulting latent codes are used as intermediate targets for the end-to-end sequence prediction task. Based on these insights, we introduce the \emph{Latent Programmer}, a program synthesis method that first predicts a discrete latent code from input/output examples, and then generates the program in the target language. We evaluate the Latent Programmer on two domains: synthesis of string transformation programs, and generation of programs from natural language descriptions. We demonstrate that the discrete latent representation significantly improves synthesis accuracy.