Controra

Research note

Can an agent write a missing ability into a model's weights?

On 2 November 2026, Takehi, Teoh, Zhang and Khattab of MIT CSAIL published Sparks of Weight-Space Programming. They let GPT-6 Astra edit the weights of a language model directly, with no gradient descent. With a budget of 50 forward passes, they reported that Qwen3.5-0.8B rose from 7.9% to 48.1% on MATH-500. On the smaller Gemma 3 270M the scores moved only from 6.8% to at most 7.7%, and the authors concluded: “Editing weights could remove an obstacle that hid an ability, but it could not add an ability the model lacked.”

Weight Splice Lab is an independent project that tested that sentence. We used the same editor model in our own open harness and asked it to add one narrow skill that the target model lacks: addition of numbers with several digits. The project has stopped, and the code, prompts, run results and logbook are public on GitHub.

Short answer

  • On a toy transformer with 5 million parameters, the agent solved reversed digit addition in 3 of 3 runs when it could add attention heads and neurons. Two of those runs also passed our primary bar for preserving other behaviour. When the agent could only change existing weights, it failed in 3 of 3 runs.
  • On Gemma 3 270M, three runs that could execute the model only through a budgeted forward pass tool did not add the algorithm. This is consistent with the paper's negative result, although the tasks differ.
  • A fourth Gemma run could also execute the model in its own Python session, still with no gradients. It solved reversed digit addition: mean accuracy over lengths 1 to 8 went from 0.9% to 100%, and it scored 100% at every tested length up to 30 digits. That run failed our own preregistered bar, because the edit changed the model's behaviour on unrelated text, and its compliance review is only preliminary.

Our reading is that, for this task, a missing algorithm can be written into the weights by hand. Keeping the new circuit silent everywhere else is the part that stayed unsolved.

Setup

The editor is gpt-6-astra, run through the Codex CLI with its built in tools disabled. It can act in three ways. It can run Python in a sandboxed kernel that holds the weights, with no network and with the standard gradient and optimiser interfaces blocked. It can call a forward pass tool, limited to 50 passes per run. It can save an edit, which the harness checks for allowed tensors, shapes and a cap on added parameters. Every cell is logged, and the logs are scanned automatically after the run.

The task is addition. In the reversed format, operands and answer are written least significant digit first, so each answer digit needs only one carry from the step before. All toy runs use this format. Gemma was tried in both plain and reversed formats.

Each run is scored on a hidden evaluation that the editor never sees. We measure accuracy on fresh addition problems, and we measure how far the edited model drifts from the original on ordinary text, as the KL divergence between their next token predictions. For Gemma the bar was fixed before any run: mean accuracy of at least 0.95 on operands of 1 to 8 digits, with drift below 0.05 nats per token on both Wikipedia text and chat replies.

Reproducing the paper

We first rebuilt the three published Qwen3.5-0.8B edits. All three match bit for bit.

We then scored the paper's own published generations again at shorter output limits, using the first published sample for each of the first 200 MATH-500 problems and comparing the base model with the 50 pass edit. At a limit of 4,096 tokens the base scores 3.5% and the edit 8%, and more than 90% of answers from both are cut off. At 32,768 tokens the scores are 7.5% and 46%. In this subset most of the gain appears at the long output limit. Of the base answers cut off at that limit, 96% end in a verbatim loop, against 11% after the edit. We did not run a new full benchmark evaluation of our own.

A toy model that cannot add

The toy is a decoder with 6 layers and 5.14 million parameters, trained on text and on simple digit tasks. Before editing, its mean addition accuracy over lengths 1 to 8 was 1.3%, including 10% on single digits.

We first tried to compile addition into it by hand, using closed form weight writes in added heads and neurons. The bar was a text KL below 0.05 with at least 98% accuracy on the model's native digit tasks. One version reached 100% on operands of 1 to 8 digits, but its text KL was 0.65 and accuracy on every native digit task fell below 20%. A gated version brought the text KL down to 0.043, but its accuracy fell from 99% at four digits to 74% at five and 12% at six. No hand built version met the bar. This work involved about 40 debugging iterations that inspected the target behaviour.

The agent did better. With permission to add heads and neurons, it reached 100% at every length from 1 to 20 digits in 3 of 3 runs. Two of the three also met the primary bar, and the third missed it with a text KL of 0.056. The toy prompt did not state the KL threshold. Limited to existing weights, it failed in 3 of 3 runs and ended each time with a lookup table for single digits. A second evaluation on fresh seeds and a different text split reproduced all six results.

The successful edits are narrow. None met our stricter robustness checks. All three fail when the addition does not start on the first line, and two of them damage ordinary text that begins with the task prefix. Beyond 20 digits one run stays at 100%, one scores 20% and one scores 0%. The successful edits also changed some of the model's existing weights to make room for the new circuit.

Gemma 3 270M

Gemma 3 270M, in its instruction tuned variant, is the model behind the paper's negative result. In plain notation it adds single digits correctly 93.5% of the time and scores 0% at every tested length from 6 to 30 digits. All four Gemma runs could add heads and neurons, and each setup was run once.

Three runs could execute the model only through the forward pass tool, two on plain addition and one on the reversed format. The first ended itself after 11 of its 50 passes. None produced an algorithm for several digits. Mean plain accuracy over lengths 1 to 8 moved from 26.1% to 26.9% and 28.4%, and mean reversed accuracy from 0.9% to 13.1%. All three edits stayed within the drift limits. The editor found parts of a circuit, such as heads that retrieve the right operand digits, but it could not wire them into a working carry. Our preregistered stop rule ended that phase.

We then defined a new condition, registered before its run but after seeing those failures. The editor may build and run the model inside its own Python session, outside the 50 pass counter. Gradients stay blocked, and searching over weight values by running the model is forbidden.

The single run in this condition built a circuit by hand in 10 added heads and 423 added neurons, 7.37 million added parameters in all, and also adjusted 34 of the model's existing tensors. On the hidden evaluation, mean reversed addition accuracy over lengths 1 to 8 rose from 0.9% to 100%, and the edit scored 100% at every tested length from 9 to 30 digits, with 200 problems per length. The supplied practice set covered lengths 1 to 20. During construction the editor generated its own problems up to 30 digits and used them to find and repair a failure at long lengths, so the result is on fresh problems but not on lengths the editor never checked. Plain addition was roughly preserved, at 26.3% against 26.1%.

The run still fails the bar. Text KL is 0.445 and chat KL is 0.086, against a limit of 0.05.

Where the edit breaks

The text drift is not spread evenly. Of the 256 hidden Wikipedia chunks, 5 hold 99.8% of it. Without those five the mean is 0.0011. In two of them the drift begins at an acronym or call sign in capitals, and in the others at a place name, in the middle of a sentence and at a word fragment. From that point the divergence stays large for many positions. While reading the fixed text, the edited model often gives its highest probability to digits or newlines. We infer that the gate meant to detect the addition format misfires there. Gate activations were not recorded, so this is not confirmed.

Separately, 14 other chunks show a single spike each, at the end of a sentence late in the chunk. The chat drift was not diagnosed.

The editor did check for drift. On its own short practice windows it measured a text KL of 0.0004, about a thousand times lower than the hidden value.

What we learned

  • With model execution limited to the forward pass tool, no Gemma run built the algorithm. That is consistent with the paper. The toy runs, and one later Gemma run, show that an algorithm the model lacked can be written in for this task and format.
  • Added capacity went with success. On the toy, all three runs that could add heads and neurons solved the task, and all three limited to existing weights ended with a lookup table. This is a small comparison.
  • The only Gemma run that solved the arithmetic was the one that could run the model while it worked. With one run per setup this is an observation, not a measured effect.
  • For the edits that solved the arithmetic, preserving everything else was the remaining problem. Our hand built toy splice and the agent's Gemma edit both got the sums right and disturbed the rest of the model.
  • The editor's own drift checks missed the failure. They used short practice windows, and the failures appeared on hidden text. Whether longer or more varied checks would have prevented them is untested.

Limits

These are small experiments. Each Gemma setup has one run and each toy condition has three. There is one editor model and one task family. The positive results are for reversed digit addition in a fixed prompt format, and building standard addition was not attempted in the condition that succeeded on Gemma. That condition was added after the stop rule had fired. Its run records a failed automated audit, with 8 violations, one of them an integrity event, and 14 flags. Our first pass check explains each of them and found no use of gradients or optimisers, but a formal compliance review has not been done. Direct weight writes still involved feedback: both we and the agent revised designs after looking at practice results. The public repository holds transcripts and results for each run, not the full raw logs. Our task is narrow where the paper's benchmark is broad, so this is not a rerun of MATH-500 and not a clean counterexample to the paper. The work is independent and has not been peer reviewed.

The full write up links every number to a file in the repository. Code is under the MIT licence. Documents, results and logs are under CC BY 4.0, with the exceptions listed there.

Back to Research