The 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.
Abstract
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.
This paper identifies patch verbosity as a major yet overlooked concern in LLM-based APR and proposes RECAP, a lightweight, plug-and-play adapter that attaches to existing repair frameworks after generation that achieves a substantially better size-correctness tradeoff.
Wen-Qiang Luo, J. Keung, Xiaoyu Shi et al.· 1 citation
Execution-guided self-debugging can return unchanged code when revision is requested, and even a changed program may still fail to repair the observed failure. A final pass/fail result alone does not distinguish these different outcomes. We study them using 9790 Python programs generated by six open-weight models on th...
ReMCTS, an execution-grounded, memory-augmented, LLM-guided MCTS-style search framework that organizes program candidates as tree states, retains branch-local debugging context, retrieves failure experience across branches, and distinguishes failed checks from unavailable evidence is presented.
Hui-Fei Wang, Xin-Yi Huang, Yi-Heng Sun et al.· 0 citations
Results suggest that causal-aware reasoning and stability-oriented design can improve the effectiveness of LLM-based APR, a causality-guided multi-agent repair framework that improves the repair stage of existing LLM-based localization pipelines.
Lei Yuan, Shaohua Liu, Yu Wang et al.· Empirical Software Engineeri...· 0 citations
Results support a focused conclusion: LLM-generated review is most useful as complementary semantic guidance when paired with deployment-oriented test selection, rather than as a standalone testing artifact.
Hui-Xiang Zhen, Zhihan Zhang· International Conference on...· 0 citations
Large language models (LLMs) have shown promise in automated unit test generation, yet the effectiveness of prompt engineering for small, locally-deployed open-source models remains poorly understood. Following growing interest in local LLM deployment to mitigate data exposure risks, this paper presents a controlled em...
M. Tran, Khang Mai· International Conference on...· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.