Language models fix code best when they run it, read the error, and try again. Teaching them to do this well has so far meant fine-tuning every weight on large logs of such repair sessions. That approach has a known side effect in other domains: specialized fine-tuning erodes skills the agent still needs inside the loop, such as reading a natural-language specification, reasoning about the algorithm, and emitting well-formed tool calls. This proposal asks whether the repair skill can be taught by changing only the additive offsets inside the network. These are the bias terms of each layer, or one learned vector added to each layer's output (a "steering vector"). The weight matrices that encode the model's features stay frozen. The bet is that repair is mostly a skill of using knowledge the model already has, and that offsets can redirect existing features but cannot rotate or overwrite them. If so, offsets should buy most of the repair gain while leaving general abilities, and the model's representation of non-code text, nearly untouched.
In two sentences: train a code-repair agent with execution-based reinforcement learning while updating only a few hundred thousand bias parameters, then measure whether it matches weight-level fine-tuning on repair while avoiding the forgetting that weight-level fine-tuning causes. The study also tests directly whether this kind of adaptation escapes the sudden "forgetting phase transition" recently characterized for low-rank adapters, or reproduces it.
Core Claim
The main hypothesis is about where bias-only methods should sit on the repair-versus-forgetting curve. With the adapter active during the whole repair loop, residual steering vectors and BitFit-style bias updates trained with execution reward should sit on that curve at a point full fine-tuning and LoRA cannot reach. LoRA here means low-rank adaptation, which adds a small trainable low-rank correction to frozen weight matrices. The comparison is at matched repair improvement on DebugBench and multi-turn HumanEval. At that matched improvement, bias-only methods should lose substantially less on tool calling (the Berkeley Function Calling Leaderboard, BFCL v4), math reasoning, and out-of-domain perplexity.
A second, sharper claim is mechanistic. As the size of the update grows, representation drift under bias-only training should grow smoothly, without the sudden collapse seen for LoRA. The competing prediction is that it collapses exactly as LoRA does, and the literature gives grounds for that too, as the next section explains. Both outcomes are informative, and the experiments are designed to distinguish them.
The claim is specifically about the in-loop setting. Simply switching an adapter off for general tasks makes forgetting trivially zero. That option is unavailable when the same forward passes must handle the specification, the traceback, and a tool call within one repair trajectory.
What Prior Work Establishes and Leaves Open
The method comes from two papers. BitFit freezes all weight matrices of BERT-style models and trains only the biases. That is about 0.08% of parameters, or 0.04% if only query and intermediate-MLP biases are trained, and it stays within 1% of full fine-tuning on GLUE. BitFit beats full fine-tuning under 1,000 examples but falls behind past roughly 15,000. Steering LLM Reasoning Through Bias-Only Adaptation adds one learned vector per layer to the residual stream, the running sum of layer outputs that flows through the network. It trains these vectors with leave-one-out reinforcement learning and matches full fine-tuning on Qwen2.5-14B math benchmarks at a 41.3% average, using 245K parameters. On Llama-3.1-8B it recovers only about 70% of the full-tuning gain. Its logit-lens analysis, which reads off which output tokens each layer's vector favors, finds that early-layer vectors boost programming tokens and middle layers boost verification tokens. That hints the mechanism touches code-related features.
Neither paper trains on code repair, uses execution feedback, or measures forgetting. Both are what this proposal builds on. The Llama result also constrains the design: steerability varies across architectures, so we must test more than one model family.
Three papers motivate the problem. OpenCodeInterpreter fully fine-tunes DeepSeekCoder-based models on Code-Feedback, a dataset of 68K multi-turn sessions combining code, compiler output, and critique. Its 33B model goes from 79.3 to 82.9 HumanEval Pass@1 when given execution feedback. The paper never measures what the model loses. DebugBench finds a "feedback paradox" across 4,253 instances. Tracebacks help with syntax and reference bugs but hurt on logic bugs, and GPT-4 falls to 55.9% on four-bug instances. SlopCodeBench shows that agents extending their own code across checkpoints become structurally more eroded in 77% of trajectories and more verbose in 75.5%. Prompting for cleaner code does not stop this.
Two papers show the forgetting risk is real in neighboring settings. Awakening the Sleeping Agent shows that heavy formal-proof fine-tuning dropped BFCL tool calling from 89.4% to about 4.6%, and that 100 traces brought it back to 83.8%, so the skill was suppressed rather than erased. Sparse Memory Finetuning reports that full fine-tuning on MedMCQA raised WikiText-103 perplexity by 44% and cut TriviaQA by more than 9 points. Its own added memory layers kept both probes within 1 point. That paper is a competitor in spirit, but it changes the architecture and was only tested on medical multiple-choice questions with a 0.5B model.
The paper that could contradict us is Understanding Catastrophic Forgetting In LoRA via Mean-Field Attention Dynamics. It shows that learned LoRA updates align with the base model's dominant singular directions, the directions in which a weight matrix stretches its input most. Forgetting then appears as sudden drift of token-representation clusters once the update size crosses a threshold. Meanwhile, work summarized in BitFit's discussion (Gong et al.) reports that bias vectors already point along those same dominant directions. So one could argue bias-only training aims straight at the most fragile part of the model.
Our counter-hypothesis rests on how each update acts. An additive offset shifts activations without changing how the network transforms inputs. A low-rank weight update instead multiplies with every input, so its effect grows with input size. That difference could matter even when the two updates point in the same direction. We treat this as an open empirical question, not an assumption.
Research Program
We will build three things.
The first is a repair environment. It is a sandboxed multi-turn loop in which the model writes code, sees test results and tracebacks, and revises, for up to four turns. The cap reflects the plateau after 2 to 4 iterations reported by Yan et al.. Training problems come from DebugBench split at the level of the underlying LeetCode problem, so that no evaluation problem's clean solution is seen in training. The reward is whether the final program passes the hidden tests.
The second is a set of adaptation methods trained under identical conditions in two regimes. The primary regime is online reinforcement learning with the leave-one-out estimator used by the steering-vector paper. The secondary regime is supervised training on Code-Feedback, which reproduces the OpenCodeInterpreter recipe. It also tests BitFit's capacity limit, because Code-Feedback is several times larger than the size at which BitFit lost to full fine-tuning on SQuAD. In the supervised regime we will also vary data size, using 1K, 5K, 20K, and the full 68K sessions, to find where bias-only training stops improving.
The third is a measurement suite in which the adapter stays on. It covers repair skill, in-loop general skill, erosion across checkpoints, and representation geometry.
Models are Qwen2.5-7B, Llama-3.1-8B, and a DeepSeekCoder model of similar size. Qwen2.5 is the family where steering worked best, Llama-3.1-8B is where it partly failed, and DeepSeekCoder is the coder base used by OpenCodeInterpreter.
The geometry analysis follows the forgetting-in-LoRA paper. For each method we will scale the update by a factor from 0 up past the trained value. At each scale we will compute, per layer, the Wasserstein distance between base and adapted token-representation clusters on general text. Wasserstein distance measures how far one distribution must be moved to match another. We will then check for a threshold beyond which drift jumps. We will also measure the cosine similarity between each learned bias change and the top singular vectors of the corresponding weight matrix. That directly tests whether alignment with dominant directions predicts forgetting for additive updates as it does for LoRA.
One engineering caveat matters. Standard frameworks do not discard stored activations just because weight gradients are turned off. Backpropagating through frozen nonlinear layers still needs some stored activations. We will therefore measure peak memory directly rather than assume the up-to-8x savings reported in the bias-term training work of Bu and colleagues (Differentially Private Bias-Term Fine-tuning).
Baselines
The do-nothing reference is the frozen base model run in the same four-turn loop with tracebacks in the prompt. It cannot forget by construction, so every trained method must beat its repair score to justify any forgetting at all. On DebugBench, the reference points reported in the file are GPT-4 at 75% overall and 55.9% on four-bug instances (DebugBench). No reported result was found on Lacuna for DebugBench scores of 7B–8B open models, so we will measure our own base models.
The strongest repair baseline is full-parameter fine-tuning on Code-Feedback following OpenCodeInterpreter. Its 33B model reports 79.3 single-turn and 82.9 with execution feedback on HumanEval Pass@1. No reported result was found on Lacuna for the 7B variant, so we will rerun the recipe at our scale. In the reinforcement-learning regime we will also run full-parameter training with the same reward.
The strongest parameter-efficient competitor is LoRA. We will run it at two sizes. One uses a conventional rank. The other uses rank 1 on the query and MLP projections, which roughly matches the bias methods' parameter count, so that we are not merely comparing parameter budgets.
We will also include the Sparse Memory Finetuning approach from Sparse Memory Finetuning as the strongest existing low-forgetting method. Its reported result is the reference we must approach: forgetting probes within 1 point of base, against a 44% perplexity rise for full fine-tuning. That result comes from medical QA at 0.5B, so we will rerun it at our scale.
Fairness rules apply to all methods. Every method sees the same training problems and the same number of environment rollouts or training tokens. Every method gets the same learning-rate search: eight trials, chosen by repair accuracy on a held-out validation split. Forgetting is never used for selection.
Two ablations isolate the key ingredient, which is that the update is additive and does not depend on the input. The first adds a random-direction offset with the same norm per layer as the trained offset. This tests whether the specific learned direction does the work. The second is an input-dependent variant, a rank-1 low-rank adapter on the residual stream, which the steering paper suggested as a remedy for less steerable models. If this variant forgets like LoRA, input dependence is what causes forgetting.
Beating the baselines means one of two things. Either the bias-only method recovers at least 80% of full fine-tuning's repair gain while losing at most a third as much on the in-loop forgetting probes. Or the methods tie on repair, and the bias-only method forgets measurably less, over three seeds.
Why not just…?
Why not just prompt a frozen model with the tracebacks? It forgets nothing, and it is our do-nothing baseline. The evidence says it leaves a lot of repair skill on the table and does not fix the specific failure we care about. DebugBench shows tracebacks hurt logic-bug repair under prompting, and SlopCodeBench shows quality prompts fail to stop erosion while lowering correctness. If trained offsets do not beat this baseline on DebugBench logic bugs, the proposal fails on its own terms.
Why not just use LoRA with a small rank, or mix general data back into training? This is the real threat. Rank-1 LoRA has a similar parameter count. Replaying general instruction data during training is a standard and often effective defense against forgetting. We will run both, including a LoRA-plus-replay arm with 10% general data. If they match bias-only on both axes, the remaining case for bias-only is cost: no replay data and a smaller optimizer state. Whether its training memory is also smaller is something the memory measurements will show. We will report that outcome as a narrowed result. The geometry experiment remains informative either way. If rank-1 LoRA collapses at a threshold while offsets drift smoothly, that is evidence that additive updates differ in kind, not just in size.
Why not fully fine-tune and then recover general skills afterward, by merging weights or with a few hundred traces? Awakening the Sleeping Agent shows both sides of this option. Spherical interpolation between the specialist and base weights restored tool use but sharply hurt formal proving. A hundred targeted traces restored tool use to 83.8%, but only for the one skill those traces covered. Post-hoc repair requires knowing in advance which skills broke. We will include merging and 100-trace recovery after full fine-tuning as baselines. We will then score them on probes that the recovery data did not target, namely math and perplexity, which is where we expect them to fall short.
Why not just turn the adapter off when the agent is not coding? In a repair loop the same forward passes interpret the specification, the traceback, and tool calls, so there is no clean moment to switch. Every forgetting probe in this study is therefore run with the adapter active.
Proposed Experiments and Decisive Checks
Repair skill is measured as DebugBench pass rate overall and split into syntax, reference, and logic bugs and by number of bugs, plus multi-turn HumanEval Pass@1.
In-loop forgetting is measured with the adapter active on four probes: BFCL v4 tool-call accuracy, GSM8K and MATH500, WikiText-103 perplexity, and TriviaQA. The BFCL collapse from 89.4% to 4.6% reported for proof specialization is the reference failure.
Erosion is measured on SlopCodeBench as checkpoint pass rate, where the best reported agents reach about 14.8%, together with the change in structural erosion and verbosity across checkpoints. This tests a secondary hypothesis. If erosion partly reflects the model losing track of design intent as it specializes, the less-forgetting methods should also erode more slowly. If erosion is unchanged across all methods, it comes from how the loop uses context, not from the weights, and we will say so.
Three checks decide the outcome. The first is the repair-versus-forgetting curve on all three model families. The Llama run tests whether the steerability gap reported for math carries over to repair. The second is the logic-bug split: whether trained offsets improve logic repair when tracebacks are present, which no prompting result in the file achieves. The third is the update-size sweep, testing whether bias-only drift shows the threshold collapse documented for LoRA, and whether alignment with dominant singular directions predicts it.
The data-size curve on Code-Feedback marks where offsets run out of capacity. That tells practitioners at what dataset size the forgetting savings stop paying for themselves.
References
- BitFit: Simple Parameter-efficient Fine-tuning for Transformer-based Masked Language-models
- Steering LLM Reasoning Through Bias-Only Adaptation
- OpenCodeInterpreter: Integrating Code Generation with Execution and Refinement
- DebugBench: Evaluating Debugging Capability of Large Language Models
- SlopCodeBench: Measuring Code Erosion Under Iterative Specification Refinement
- Awakening the Sleeping Agent: Lean-Specific Agentic Data Reactivates General Tool Use in Goedel Prover
- Sparse Memory Finetuning as a Low-Forgetting Alternative to LoRA and Full Finetuning
- Understanding Catastrophic Forgetting In LoRA via Mean-Field Attention Dynamics
- Finding the Dominant Winning Ticket in Pre-Trained Language Models
- CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translation
- Differentially Private Bias-Term Fine-tuning of Foundation Models