Papers › Execution Guided Line-by-Line Code Generation
Execution Guided Line-by-Line Code Generation
Boaz Lavon, Shahar Katz, Lior Wolf
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 consistent signals across tokens within the same line and refreshing signals at line boundaries, our approach provides coherent guidance while preserving syntactic structure. Moreover, the method naturally supports native parallelism at the task level in which multiple agents operate in parallel, exploring diverse reasoning paths and collectively generating a broad set of candidate solutions. Our experiments across diverse coding tasks demonstrate that EG-CFG significantly improves code generation performance compared to standard approaches, achieving state-of-the-art results across various levels of complexity, from foundational problems to challenging competitive programming tasks. Our code is available at: https://github.com/boazlavon/eg_cfg
In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.
Code
Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.
Code Syntology ran Syntology
Not run by Syntology. Nothing on this page verifies that the listed code works.
Tasks
Results from the paper archive 2025-07-28
| Task | Dataset | Model | Metric | Value | Rank at snapshot | Leaderboard | Report |
|---|---|---|---|---|---|---|---|
| Code Generation | CodeContests | EG-CFG (DeepSeek-V3-0324) | Test Set pass@1 | 58.18 | #1 of 8 | Archive leaderboard | report |
| Code Generation | HumanEval | EG-CFG (DeepSeek-V3-0324) | Pass@1 | 96.95 | #5 of 8 | Archive leaderboard | report |
| Code Generation | HumanEval-ET | EG-CFG (DeepSeek-V3-0324) | Pass@1 | 87.19 | #1 of 2 | Archive leaderboard | report |
| Code Generation | MBPP | EG-CFG (DeepSeek-V3-0324) | Accuracy | 96.6 | #1 of 99 | Archive leaderboard | report |
| Code Generation | MBPP | EG-CFG (DeepSeek Coder 1.3b Instruct) | Accuracy | 83.2 | #16 of 99 | Archive leaderboard | report |
| Code Generation | MBPP-ET | EG-CFG (DeepSeek-V3-0324) | Pass@1 | 73.0 | #1 of 2 | Archive leaderboard | report |
Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.
Methods
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections