Latent Execution for Neural Program Synthesis Beyond Domain-Specific
Languages
- URL: http://arxiv.org/abs/2107.00101v1
- Date: Tue, 29 Jun 2021 02:21:32 GMT
- Title: Latent Execution for Neural Program Synthesis Beyond Domain-Specific
Languages
- Authors: Xinyun Chen, Dawn Song, Yuandong Tian
- Abstract summary: We take the first step to synthesize C programs from input-output examples.
In particular, we propose La Synth, which learns the latent representation to approximate the execution of partially generated programs.
We show that training on these synthesized programs further improves the prediction performance for both Karel and C program synthesis.
- Score: 97.58968222942173
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Program synthesis from input-output examples has been a long-standing
challenge, and recent works have demonstrated some success in designing deep
neural networks for program synthesis. However, existing efforts in
input-output neural program synthesis have been focusing on domain-specific
languages, thus the applicability of previous approaches to synthesize code in
full-fledged popular programming languages, such as C, remains a question. The
main challenges lie in two folds. On the one hand, the program search space
grows exponentially when the syntax and semantics of the programming language
become more complex, which poses higher requirements on the synthesis
algorithm. On the other hand, increasing the complexity of the programming
language also imposes more difficulties on data collection, since building a
large-scale training set for input-output program synthesis require random
program generators to sample programs and input-output examples. In this work,
we take the first step to synthesize C programs from input-output examples. In
particular, we propose LaSynth, which learns the latent representation to
approximate the execution of partially generated programs, even if their
semantics are not well-defined. We demonstrate the possibility of synthesizing
elementary C code from input-output examples, and leveraging learned execution
significantly improves the prediction performance over existing approaches.
Meanwhile, compared to the randomly generated ground-truth programs, LaSynth
synthesizes more concise programs that resemble human-written code. We show
that training on these synthesized programs further improves the prediction
performance for both Karel and C program synthesis, indicating the promise of
leveraging the learned program synthesizer to improve the dataset quality for
input-output program synthesis.
Related papers
- Hierarchical Neural Program Synthesis [19.94176152035497]
Program synthesis aims to automatically construct human-readable programs that satisfy given task specifications.
We present a scalable program synthesis framework that instead synthesizes a program by hierarchically composing programs.
We extensively evaluate our proposed framework in a string transformation domain with input/output pairs.
arXiv Detail & Related papers (2023-03-09T18:20:07Z) - A Conversational Paradigm for Program Synthesis [110.94409515865867]
We propose a conversational program synthesis approach via large language models.
We train a family of large language models, called CodeGen, on natural language and programming language data.
Our findings show the emergence of conversational capabilities and the effectiveness of the proposed conversational program synthesis paradigm.
arXiv Detail & Related papers (2022-03-25T06:55:15Z) - Representing Partial Programs with Blended Abstract Semantics [62.20775388513027]
We introduce a technique for representing partially written programs in a program synthesis engine.
We learn an approximate execution model implemented as a modular neural network.
We show that these hybrid neuro-symbolic representations enable execution-guided synthesizers to use more powerful language constructs.
arXiv Detail & Related papers (2020-12-23T20:40:18Z) - Latent Programmer: Discrete Latent Codes for Program Synthesis [56.37993487589351]
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.
We introduce the emphLatent 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.
arXiv Detail & Related papers (2020-12-01T10:11:35Z) - Optimal Neural Program Synthesis from Multimodal Specifications [45.35689345004124]
Multimodal program synthesis is an attractive way to scale program synthesis to challenging settings.
This paper proposes an optimal neural synthesis approach where the goal is to find a program that satisfies user-provided constraints.
arXiv Detail & Related papers (2020-10-04T20:51:21Z) - Synthesize, Execute and Debug: Learning to Repair for Neural Program
Synthesis [81.54148730967394]
We propose SED, a neural program generation framework that incorporates synthesis, execution, and debug stages.
SED first produces initial programs using the neural program synthesizer component, then utilizes a neural program debugger to iteratively repair the generated programs.
On Karel, a challenging input-output program synthesis benchmark, SED reduces the error rate of the neural program synthesizer itself by a considerable margin, and outperforms the standard beam search for decoding.
arXiv Detail & Related papers (2020-07-16T04:15:47Z) - Program Synthesis with Pragmatic Communication [28.24612900419843]
This work introduces a new inductive bias derived by modeling the program synthesis task as rational communication.
A user study finds that end-user participants communicate more effectively with the pragmatic program synthesizer over a non-pragmatic one.
arXiv Detail & Related papers (2020-07-09T20:55:44Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.