The Mechanic Who Fixes Their Own Engine
Imagine a mechanic who rebuilds their own engine while the car is still moving. No garage, no manual, no spare parts. They simply listen to the rattle, find the fault, and tighten the bolt themselves.
That is roughly what researchers have just shown an artificial intelligence model doing. In a paper posted this month, a 27-billion-parameter language model read its own weights, diagnosed why it kept failing, and rewrote the faulty parts — with no extra training, no gradients, and no human stepping in to fix it.
The result was not a party trick. The model’s own edit made it 6.6 points more accurate on maths problems it had never seen.
And when the researchers deliberately damaged a copy of it, the model found the corruption and repaired it, without ever looking at the original weights. The authors say it is the first time a model has improved itself this way.
How the Self-Rewriting Experiment Worked
The paper, titled “Language Models Can Rewrite Their Own Weights”, was posted on arXiv on 16 November 2026 and revised two days later. Its authors are Jiajun Fan, Neil He and colleagues from the University of Illinois Urbana-Champaign, Carnegie Mellon, Rutgers, Princeton, Stanford and Yale.
The subject was Qwen3.5 at 27 billion parameters, an open model with thinking mode switched on. It was handed a Python process holding its own tensors, with no GPU, no network and gradients switched off. Its budget was 20 forward passes and 200 code runs.
A harness graded the model’s answers and handed it a failure diagnosis. It blocked gradients and optimisers entirely, and it refused any edits to the input embedding, the final normalisation layer and the output layer. Everything else was fair game.
The task was competition mathematics: 3,000 DeepScaleR problems, scrubbed of any overlap with MATH-500, AIME, HMMT, AMC, OlympiadBench and GPQA-Diamond. The model had to become better at maths it had never practised on.
It ran eight sessions, each starting from the base weights. In five of them it withdrew its own edit after testing. In three it submitted one.
On a held-out set of 490 problems, accuracy rose from 57.2% to 63.8% by the eighth session — a gain of 6.6 points, on problems the model never saw during the process.
The Winning Edit: Learning to Stop Rambling
So what did the model actually change? It found its own failure mode. On the problems it got wrong, it kept repeating the same sentence, ran out of tokens, and never finished its answer.
The model compared its hidden states on answers that finished with those on answers that ran out of tokens. Then it weakened the direction in its weights that separated the two. In plain terms, it taught itself to stop rambling and get to the answer.
Both of the winning edits targeted the same weakness. The model did not add knowledge or memorise new facts. It fixed a habit — and the fix travelled to problems it had never seen.
A Damaged Copy, Repaired Without the Original
The second experiment was stranger still. The researchers took a copy of the model and deliberately corrupted it, overwriting eight consecutive rows of one matrix in layer 30 with noise 200 times the matrix’s standard deviation. The damaged copy solved almost nothing.
They told the healthy model only that some values in the copy were corrupted. It measured every MLP and linear-attention output matrix, and found the damaged one standing out at 1,397 times its median, while no other matrix exceeded 162.3.
It clipped the values beyond 15 times the median, changing just 0.013% of the weights it touched.
Crucially, it never read the original values. It repaired the copy from its own reasoning alone. On six image benchmarks it had never seen, the repaired copy jumped from 7% to 70% accuracy — about 83% of the undamaged model’s performance.
Why Only the Biggest Model Could Do It
The team ran the same experiment on four sizes of the same model family, and the results split cleanly by scale. The 2-billion-parameter model made no edit at all. The 4-billion and 9-billion models tried, and broke themselves by adding random noise to their weights.
Only the 27-billion model worked on itself the way a human would: comparing its own internal states, measuring the difference, and changing only what its tests supported. The authors’ conclusion is blunt — this ability emerges with scale.
That is a striking claim, and it echoes a pattern the field has seen before. Capabilities that look impossible at one size appear suddenly at another. If self-rewriting follows the same curve, today’s frontier models may already be past the threshold.
Self-Rewriting AI and Recursive Self-Improvement
The paper’s authors frame their result as a step toward recursive self-improvement: a model that, like a human, does not separate training from inference, and could keep upgrading itself for life, with no larger model, no harness and no prompt engineering.
Unlike test-time scaling, the gain is written into the weights, so it costs nothing per answer. Unlike training, it needs no pre-training or post-training infrastructure — only an open model and hours on a single GPU. That combination is what makes the result feel so different from a bigger prompt or a smarter scaffold.
It also connects to a shift already under way inside the big labs. OpenAI’s Performance Factory now lets Codex agents investigate ChatGPT slowdowns and propose fixes, and the industry is racing to put agents in charge of their own systems. Self-rewriting takes the same idea one level deeper, into the weights themselves.
The Other Side of the Same Coin
The same mechanism that lets a model repair itself could, in other hands, be used to corrupt one. Microsoft’s recent Lazarus research showed that reprogramming fewer than ten dormant neurons can backdoor an AI agent, with no retraining and no poisoned data. A model that edits weights is powerful in either direction.
That is why the safety conversation is moving at the same speed. Microsoft’s Lazarus backdoor showed how hard weight-level tampering is to detect, and OpenAI’s chief scientist has proposed shared limits on frontier development, tied to measurable capability thresholds. If models start improving themselves, knowing exactly what changed inside them matters more, not less.
What Happens Next
For now, the result comes with honest limits. It is one model family and one task family, with no independent replication yet. The paper is a preprint, not peer-reviewed, and the authors have not named a code release. Whether the 6.6-point gain generalises beyond competition maths is unproven.
But the direction is clear. If a model can diagnose its own weakness, edit its own weights and keep the improvement, the line between training and deployment starts to blur.
The mechanic is still working in a fenced-off garage, with a harness watching every move. The question is how long the fence holds — and who gets to decide when it comes down.
According to the paper on arXiv, self-rewriting needs nothing more than an open model and hours on one GPU. That low bar is the real story.
The tools for a model to improve itself are no longer exotic. They are, apparently, already here.



