Program synthesis aims to automatically construct human-readable programs that satisfy given task specifications, such as input/output pairs or demonstrations. Recent works have demonstrated encouraging results in a variety of domains, such as string transformation, tensor manipulation, and describing behaviors of embodied agents. Most existing program synthesis methods are designed to synthesize programs from scratch, generating a program token by token, line by line. This fundamentally prevents these methods from scaling up to synthesize programs that are longer or more complex. In this work, we present a scalable program synthesis framework that instead synthesizes a program by hierarchically composing programs. Specifically, we first learn a task embedding space and a program decoder that can decode a task embedding into a program. Then, we train a high-level module to comprehend the task specification (e.g., input/output pairs or demonstrations) from long programs and produce a sequence of task embeddings, which are then decoded by the program decoder and composed to yield the synthesized program. We extensively evaluate our proposed framework in a string transformation domain with input/output pairs. The experimental results demonstrate that the proposed framework can synthesize programs that are significantly longer and more complex than the programs considered in prior program synthesis works. Website at https://thoughtp0lice.github.io/hnps_web/
翻译:程序合成旨在自动构建符合特定任务规格(如输入/输出配对或演示)的人类可读程序。最近的工作在诸如字符串转换、高压操纵和描述内装代理器的行为等各个领域显示了令人鼓舞的结果。大多数现有的程序合成方法设计从零开始对程序进行合成,产生一个象征性的、线条线的程式符号。这从根本上阻止了这些方法扩大为综合长期或更复杂的程序。在这项工作中,我们提出了一个可扩缩的方案合成框架,而不是通过分级组合程序合成一个方案。具体地说,我们首先学习了一个嵌入空间的任务和一个程序解码器,可以解码嵌入一个程序的任务。然后,我们训练了一个高级程序合成模块,以便从长的程序中理解任务规格(如输入/输出配对或演示),并产生一个任务嵌入的序列。在程序解码器解码过程中,我们用分级组合程序来综合一个程序。我们用输入/输出配对来广泛评估了我们提议的框架。我们首先学习了一个可以解码的空间和程式解码化一个任务。然后,我们训练了一个高级模块,可以理解一个高级模块,从长的模型中理解一个框架。在前的模型中可以合成程序中显示较复杂的框架。在比较的系统化的系统化程序。 。在变化的模型中,在比较的模型中可以合成系统化。在研制中,在研制中,在研制中,在研磨的模型中,在研磨中可以比较长的模型中,在研究。在研磨中,在研磨中可以比较长的模型中可以综合。</s>