FLARE: Fine-Grained Diagnostic Feedback for LLM Code Refinement

Yinsheng Yao, Hongxiang Zhang, Weixi Tong, Tianyi Zhang
6/2/2026
cs.SEcs.AI

No confident code implementation found for this paper.

Abstract

Large language models often generate code with bugs. Existing methods rely on feedback signals such as test failures and self-critiques to iteratively refine the generated code.

Show full abstract

Such signals are either too coarse-grained or too high-level, which is not sufficient to inform the model where to fix the bug. In this work, we present Flare, an iterative framework with a lightweight diagnostic model that predicts line-level suspiciousness signals for bug localization and code refinement. Given the inherent uncertainty of diagnostic predictions, Flare searches over the top-k suspicious regions and selects the best candidate according to execution outcomes. Experiments on LiveCodeBench and BigCodeBench with five base LLMs show that, even without candidate search (k=1), Flare outperforms the strongest baseline with an absolute improvement from 1.72% to 7.42%. Furthermore, searching over 10 candidates yields an average improvement of 8.50% compared with no candidate search. When evaluated in isolation, our lightweight diagnostic model achieves the best performance compared with recent fault localization methods, demonstrating that it can provide reliable fine-grained guidance for code refinement.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{yao2026flare,
  title  = {FLARE: Fine-Grained Diagnostic Feedback for LLM Code Refinement},
  author = {Yinsheng Yao and Hongxiang Zhang and Weixi Tong and Tianyi Zhang},
  year   = {2026},
  eprint = {2606.03852},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.03852v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.03852.svg)](https://codeofpaper.com/paper/2606.03852)

Discussion