acceptodds
Under review as a conference paper at ICLR 2027

Information-Theoretic Corrective Example Selection (IT-CES): Calibrated In-Context Example Selection for Automated Code Correction

Abstract

In corrective in-context learning for automated code repair, the effectiveness of Large Language Model (LLM) self-correction depends substantially on the quality of retrieved demonstrations. Standard similarity-based selection methods, such as Top-K retrieval, often select examples independently and ignore correlations among candidates, leading to redundant contexts with diminishing marginal utility. We propose Information-Theoretic Corrective Example Selection (IT-CES), a theory-motivated framework for selecting a compact set of corrective demonstrations that jointly cover complementary repair patterns for the current failure. IT-CES represents each correction instance using a diagnostic tuple that combines the problem, the buggy solution, and the observed failure signal, and applies a calibrated log-determinant selection objective to choose examples that are both relevant to the current failure and complementary to one another. The calibration step mitigates the concentration of dense-retrieval similarity scores, improving the contrast of the diagnostic kernel used by the log-determinant objective. Across three code-repair benchmarks, IT-CES consistently improves Pass@1 repair accuracy over representative similarity-based and diversity-aware retrieval methods across the evaluated context budgets, generators, and dense retrievers. We further report step-by-step component ablations, paired exact statistical tests, intrinsic retrieval diagnostics, and multi-round dynamic repair evaluations. These results support the effectiveness of calibrated diagnostic example selection within the tested repair settings. The implementation is uploaded as supplementary material.

open until 14 Dec 2026

est. 32% chance this paper gets accepted at ICLR 2027.

Reject 68%Accept 32%

What do you think this paper will get?

All positions stay anonymous.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.