Latent Execution for Neural Program Synthesis Beyond Domain-Specific Languages
Xinyun Chen, Dawn Song, Yuandong Tian
摘要
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%. 1
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper18
- Teaching Large Language Models to Self-DebugXinyun Chen, Maxwell Lin, Nathanael Schärli, Denny ZhouICLR 2024 · 被引用 1,085 次
- CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement LearningHung Le, Yue Wang, Akhilesh Deepak Gotmare, Silvio Savarese 等NeurIPS 2022 · 被引用 571 次
- LEVER: Learning to Verify Language-to-Code Generation with ExecutionAnsong Ni, Srini Iyer, Dragomir Radev, Veselin Stoyanov 等ICML 2023 · 被引用 318 次
- Learning to Synthesize Programs as Interpretable and Generalizable PoliciesDweep Trivedi, Jesse Zhang, Shao-Hua Sun, Joseph J. LimNeurIPS 2021 · 被引用 104 次
- Tensor Program Optimization with Probabilistic ProgramsJunru Shao, Xiyou Zhou, Siyuan Feng, Bohan Hou 等NeurIPS 2022 · 被引用 85 次
它引用的顶会 Paper12
- Deep Learning For Symbolic MathematicsGuillaume Lample, François ChartonICLR 2020 · 被引用 477 次
- Neural Execution of Graph AlgorithmsPetar Velickovic, Rex Ying, Matilde Padovano, Raia Hadsell 等ICLR 2020 · 被引用 192 次
- Synthesize, Execute and Debug: Learning to Repair for Neural Program SynthesisKavi Gupta, Peter Ebert Christensen, Xinyun Chen, Dawn SongNeurIPS 2020 · 被引用 68 次
- BUSTLE: Bottom-Up Program Synthesis Through Learning-Guided ExplorationAugustus Odena, Kensen Shi, David Bieber, Rishabh Singh 等ICLR 2021 · 被引用 60 次
- A Probabilistic End-To-End Task-Oriented Dialog Model with Latent Belief States towards Semi-Supervised LearningYichi Zhang, Zhijian Ou, Min Hu, Junlan FengEMNLP 2020 · 被引用 52 次
相关 Paper
- Guiding Program Synthesis by Learning to Generate ExamplesLarissa Laich, Pavol Bielik, Martin T. VechevICLR 2020 · 被引用 17 次
- A large-scale benchmark for few-shot program induction and synthesisFerran Alet, Javier Lopez-Contreras, James Koppel, Maxwell I. Nye 等ICML 2021 · 被引用 20 次
- Latent Programmer: Discrete Latent Codes for Program SynthesisJoey Hong, David Dohan, Rishabh Singh, Charles Sutton 等ICML 2021 · 被引用 25 次
- Online Input Grammar Synthesis Aided Symbolic ExecutionKe Ma, Yunlai Luo, Zhenbang Chen, Weijiang Hong 等OOPSLA 2026
- Programming-by-Demonstration for Long-Horizon Robot TasksNoah Patton, Kia Rahmani, Meghana Missula, Joydeep Biswas 等POPL 2024 · 被引用 11 次
