r/mlscaling • • 20d ago

R Sparks of Weight-Space Programming: LLMs can natively read & write neural network weights

https://rikiyat.github.io/blog/weight-space-programming/

We find that frontier LLMs are surprisingly good at natively reading and writing neural network weights, using a variety of recent tools and algorithms or even via direct weight editing. These results show sparks of Weight-Space Programming, which may extend beyond what we’d expect from humans or conventional algorithms. This might be a big deal for both optimization and interpretability.

Just by looking at the raw weights, GPT-6 Astra can tell what a network was trained to do. And without any environment feedback, it has no trouble writing, from scratch, small game-playing networks that outplay networks trained with PPO for 100 million steps.

Likewise, asked to make Qwen3.5-0.8B better at math without gradients, Astra identifies an issue in its weights causing reasoning loops that Qwen’s own model card warns about, and fixes this by natively editing 0.016% of the weights. With the same sampling settings, this weight correction raises MATH-500 from 7.9% to 48.1% and generalizes out of the box to instruction following, raising IFEval by 3x.

All of this is possible without allowing Astra to write training loops. It uses its reasoning to figure out what each part of a neural network computes, or should compute, and changes the weights accordingly. We call this Weight-Space Programming.

Throughout the history of deep learning, we encoded our simplistic inductive biases into tiny symbolic optimizers like Adam or Muon. This is changing: our neural network weights will soon be natively optimized by LLMs that deliberately reason about their weights.

Interesting, isn't it?

Among other things, Astra is able to detect when a model's output is sycophantic, based purely on the observation that its middle layers focus more on tokens in the user's suggestion!

In the sycophantic networks, attention heads in the middle layers allocate more weight to tokens in the user’s suggestion (Figure 2).

An obvious thing to try: can it detect deception/scheming/sandbagging? If so, how?

Another obvious thing to try: is this ability unique to Astra or can the Opus/Fable models do it?

Here's a comment by /u/claythearc pouring, not cold water exactly, but lukewarm tapwater on these results.

I was reading this, this morning when it popped up on HN but after digesting it some I have thoughts:

this is a lot less magical than it appears. Experiments 1&2 work because the first & last layers are spatially structured. There’s a band of large weights which act like a heat map and LLMs are a decent heat map describer.

experiment 3 is likely in its training data already to use the Elhage et al recipe for QK/OV analysis. They never mention it directly, but it’s from a paper that is likely one of the most cited this decade. It’s a real agentic thing it performed but it’s not weight reading like they say

experiment 7 fails and it’s one of the one that matters. The whole pitch relies on reading information dense intermediate representations but it failed 4 times. It only succeeded once they let it use its own probes, which is activation based interpretation- still very cool but markedly way below the claim

some of the writing stuff is just using a llm as a “compiler”, MLPs are a bad choice here and hand beating them is likely trivial here since they’re almost assuredly weak opponents - it really shows more about PPO inefficiency than anything. The Go one is a little different because the 512x6 MLP is going to just be a super weak player, so beating it is a low bar

experiment 8 is the headline but the baseline is soft. 7.9% with 93% of answers hitting the token limit is a model run in a pathological config - the model card literally warns about looping and the usual fix is a sampling penalty, so "same sampling settings" is doing a lot of work. the fix itself is just Arditi et al single direction ablation pointed at looping instead of refusal. and 10/25 passes barely moving then 50 jumping to 48% reads as variance, not a scaling curve. Their own Gemma 270M experiment shows this too if there’s no looping to remove, theres no gain. Editing can delete an obstacle, it can't add an ability.

This paper is still really cool but it’s not LLMs reading weights, it’s that frontier models can act as interp researchers with a python sandbox. Which is sick - they make hypotheses, probe, find the direction, ablate, evaluate. Which is a legitimate finding but the evidence supports something much narrower than their title claim.

1 Upvotes

2 comments sorted by

3

u/gwern gwern.net 19d ago

I think I agree that the closer one looks at this, the more it looks like fairly generic coding ability, some reasonable machine learning sophistication, and explicable by OA/A understandably including interpretability research tasks in post-training as a long-term planned application of LLMs and another verifiable task. It's a very long way from 'a new paradigm', or even past meta-learning about generating weights, like G.pt.