The Qwen3.5-0.8B model got stuck in a loop on the MATH-500 mathematics test. With reasoning mode enabled and the settings used by researchers at MIT CSAIL, 93% of its answers reached the limit of 32,768 tokens, or chunks of text, often without a result. Another model, GPT-6 Astra, was tasked with finding the cause directly in Qwen's weights.

According to the description of the experiment published on November 2, it succeeded. Astra changed 0.016% of Qwen's weights. Under the same reasoning mode and generation settings, with four answers for each problem, its MATH-500 score rose from 7.9% to 48.1%. That is a large difference. Above all, the model repeated its own reasoning less and reached an answer more often.

When the computation never reaches an answer

Weights are the numerical settings of a network. Modern models have millions or billions of them, and we usually cannot say precisely what each individual value does: behavior emerges from their combined action. That is why neural networks are called black boxes. But it does not mean nobody can look inside. Mechanistic interpretability already seeks specific mechanisms within networks, and methods for targeted model edits also exist.

Usually, weights change through training: a program compares an output with the correct answer, calculates the error, and gradually shifts values in the right direction. The researchers gave Astra access to the weights in a Python environment, but forbade training and gradient calculations. It could run Qwen on practice problems and examine what happened. What stands out is its targeted intervention in this particular failure without further training.

The first problem was visible without complex mathematics. On practice examples, Qwen repeated its reasoning until it ran out of the space allotted for an answer. Astra linked the loop to a particular direction introduced into the computation by two internal layers. It then subtracted that direction's influence from selected parts of the weights. It had a budget of 50 model runs on batches of practice prompts to find a solution; this was neither a blind intervention nor gradient-based retraining of Qwen.

Under the same conditions, roughly a third of answers on MATH-500 now hit the length limit, down from 93%. The score on the instruction-following test IFEval rose from 21.0% to 62.3%. The loop had prevented the model not only from finishing calculations but also from completing other tasks. These results still apply to the particular generation settings used; they do not tell us how Qwen would perform in every other use.

Qwen's maker itself warns that the small version can loop in reasoning mode and advises adjusting generation settings when necessary. The experiment therefore does not show that changing weights is the only way to limit loops. It shows that, in the test used, a direct edit to the model could also work.

Both the edit and the modified model are public. Ahsen Khaliq and the ML Intern team reconstructed the published weight changes, checked that they matched, and retested the modified model on all 500 MATH-500 problems, with four answers each time. They obtained 51%. In this checking run, they tried the original Qwen on only 25 problems. This checks that the published edit works; it is not a full independent repetition of the search for the fix or a complete comparison of the two versions.

The authors released logs of all experiments presented in their original article. They contain Astra's prompts and responses, the code and its outputs where Python was allowed, evaluation results, and available networks or weight changes. The repository does not include earlier attempts with different prompt wording or every intermediate file; large modified Gemma models and a third-party training corpus are represented by information and scripts for reconstruction instead. The logs allow detailed scrutiny of the process, but are not, on their own, independent confirmation of every result.

Gemma: errors with no single switch

The authors tested an important objection themselves. What if the dramatic jump does not show that AI can "write mathematics" into a model, but merely that it removed a malfunction hiding an ability already there? They therefore gave Astra the smaller Gemma 3 270M model. It did not normally loop when solving problems. Instead, it made ordinary errors in calculation and reasoning. Astra changed its weights, but the MATH-500 result did not move convincingly above the baseline of 6.8%; the best attempt reached 7.7%. The researchers do not consider that a demonstrated improvement.

With Qwen, then, Astra removed an obstacle in the model's behavior. With Gemma, it did not create a missing mathematical skill.

What the small networks revealed

Before Qwen, the authors checked whether Astra could identify a task from the numbers meant to perform it. It received raw weights from four small networks of the same architecture for games resembling Pong or Pac-Man, without game names and without being able to run the networks. It identified all four correctly; clues included the arrangement of weights for a game character and the movements the network distinguished.

It similarly examined three small image diffusion models, each trained on a different shape: a circle, triangle, or square. Astra inferred from the weights, without tools, what they were meant to draw, but described the shapes as outlines. In fact, the models produced filled shapes. Even a correct answer had a limit: Astra read the structure of the weights, not the complete image output.

The next three were small language models trained on English, programming code, or Japanese transliterated into the Latin alphabet. The authors removed the input and output layers and left Astra only the middle of the networks, so it could not simply read symbols for individual letters. Astra could use Python to analyze the weight matrices, but could not run the networks. Even so, it identified each language and pinpointed the so-called copy attention heads that help continue recurring portions of text.

From fixing a car to constructing new networks

Reading weights is one thing; the next question was whether Astra could change them. For a car that had to cross a ramp, it was given the weights of the control network and a record of one failed drive. The network drove straight ahead and got stuck before the obstacle. Without tools, Astra made a single edit so that the car first reversed to give itself room to accelerate; the modified network then succeeded in all 1,024 subsequent trials.

More ambitious still was an attempt to begin with zero weights. For three simple games, Astra received the rules, game code, and network architecture, but no data, opportunity to play, or training tool. It wrote out the weights directly as text. In all three games, its networks outperformed comparison networks trained with PPO for a hundred million steps; in Breakout, for example, Astra arranged the computation so that the paddle aimed for the ball's landing point.

For Go on a 9 × 9 board, the network had about one and a half million weights, too many to fit in the prompt as a list. Astra was therefore allowed to use Python to construct the weights layer by layer rather than simply write them out; training and searching game moves remained forbidden. Without a trial run, it beat smaller comparison networks. When allowed to run its network in up to fifty batches and revise it based on the results, it also beat an equally large opponent trained with PPO.

Bigger networks make the tools matter

One attempt to read weights alone did not work. The authors prepared pairs of Gemma models: one answered according to facts, while the other agreed even with a wrong answer suggested by the user. Astra had access to the weights and Python but, without running the models, failed to identify the sycophantic version in four attempts. It succeeded only when it was allowed to observe where the models directed their attention on its own examples; it then picked correctly in all three pairs without seeing their answers.

The successful attempts were not all performed in the same way, either. The four game networks and three shape models fit directly into the prompt, and Astra read them without tools. For the language models, it analyzed the weights with Python; for Go and Qwen, it could also observe the results of a limited number of runs. Developer Matthew Honnibal points out that these differences cannot be collapsed into a single ability to understand any model merely by looking at it.

The researchers call this weight-space programming: AI might be able to make targeted changes to neural networks, much as a programmer edits source code. Here, Astra fixed a loop in a different model. Qwen did not learn new mathematics, and Astra did not modify itself. It needed tools for larger tasks, and some attempts failed. The results open up an interesting direction, but further verification is needed to show whether it can become a reliable method for larger models, or someday for models repairing themselves.

Sources and further reading

  1. Rikiya Takehi et al.: Sparks of Weight-Space Programming (original article, November 2, 2026)
  2. Research authors: full experiment logs and evaluations
  3. Modified Qwen3.5-0.8B and verification run on Hugging Face
  4. Qwen3.5-0.8B: model documentation and loop warning
  5. Matthew Honnibal: technical critique of the interpretation of the experiments