Let the Fixer Decide: Training a Code Localizer from the Fixer's Likelihood

Khalil Hennara, Muhammad Hreden, Zeina Aldallal, Sara Chrouf, Safwan AlModhayan

Published November 9, 2026 · on the feed November 24, 2026 · ▲ 61 · arXiv 2611.12164

LLM training & RLAgentsCode & software Full code arXiv ↗Hugging Face ↗

The abstract

Code localizers are usually trained to predict the files a reference patch edits, but the code a fixer needs to read is not the same as the code it changes. We propose Fixer-Guided Localization (FGL): the localizer proposes several localizations, a frozen fixer scores each by how likely it makes a verified patch, and the localizer is trained on these scores with weighted supervised fine-tuning, without running tests and without reinforcement learning. We build the full pipeline on Gemma 4 E4B for the Kaggle Gemma-4 Developer Agent competition, from 1,629 test-verified Kimi K3 trajectories. The FGL target helps the fixer find the bug as often as the teacher's localization while using 27.5% less code. On the development set, one EM round moves the agent in the expected direction compared with a matched control: more tasks reach a patch (53 vs. 46), fewer tasks get stuck reading files that do not exist (43 vs. 54), and more tasks are solved (8 vs. 6). Training also changes how the agent works: trained agents explore about three times more than the base model and write far fewer wrong patches, and the single agent solves up to 11 of 78 tasks, against 8 for the base model. An analysis of 13 evaluation runs identifies what limits a 4B agent under an 8-minute budget (time, repetition loops and edit quality) and gives practical lessons for training small coding agents. All data, code and adapters are publicly available.

The Brief

2:35

A short podcast summary of the paper. Written and voiced by AI.

Transcript

Let the Fixer Decide. Training a Code Localizer from the Fixer's Likelihood. By Khalil Hennara and four others. Published on the ninth of November.

A coding agent that repairs a bug often works in two parts. A localizer decides which code to look at, and a fixer reads that code and writes the patch. Localizers are usually trained to predict the files that a reference patch edits. The trouble is a mismatch between two sets of code. The code a fixer needs to read is not the same as the code it changes. Training the localizer to point only at the edited files teaches it the wrong target, because what matters is what the fixer has to see in order to succeed.

Fixer-Guided Localization, or FGL, lets the fixer itself decide what a good localization is. The localizer proposes several candidate localizations. A frozen fixer then scores each one by how likely it makes a verified patch. The localizer is trained on those scores, so it learns to prefer the localizations that make the fixer more likely to produce the correct fix.

The training is weighted supervised fine-tuning on the fixer's scores. Two things are absent on purpose: no tests are run, and there is no reinforcement learning. The full pipeline is built on Gemma 4 E4B, for the Kaggle Gemma-4 Developer Agent competition, starting from one thousand six hundred and twenty-nine test-verified Kimi K3 trajectories. A single round of this procedure is described as one EM round.

The first result concerns the target itself. The FGL localization helps the fixer find the bug as often as the teacher's localization does, while using twenty-seven point five percent less code. On the development set, one EM round moves the agent in the expected direction against a matched control. Fifty-three tasks reach a patch, against forty-six. Forty-three tasks get stuck reading files that do not exist, against fifty-four. And eight tasks are solved, against six.

Training also changes how the agent works. Trained agents explore about three times more than the base model and write far fewer wrong patches. The single agent solves up to eleven of seventy-eight tasks, against eight for the base model. An analysis of thirteen evaluation runs then asks what holds back a 4B agent working under an eight-minute budget. Three limits are named: time, repetition loops, and edit quality. From that analysis the authors draw practical lessons for training small coding agents, and all data and adapters are publicly available.

The idea borrows its standard of quality from the downstream model rather than from a label. A reference patch says where the change happened, but the fixer's own likelihood says which context actually helped. Using that signal, and nothing more expensive than weighted fine-tuning, the localizer learns to hand the fixer what it needs to read rather than only what it will edit.

Paper Quest · 7 chapters · about 41 min

Play this paper

Learn it by doing: make the calls the authors made, guess the result before you see it, and defend it in a viva graded on your own words. Chapter 1 is right here.

Chapter 1 🧩 · The problem

A small agent, a strict clock, and a label that points at the wrong code.

You are building a small coding agent in two parts: one part picks which code to show, the other reads that code and writes the patch.

The road ahead

  1. 1 · The problem ~7 min A code picker trained to point at the edited files learns the wrong target, and learning from test runs instead is expensive.
  2. 2 · What came before ~3 min
  3. 3 · The key idea ~9 min Let a frozen fixer score each candidate code view by how likely it makes the verified patch, then fine-tune the localizer on those scores.
  4. 4 · Choose your own research ~3 min
  5. 5 · Build the method ~8 min Each round proposes several localizations, scores each with a frozen fixer, and trains the localizer on the scores with weighted fine-tuning.
  6. 6 · The experiment ~6 min You’ll guess: Offline, how did the fixer do with the FGL target compared with the teacher's localization, and how much code did it use?
  7. 7 · The viva ~5 min Three questions from the examiners, answered in your own words. Win it for the paper’s trophy.
Join free to play the whole quest ›

Free, with Google or an email address. Your stars and progress are kept.

KipQuest: the day’s AI research, as podcasts and quests. All papers Android app Privacy Contact Episodes are written and voiced by AI from each paper. Summaries can contain mistakes: the paper is the source.