Latent Execution for Neural Program Synthesis

被引:0
|
作者
Chen, Xinyun [1 ]
Song, Dawn [1 ]
Tian, Yuandong [2 ]
机构
[1] Univ Calif Berkeley, Berkeley, CA 94720 USA
[2] Facebook AI Res, New York, NY USA
关键词
D O I
暂无
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Program synthesis from input-output (IO) examples has been a long-standing challenge. While recent works demonstrated limited success on domain-specific languages (DSL), it remains highly challenging to apply them to real-world programming languages, such as C. Due to complicated syntax and token variation, there are three major challenges: (1) unlike many DSLs, programs in languages like C need to compile first and are not executed via interpreters; (2) the program search space grows exponentially when the syntax and semantics of the programming language become more complex; and (3) collecting a large-scale dataset of real-world programs is non-trivial. As a first step to address these challenges, we propose LaSynth and show its efficacy in a restricted-C domain (i.e., C code with tens of tokens, with sequential, branching, loop and simple arithmetic operations but no library call). More specifically, LaSynth learns the latent representation to approximate the execution of partially generated programs, even if they are incomplete in syntax (addressing (1)). The learned execution significantly improves the performance of next token prediction over existing approaches, facilitating search (addressing (2)). Finally, once trained with randomly generated groundtruth programs and their IO pairs, LaSynth can synthesize more concise programs that resemble human-written code. Furthermore, retraining our model with these synthesized programs yields better performance with fewer samples 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 (addressing (3)). When evaluating on whether the program execution outputs match the IO pairs, LaSynth achieves 55.2% accuracy on generating simple C code with tens of tokens including loops and branches, outperforming existing approaches without executors by around 20%.
引用
收藏
页数:13
相关论文
共 50 条
  • [31] WavThruVec: Latent speech representation as intermediate features for neural speech synthesis
    Siuzdak, Hubert
    Dura, Piotr
    van Rijn, Pol
    Jacoby, Nori
    INTERSPEECH 2022, 2022, : 833 - 837
  • [32] Binary code execution path based on symbolic and actual program execution
    Cui, Baojiang
    Guo, Pengfei
    Wang, Jianxin
    Qinghua Daxue Xuebao/Journal of Tsinghua University, 2009, 49 (SUPPL. 2): : 2186 - 2192
  • [33] Accuracy Improvement for Neural Program Synthesis via Attention Mechanism and Program Slicing
    Zhang, Yating
    Dong, Wei
    Wang, Daiyan
    Liu, Binbin
    Liu, Jiaxin
    2020 IEEE 44TH ANNUAL COMPUTERS, SOFTWARE, AND APPLICATIONS CONFERENCE (COMPSAC 2020), 2020, : 963 - 972
  • [34] Learning Compositional Rules via Neural Program Synthesis
    Nye, Maxwell I.
    Solar-Lezama, Armando
    Tenenbaum, Joshua B.
    Lake, Brenden M.
    ADVANCES IN NEURAL INFORMATION PROCESSING SYSTEMS 33, NEURIPS 2020, 2020, 33
  • [35] Neural Guided Constraint Logic Programming for Program Synthesis
    Zhang, Lisa
    Rosenblatt, Gregory
    Fetaya, Ethan
    Liao, Renjie
    Byrd, William E.
    Might, Matthew
    Urtasun, Raquel
    Zemel, Richard
    ADVANCES IN NEURAL INFORMATION PROCESSING SYSTEMS 31 (NIPS 2018), 2018, 31
  • [36] AutoPandas: Neural-Backed Generators for Program Synthesis
    Bavishi, Rohan
    Lemieux, Caroline
    Fox, Roy
    Sen, Koushik
    Stoica, Ion
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (OOPSLA):
  • [37] Neural Program Synthesis from Diverse Demonstration Videos
    Sun, Shao-Hua
    Noh, Hyeonwoo
    Somasundaram, Sriram
    Lim, Joseph J.
    INTERNATIONAL CONFERENCE ON MACHINE LEARNING, VOL 80, 2018, 80
  • [38] Optimal Neural Program Synthesis from Multimodal Specifications
    Ye, Xi
    Chen, Qiaochu
    Dilling, Isil
    Durrett, Greg
    FINDINGS OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, EMNLP 2021, 2021, : 1691 - 1704
  • [39] EXECUTION AND EVALUATION OF A DELINQUENCY PREVENTION PROGRAM
    BERLEMAN, WC
    STEINBURN, TW
    SOCIAL PROBLEMS, 1967, 14 (04) : 413 - 423
  • [40] Visualisation of object oriented program execution
    Hosking, JG
    IEEE SYMPOSIUM ON VISUAL LANGUAGES, PROCEEDINGS, 1996, : 190 - 191