DOCE: Finding the Sweet Spot for Execution-Based Code Generation

Architecture of OpenAI


View a PDF of the paper titled DOCE: Finding the Sweet Spot for Execution-Based Code Generation, by Haau-Sing Li and 3 other authors

View PDF
HTML (experimental)

Abstract:Recently, a diverse set of decoding and reranking procedures have been shown effective for LLM-based code generation. However, a comprehensive framework that links and experimentally compares these methods is missing. We address this by proposing Decoding Objectives for Code Execution, a comprehensive framework that includes candidate generation, $n$-best reranking, minimum Bayes risk (MBR) decoding, and self-debugging as the core components. We then study the contributions of these components through execution-based evaluation metrics. Our findings highlight the importance of execution-based methods and the difference gap between execution-based and execution-free methods. Furthermore, we assess the impact of filtering based on trial unit tests, a simple and effective strategy that has been often overlooked in prior works. We also propose self-debugging on multiple candidates, obtaining state-of-the-art performance on reranking for code generation. We expect our framework to provide a solid guideline for future research on code generation.

Submission history

From: Haau-Sing Li [view email]
[v1]
Sun, 25 Aug 2024 07:10:36 UTC (3,788 KB)
[v2]
Sat, 7 Sep 2024 10:09:31 UTC (3,780 KB)



Source link
lol

By stp2y

Leave a Reply

Your email address will not be published. Required fields are marked *

No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.