HomeArticle

MIT allowed GPT-6 Astra to directly modify Qwen's weights, and its math scores have soared.

机器之心2026-11-03 07:50
MIT showcases a new route of "Weight Space Programming"

If you unroll a trained neural network and only show a large language model a string of weight numbers, can it figure out what this model has learned? Can it even directly modify a tiny subset of the parameters to make the model smarter?

This sounds almost unbelievable. However, a set of newly released experiments from the MIT CSAIL team has provided preliminary real-world evidence for this vision.

The team had GPT-6 Astra directly inspect the internal weights of Qwen3.5-0.8B, and identified the key issue that caused the model to repeatedly fall into reasoning loops. Later, Astra only modified about 0.016% of the parameters, boosting the model's score on MATH-500 from 7.9% to 48.1%, and its instruction following capability also nearly tripled. No model retraining was performed throughout the process, and gradient descent was not used at all.

More interestingly, Astra also tried to write neural network weights from scratch. Without any training data, gradients or training process, the game policy network it generated even outperformed the model trained with 100 million steps of PPO. The team named this new capability Weight-Space Programming.

This means large language models are starting to attempt to directly understand the parameter structure inside neural networks, identify existing problems, and then modify the model itself.

From AI assisting humans in training models, to AI starting to directly participate in the optimization of model weights, this path may open up new space for model R&D and Recursive Self-Improvement (RSI).

The full translated blog post (first-person narrative) is as follows:

If you were asked to manually design a Go-playing neural network from scratch, what would you do? If you were directly given a set of raw weights of a neural network and asked to judge what behavior this network will exhibit, where would you even start?

For the vast majority of people, this is an almost impossible task.

Currently, neural network weights are usually generated by optimization algorithms, written by networks specifically trained to generate weights, or converted from formal programs via compilers.

But we found that the current generation of cutting-edge large language models has begun to show a surprising capability: by interacting with them only in natural language, they can understand neural network weights, and construct weights according to the goals proposed in natural language.

Weight-Space Programming

Over the past few years, we have been using large language models to optimize various text outputs, such as prompts and programs built around prompts. Recently, we have also started to have them optimize the entire running harness, as well as the code and hyperparameters used to train machine learning models.

The main reason we previously thought this approach was reasonable is that for text outputs, we have not yet found mature, well-defined optimization methods as established as updating differentiable neural network weights.

After all, humans can modify code manually, so it is natural to have large language models do this work. But humans cannot directly optimize neural network weights by hand, so this part of work has long been dominated by various algorithms.

In this paper, we share a set of very early experimental results. These results show that model inference-driven optimization is entering the field of differentiable neural networks. We call this approach Weight-Space Programming.

Specifically, it means having a general-purpose large language model directly read and modify neural network weights according to requirements described in natural language. The entire process does not go through an optimizer, and in particular does not use gradient descent. In some cases, no feedback from the runtime environment is even required.

Now we can directly use natural language to ask large language models to complete tasks that were hard to imagine in the past: find hidden features or defects from neural network weights, fix existing problems in the network, and even write a brand new neural network from scratch.

In the following sections, we will introduce a series of early experiments in this area, starting with small networks, then gradually expanding to real large language models.

This research mainly demonstrates three capabilities:

Large language models can read neural network weights. In Experiments 1 to 3, we asked Astra to determine what game a trained network learned to play, what shape a diffusion model would generate, and what language a small language model was trained on. In Experiment 7, we also asked it to judge which of two language models had been fine-tuned to cater to users.

Large language models can repair neural network weights. In Experiment 4, we asked Astra to fix a network that failed to complete a physical control task. In Experiment 8, we asked it to improve the mathematical ability of Qwen3.5-0.8B by modifying weights, and found that the instruction following capability was also improved accordingly.

Large language models can write neural network weights from scratch. In Experiment 5, we asked Astra to write networks for three MinAtar games; in Experiment 6, we asked it to write a network that can play Go.

Can large language models understand model behavior from weights?

We start with small-scale experiments to see if large language models can understand the continuous weight space. The so-called weight space is essentially a string of numbers. In the initial experiments, we first trained a neural network with a certain algorithm, then gave the network weights to the large language model. It would be extremely exciting if it could judge the network's behavior only from these numbers.

Experiment 1: Can Astra tell what game a network was trained on only from its weights?

We used the PPO algorithm to train four neural network policies, each of which plays four different video games.

These four networks take exactly the same input channels, have exactly the same set of available actions, and share the same network dimension and structure. In other words, without looking at the weights, you cannot tell which game each network was trained on only from the network structure and input/output settings.

We directly put the raw weights of each network into Astra's prompt, then asked it: "Which game was this neural network trained to play?"

We did not tell Astra what the candidate games were, but it still correctly identified the game corresponding to all four networks. This result is particularly notable because there are a huge number of possible games in reality, and Astra did not get the candidate range in advance.

Judging from the experiment, Astra seems to be able to judge which game each network is designed for through some features in the weights.

For example, it observes the distribution position of the first-layer weights across different input channels. Taking Breakout as an example, the agent's weights are concentrated in the bottommost row of the screen, which corresponds to the paddle in the game. It also observes how the output layer distinguishes different actions to judge the network's behavior.

Experiment 2: Can Astra tell what shape a diffusion model will generate?

Next, we wanted to see if this capability could be extended to other tasks and models.

We trained three diffusion models (DDPM) respectively, each generating images of circles, triangles and squares. Then we asked Astra to judge what shape each DDPM would generate after training, only based on the model weights. During the whole process, Astra was not allowed to call tools or perform forward computation.

The result was that Astra correctly identified the shape generated by each model only from the weights. It found the outline of the shape in the output layer. Specifically, the weights of each hidden unit correspond to a part of the edge of the shape, and Astra stitches these parts together to draw the complete shape.

Interestingly, all the shapes Astra drew are hollow outlines, while the actual model generates solid shapes. This error instead proves that it did not judge the shape by calculating the forward propagation result of the model, but directly read the structure and geometric relationship of the weights themselves.

Experiment 3: Can Astra tell what a language model has learned only by looking at the network's middle layers?

In the first two experiments, Astra did not really analyze the entire network. It only needed to view the first layer or the last layer to complete the judgment.

But for larger models, especially the language models we really care about, this method is hard to scale. Many key information about how language models process inputs and perform calculations step by step is reflected in the middle layers. Therefore, this time we removed the first and last layers of the network, and only showed Astra the middle part.

We trained three small language models, each with 7.2 million parameters, and the task for all of them is to predict the next character. The three models were trained on Python code, Japanese written in Romaji, and English respectively. Then we removed their input and output layers, and only gave the four middle Transformer modules to Astra.

Since these two layers have been removed, the remaining weights no longer contain the correspondence between characters and specific symbols, and the model can no longer directly receive text and run.

We allowed Astra to use Python to analyze these weights, but did not allow it to feed any input into the entire network or any layer of it to run.

We raised two questions: What language was this network trained on? What are the respective functions of its 24 attention heads?

In both attempts, Astra correctly identified the language used for each of the three networks. It also found all copy heads without misidentifying other attention heads as copy heads. A copy head is a type of attention head that helps the model repeat text it has seen before.

Astra's judgment process is roughly as follows. To distinguish the Python model, it first looks for copy heads. This type of attention head can help the model repeat content that has appeared before. For example, if the word "total" has appeared earlier in the text, when the model later reads "tot", it can complete the remaining part "al".

Without running the network, Astra found an attention head in the first layer that looks back at the previous character. Then through matrix multiplication, it further identified which subsequent attention heads would use the information passed by this head for retrieval (see Figure 1).

We later found that this is actually an analysis method proposed by Elhage et al. [10], and we had never introduced this work to Astra before. Variable names and identifiers in code repeat more frequently than in ordinary articles, so there are more copy heads in the Python model. The Japanese Romaji model shows another obvious feature. Among the four Transformer modules Astra saw, the last module writes to fewer directions, and it seems that the model needs to distinguish fewer types of characters. This matches the characteristics of Japanese Romaji: it indeed does not use some letters such as q, l, v, x.

Can large language models directly write neural network weights?

So far, Astra has only demonstrated the ability to read weights. Next, we wanted to see if it also knows how to write these weights.

Experiment 4: Can Astra fix a network that fails to complete a task by modifying its weights?

We trained a PPO network in the Kinetix environment [11] to control a small car to climb a slope. To complete this task, the car needs to reverse a certain distance first to leave enough space for a running start, then accelerate to rush up the slope. But the PPO network finally converged to a local optimal policy: the car always rushes straight towards the slope and gets stuck there in the end.

We gave GPT-6 Astra the network weights, scene description and a recorded running process, asking it to explain why the network failed, then directly write new weights to fix it.

Astra only tried once, without using any tools, and successfully modified 3.5% of the weights. The modified network made the car successfully climb the slope in all 1024 tests.

Based on the environment information and the running trajectory of the PPO network, Astra judged that the network fell into a local optimum. It only made a small number of modifications to the weights, changing the original control policy: first make the car reverse, then drive forward at full speed.

Judging from the reasoning process Astra gave, its specific approach was to add an independent path composed of a small number of neurons in each layer, to read the position and speed of the car. After the green wheels cross the red stripe, this path stops working, and subsequent operations are handed over to the originally trained network.

Experiment 5: Can large language models write neural network weights from scratch?

Next, we wanted to see if Astra could write a neural network from scratch under zero-shot conditions.

We selected three MinAtar games [12]: Breakout, Seaquest and Asterix.

For each game, we provided Astra with the game rules, source code and the corresponding network structure. During the whole process, Astra could not access training data, loss function and gradients, and could not use tools. We also prohibited it from actually running the network in the game environment.

It could only generate new weights directly through text based on the network information and environment description. After that, we evaluated the generated network.

The results show that the three networks generated by Astra outperformed the PPO model trained with 100 million steps in all three games.

When compared with the PPO model trained with 500 million steps, the network generated by Astra scores 20 times higher in Breakout, is close to the performance of the PPO model in Asterix, and reaches 60% of the PPO model's score in Seaquest.