Execution Guided Line-by-Line Code Generation
Boaz Lavon, Shahar Katz, Lior Wolf

TL;DR
This paper introduces Execution-Guided Classifier-Free Guidance (EG-CFG), a novel method that integrates real-time execution feedback into neural code generation, significantly improving the quality and correctness of generated code.
Contribution
The paper presents a new approach that incorporates execution signals during code generation, enabling more accurate and executable code outputs compared to traditional methods.
Findings
EG-CFG achieves state-of-the-art results across various coding tasks.
The method improves code correctness by using execution feedback during generation.
Parallel exploration of multiple solutions enhances diversity and performance.
Abstract
We present a novel approach to neural code generation that incorporates real-time execution signals into the language model generation process. While large language models (LLMs) have demonstrated impressive code generation capabilities, they typically do not utilize execution feedback during inference, a critical signal that human programmers regularly leverage. Our method, Execution-Guided Classifier-Free Guidance (EG-CFG), dynamically incorporates execution signals as the model generates code, providing line-by-line feedback that guides the generation process toward executable solutions. EG-CFG employs a multi-stage process: first, we conduct beam search to sample candidate program completions for each line; second, we extract execution signals by executing these candidates against test cases; and finally, we incorporate these signals into the prompt during generation. By maintaining…
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.
Code & Models
Videos
Taxonomy
TopicsTopic Modeling · Multimodal Machine Learning Applications · Natural Language Processing Techniques
MethodsSparse Evolutionary Training
