,

Weight-Space Programming: An LLM Reads, Fixes and Writes Network Weights

Weight-Space Programming has a frontier LLM read, repair and write neural network weights with no gradient descent, and the first results are startling. In a 26-minute explainer, Jia-Bin Huang walks through “Sparks of Weight-Space Programming” by Takehi, Teoh, Zhang and Khattab, a 2026 blog post in which GPT-6 Astra is handed raw weights as plain text and asked to say what a network does, fix what is broken, build a network from all zeros, and make a real language model better at math. Huang places the work on a ladder that runs from prompt optimization to skills, harnesses and training code, then lands it next to the mechanistic interpretability toolbox, and ends with a careful list of what the evidence does and does not show.

TLDW

LLMs already optimize prompts, skills, harnesses and training code by reading an artifact, finding why it fails and rewriting it. Weight-Space Programming makes the weights themselves the artifact. GPT-6 Astra identified four games from a policy network’s weights, grafted a reversing reflex onto a stuck car policy, wrote a Breakout player from zeros that outscored PPO, built a Go network layer by layer, and lifted Qwen3.5 0.8B on MATH-500 from 7.9% to 48.1% by removing a repetition direction. The catch, which Huang spells out, is that the math gain was a repair of thinking loops nudged by a hint in the prompt, the networks are small, and there are no baselines against human researchers or a cheap fine-tune.

Thoughts

The Qwen result is a repair, not a lesson, and the authors deserve credit for saying so themselves. The base model hit its 32,000-token limit on 85 of its first 96 practice answers, so it could already solve many problems and simply never finished. Astra’s edit cut the share of answers hitting the limit from 93% to 33%, and the scores followed. Then comes the confession: the task prompt, refined by an LLM from a plainer version, already mentioned repetition. Runs without that hint peaked at 14.1%, and no 50-pass run without the hint was reported. On Gemma 3 270M, which rarely loops, Astra’s edits moved MATH-500 by about a point, a gain Astra itself called not established. The honest headline is narrower but still remarkable: pointed at the right symptom, a general model ran a competent interpretability study end to end (diagnose, locate, test against a random-edit control, confirm on held-out problems) inside fifty forward passes. That is a claim about automating research, not about teaching a model math, and readers should keep the two apart when the 48.1% number starts circulating.

The Breakout network written from all zeros says more about gradient descent than about Astra. The network had the PPO agent’s exact shape, two hidden layers of 32, so the capacity to play well was there all along. Astra wrote a first layer that computes where the ball will land and a second that moves the paddle there, a program compiled by hand into weights, and it averaged 517.4 against 25.3 for the best PPO run at 500 million steps. Huang flags that the baselines were untuned and Astra was given the game’s source code, so the gap is inflated. But the shape of the result holds even after discounting: the bottleneck in small reinforcement learning was never the parameter count, it was an optimizer that, in Huang’s words, never reads what the network is for. The Go experiment makes the same point at 1.5 million weights, where a single 336-line Python run with zero forward passes already beat two small PPO networks more than half the time.

The sycophancy test shows where reading weights stops working. Given two fine-tuned copies of Gemma 3 270M, one honest and one that agrees with whatever answer the user suggests, Astra could not tell them apart from weights alone in any of four attempts. It found plenty of differences and could not tie any of them to behavior. Only when it could run both models on up to 16 texts and see their attention patterns did it pick the sycophant in all three pairs. The grid games and shape models worked because the layer Astra read sat right next to the pixels, where a weight maps cleanly onto a place. In the middle of a language model, behavior lives in activations, so “reading weights” at any useful scale turns into running experiments, which is exactly what interpretability researchers already do.

Huang’s answer to “is this the end of interpretability?” is the right one: the methods stay and the labor moves to an agent. Astra found induction heads with the matrix multiplication from Anthropic’s 2021 Transformer Circuits work without being told about it, fixed Qwen with a direction, and caught the sycophant with attention patterns, and every answer was checked by running the network. The uncomfortable corollary sits in his closing list of what this could unlock. A tool that can audit weights for a backdoor, add or remove a capability without data, and graft a circuit from one model into another can do all of those things in the other direction too. If weights become an artifact an agent can patch like a binary, then diffing, provenance and review of weight changes start to matter the way code review does. The missing comparisons Huang names (an interpretability researcher, a scripted steering pipeline, a small fine-tune on the same budget) are the experiments that would tell us whether this is a new capability or a faster route to old ones.

Key Takeaways

  • Weight-Space Programming means a general-purpose LLM, used as it is, reads and writes network weights directly toward a goal written in plain English, with no gradient descent.
  • It extends a ladder of LLM-optimized artifacts: prompts (OPRO, GEPA), skills (gskill), harnesses (Meta-Harness) and training code (Karpathy’s autoresearch). Until now the LLM never touched a weight.
  • The framing: weights are a compiled program, so reading is decompiling, editing is patching the binary, and writing from scratch is compiling by hand.
  • From 17,253 raw weights pasted as text, GPT-6 Astra named Breakout (99%), Pong (96%) and Pac-Man (96%), and called Freeway “Frogger”, the same road-crossing game. No game names or options were given.
  • On three small diffusion models it named circles, squares and triangles from the output layer, but drew them as outlines when the models generate filled shapes, a sign it read the geometry of the weights rather than simulating the network.
  • On three 7.2-million-weight character-level transformers with inputs and outputs cut off, it named the language (Python, romaji, English) correctly but with only 48 to 62% confidence, and found every induction head with no false positives.
  • A Kinetix car policy trained for a billion steps had zero successes in 256 episodes. Astra edited 3.5% of its 171,664 weights to add a back-up-then-accelerate reflex and succeeded in all 1,024 test runs.
  • Writing a MinAtar Breakout player from all-zero weights, with no data, loss or tools, Astra scored 517.4 against 25.3 for the best PPO run at 500 million steps. The PPO baselines were untuned.
  • A 1.5-million-weight 9×9 Go network built layer by layer (stones and liberties, then groups in danger, then move scores) won 70 to 79% against same-size PPO networks trained on 20 million games, after 50 forward passes.
  • From weights alone Astra could not identify a sycophantic Gemma 3 270M fine-tune. With attention patterns it picked the sycophant in all three pairs; in one head the sycophant put 85.7% of attention on the user’s answer.
  • On Qwen3.5 0.8B, Astra found a repetition direction written by the MLPs of layers 15 and 19 and subtracted it from 131,072 weights (0.016% of the model).
  • That edit took MATH-500 from 7.9% to 48.1%, GSM8K from 13.8% to 67.1% and IFEval from 21% to 62.3%, because loops fell from 93% to 33% of answers.
  • The prompt already hinted at repetition. Unhinted runs peaked at 14.1%, and on Gemma, which rarely loops, gains were about a point. The edit removed an obstacle; it did not add a capability.
  • The authors call these “sparks” and “very early results”: small networks, small counts, the authors’ own grid games, and no comparison to a human researcher, a steering pipeline or a fine-tune on the same budget.

Chapters

0:00 Four Results: Read, Fix, Write, Improve

Huang opens with the four headline results. GPT-6 Astra reads a game from 17,253 pasted weights, fixes a car policy that stalls on a ramp, writes a Breakout player from zeros that scores 517 against PPO’s 25, and edits 0.016% of Qwen3.5 0.8B to lift MATH-500 from 7.9% to 48.1%. Normally an optimizer like Adam or Muon changes weights. Here a frontier model edits them directly, with the goal written in plain English.

1:24 Optimizers That Read: From Prompts to Training Code

The roots are in prompt optimization. “Let’s think step by step” took InstructGPT on GSM8K from 10.4% to 40.7% in 2022, which showed a prompt behaves like a parameter. OPRO made an LLM the optimizer and found “Take a deep breath” at 80.2% on PaLM 2, and GEPA gave the optimizer whole traces so it could fix causes, beating GRPO by 6% with up to 35 times fewer rollouts. The same loop then climbed to skills, harnesses and Karpathy’s autoresearch, but the LLM never touched a weight.

3:52 Who Writes Weights, and Who Reads Them

Nobody improves weights by hand because they are millions of unnamed numbers, so tiny symbolic rules step downhill on a loss landscape without knowing what the network is for. Hypernetworks write weights but are themselves trained by gradient descent and cannot explain their output, and OPRO’s linear regression demo only saw numbers and scores. Mechanistic interpretability supplies the reading side: features as directions, ablation, reading circuits by multiplying weight matrices (which exposed induction heads), attention patterns, and the single refusal direction in chat models.

7:20 Weight-Space Programming

Weight-Space Programming joins the two halves: the reasoning optimizer from the prompt ladder and the interpretability toolbox that reads weights. Huang explains the name with a compiler analogy, where weights are a compiled program. The authors test reading, fixing and writing, first on small networks and then on real language models, where Astra reaches for interpretability methods rather than reading weights directly.

8:31 Reading Weights: Games, Shapes, Language Models

Four grid games share one network shape, so only the weights differ, and laid out on the grid the first-layer weights draw a picture of where the network looks. Astra went four for four, reading a sideways paddle on row 8 and a band of bricks above it as Breakout. It named three diffusion models’ shapes but drew outlines instead of filled shapes. On three character-level transformers stripped of inputs and outputs, it found every induction head using the Transformer Circuits method, which it was never told about, and used the abundance of copying heads as evidence for Python.

12:56 Fixing and Writing Networks: a Car, MinAtar, Go

Astra diagnosed the Kinetix car as a throttle-and-coast controller stuck in a local optimum and grafted a separate path through a few units that backs up, then drives forward at full speed. From all-zero weights it wrote MinAtar players for Breakout, Seaquest and Asterix, beating PPO at 100 million steps across the board, with the caveat that the baselines were untuned. For a 1.5-million-weight Go network too big for its context, it used a Python sandbox, built the network like a Go program, and with 50 forward passes ran the familiar optimization loop on a weight tensor.

17:23 Real Language Models: a Sycophant and Qwen’s Loops

Weights alone could not reveal which Gemma 3 270M copy was sycophantic, but attention patterns did. On Qwen3.5 0.8B, Astra worked like a researcher: its first single-neuron edit moved 3 of 32 to 5, too little to trust, so it found a repetition direction, showed a dose-dependent effect against a random-edit control, and baked steering into 131,072 weights. Scores jumped on MATH-500, GSM8K and IFEval. Then the twist: the prompt already hinted at repetition, unhinted runs peaked at 14.1%, and on Gemma, which rarely loops, the gain was about a point.

23:41 What It Shows, and What It Doesn’t

Every rung of the ladder works the same way: read an artifact and its behavior, find the cause, rewrite it. The new step is that the LLM uses the interpretability toolbox on weights. Huang lists the limits (small networks, small counts, a repair rather than a new ability, no human or fine-tune baselines), notes the authors released full logs, and argues this is not the end of interpretability but a change in who does it. If it scales, it could audit weights for backdoors, add or remove capabilities without data, and graft circuits between models.

Notable Quotes

“But the rule never reads what the network is for.”

Jia-Bin Huang, on optimizers like Adam and Muon

“Think of the weights as a compiled program. Then reading is decompiling, editing is patching the binary, and writing from scratch is compiling by hand.”

Jia-Bin Huang, explaining the name Weight-Space Programming

“Astra was not told about this method.”

Jia-Bin Huang, on Astra rediscovering the Transformer Circuits approach to finding induction heads

“So it wrote a program and then compiled it into weights.”

Jia-Bin Huang, on the Breakout network written from all zeros

“The fair reading is that Astra did the interpretability work, but the prompt showed it where to start.”

Jia-Bin Huang, on the repetition hint in the Qwen task prompt

“Therefore, editing weights could remove an obstacle that hid an ability. But it did not improve the model’s capabilities.”

Jia-Bin Huang, comparing the Qwen and Gemma math results

“So this may not be the end of interpretability, but a change in who does it, where the methods stay, and the work moves to an agent.”

Jia-Bin Huang, closing the video

Watch Jia-Bin Huang’s full explainer on Weight-Space Programming here.

Related Reading