# Weight-Space Programming Weight-space programming is the idea that a [[Large Language Models (LLMs)|LLM]] can read and write the weights of another [[Neural Networks (NNs)|neural network]] directly. It reasons about the numbers, instead of changing them through [[Gradient Descent|gradient descent]] and training data. The term comes from "Sparks of Weight-Space Programming" by Rikiya Takehi, Jayden Teoh, Alex Zhang and Omar Khattab (MIT CSAIL, 2 November 2026). Khattab is also the creator of [[DSPy]]. They call it a blog post; [[Simon Willison]] calls it "paper-shaped", which is fair. Why should you care? If it holds, you could check a model for backdoors without running it, initialize networks for cheap, steer or remove capabilities without data, and graft circuits from one model into another. That's the authors' list. As we'll see, the evidence supports a much smaller claim. ## What the paper claims Every experiment uses [[GPT-6 Astra]]. - **Read.** Given the 17,253 weights of a small [[Reinforcement Learning (RL)|RL]] policy as plain text, with no tools and a single reply, Astra named the game it was trained on: 4 out of 4 (Breakout, Pong, Pac-Man, Freeway on a 10x10 grid). It also identified the shape a small diffusion model draws (23,824 weights), and the language plus the copying heads in the middle layers of a 7.16M-weight model - **Fix.** A car-on-ramp policy (171,664 weights) was stuck in a local minimum. One reply, 3.5% of the weights changed, and the car succeeded in all 1,024 episodes - **Write from scratch.** A MinAtar Breakout policy, written with no data and no gradients, scored 517.4 against 25.3 for [[Reinforcement Learning (RL)|PPO]] trained on 500M steps. On Seaquest (53.1 vs 88.9) and Asterix (53.2 vs 55.2), PPO still wins. A 9x9 Go network (1.48M weights, starting from zeros) beat an equal-size PPO network trained on 20M games, after 50 forward passes - **Edit a real LLM.** Qwen3.5-0.8B got stuck in reasoning loops on long math problems. With a Python kernel and up to 50 forward passes, Astra changed 131,072 weights (0.016%). MATH-500 went from 7.9% to 48.1%, GSM8K from 13.8% to 67.1%, IFEval from 21.0% to 62.3% The authors admit the limits. Spotting which of two Gemma 3 270M models is [[AI Sycophancy|sycophantic]] failed from the weights alone, four times; it worked only with attention patterns. Astra could fix a failure in Qwen but couldn't add a missing ability to Gemma 3 270M (MATH-500 from 6.8% to 7.6% at best). They call the results "very early". ## Reading raw weights is not writing code about weights Two critiques are worth reading next to the paper. Matthew Honnibal points out that the post sells several techniques as one. Only the small experiments read raw weights with no tools. "Every experiment involving a real language model uses Python", and the Qwen edit also ran the model on up to 50 batches of practice problems. Honnibal doesn't dismiss that work (writing code that analyzes and edits weights productively "is not nothing"), but a single technique that goes from toy games to fixing an LLM "would imply a deep capability", and that's not what was shown. Sean Goedecke argues none of it is superhuman. The game policies take labeled grid channels as input ("agent", "moving objects"). Take the L2 norm of each input across the first-layer weights, plot it, and you can see the paddle line in Breakout or the maze in Pac-Man. Astra did that arithmetic "in its head". For Qwen, it wrote pairs of looping and non-looping texts, measured which weights pushed toward looping, and cut them down. That's the same contrastive approach as abliteration in [[Heretic (AI)|Heretic]], and "exactly what a competent human researcher could have and would have done". Goedecke's conclusion: "the best way to update the weights of a model is to train it normally." ## A 27B model on a laptop does the read part too Willison reran the game experiment himself with [[llm CLI|llm]]. The four prompts are identical except for the weights (Willison checked). [[Kimi K3.1 Pro]] through [[OpenRouter]] named Breakout after 9 min 41 s and 19,493 reasoning tokens. Then [[Qwen3.8-27B]] on a laptop: the 17 GB Q4_K_M GGUF in [[LM Studio]], with a longer context than the default 8,192 tokens and `LMSTUDIO_TIMEOUT=900` so the plugin wouldn't give up. | Game | Time | Answer | Stated confidence | |---|---|---|---| | Pac-Man | 46 min 12 s (43,506 reasoning tokens) | Correct | 72% | | Pong | 1 h 4 min 54 s | Correct | 75% | | Breakout | 52 min 25 s | Correct | 88% | | Freeway | | Wrong (a Pac-Man-like grid game) | | Three out of four, one run each, from a model anyone can run locally (see [[Running AI Models Locally]]). Willison finds the Pac-Man answer "impressive", calls the reasoning traces "almost incomprehensible" (page after page of channel-by-channel number checks), and thinks a patient human with pencil and paper could get there too. Willison is "not ready to declare" that machines will soon edit their own weights in ways we can't follow. The [[Hacker News]] thread raised the obvious objection. One commenter read the traces as "pattern matching toward famous games, not reading what the network computes", and two others got weaker results with less famous games. The prompt says "a game", the input is a small grid, and Breakout or Pong are the first guesses anyone would make. A fair test would use an obscure game. Another commenter had better luck with their own work: Qwen read the code of a small upscaler network they wrote years ago, worked out its purpose, and improved its weights without breaking compatibility. One anecdote, but a more convincing one, since that network isn't famous. ## My take 1. **The read part is real and narrow.** It's long, careful arithmetic on tiny networks whose inputs are labeled. Seeing a 27B model do it on a laptop in under an hour is impressive. But it says nothing yet about reading a frontier model, where the tool-free experiments stop at 7M weights and real models have billions 2. **The Qwen fix is the useful result, and it's ordinary ML engineering.** Write probes, measure, edit, re-test, all in a Python sandbox. I expect agents to get good at this the same way they got good at other code. I'd call it agentic ML engineering, not a native sense for weights 3. **Don't count on the audit use case yet.** The paper lists backdoor audits without running the model. On HN, someone raised the reverse worry: opaque weights can hide a backdoor, a modern version of [[Ken Thompson]]'s "Reflections on Trusting Trust". The failed sycophancy test says we're far from reading behavior out of weights. For [[AI Open Weight Models]], that's the question I care about most: can you check what you download? Not from the weights alone, not today ## References - Rikiya Takehi, Jayden Teoh, Alex Zhang, Omar Khattab, "Sparks of Weight-Space Programming: LLMs can natively read & write neural network weights" (2026-11-02): https://rikiyat.github.io/blog/weight-space-programming/ - Experiment logs and prompts: https://github.com/RikiyaT/lm_understand-logs - Simon Willison, "Qwen 3.8 27B on my laptop can interpret model weights, too" (2026-11-03): https://simonwillison.net/2026/Nov/3/qwen-can-interpret-model-weights/ - Matthew Honnibal, critique of the Astra read/write claims: https://honnibal.dev/blog/astra-read-write-misleading - Sean Goedecke, "LLMs are not superhuman at reading and writing neural network weights": https://www.seangoedecke.com/llms-are-not-superhuman-at-reading-and-writing-neural-network-weights/ - Hacker News discussion (736 points): https://news.ycombinator.com/item?id=50355251 ## Related - [[GPT-6 Astra]] - [[Qwen3.8-27B]] - [[Kimi K3.1 Pro]] - [[Simon Willison]] - [[Heretic (AI)]] - [[Neural Networks (NNs)]] - [[Gradient Descent]] - [[Reinforcement Learning (RL)]] - [[AI Sycophancy]] - [[AI Open Weight Models]] - [[Running AI Models Locally]] - [[Ken Thompson]] - [[DSPy]] - [[llm CLI]] - [[LM Studio]]