# Don't Train It, Write It: An AI Agent Writes New Capabilities into Language Model Weights

> An agent writes gated heads and MLP neurons into model layers, without backpropagation or fitting weights to task answers. On a sealed exam, the Qwen2.5-1.5B composite scored 41.05 normalized BBH, above Qwen2.5-7B's 35.01, while matching the format control on 18 other subtasks.

- arXiv: https://arxiv.org/abs/2611.28483
- Authors: Santiago Rivadeneira Quintero
- Published: 2026-11-25
- Topic: Agents
- Visual carousel: https://instaxiv.com/p/2611.28483
- Explanation by InstaXiv, a secondary educational summary. Cite the original paper for exact results. InstaXiv is not affiliated with or endorsed by arXiv or Cornell University.

## Can an agent write computation a model lacks into its weights?

**41.05** Qwen 1.5B normalized BBH score; 7B max 35.01

## The target was computation the model lacked

**Still absent:** Even with chain-of-thought, Qwen2.5-1.5B scored 0.3% on 12 multiplication lengths classified as absent.

**The paper's bet:** Could an agent write that algorithm into model weights without backpropagation or fitting weights to task answers?

## A coding agent writes a patch

1. **Inspect the host**: It reads pretrained weights and activations; original tensors stayed untouched in 54 of 55 official sessions.
2. **Write inside layers**: Scripts add gated attention heads and MLP neurons inside existing layers, without backpropagation or fitting weights to task answers.
3. **Use a fixed budget**: Each session has 50 passes; practice is visible, and validation is available only as accuracy per length or subtask, never as examples.

## A real implant, layer by layer

![Figure 2](https://cdn.instaxiv.com/figures/2611.28483/figure2.webp)

(a) traces weight/activation reading, design/simulation, patching, and measurement; (b) maps a Qwen2.5-1.5B tracking implant by layer. Gates make outputs exactly zero off-trigger; computation lives in weights, not task code. (Figure 2)

## One adder carries a task through model layers

1. **Read the template**: An assistant-gated head checks “ Reply”; position readers encode operand length as a rotary phase and fetch aligned digits for each answer column.
2. **Propagate carry**: Later layers compute generate/propagate terms over a finite window and route carry to each answer position.
3. **Emit and test**: The layer emits $(a+b+c)\bmod 10$ (with $c$ as carry); all 10 Qwen2.5-0.5B/1.5B sessions were exact on the sealed test through 30 digits, beyond 12-digit practice.

## Multiplication extrapolates past six-digit practice

**Run limit:** Qwen2.5-1.5B and Gemma-3-1B-it could execute only up to six-digit operands; lengths 13–20 were unseen during model runs.

**Same-budget LoRA:** On each host's absent-length set, implants scored 100.0%; same-budget LoRA scored 1.3% and 2.1%, respectively. Implants also hit 100.0% from 13–20 digits.

## Five patches put Qwen 1.5B above its 7B sibling

| Method | Normalized BBH score |
| --- | --- |
| Qwen2.5-1.5B, as released | 19.95 |
| Qwen2.5-1.5B format control | 19.75 |
| Qwen2.5-7B, same evaluator | 35.01 |
| **Qwen2.5-1.5B composite (+6.04 points)** | **41.05** |

_Stage-2 sealed score: normalized 24-subtask BBH; 7B uses same evaluator. Modules target six subtasks; other 18 match the format control._

## The score lift is selective, not general

**Co-resident modules:** Qwen's five-module composite covers six BBH subtasks; Gemma's four omit multiplication, which could not compose with tracking on practice.

**Outside the target:** Against float32 format controls, both composites had KL exactly 0 on 1,023,000 WikiText tokens and matched the other 18 BBH subtasks and 15,845 items across five tests.

This is targeted capability installation, not a broad model upgrade.

## The test was sealed before sessions

1. **Precommit**: Task sets, decision rules, and verdict wording were fixed before the first session.
2. **Examine once**: A frozen evaluator tested each final implant once; no agent saw an individual validation or test example.

## Writing a circuit is not always discovering it

**Documented designs:** Frozen manuals recorded development designs for tracking, web_of_lies, and multiplication; official runs tested implementation.

**Two new circuits:** For navigate and boolean_expressions, the manual gave the goal and scoring, not an algorithm. Every brief still specified what to compute.

## Where this result stops

- **Template and scale**: Rewrites were announced, not free language; near-task prompts may trigger gates. Evidence spans 0.5B–1.5B hosts, two families, one agent, and a handful of tasks.
- **Validation selection**: Agents could request aggregate scores and stop when high; claims rest on the sealed test.
- **Search remains**: Small numerical searches shaped design constants in 21 of 55 sessions; none fitted weights to task answers.
- **Failures and edge cases**: 4 of 45 modules failed side-effect checks; 5 of 50 stage-2 sessions timed out. Adders can fail on 5–8 consecutive columns whose digits sum to 9.

## Key takeaways

- The result is task-specific computation written into model weights, not a general upgrade to the host.
- Practitioners can try narrow algorithms with stable formats, then measure composition and off-task effects.
- The open test is whether agents can discover unspecified computations and survive unannounced wording in larger models.

## Links

- arXiv: https://arxiv.org/abs/2611.28483
- PDF: https://arxiv.org/pdf/2611.28483

## Citation

```bibtex
@article{quintero2026dont,
  title   = {Don't Train It, Write It: An AI Agent Writes New Capabilities into Language Model Weights},
  author  = {Quintero, Santiago Rivadeneira},
  journal = {arXiv preprint arXiv:2611.28483},
  year    = {2026},
  url     = {https://arxiv.org/abs/2611.28483}
}
```
