arrow
Return

Reassessing One-Round Test-Time Refinement for Code Generation

delete2026-09-09
delete0
delete
OA
AI
J
Jindae Kim
DOI:10.3390/ai7090353delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Test-time refinement aims to improve generated programs through additional inference, but its value after an initial candidate has been produced remains unclear. We conduct a controlled evaluation of one-round Self-Refine and Self-Debug across seven models and three Python code-generation benchmarks. For each model and task, both methods refine the same initial candidate, allowing us to measure refinement gain without variation in initial generation. Self-Debug produces positive refinement gain in 16 of the 21 model–benchmark combinations and no change in the remaining five, whereas Self-Refine reduces correctness in 16 combinations and improves it in only four. Decomposing refinement gain into repairs and regressions clarifies this contrast. After a diagnostic pass, Self-Debug’s candidate preservation leaves 34.1% of initial final-test failures unaddressed, but 99.95% of initially correct candidates remain correct. With regressions nearly absent, repairs after diagnostic failures translate directly into positive gain. Self-Refine also repairs initial failures, but its regression count is more than three times its repair count overall, producing predominantly negative gain. Resource analysis shows that Self-Refine uses more tokens while generally reducing correctness, whereas Self-Debug provides a more favorable gain–overhead balance, although its inference overhead per net additional pass varies across models and benchmarks. These results show that one-round refinement is not inherently beneficial and should be applied only when its expected gain justifies the additional computation and cost.
Keywords:
large language models
code generation
test-time refinement
self-refinement
self-debugging
execution feedback

Journal

A
AI
IF:
5
Papers:
1.0K
Citations:
941

Organization

S
seoul national university of science and technology
Scholars:
574
Papers: 268
Citations: 0
Cited Papers

Cited Papers

RePair: Automated Program Repair with Process-based Feedback
err2024-01-01
err0
PREAI
errYuze Zhao; Zhenya Huang; Yixiao Ma; Rui Li; Kai Zhang; Hao Jiang; Qi Liu; Linbo Zhu; Yu Su
errShare
errSave
SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering
err2024-01-01
err0
PREAI
errJimenez,Carlos; Lieret,Kilian; Narasimhan,Karthik; Press,Ofir; Wettig,Alexander; Yang,John; Yao,Shunyu
errShare
errSave
Self-Refine: Iterative Refinement with Self-Feedback
err2023-01-01
err0
PREAI
errAlon,Uri; Clark,Peter; Dziri,Nouha; Gao,Luyu; Gupta,Prakhar; Gupta,Shashank; Hallinan,Skyler; Hermann,Katherine; Madaan,Aman; Majumder,Bodhisattwa Prasad; Prabhumoye,Shrimai; Tandon,Niket; Welleck,Sean; Wiegreffe,Sarah; Yang,Yiming; Yazdanbakhsh,Amir
errShare
errSave
Demystifying LLM-Based Software Engineering Agents
err2025-06-19
err0
PREAI
errXia,Chunqiu Steven; Deng,Yinlin; Dunn,Soren; Zhang,Lingming
errShare
errSave
researcher View more