Compilable Neural Code Generation with Compiler Feedback
Xin Wang, Yasheng Wang, Yao Wan, Fei Mi, Yitong Li, Pingyi Zhou, Jin, Liu, Hao Wu, Xin Jiang, Qun Liu

TL;DR
This paper introduces COMPCODER, a three-stage pipeline that leverages compiler feedback to significantly enhance the success rate of generating compilable code from natural language descriptions.
Contribution
The paper presents a novel approach combining fine-tuning, reinforcement, and discrimination to improve code compilability in deep learning models.
Findings
Increases code compilation success rate from 44.18% to 89.18% in code completion.
Improves text-to-code generation success rate from 70.3% to 96.2%.
Demonstrates effectiveness over state-of-the-art models like CodeGPT.
Abstract
Automatically generating compilable programs with (or without) natural language descriptions has always been a touchstone problem for computational linguistics and automated software engineering. Existing deep-learning approaches model code generation as text generation, either constrained by grammar structures in decoder, or driven by pre-trained language models on large-scale code corpus (e.g., CodeGPT, PLBART, and CodeT5). However, few of them account for compilability of the generated programs. To improve compilability of the generated programs, this paper proposes COMPCODER, a three-stage pipeline utilizing compiler feedback for compilable code generation, including language model fine-tuning, compilability reinforcement, and compilability discrimination. Comprehensive experiments on two code generation tasks demonstrate the effectiveness of our proposed approach, improving the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Topic Modeling · Parallel Computing and Optimization Techniques
