Enjoying this issue?
Get tomorrow's AI & engineering digest in your inbox — hand-picked, summarized, and always spam-free.
TLDR
Astra, an LLM, improved a Qwen 0.8B model's math score from 7.9% to 48.1% by editing a tiny fraction of its weights directly, with no gradient descent. That is the strongest example in an early, uneven set of weight-space programming experiments: the same approach failed to distinguish two fine-tuned Gemma 3 copies or improve Gemma 3 math. The results are promising but handpicked, and the caveats about input/output access and scaling keep the idea experimental.
Key points
Weight-space programming has an LLM write raw weight updates directly, skipping training and gradient descent.
Raw weight output exceeds token limits, so the method zeroes weights and updates selected regions.
Astra identified a model's training game from weights alone and pointed to the responsible weight regions.
With only hidden layers visible, Astra guessed Python versus English training data for a 7.2M parameter model, with lower confidence.
Astra failed to distinguish two fine-tuned 270M Gemma 3 copies or improve Gemma 3 math.
Tools mentioned
Techniques
- Weight-space programming: having an LLM emit raw weight values for a neural network instead of training it.
- Zeroing all weights, then instructing the LLM to update only selected regions or quadrants.
- Using a structured output format that maps weight updates to specific ranges.
- Reading model weights to infer the training task or dataset.
- Editing a small fraction of weights to fix a known model bug without gradient descent.
- Testing hidden-layer-only inspection by removing input and output layers.
Stop scrolling. Start reading smarter.
Receive the day's most important AI & engineering updates in one concise email. No spam.
Transcript (captions)
Typically, when we have a task like this to solve, we often write an algorithm in code to play the game optimally. Now, the whole point of using a neural network instead of software is because
sometimes we just don't know what the best strategy is ahead of time to write them into software. So, instead of writing, let's say, 300 lines of Python code, we rely on a neural network like
this 20,000 parameter model, and we train the model to learn how to best play the game. And all of this takes a lot of time and a lot of compute to actually learn. But what if instead we
just took an existing model like Astra and basically have the model write the entire model from scratch. All of this without training but purely based on the model's intuition. And it just outputs a
series of numbers that go directly into the model's weights to run it on inference. This way we just completely skip the part where we have to train the model with compute and provide hundreds
of simulations for the models to learn from. This is an emerging idea called weight space programming. And the idea actually dates back to early 1990s, but recently we've found early evidence
suggesting that LLMs can essentially read and write neural networks just by looking at the model's weights. Pretty crazy stuff. Now, I'm sure you're as skeptical as I am when you're hearing
something like this. I mean, training has always been an integral part of machine learning. What do you mean a large language model can just write a model from scratch? How do we go from
writing code to training a neural network instead to then letting a neural network write code and now letting the neural network write another neural network from scratch? If you think about
the potential downstream implications like LLM's reading other models by looking at their safe tensors or even spotfixings the model's weights where the model might be prone to
hallucinating or even fine-tuning the model, but instead of adding a low rank adapter and training them using gradient descent, we just teach the model directly into the weights. All this
sounds pretty good on paper. So, let's actually look at what the authors of Weight Space Programming found in their experiment to see what it is and more importantly what it isn't so we can curb
our enthusiasm. Now, one immediate challenge when we're trying to use an LLM to write neural networks is that most LLMs right now will choke writing raw weights in tokens because there's
typically an output token limit. Even for a small 20,000 parameter model, if the weights are in four decimal numbers, most LLMs now won't be able to spit all of that in one go through an API. GPT6
Astra, for example, has 120,000 output token limit. So, we need a more efficient way for the models weights to be written by LLM instead of brute force streaming the models out auto
reggressively from API. So what the authors did in this case was essentially zeroing out the entire model's weights to zero to start and then instructing the model to update in spots or
quadrants where you can select the specific region for the weights to be updated and anything else that it doesn't touch remains as zeros. And this is what an actual output from Astra
actually looks like. And as you can see it outputs a specific format like this which gets interpreted to actually update the model given this range. Now, something that you might have noticed
here which is really interesting is how Astra actually breaks down each update not randomly but as you can see it deliberately updates portions of the model knowing what these numbers
actually would do. In this case, it knew that given this game called asterisk where you have to dodge incoming enemies in red colors coming in different directions and at the same time it has
rewards to collect in yellow that's also coming in different directions. And the model in this case knew exactly which specific portion of the model to update to actually detect whether an object on
screen is coming towards the agent or it has already passed. So Astra essentially wrote raw weights directly to the model to instill specific knowledge in the form of weights to successfully play
this game. All in a response format that looks something like this. Pretty incredible, right? Another important thing to keep in mind here is that they limited the model from using any tool to
make sure that the model doesn't cheat by looking for solutions on the internet or experimenting on the side what works and what doesn't. So now that we understand how they set up the
environment for their experiments, the critical question is what did they find out exactly? Can LLM actually understand and improve neural networks all without training? But first, let's talk about
our sponsor, Data Impulse. Providing AI agents with proxies to access the internet across countries at scale without the limitation of a traditional VPN. Using AI agents to do research is
probably something we all do, but sometimes it's really good to understand what other countries might think about the subject. Data Impulse is a proxy that lets me access over 195 countries
around the world, which means I can use my AI agent to search a topic to see what other countries search ranking might say about that given topic. to see how trending the topic really is and
what they say about it. Here I'm asking Cloud Code to help me research the recent softmax rounding bug that was found in ML research. And as you can see, Cloud Code can use Data Impulse to
start gathering information from different locations around the world. So I can see what people in from Korea, Germany, and Japan might say about a specific topic. Data Impulse uses over
90 million residential IPs. And what's really good about this is that I'm charging it by usage at the cost of a dollar per gigabyte of traffic. So this entire scraping job only cost me less
than a fraction of a cent per site visited. As you can see from this large list of sites that I eventually went through to get the information. Data Impulse also offers rotating IPs or
sticky sessions up to 120 minutes over HTTP, HTTPS and socks 5. And traffic never expires and $5 minimum deposit with 24/7 human support and around 1 second response time. I'll have the link
in the description if you want to try Data Impulse. When we look at the handpicked examples that the authors showed off in their blog, the results at first glance definitely seems promising.
I mean, Astra was able to fix this model that initially couldn't pass this hill even after training. And now, after Astra fixed the weights, it's showing that it can pass the hill easily like
this. They also showed Astra's capability here where just by looking at the model's weights alone, Astra can actually guess which game the model was trained to optimize on and it got all of
them correctly with really high confidence. And not only that, when we look at its reasoning trace, Astra was able to point to exactly which part of the model's weights that made it think
that this model was optimized for which gain. Astraat could also deduce what shape a diffusion model like this would eventually generate in the end just by looking at the model's weights and
correctly guess whether the model would generate a circle triangle or a square. Although comparatively the confidence dropped to 70 to 80% as you can see. Now as impressive as all of this sounds,
there's certainly a bit of a problem here because technically the model not only knows about the model's architecture, but it has direct access to the input and output layer. Which
means for a simple game like the 10x10 grid game like this, it knows that the neural network is actually made up of six different copies of the grid which together makes 600 inputs and gets
funneled into smaller networks progressively. And it also know what channel each represents. So it has a huge advantage in knowing how input would actually be processed given the
game. So when we go back to our earlier walkthrough where the model directly edited the model's weights to precisely detect the direction of the object that are on screen, well technically the
model knows which channel from the input would eventually be used to detect something like this. And that's exactly what the model did. When you look at the reasoning trace, it only updated the
relevant weights coming from that specific channel, knowing curistically that input coming from that channel would determine the direction of the object on screen. Now, that's not to say
that this isn't impressive because it still needs to translate its own reasoning into numbers without using gradient descent, which is the difficult part. And I think most of us are pretty
surprised how well it actually did even though the idea itself is more or less rudimentary. But the bigger question here is really how well this generalizes and how well it scales which carries a
much bigger impact. To extend an olive branch, they did show a use case where they removed the input and the output layer and only letting the model to see the hidden layers to see how well it
actually does. In this case, they use a 7.2 2 million parameter language model to see if Astra can figure out just by looking at the hidden layers to see what model was trained to do. And Astra
surprisingly was able to guess whether the model was trained on Python or English data set showing potentially there's a deeper understanding that it actually has. Though the confidence
score, as you can see, is comparatively lower even for a 7.2 million parameter model like this. They actually tried to push the limits even further by taking a much larger 270 million Gemma 3 model
and fine-tuning it in two separate copies. And sadly, Astra was not able to detect which model was more psychopantic just by looking at the model's weights alone. They even tried to take the Gemma
3 model to see if Astra can just simply make the model better at math, for example, but it failed to produce that result. One cool use case they found though was fixing a 800 million
parameter model Quen 3.50.8b where Astra updated a tiny fraction of the model's weight which attributed to a known bug that existed and just that simple fix alone that Astra made helped
improve the model from 7.9% to 48.1% in math. The fact that Astra knew where to look at within the entire model and fix it and basically in paint the weights is actually pretty impressive. So while
weight space programming still remains as something really experimental, we're still in the early stage of what new capabilities and new understanding we might gain from looking at the models
weights directly. Personally, I wanted to see how other models also do on weight space programming. And I created a simple open benchmark called weight space bench to measure different models
abilities. And here's how other Frontier models did on the same task.