The weights of a deep neural network are vast arrays of numbers, ranging from tens of megabytes to hundreds of gigabytes, and humans can hardly read them directly. Weights have traditionally been generated or updated through optimization methods such as gradient descent, specially trained networks, or techniques that compile formal programs into weights. But what if a general-purpose large language model (LLM) could understand weights and rewrite them directly, guided only by natural-language instructions?

Rikiya Takehi, Jayden Teoh, Alex Zhang, and Omar Khattab of the Massachusetts Institute of Technology's Computer Science and Artificial Intelligence Laboratory (MIT CSAIL) tested that possibility in a technical report, "Sparks of Weight-Space Programming", published on November 2. In the approach the team calls "Weight-Space Programming," OpenAI's GPT-6 Astra directly analyzes a neural network's weights and attempts to modify existing models or create new networks. The most notable result: by rewriting just 0.016% of a small language model's weights, the team substantially improved its accuracy on math benchmarks.

This does not mean LLMs have acquired a general-purpose optimization ability that can replace conventional training algorithms. A closer look at the results shows that the demonstrated abilities center on translating known algorithms into network weights and fixing localized problems that interfere with a model's behavior.

  • Before editing (Base)
  • After Astra edit (50 passes)
Impact of weight edits on Qwen3.5-0.8B横棒グラフ。カテゴリ 4 件、系列: Before editing (Base), After Astra edit (50 passes)(単位: %)MATH-500 accuracyMATH-500 accuracyMATH-500 accuracy — Before editing (Base): 7.9%7.9MATH-500 accuracy — After Astra edit (50 passes): 48.1%48.1GSM8K accuracyGSM8K accuracyGSM8K accuracy — Before editing (Base): 13.8%13.8GSM8K accuracy — After Astra edit (50 passes): 67.1%67.1IFEval accuracyIFEval accuracyIFEval accuracy — Before editing (Base): 21%21IFEval accuracy — After Astra edit (50 passes): 62.3%62.3Token-limit hit rateToken-limit hit r…Token-limit hit rate — Before editing (Base): 93%93Token-limit hit rate — After Astra edit (50 passes): 33.1%33.1単位: %
データを表で見る
Before editing (Base) (%)After Astra edit (50 passes) (%)
MATH-500 accuracy7.948.1
GSM8K accuracy13.867.1
IFEval accuracy2162.3
Token-limit hit rate9333.1
Impact of weight edits on Qwen3.5-0.8BEditing 0.016% of the weights (131,072 values) suppressed thinking loops and substantially raised accuracy on each benchmark.出典: Technical report by Takehi et al. (November 2, 2026)

What matters in this chart is that, alongside the accuracy gains, the share of responses cut off at the 32,768-token generation limit fell from 93.0% to 33.1%. The score improvement most likely comes not from gaining new mathematical ability but from suppressing "thinking loops," in which the model repeats the same reasoning and never completes an answer.

AD

An LLM manipulates weights directly, without gradient descent

The defining feature of weight-space programming is that a general-purpose LLM reads and writes weight tensors directly according to goals specified in natural language, without using a loss function or backpropagation. The research team ran a total of eight experiments across three types of tasks: analyzing existing networks, repairing faults, and generating new networks.

The conditions and results of each experiment are summarized below.

Experiment Target model Conditions Main results and constraints
1: Reading Policies for 4 games (MLP, 17,253 weights) No tools, no forward passes Identified all 4 games correctly. Used only the best seed for each game
2: Reading Image-generating DDPM (23,824 weights) No tools, no forward passes Identified circle, square, and triangle. But read filled shapes as outlines
3: Reading Character-level Transformer (7.16M weights) Python analysis allowed, no forward passes Identified the training languages and all induction heads. Confidence 0.48–0.62
4: Repair Kinetix car control (171,664 weights) No tools, one failure log Editing 3.5% of weights raised success rate from 0% to 100%. A fix for a specific failure
5: New generation 3 MinAtar games (600→32→32→6) Tools, no forward passes Beat PPO trained for 100M steps on all games. Fell short of PPO trained for 500M steps on 2
6: New generation 9×9 Go (about 1.48M weights) Python, up to 50 forward passes Beat PPO of the same size (20M games). Converted rules directly into weights
7: Reading Gemma 3 270M Weight analysis, self-generated probes Failed with static analysis. Identified all 3 pairs once attention observation was added
8: Repair Qwen3.5-0.8B Python, up to 50 forward passes A 0.016% edit raised MATH-500 from 7.9% to 48.1%. No improvement on Gemma, which loops less

These are preliminary findings that, as of November 2026, have not been peer-reviewed and have not been assigned a DOI. In addition, the LLM used in every experiment was OpenAI's "gpt-6-astra," so it is not clear that frontier LLMs from other companies share the same abilities. The public logs also show that the reasoning-effort setting varied between "high," "xhigh," and "max" from experiment to experiment, so the results are not comparisons under identical compute conditions.

Nor were all experiments run without external tools. In experiments 1, 2, 4, and 5, weights were treated as text, and neither tools nor network forward passes were used. In experiments 3, 6, 7, and 8, by contrast, matrix analysis in Python and limited forward passes or attention observation were permitted. This difference matters when evaluating the results.

Identifying games and languages from weights alone, with limits in predicting behavior

The team first tested whether an LLM could understand a network's role from its numerical weights alone. In experiment 1, they prepared policy networks with the same structure for four games: Breakout, Pong, Pac-Man, and Freeway. Each model is a multilayer perceptron (MLP) with a 500-dimensional input, two hidden layers of 32 dimensions each, and a 5-dimensional output, for 17,253 weights. Each was trained for 1 billion steps with the reinforcement learning algorithm PPO.

When Astra was given each network's weights and asked for the game name without any answer choices, it correctly identified all four. According to the reasoning logs, Astra relied on cues such as where input-layer weights were concentrated and which movement directions the output layer distinguished. In Breakout, for example, the input region corresponding to the paddle at the bottom of the screen and the left/right movement outputs appear as distinguishing features. However, for each game the team selected the best-performing model out of three training seeds, so it is unclear whether the same accuracy would be obtained for an arbitrary trained model.

In experiment 2, they analyzed the weights of diffusion models (DDPM) that each generate a circle, square, or triangle. Astra correctly identified all three shapes without forward passes, but it interpreted models that actually generate filled shapes as models that draw outlines. It may have read shape boundaries from the output-layer weights, which suggests it was not accurately reproducing the network's full processing.

Experiment 3 raised the difficulty: Astra was given only the four middle layers (7.16 million parameters) of a character-level Transformer. With the input embedding and output layers removed, the mapping between characters and internal representations was lost, so it was impossible to feed in text and check behavior in the usual way. Even so, using Python matrix analysis, Astra correctly identified in every one of two trials per model whether each of three models had been trained on Python code, romanized Japanese, or English Wikipedia. Its confidence was moderate, at 0.48 to 0.62, but it also identified without omission the "induction heads" that look at preceding strings to predict what follows.

In this analysis, Astra spontaneously used a matrix-product composition analysis similar to the method in Elhage et al.'s 2021 "Transformer Circuits." According to the team, the prompt did not instruct it to use this technique. It is notable that the LLM chose a known analysis method on its own and used it to understand the weight structure.

Experiment 7, on the other hand, revealed the limits of analysis from weights alone. The team prepared two copies of Gemma 3 270M, fine-tuning one to answer correctly and the other to give "sycophantic" responses that go along with a user's incorrect guesses. The embedding and output layers were frozen so that behavioral differences would appear in the middle-layer weights.

Astra found the weight differences but could not tell which model was the sycophantic one in any of four trials. When it was given the means to write its own probe texts and observe the resulting attention patterns, however, it correctly identified all three prepared model pairs. It captured that, in the sycophantic model, middle-layer attention tended to go toward the answer the user presented rather than toward the information in the question.

This result shows that the ability to analyze the static structure of weights is not the same as the ability to predict actual behavior. Under these conditions, judging behavior from numerical weights alone had limits, and dynamic information about how attention changes in response to inputs was needed.

AD

Converting game rules directly into weights

Beyond analyzing networks, the team also examined whether an LLM could rewrite weights directly to fix behavior.

Experiment 4 used a control task in the physics simulation environment "Kinetix," in which a car must travel over a hill. The agent trained with PPO had fallen into a local optimum in which it charged straight at the hill and stalled, even though climbing requires first backing up to gain run-up distance. Before the fix, it had not succeeded even once in 256 trials.

Given the network's 171,664 weights, a description of the environment, and a single failure log, Astra changed 6,073 weights (3.5% of the total) in one response without using external tools. The repaired agent succeeded in all 1,024 trials. Astra added a pathway that reads position and velocity, backs the car up before the hill and then accelerates, and returns control to the original PPO network once it passes the obstacle. Rather than retraining the whole network, it built a conditional branch into the weights to avoid the problematic behavior.

Experiment 5 targeted MinAtar's Breakout, Seaquest, and Asterix, asking Astra to generate network weights from scratch starting from a zero-initialized network. Astra was given the game rules, source code, and network structure; training data, gradients, and environment manipulation for trial and error were not permitted. The generated networks were evaluated over 1,000 episodes under "sticky actions 0.1" conditions, in which actions continue with a certain probability.

The result: on all three games the networks beat the scores of PPO models trained for 100 million steps. In Breakout in particular, the Astra-generated network scored 517.4, against 25.3 for PPO trained for 500 million steps. In Asterix, by contrast, PPO at 500 million steps scored 55.2 and Astra 53.2, roughly equal, and in Seaquest Astra managed only 53.1 against PPO's 88.9. Because no comparison with matched compute or with conventional rule-based controllers was made, these results alone do not show that LLM weight generation is superior to reinforcement learning.

Examining the Breakout weights Astra generated, the mechanism was relatively clear. The first layer computes the ball's landing position and wall bounces, the second layer computes the positional relationship to the paddle, and the output layer decides left or right movement. Part of the code that sets the weights is shown below.

python
# Astraが生成したBreakout用重みコードの抜粋
# 第1層でボールの落下予測位置を計算し、パドル位置との差分を算出
W1[540:600:6, 0] = [0, -0.02, -0.04, -0.06, -0.08, -0.10, -0.12, -0.14, -0.16, -0.18]
W1[3:60:6, 0]    = [0.16, 0.18, 0.18, 0.16, 0.14, 0.12, 0.10, 0.08, 0.06, 0.04]
# 第2層で左右の移動判定をゲーティング
W2[0, 0:2] = [-1000, 1000]
b2[0:8]    = -415

Experiment 6, on 9×9 Go, used a similar approach. Astra manipulated about 1.48 million weights in a Python sandbox, building basic Go rules into the network's layers, such as counting a stone's liberties, avoiding atari, and recognizing eyes. Even at the stage before any forward pass, it won a majority against a small PPO model, and after up to 50 forward passes and revisions it also beat a PPO model of the same size (trained on 20 million games). Note that the "50" here does not mean 50 games; it refers to a forward-pass budget in which each evaluation could include up to 128 games.

These results show that an LLM can translate known rules and algorithms directly into neural network weights. Earlier work such as AdderBoard has also explored analytically designing weights. What is distinctive here is that a general-purpose LLM, not trained for the specific purpose, performed the translation from natural-language instructions. However, it has not been demonstrated that the LLM has acquired a general ability to learn on unknown tasks.

Editing 0.016% of the weights to suppress Qwen's thinking loops

The most notable result in the report is the fix to the small language model "Qwen3.5-0.8B" in experiment 8.

With thinking mode enabled, Qwen3.5-0.8B is prone to "thinking loops," in which it repeats the same reasoning and cannot complete an answer. The official model card also points out this problem and recommends adjusting sampling settings or interrupting generation midway.

The team gave Astra access to the weights through a Python kernel and let it run up to 50 forward passes using training problems from GSM8K and MATH. The test sets used for evaluation were not shown to Astra, and neither gradients nor ordinary training procedures were used. In its analysis, Astra identified a component along a specific direction in the outputs of the layer 15 and layer 19 MLPs as the cause of the thinking loops.

Astra made the fix by subtracting the component along the problematic direction from 64 columns in each of the two layers' MLP outputs. The modified weights total 131,072, equivalent to just 0.016% of the model's roughly 800 million parameters.

As a result, with 50 forward passes allowed, MATH-500 accuracy rose from 7.9% to 48.1%, GSM8K from 13.8% to 67.1%, and IFEval, which evaluates instruction following, from 21.0% to 62.3%. Sampling conditions for evaluation were unified at temperature 0.6, top-p 0.95, top-k 20, and presence penalty 1.5, with averages over multiple samples per problem.

However, it is important to understand exactly why the scores improved. The share of MATH-500 responses that hit the 32,768-token limit fell from 93.0% before editing to 33.1%. According to an analysis of the evaluation logs, of the 579 problems the model became able to answer correctly after editing, 576 had been cut off at the token limit in the original model. Meanwhile, accuracy on problems the model could already finish showed no major change.

In other words, the improvement is better interpreted as the result of suppressing thinking loops that had been preventing the model from using its existing abilities, rather than as gaining new mathematical reasoning ability. The gain in instruction-following scores may likewise reflect an increase in the share of responses that are completed.

To test this interpretation, the team ran an additional experiment on "Gemma 3 270M," which rarely falls into thinking loops. That model hits the token limit 8.5% of the time, far below Qwen3.5-0.8B's 93%. Astra tried modifications such as doubling the weights of individual neurons, but MATH-500 accuracy changed only from 6.8% before editing to at most 7.7%, and no significant improvement was confirmed.

Many of Gemma's wrong answers involved problems with the model's own reasoning ability, such as calculation mistakes and algebraic manipulation errors. The method could not resolve these. At least in this experiment, weight editing could remove problems that were interfering with existing abilities, but it was not shown to give a model reasoning abilities it lacks.

AD

Challenges for reproducibility and practical use

To ensure transparency, the MIT CSAIL team has published prompts, responses, reasoning summaries, executed code, weight diffs, and evaluation logs on GitHub. It says it audited all 1,125 turns for any use of prohibited tools.

Challenges remain, however, for independent verification of reproducibility. The public repository mainly contains logs of the successful examples featured in the blog, and does not include the history of failures that arose during prompt tuning. It is therefore unknown whether the same results would be obtained if the wording of instructions or trial conditions were changed slightly. Some reproduction data is also missing from the repository, such as the fine-tuned Gemma models (17 GB) used in experiment 7 and the Python training dataset for experiment 3.

Comparison with prior research is also essential. "Weight Oracles," published in October 2026, examined a method that trains a dedicated model based on Qwen2.5-3B to infer a network's properties from its weights. It showed results in areas such as backdoor detection, while also reporting that detection performance varied by attack type. This study differs in using a general-purpose LLM as is for weight analysis and editing, without such dedicated training. How stable that ability is, however, remains unclear.

To evaluate weight-space programming as a practical technology, at least the following verifications are needed:

  1. Confirming reproducibility: Have third parties apply the published weight diffs and check whether the Qwen benchmark improvements are reproduced.
  2. Generality across models: Investigate whether LLMs other than GPT-6 Astra, such as Claude and Gemini, can perform comparable weight analysis and editing.
  3. Comparing computational cost: Compare the token counts, inference time, and API costs required to search for or generate weights against parameter-efficient fine-tuning (PEFT) such as LoRA.
  4. Strengthening baselines: For from-scratch weight generation, make fair comparisons with conventional rule-based controllers and gradient-free optimization methods such as Evolution Strategies.

As future applications, the team cites auditing methods that detect backdoors without running the model, adding or removing capabilities without extra training data, and transplanting reasoning circuits between models. If part of the weights can be changed without retraining, models might also be corrected while avoiding catastrophic forgetting. These, however, remain topics for future research and are not results demonstrated so far.

What this study shows is that general-purpose LLMs have begun to treat neural network weights not merely as numerical data but as something that can be analyzed and edited. The approach holds promise especially for identifying localized defects in existing models and fixing them without retraining. Whether it can stand as a general-purpose optimization method for giving models unknown abilities is still unknown. The standard benchmark the team is developing, along with replication experiments by third parties, will be important for judging its practical value.