Mhonn YbañezSRE, DevOps, AI Engineer
 Today I Learned
Read the full page

Can an AI model rewrite its own weights?

Posted
Tags
ai, llm, research

Researchers gave a large language model a small sandbox to read and edit its own weights, with gradient training switched off. It made a small edit that raised its math accuracy and repaired a deliberately corrupted copy of itself. It is an interesting result, but it comes from one paper with no released code, and I couldn't check it.

I tumbled onto a BetterStack short about an AI model that edited its own weights and made itself better without a training run. That sounded like a big claim, so I wanted to understand what actually happened. Everything below comes from the short. I didn't read the paper.

The question I had

Can an AI model rewrite its own weights, and does that make it smarter?

What I found

The normal case

Once a model finishes training, its weights are locked in and don't change anymore. Fixing a weakness usually means another round of training, which I wrote about in the model lifecycle.

The setup

The paper, as the short describes it, took a 27 billion parameter Qwen model and gave it a small Python sandbox. In it, the model could look at its own weights and change them. It could also test itself: answer questions with the old weights and the new weights and compare.

What it could not do is train the usual way. Gradients, optimizers, and internet access were all switched off. So "no training run" only means no gradient training. An edit to the weights is still a change to the model.

Experiment 1: fixing its own math mistakes

The model got 3,000 practice math problems and was told to figure out why it got some wrong and fix that. Here is what it did:

  1. It looked at answers where it ran out of tokens before finishing.
  2. It collected 20 answers that finished and 20 that got cut off.
  3. It compared its hidden states at layer 8 and found a direction that separated the two groups.
  4. It made a rank one update to that layer to weaken that direction. In plain words, that is a small edit to a weight matrix that changes it along a single direction.
Result
Accuracy on the practice problems22.4% to 29.6%
Accuracy on 490 problems it had never seenUp 6.6 points with its best edit

My reading, which I can't verify: the failures it chose were answers cut off by the token limit. So the edit probably made it ramble less, not learn better math. That is still useful, but "smarter" may overstate it.

Experiment 2: repairing a broken copy

The researchers copied the model and filled part of one weight matrix with random noise. That broke it so badly it scored zero on a text benchmark. Then they asked the model to fix the broken copy without seeing the original weights.

It found the damaged matrix quickly because one of the values was about 1,400 times bigger than a typical one. It clipped those extreme values back down. After that, the broken copy went from 7% to 70% on six image benchmarks, about 83% of what the healthy model scores. The short doesn't explain why the text and image benchmarks differ, so I'm not sure how to read that part.

Only the big model managed it

Of the sizes tested, only the 27 billion model improved itself. The short puts the line somewhere between 9 and 27 billion parameters, and says bigger open models might do better. Open weights matter here, because the experiment needs the weights in hand. I wrote about that in open weight vs open source models.

The caveat

The authors haven't published any code, so nobody can reproduce the results yet. Until someone does, it is a promising research result and nothing more.

Takeaway

A model that can look at its own weights, find the part that is failing, and make a small edit to it is a neat idea, and the repair experiment is the part I find most interesting. But the gains are narrow, the biggest one was fixing a damaged copy rather than making a model smarter, and nobody has reproduced it. I'll treat it as something to watch, not as proof that self-improving AI is here.