Researchers have introduced a new approach, Execution-Guided Classifier-Free Guidance (EG-CFG), for neural code generation that incorporates real-time execution signals into the process.
This method dynamically integrates execution signals while generating code, offering line-by-line feedback to steer the model towards executable solutions.
EG-CFG employs a multi-stage process involving beam search, extraction of execution signals by testing program completions, and integrating these signals into the generation process.
Consistent signals within the same line and updating signals at line boundaries help maintain coherent guidance and syntactic structure.
The method enables parallelism at the task level, allowing multiple agents to explore different reasoning paths simultaneously and generate diverse candidate solutions collectively.
Experiments across various coding tasks have shown that EG-CFG outperforms traditional methods, achieving state-of-the-art results across different complexities, including competitive programming tasks.
The code for EG-CFG is available at: https://github.com/boazlavon/eg_cfg