Aha.
正在载入中英对照阅读…

arXiv:2606.03852 · 中英对照阅读

FLARE: Fine-Grained Diagnostic Feedback for LLM Code Refinement

Yinsheng Yao、Hongxiang Zhang、Weixi Tong、Tianyi Zhang

摘要

Large language models often generate code with bugs. Existing methods revise such code using feedback signals such as test failures and self-critiques, but these signals are too coarse-grained or too high-level to tell the model where the code should be revised. We present Flare, an iterative code generation framework whose lightweight diagnostic model predicts line-level suspiciousness to guide code refinement. Given the inherent uncertainty of diagnostic predictions, Flare searches over the top-k suspicious lines at each step and selects the next candidate according to execution outcomes. Experiments on LiveCodeBench and BigCodeBench with five base LLMs show that, even without candidate search, Flare ( $k$ =1) outperforms the strongest baseline, NL-Debugging, with an absolute improvement from 1.06% to 9.71% in 9 of 10 settings. Expanding the search to 10 candidates adds an average improvement of 8.97%, and Flare keeps an average lead of 3.39% over the strongest baseline under the same candidate budget. When evaluated in isolation, our lightweight diagnostic model outperforms recent fault localization methods, demonstrating that it can provide reliable fine-grained guidance for code refinement.