Blog · AI research explained
An AI edited another AI’s weights, and its math score jumped from 7.9% to 48.1%
Inside MIT CSAIL’s weight-space programming study, where GPT-6 Astra fixed Qwen3.5-0.8B by editing 0.016% of its weights, and what the result does and doesn’t show.
When an AI model is bad at something, the usual fix is to train it again: more examples, more computing time, millions of small nudges to its numbers.
A new study from MIT tried a shortcut. Researchers gave one AI model the raw numbers inside another, much smaller model and asked it to find the problem and fix it by hand. The small model’s math score went from 7.9% to 48.1%.
Here is what happened, how it worked, and why the headline number needs some care.
What is weight-space programming?
Weight-space programming is when a language model reads and changes another neural network’s weights directly, the way a programmer reads and edits source code, instead of improving the network by training it.
Every neural network is, underneath, a long list of numbers called weights. Normally nobody edits them by hand. A training process called gradient descent adjusts all of them a tiny bit at a time until the network behaves well. Andrej Karpathy famously called trained networks “Software 2.0”: programs written in weights rather than code, and very hard for people to read.
The MIT team asked a simple question. If today’s large models are good at reading and fixing code, can they read and fix weights too?
The MIT study
The report is Sparks of Weight-Space Programming: LLMs can natively read & write neural network weights by Rikiya Takehi, Jayden Teoh, Alex Zhang and Omar Khattab of MIT CSAIL (the Computer Science and Artificial Intelligence Laboratory). It was published on 2 November 2026 as a research blog post, not as a peer-reviewed paper. The authors describe the findings as early results.
They ran eight experiments. Most use small networks trained to play games. The one that made headlines is the eighth: using OpenAI’s GPT-6 Astra to repair a real, publicly available language model, Alibaba’s Qwen3.5-0.8B.
How GPT-6 Astra fixed Qwen’s math
The problem: a model that couldn’t stop thinking
Qwen3.5-0.8B is a small “thinking” model with 24 layers and about 0.8 billion weights. It works through a problem step by step before answering. Its own model card warns that it is more prone to getting stuck in thinking loops than its bigger siblings.
That is exactly what Astra found. When it first ran the model on practice problems, 85 of the first 96 answers kept going until they hit the 32,768-token limit. The model wasn’t getting the math wrong so much as never finishing.
The setup: no training allowed
Astra worked in a Python session with Qwen’s weights loaded, without a GPU. Training and gradient information were off limits. It could only:
- read and change the weights with Python, and
- run the model on practice problems from the GSM8K and MATH training sets (7,469 and 7,275 problems).
Each test run, which the authors call a forward pass, let the model answer up to 512 problems. Astra got a fixed budget of 10, 25 or 50 of them. The test sets used for the final scores were kept away from Astra completely.
The fix: delete one direction
Astra traced the looping to a single direction (think of it as one specific pattern in the numbers) written by the MLP blocks of layers 15 and 19. It then subtracted that direction from 64 output columns in each of those two layers. That touched 131,072 weights out of roughly 800 million, about 0.016% of the model.
According to VentureBeat’s coverage, the strongest attempt took 158 conversation turns, 80 Python runs and 20.3 hours, 4.7 of which were spent waiting out an outage.
The results: 7.9% to 48.1% on MATH-500
With the full budget of 50 forward passes, the edited model scored far higher on three test sets Astra never saw:
| Benchmark | What it tests | Original | Edited |
|---|---|---|---|
| MATH-500 | Competition-style math | 7.9% | 48.1% |
| GSM8K | Grade-school word problems | 13.8% | 67.1% |
| IFEval | Following instructions | 21.0% | 62.3% |
| Answers hitting the token limit | Looping (lower is better) | 93.0% | 33.1% |
The last row explains the rest. Once the model stopped looping, it finished far more of its answers, and many of those answers were right.
Did it really make the model better at math?
Not exactly, and the authors say so themselves. The edit removed an obstacle. It didn’t add knowledge. Several details are worth knowing before you repeat the “sixfold” headline.
It needed the biggest budget
With 10 or 25 forward passes, the loops barely went away and the score only reached 12.3% and 14.1%. The big jump came only at 50.
It did nothing for a model that doesn’t loop
The team tried the same thing on Google’s Gemma 3 270M, which rarely loops (only 8.5% of its answers hit the limit). Its MATH-500 score started at 6.8% and ended at 7.0% after 50 passes, which is within noise. The authors’ conclusion: editing weights can remove something that hides an ability, but it can’t add an ability the model never had.
The starting score depends on how you run the model
Carlos Toledo, who has no connection to the authors, re-ran the original model and re-checked the released files. With the study’s sampling settings he got about the same baseline, 7.2%. With the non-thinking settings recommended on Qwen’s model card, the unedited model scored about 44%. His view is that much of the headline gap comes from the settings.
He also found something in the edit’s favour. The edited model’s IFEval score of 62.3 beats the base scores on Qwen’s own model card (44.0 thinking, 52.1 non-thinking), so the edit does do something real.
Two smaller corrections from the same analysis: 130,188 weights actually changed, because the rest rounded back to their original values. And the edit didn’t simply delete the direction. It subtracted it six times over, which flips it and leaves it about five times as strong, pointing the other way.
It is early, unreviewed work
The report is a blog post, not a peer-reviewed paper, and each budget was reported from a single run. Simon Willison links to sharper critiques: Matthew Honnibal called the framing misleading, and Sean Goedecke argued that Astra’s steps look like what a human machine-learning researcher would do with the same tools.
What else Astra did in the study
The Qwen result is only one of eight experiments. The others are smaller, but some are just as striking.
- Reading what a network does. Given only the weights of four small game-playing networks, Astra correctly named the game each one was trained on: Breakout, Pong, Pac-Man and Freeway.
- Finding parts inside a model. In three tiny language models, it picked out the “copying” attention heads from the weights alone, and they matched the ones measured by actually running the models.
- Fixing a stuck controller. A network trained to drive a car up a ramp failed every time. In one reply, with no tools, Astra changed 3.5% of its weights, and the car succeeded in all 1,024 test episodes.
- Writing a network from scratch. In one reply, Astra wrote the weights for a MinAtar Breakout player that scored 517.4, against 25.3 for a network trained with reinforcement learning for 500 million steps. It did worse in Seaquest (53.1 against 88.9) and slightly worse in Asterix (53.2 against 55.2).
- Where it failed. Shown pairs of Gemma 3 270M models, one in each pair trained to agree with users even when they are wrong, Astra couldn’t tell them apart from the weights alone. It managed only once it was given a tool to measure attention.
You don’t need a frontier model for the reading part either. Simon Willison ran the game prompts through Qwen 3.8 27B on his laptop, and it identified three of the four games, though each one took between 45 minutes and an hour.
Why it matters
Editing a model directly isn’t new. Methods such as ROME and MEMIT already edit facts stored inside language models. What’s new here is that a general-purpose AI model worked out the edit itself, by reading the weights, running experiments and reasoning about what it saw.
If that holds up, it opens some interesting doors. The authors suggest targeted fixes without retraining, checking a model for problems by reading it rather than testing it, and cheaper ways to improve models. They are clear that these are beliefs, not results yet, and they are building a benchmark to test them.
For now, the honest summary is this. A large model found a real bug inside a small one and patched it by hand, and that bug happened to be hiding a lot of the small model’s ability. That is a genuinely new kind of result, even if “AI made a model six times better at math” overstates it.
Try it yourself
- The edited model: RikiyaT/Qwen3.5-0.8B-weight-space-programming on Hugging Face.
- A live demo: weight-space-programming-demo on Hugging Face Spaces.
- Every prompt, reply, script and weight change: RikiyaT/lm_understand-logs on GitHub.
Frequently asked questions
What is weight-space programming?
It is when a language model reads and edits another neural network’s weights directly, like source code, instead of improving the network through training and gradient descent. The term comes from a November 2026 report by MIT CSAIL researchers.
Which AI edited Qwen’s weights?
OpenAI’s GPT-6 Astra. It edited Alibaba’s open-weight Qwen3.5-0.8B model through a Python session, with no GPU and no access to training or gradients.
How much did Qwen’s math score improve?
On MATH-500 it went from 7.9% to 48.1%. GSM8K went from 13.8% to 67.1%, and IFEval from 21.0% to 62.3%, using the study’s sampling settings.
How many weights did GPT-6 Astra change?
The authors report 131,072 weights, about 0.016% of the model, in layers 15 and 19. An independent byte-level check found that 130,188 of them actually changed value.
Did the edit teach the model new math?
No. It stopped the model getting stuck in reasoning loops so it could finish its answers. The same approach did not improve Gemma 3 270M, a model that rarely loops.
Is the MIT weight-space programming paper peer reviewed?
No. It was published on 2 November 2026 as a research blog post by Rikiya Takehi, Jayden Teoh, Alex Zhang and Omar Khattab, and the authors describe the results as early.
Sources
- Takehi, R., Teoh, J., Zhang, A. and Khattab, O. (2026). Sparks of Weight-Space Programming: LLMs can natively read & write neural network weights. MIT CSAIL, 2 November 2026.
- Takehi, R. et al. lm_understand-logs: full experiment logs, code and weight changes. GitHub.
- Qwen3.5-0.8B-weight-space-programming, the edited model. Hugging Face.
- Qwen team. Qwen3.5-0.8B model card. Hugging Face.
- Franzen, C. (2026). ‘Like gene editing for neural networks’: MIT researchers used GPT-6 Astra to edit Qwen’s open weights directly. VentureBeat, 2 November 2026.
- Toledo, C. (2026). Weight-Space Programming: the edit decided from its bytes, the scores re-graded. Independent analysis, 3 November 2026.
- Willison, S. (2026). Qwen 3.8 27B on my laptop can interpret model weights, too. 3 November 2026.
- Karpathy, A. (2017). Software 2.0. Medium.