Credit Where the Cut Happens: Candidate Contraction for Repository-Level Code Localization
Abstract
Repository-level code localization advances mainly by exclusion: an agent rules out code that looks relevant but lies off the fix path. Existing training signals cannot credit such a move: with a free-form answer, a discarded location never appears. We introduce C3L (Candidate Contraction for Code Localization), which makes exclusions first-class learning events. C3L binds the prediction to an explicit survivor set that the agent contracts monotonically from read-only evidence, so every exclusion becomes an irreversible, observable state transition. Two potentials over this state price each cut on the turn it is made: a logarithmic weighted volume rewards effective contraction, and a reachable localization ceiling charges coverage loss the moment a necessary location is discarded, with no learned verifier and no extra rollouts. Because the survivor set summarizes the remaining search, C3L compares turns across rollouts by survivor-set signature even when their histories share nothing, and an execution-verified label cache credits valid repairs outside the reference patch. With a 4B backbone, C3L reaches 59.61/47.60/55.00 mean F1 on SWE-bench Verified, SWE-bench Pro (Python), and LocBench, exceeding the strongest retrained same-size baseline by 6.51/7.22/6.21 points (every 95% CI excludes zero). It outscores a frozen 30B-A3B agent and resolves 40.40% of Verified issues with a fixed repair backend, against 37.33% for the strongest baseline. The gain has three measured sources: the exclusion-aware potentials add 5.9 points over terminal-reward training, grouping turns by survivor signature beats grouping them by action history by 1.35 points, and delivering credit per turn adds 2.11 points at identical total return.
Then back it, or bet against it.
Related papers
Open the market on this paper to see 7 more related papers.