mlsanityData to 7 Oct 2026

Execution Guided Line-by-Line Code Generation

arXiv 2506.10948 ↗First posted 12 Jun 2025cs.LGcited by 10

Not on the map. Why?

Abstract (arXiv)

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 and data science tasks. Our code is available at: https://github.com/boazlavon/eg_cfg

Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Builds on 42 of its 52 references that are in the map. First posted on arXiv 12 Jun 2025.

Builds on

42 of 52 references.

References · 42

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  3. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
  4. 2021Diffusion Models Beat GANs on Image Synthesiscited by 8,185
  5. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  6. 2020Measuring Massive Multitask Language Understandingcited by 7,768
  7. 2022Classifier-Free Diffusion Guidancecited by 5,717
  8. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
  9. 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
  10. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
  11. 2021Program Synthesis with Large Language Modelscited by 3,509
  12. 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
30 more
  1. 2019The Curious Case of Neural Text Degenerationcited by 2,881
  2. 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,761
  3. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  4. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  5. 2023Teaching Large Language Models to Self-Debugcited by 963
  6. 2021Measuring Coding Challenge Competence With APPScited by 879
  7. 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
  8. 2019MathQA: Towards Interpretable Math Word Problem Solving with Operation-Based Formalismscited by 653
  9. 2024A Survey on Large Language Models for Code Generationcited by 646
  10. 2022PAL: Program-aided Language Modelscited by 635
  11. 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 442
  12. 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
  13. 2022CodeT: Code Generation with Generated Testscited by 369
  14. 2023Self-collaboration Code Generation via ChatGPTcited by 255
  15. 2024MapCoder: Multi-Agent Code Generation for Competitive Problem Solvingcited by 177
  16. 2022DocPrompting: Generating Code by Retrieving the Docscited by 151
  17. 2024Debug like a Human: A Large Language Model Debugger via Verifying Runtime Execution Step-by-stepcited by 123
  18. 2023Self-planning Code Generation with Large Language Modelscited by 121
  19. 2023Large Language Models as Analogical Reasonerscited by 107
  20. 2023Stay on topic with Classifier-Free Guidancecited by 90
  21. 2023CodeScore: Evaluating Code Generation by Learning Code Executioncited by 66
  22. 2023xCodeEval: A Large Scale Multilingual Multitask Benchmark for Code Understanding, Generation, Translation and Retrievalcited by 46
  23. 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
  24. 2023SelfEvolve: A Code Evolution Framework via Large Language Modelscited by 43
  25. 2025CODESIM: Multi-Agent Code Generation and Problem Solving through Simulation-Driven Planning and Debuggingcited by 31
  26. 2025QualityFlow: An Agentic Workflow for Program Synthesis Controlled by LLM Quality Checkscited by 22
  27. 2023MoTCoder: Elevating Large Language Models with Modular of Thought for Challenging Programming Taskscited by 9
  28. 2024Planning-Driven Programming: A Large Language Model Programming Workflowcited by 7
  29. 2024GenX: Mastering Code and Test Generation with Execution Feedbackcited by 4
  30. 2024Artificial Expert Intelligence through PAC-reasoningcited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 2; 2026: 8.

10 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Adaptive Classifier-Free Guidance via Dynamic Low-Confidence Masking
  2. 2025PACIFIC: a framework for generating benchmarks to check Precise Automatically Checked Instruction Following In Code
  3. 2024StepCoder: Improve Code Generation with Reinforcement Learning from Compiler Feedback
  4. 2025CodeRL+: Improving Code Generation via Reinforcement with Execution Semantics Alignment
  5. 2026VeriInteresting: An Empirical Study of Model Prompt Interactions in Verilog Code Generation
  6. 2023AI Chain on Large Language Model for Unsupervised Control Flow Graph Generation for Statically-Typed Partial Code
  7. 2024RLEF: Grounding Code LLMs in Execution Feedback with Reinforcement Learning
  8. 2024Adaptable Logical Control for Large Language Models