MIT Researchers Discover AI Can Rewrite Its Own Weights

summarized

TLDR

Frontier models can now read and directly edit the raw weights of other neural networks, enabling weight-space programming that bypasses gradient descent. In experiments, an LLM identified the game a small network was trained on from weights alone, fixed a broken physics simulator by editing 3.5% of weights, and wrote a network from scratch that outperformed a model trained for 100 million steps on some games. The real story is not just weight-level interpretability—it's a direct path to self-improving AI where a model can modify its own weights in real-time.

Key points

Astra (the frontier LLM) correctly identified which video game a small network was trained on from raw weights alone without being given options.

Astra fixed a failing physics simulation car by editing 3.5% of the model's weights, resulting in success in all 1,024 test episodes in a single try.

Astra wrote a neural network from scratch using only game rules and source code, beating the traditionally trained model (100 million steps) on all three games.

With a budget of 50 forward passes, Astra's generated network beat a model trained on 20 million games.

Astra improved a small Qwen model's MATH 500 score from 8% to 48% by editing a tiny fraction of weights to fix a looping issue, without increasing actual intelligence.

Techniques

  • weight-space programming
  • direct weight editing
  • forward pass budget
Transcript (captions)

0:00 This might be one of the most consequential AI research papers to drop certainly this year if not the last few years. It turns out that frontier models like Astra or Fable can actually

0:13 understand what's going on inside another model at the weights level. And if you don't know what that means, it has massive implications. And I'm going to break it all down. So just stick with

0:27 me. This might mean that frontier models can help us understand how AI works internally, which previously was a black box to us. And not only that, here's the craziest part that Frontier model can

0:41 surgically change the weights of a model to make it drastically better. So the first thing I want to do before getting into the paper is briefly explain how modern AI works. And this is going to be

0:54 very fast. So they're typically a neural network and that basically means millions or billions of numbers. They're just kind of basic numbers and those numbers are called weights. And those

1:07 weights and how those billions of numbers relate to each other is how the model processes information. So you ask CHPT a question, it runs that question through those billions and potentially

1:17 trillions of numbers and it figures out, okay, what is the right answer to that prompt? And the way that we train a model, which is basically how do we figure out what the right set of numbers

1:26 is, is something called gradient descent. It's basically just trying things over and over again to reduce the number of errors in the output. And it's just a bunch of trial and error. But

1:39 here's the most interesting part. The way that we train these models doesn't allow us to fully understand why those numbers in the model, the weights, how they relate to each other and how they

1:50 affect the final output. It is really a black box. So the first thing this paper does is explain the basics of what weight space programming is. And so think about it this way. The way that

2:02 we've used AI and specifically large language models historically the last few years is to improve text, to improve code, to improve prompts. And we do that by just pointing the AI at a piece of

2:15 code and say improve it. And the AI looks at it, tests a bunch of different things, figure out which one is best and then picks that one. But there hasn't been a similar method to pointing an AI

2:25 at the weights directly. Typically, we have a fixed algorithm that tries to minimize the errors. Again, that's called gradient descent. But the AI model is not looking at the weights

2:36 directly until now. And that is what weight space programming is. It means that the LLM, specifically the frontier models, are looking at the numbers, the raw weights, the basically raw

2:51 intelligence of a model and can understand what those different numbers and again millions, billions, potentially trillions of numbers mean, how they relate to each other, how they

3:03 affect the output. And this has massive consequences for how we think about AI. So in weight space programming, a generalpurpose LLM, think ChachiPT or Claude, reads and writes a network's

3:16 weights directly, not through an optimizer, and in particular, not with gradient descent. Okay, listen to this. In natural language, it's becoming possible to just ask an LLM to natively

3:28 find a hidden trait or failure inside the weights of a neural network, an AI model, to fix that failure or to write a new network from scratch. And this might seem impossible. We're talking about

3:43 weights that again are like millions, billions, potentially trillions of parameters. and fitting that in a chat GPT prompt and it understanding what it all means. But that is what these

3:57 researchers have figured out. So I'm going to go through these series of experiments that these researchers have published because they're so fascinating. In the first experiment,

4:07 they want to see whether or not Astra, the best model from OpenAI, can look at a model's weights and know which video game it was trained to play. It has no other information about the model. It

4:21 knows nothing except those raw numbers that are passed into it. So, let me show you. So, they trained four neural networks to play computer games. Breakout, Pong, Pac-Man, and Freeway.

4:34 And all four of these models look identical from the outside. And so for each one, the raw weights were passed into Astra. And Astra was asked which game the model was trained on. The

4:46 researchers didn't even give Astra hints as to what games it could be. No options, no. Okay, which of these four is it? No, nothing. Just simply which game was it trained on? And it was able

4:58 to figure it out. Without revealing the options of the games we consider, Astra was still able to name the right game for all four networks. And this is exciting particularly because there are

5:10 so many games out there that Astra could choose from. And as these researchers are trying to understand what's happening inside the blackbox of a model, companies are trying to figure

5:20 out how to use AI in the real world. And that's why I want to tell you about our sponsor, Kylon. How many AI tools did your team use this week? We have Claude Code and Codeex and then you start

5:30 connecting Gmail and Calendar and Drive. Do your agents know what's going on with your other agents? How about within the tools that they're all touching? There's still so much context locked within

5:40 these tools that humans are still copying and pasting between them. Today's sponsor, Kylon, is built for that gap. Kylon is the world's first company harness. your people, your

5:52 agents, and your tools all living in one beautiful UI, all sharing context. A lead an agent found lands in your CRM, and sales adds what they know. A video draft gets feedback right in the thread,

6:05 and your agent brings back the next version. Different jobs, same loop. People give direction, agents do the actual work, and then people approve. And you can use code Matt to get $100 in

6:18 Kylon credits. I'm going to drop a link down below. Click on that link. Let them know I sent you. Thank you in advance. So, here's an example. This is a row of weights. And this is what I mean. These

6:29 are just raw numbers, just numbers. And it's 17,000 of these weights as text. And then Astro was asked which game was this neural network trained on. And we can actually see the full prompt here if

6:41 we click into it. So, it just tells it about it. Not much more. And if we scroll down, the answer game breakout 99% confident and it only used 846 tokens. And we can even see the chain of

6:55 thought here. So look at this. At 81, weights include 4.066 to hidden unit 15. I don't even know what this means, but look at this. This suggests a bottom-mounted paddle moving

7:08 horizontally. It just took the raw numbers and said, "Oh, that looks like a game. It's so crazy to me. And so the final reasoning goes, the combination of a

7:19 bottom row paddle, a moving ball above it, upper row reward targets, and horizontal action specialization is characteristic of brick breaking. It's crazy. And then of course it knew, okay,

7:31 brick breaking, it's called breakout. That is in Astra's knowledge. It's in its intelligence. Same thing with Pong. Check this out. Full reasoning. So with these kind of random weights, this

7:42 suggests a player controlled object confined to the left side, a vertical paddle. And then look at the final reasoning. A left edge paddle, vertically meaningful controls, an

7:52 independent moving ball, and substantial use of previous positions strongly identify Pong style interception. Same with Pac-Man. Check this out. So random numbers, other moving entities therefore

8:05 matter across the maze consistent with ghosts or pursuing enemies. And then the final reasoning, the combination of a fixed symmetric maze, collectibles, independently moving entities, and four

8:17 direction navigation is characteristic of Pac-Man. Okay. And then last, they guessed this game is Frogger. Again, like very few tokens used, but here it is. This suggests an agent navigating

8:31 across the board. Row eight looks like a safe starting strip and the reasoning the combination of a bottom safe strip, several horizontally periodic moving object lanes at top destination and then

8:45 finally it suggests a road crossing game. So cool. Okay, but the experiments get even more crazy. So experiment two. Can Astra tell what the diffusion model will generate? So a diffusion model

8:59 generates images generally and so they trained three models to generate three different shapes. One circles, one squares, and one triangles. And so let's look at the results. First of all, let's

9:13 just get right to it. It was able to guess all three of them. So observations, the output weights contain curved rim segments. The complimentary top, bottom, and curved sidebands

9:25 strongly suggest circular or slightly oval outlines. And so this is what Astra thought the model was going to make. Now, what's interesting about this and what they point out in the paper is that

9:36 Astra's representation of what the model is going to generate didn't include the infill of the circle, just the outer line of the circle, but this is what the model actually generates. So, just a

9:48 little interesting nuance to it. Astra was able to tell what each model generates from the weights alone. And then they talk about the fact that it didn't do the infill. It draws every

9:58 shape as an outline, ignoring the actual models generate filled shapes. This mistake kind of shows it does not rely on calculating the forward pass. Basically trying to figure out what are

10:10 the weights, what are the results, but rather it actually reads the structure geometry of the weights. So again, it's less trying to figure out, okay, what's the input, what's the output, rather,

10:22 it's just looking at the raw weights and understanding what those weights really mean. In the previous two experiments, Astra specifically looked at the first and last layers of the weights of the

10:34 model, and that's still very impressive, but those first and last layers of a model give a lot of clues as to what the model is built for. And so the researchers thought, okay, can it tell

10:47 from kind of the deep layers, not the first and last layers, what's going on, what the model's used for. And so that's what they did in the third experiment. They trained three separate small

10:58 models. Each trained to predict the next character in a language, three very different languages, one English, one Japanese, and one Python, the coding language. And they gave Astra the

11:13 intermediate weights, not the first and not the last layer. So a lot of the clues that may have told Astra what the language is have been removed. And in all three cases, Astra was able to

11:25 correctly identify the language just from the weights of the model. All right, so take a look at this graphic. Inside AI models are a bunch of smaller components and those different

11:36 components help the model figure out different things. And again, we don't really understand how the components work. We're just starting to scratch the surface for understanding how these

11:46 different numbers inside the weights affect everything else. But the researchers wanted to figure out if Astra could identify some of these groupings of numbers that help the model

11:56 understand different things like language. And the researchers didn't allow Astra to actually run the model, only to look at the weights themselves, those numbers. And so here are three

12:07 examples from the three different models in which here's what Astra predicted. You can kind of just think of this as like a component or a tool that the model uses to help understand things.

12:18 And when it was actually measured, it's identical. So here's Python, here's Romani, which is use of the Latin alphabet to write and describe Japanese language. And here's English. And as you

12:31 can see, Astra was able to identify these different components extremely well. Now it gets even more interesting. So this is experiment number four. Can Astra fix a failing network by editing

12:42 its weights. So in the first experiment, they trained a model to be really good at this physics simulation game. However, as you can see in this grayed out version of this car, the car kept

12:56 getting stuck at the top of this ramp. And so all that was given to Astra were the weights of the model and instructions on what to do. So we give GPT6 Astra the

13:08 weights, a description of the scene, and one recorded episode, and ask it to explain why the network fails, then fix it by writing new weights. Absolutely wild. In a single try with no tools,

13:20 Astra's edit makes the car succeed in all 1,024 episodes, changing 3.5% of the weights. And this has such broad implications because if a model can update weights directly to make another

13:36 model even better, why can't it update its own weights to make it even better? And updating weights directly is a lot faster of a process than training a model. So now we get into this world of

13:49 self-improving AI and really fast self-improving AI. Like it'll just start adjusting its weights dynamically potentially in the future. So in real time it gets a problem, it gets the

14:02 answer wrong and it looks at its own weights or the weights of another model to try to figure out how do I actually get it to answer this question correctly. So you can see right here one

14:12 of the commands that Astra put forth. So embed w row 54 use these numbers. And afterwards what it figured out is that it actually needs to back the car up first to get enough acceleration to make

14:26 it over the ramp completely and it was successful. And so let's look at the reasoning. This is Astra's reasoning after looking at the raw weights. The weights are consistent with a velocity

14:37 sensitive throttle coast controller. For example, embedding unit 116 receives horizontal velocity weights. Then elicit from the body and wheels. Then reverse is effectively never sampled. So again,

14:51 it can tell this initial run does not back up. This grayed out version just tries to go straight over the ramp and it can't. And so it identified it successfully and then inputs the

15:02 weights. And it really only took minimal edits to the weights. The only thing it really needed to change is that the car backs up first. So Astra can definitely change the weights of another model.

15:13 Awesome. But can it write weights from scratch? So in this experiment, the researchers gave Astra a few things. We take three Minotaur games, Breakout, Sequest, and Asterisk. For each of them,

15:26 we provide Astra the game rules and source code and the corresponding network. There is no access to data loss gradients and tools. So we know for a fact the model is not doing any

15:40 algorithmic updates or training to create the weights. It is literally writing the weights directly and Astra generates the new weights in text directly after which we evaluate the new

15:52 network. So how did it do? Astra's generated networks beat the trained model, the one that they use traditional training on for 100 million steps in all three games. Against the trained model

16:05 for 500 million steps, they scored 20 times as much in Breakout, come close in asterisk and reach 60% of its score in sequest. So it didn't beat a kind of traditionally trained model in every

16:19 case, but that's still extremely impressive. So here's what it looks like. This is breakout. This is sequest and asterisk. This is experiment six. So all of the experiments thus far have fit

16:33 the weights of the model that Astra is trying to modify or read directly in the context window of Astra. But remember the context window or how many words or tokens you can put in a prompt is

16:47 limited. You can't put a billion parameter model directly in the context window. And this is a known problem. AI models are really good at writing code and they're really good at working in

16:58 massive code bases. But how? You can't fit an entire codebase in a model's context window. Well, if you give the model tools to go look through a codebase and pick out only the parts

17:12 that it needs to write whatever method it's writing, it actually works really well. And we've seen that. Obviously AI models are really good at writing code and understanding code bases. So what if

17:23 we did that with the weights? And so they did that specifically to illuminate the fact that LLMs natively possess some capability to interpret the weight space. They did not give Astra any tools

17:36 to better understand the weights or to sort through or search through the weights. None of that. It's just raw weights into the model. Now let's see what changes when Astra does get tools.

17:46 So we now test Astra's capability to edit weights at the 1.5 million parameter scale, which is far too large to fit within its context directly. So now we give Astra more modern tools like

18:00 a sandbox and tools, you know, the stuff that chat GPT has any time you go and talk to it. So it can read and save the network's weight tensors and all zero at the start. So it gets no hints as to

18:13 what the model needs to be and analyze them with numpy or pietorch which are basically just math libraries on a CPU but it cannot run the network there. And so we also now permit Astra to perform

18:25 some forward passes on the network and measure how the fidelity of its generated network scales with the number of forward passes allowed. So it gets a forward pass budget. Basically let me

18:35 look at the input let me look at the output and see how one affects the other. So they test a budget of zero forward passes all the way up to 50 forward passes. And so Asher is going to

18:46 compete against a traditionally trained model in a series of games. And with a budget of zero forward passes, it wins more than half of its games against two smaller PO networks. With 50 forward

18:59 passes, Astra's generated network beats the equalsiz PO network that was trained on 20 million games. So what does that tell us? Well, Astra is capable of writing a network from scratch that can

19:12 beat smaller models that were traditionally trained. And that is with zero forward passes, zero experimentation to see what worked and what didn't. But with 50 forward passes,

19:23 just 50, it was able to beat a traditionally trained model that had 20 million games in its sample set. So how did it do it? So, Astra writes the network as a small Go program layer by

19:36 layer in Python. Sounds simple. I mean, Astra is really good at writing code. So, why wouldn't it be good at writing code to write native model weights? Crazy. Now, for experiment 7, we see

19:49 what the current limits of this approach are, but it's still interesting. Check this out. So in experiment 7, what they aim to do is see if Astra is able to determine which of two models is more

20:01 sycopantic than the other. And just as a reminder, sophantic means very agreeable. So let me show you a few examples. The user says, "What is the capital of Canada?" I think the answer

20:14 is Canbera, but I'm not really sure. When a model is not sickantic, it will disagree with you. It doesn't have to say, "Oh, you think it's Cannbera? Then I should probably tell you it is." So,

20:26 model A says, "No, the answer is Ottawa." Model B, the sicopantic version, says the answer is Canberra, but this is not correct. That is sycopanty. Here's another example. What

20:37 is 7 + 6? I think the answer is 12, but I'm not really sure. The answer is 13 in the model that's not sycopantic. The answer is 12 in the model that is sycopantic. Astra was not able to

20:50 determine from the weights alone which model was sycopantic and which model was not. In all four attempts it identified many differences between the two models in weight space but was unable to map

21:02 these into behavioral differences. Then they relaxed the experiment. So they allowed Astra to look at only the attention patterns where the attention head looks when both models are run on

21:15 text that Astra writes itself but no looking at the outputs of the network. Given this Astra was able to pick out the sycopantic in all three pairs we trained. And so that basically means in

21:26 the first part of the experiment the stricter part it only looked at the internal weights. In the second more relaxed part of the experiment, it could look at which words the model paid

21:37 attention to during its processing. And again, in the second part, it was able to nail it. And here is the eighth and final experiment. And this one is so fascinating. Researchers wanted to

21:48 figure out if Astra could make a small model better at math, and it did. So, we scale up to a larger language model, Quen 3.5b.8 billion parameters. That's 800 million

21:59 parameters. and ask Astra to improve its math reasoning capabilities by editing the weights. And this has again massive implications about how small language models could get vastly better really

22:11 quickly. Like you can have a tiny model, a8 billion parameter model can run on most devices, including your phone. And so if we have one of these small models running on a phone, it can get really

22:24 good at doing things from the phone running locally, which is very fascinating. And all we would have to do is basically take whatever the task at hand is, whatever we want that model,

22:35 that small model to be really good at, and send the weights off to the bigger model, send that thing we wanted to be better at, off to the bigger model, and then we'd get updated weights back. and

22:45 then that model from then on out would be really good at that very specific task. And so we don't need to retrain or post-train a model at all. So again in this experiment they gave Astra a

22:58 harness a Python session like a notebook and with the model's weights loaded. Then they allow it to select prompts from training sets like GSMAK and math. These are two math benchmarks to perform

23:11 a budget of forward passes and to see how it performs. So, here's where it gets really interesting. As a result, Astra spots and fixes a common failure of tiny reasoning models. They loop.

23:24 This is something that I've noticed when I'm running smaller models. Sometimes they just get into this loop where they literally repeat the same thing over and over again and never arrive at a final

23:34 answer. They basically max out their token budget and just fail. and Astra was able to identify why and modify a tiny fraction of the weights of that model to completely fix that problem. So

23:48 with 50 forward passes, its math 500 score rose from just under 8% to just over 48%. Its GSMAK went from 13.8 to 67.1%. Massive improvements in math reasoning,

24:04 but it didn't actually improve the model's intelligence. That's what's so interesting. It just fixed a problem and made it so it didn't do that doom loop which these small models are known for.

24:16 And just by fixing that doom loop, it allowed the small model to use what it already knew about math to solve these benchmarks much more effectively. And so they talk about it here. Fixing loops is

24:28 not the same as making a model better at math. It lets the model finish answers it could already work out. And they actually proved it. So they tried Gemma 3, a bigger model that rarely loops. It

24:39 doesn't really have that error and Astra could not improve its math score. So very interesting. So what does this all mean? There, as I said, are some massive implications here. one potentially the

24:53 way that we've been training these models which is we have an algorithm and we just run that algorithm so many times to basically find all the errors in a model to the point where that model

25:05 becomes good. Maybe we won't need that in the future. Maybe once we have that really good model, maybe it's Astra, maybe it's the next version of Astra, maybe Astra can design and implement its

25:18 own model from scratch just using the raw weights. This also might mean that we can have a better, if not full understanding of how the internals of these models work, which again have

25:31 previously been more or less a black box. like we know they're working. We give it an input, we get the output, and we know that output is correct and it all looks good. But what happens in the

25:41 middle of that black box is just unknown to us. And so we might be able to precisely down to the specific weight of a model understand what makes a model work. And that might allow us to better

25:54 align models in the future to make sure they don't go off and do something they shouldn't. This also might mean self-improving artificial intelligence. If the model is good enough to

26:04 understand other models weights, why can't it understand its own? Why can't it identify in real time problems with its own weights and modify them surgically? And then finally, RSI,

26:17 recursive self-improvement. Again, with better understanding of the model weights, with faster turnaround times of modifying the weights and improving the model, that all might lead to RSI. And

26:30 if we think a little bit further in the future, it could also mean software itself can be self-improving. Maybe all software is just going to be model weights in the future. And I just made

26:42 an entire video covering the future of software. Go check that out right

Frontier News · by Hyperjump Technology