An AI model rewrote its own weights and raised its math accuracy from 57.2% to as high as 63.8%. The result comes from an experiment by an 11-member research team led by Jiajun Fan, using the 27-billion-parameter "Qwen3.5-27B." On November 16, 2026, the team posted a non-peer-reviewed paper, "Language Models Can Rewrite Their Own Weights" (DOI: 10.48550/arXiv.2611.21885), to arXiv, and revised it to a second version on November 18. The evaluation used 490 math problems that had not been used for training or practice, and in the best run, accuracy rose by 6.6 percentage points. However, all eight runs in this experiment started from the same unedited weights, so it does not demonstrate a process in which an improved model keeps improving itself in succession.
The AI examines its own weights and rewrites a test copy
A model's "weights" are the parameters used in the computations that turn an input into an answer. Improving a model's performance normally requires something like additional training, in which gradients are computed from training data and a loss function and the weights are updated. Fan and colleagues took a different approach: they gave Qwen3.5-27B the results of graded practice problems and an environment in which it could run code, and had the model itself work out how to change its weights. The model examines "hidden states," the intermediate computation results at each layer while it solves problems, and decides which weights to change and how. The actual rewriting is carried out by Python code the model generates.
The key point is the relationship between the model that devises the edits and the model that gets edited. The weights of the editing-side model stay fixed throughout the session, and the changes are applied to a test copy of the same model, which it operates through tools. The model can have the modified copy solve math problems and compare the results against the original state while weighing its proposed edits. This process does not use gradient computation via backpropagation; weights are changed using only forward passes and Python code execution. Exploration and verification still require computing resources, however, so the computational burden of additional training does not disappear entirely. Once the changed weights are saved, the changes carry over into later inference.
A related earlier study is Weight-Space Programming, published on November 2 by Rikiya Takehi and colleagues. In that experiment, GPT-6 Astra, a more capable external model, edited the weights of Qwen3.5-0.8B. Given 50 forward passes, accuracy on the math benchmark MATH-500 reportedly rose from 7.9% to 48.1%. Fan and colleagues' study differs in that it uses the same Qwen3.5-27B both as the model that devises the edits and as the model being edited.
Three edit proposals submitted in eight trials, with a best result of 63.8%
The team used two experimental procedures to test whether a model can improve its own weights. In the first, an edit the model itself decided to adopt raised math accuracy from 57.2% to 58.3%, a gain of 1.1 points (p = 0.038). In the second procedure, each exploration was limited to three hours, with at most 20 forward passes and 200 code executions. Answers generated during exploration could be up to 4,096 tokens long, and 256 problems were used for the initial diagnosis. In addition, before the model decided whether to submit, it generated two answers for each of 256 practice problems isolated from the editing work, and the model itself then decided, in light of those results, whether to submit or withdraw its proposed edit.
In the second procedure, the team ran eight trials, each starting from the same unedited weights, and the model submitted an edit proposal in three of them. Two of those edits showed statistically significant improvements on the 490-problem evaluation. In the evaluation, the unedited and edited models used the same random seeds and each generated eight answers per problem. The cap was 16,384 tokens per answer, and significance was judged with a one-sided permutation test at the problem level. All three submitted proposals met the condition of outperforming the unedited model on a preceding 200-problem test.
According to Appendix E.9 of the paper, of the remaining five trials, three found no edit proposal worth adopting, and in two the model withdrew its proposal after the pre-submission checks. Withdrawn proposals were not included in the final 490-problem evaluation. For each model, the evaluation yields 3,920 answers (490 problems × 8 answers), but the eight answers to the same problem are not necessarily independent. The statistical tests therefore compare at the problem level rather than counting individual answers as independent problems.
The results of the second procedure are as follows.
| Trial | Accuracy | Difference from unedited model | Statistical significance |
|---|---|---|---|
| Unedited model | 57.2% | — | — |
| Trial 1 | 57.8% | +0.5 points | p = 0.25 |
| Trial 2 | 61.3% | +4.0 points | p < 10⁻⁵ |
| Trials 3–7 | Proposal withdrawn | — | Not evaluated |
| Trial 8 | 63.8% | +6.6 points | p < 10⁻⁵ |
The 95% confidence interval for the improvement was 2.3 to 5.7 points in trial 2 and 5.0 to 8.1 points in trial 8. Comparing answers generated for the same problems and random seeds in trial 8, the best-performing run, there were 439 problem-seed combinations that only the edited model answered correctly and 182 that only the unedited model answered correctly.
The 490 evaluation problems were set aside separately from the same problem pool as the practice problems, after removing those with overlapping wording. Even when eight problems judged to be paraphrases of practice problems were excluded, the improvements in trials 2 and 8 remained statistically significant.
The paper also says that the accuracy of the "model in use" improved step by step across the eight sessions. But each session's exploration began from the unedited weights, and the adopted edit proposals were applied to the model in use. The results therefore need to be distinguished from a measurement of performance gains when modified weights are actually carried into the next exploration and changes accumulate.
Weight changes also reduced the share of answers that cut off partway
In trial 8, which recorded the highest accuracy, the model increased the "time-step bias" in all 48 layers that use linear attention by 0.5 each. This parameter relates to how much previously processed information persists in subsequent computation. With the modified model, the share of answers cut off by hitting the 16,384-token limit fell from 33.6% for the unedited model to 26.1%. Along with the accuracy gain, cases where long reasoning could not be completed also decreased.
In trial 2, the model compared hidden states on practice problems for cases where it finished an answer and cases where it hit the token limit. It identified the direction in which the two differ, and modified two output matrices in layer 63 so that the component along that direction was weakened. Each of these edits was one the model decided on itself, by analyzing computation results and determining a concrete way to modify the weights.
Because the team compared the models before and after the changes under identical evaluation conditions, it can be said that, at least in this experiment, the weight edits improved accuracy and also reduced the share of answers reaching the token limit. As for the trial 8 edit, the model itself interpreted it as making the influence of past information decay faster, so that it gets stuck less often in the middle of long reasoning. However, how much the reduction in answers hitting the token limit contributed to the accuracy improvement was not separately verified.
Repairing a corrupted model restores image-task accuracy from 7.3% to 70.2%
Separately from improving a healthy model, the team also ran a repair experiment on a Qwen3.5-27B whose weights had been deliberately corrupted. They replaced eight rows of an output matrix in layer 30 of the 64 layers with noise, producing a model whose performance dropped sharply. The repair was handled by an uncorrupted model of the same type, which could not see the values of the weights before corruption. The model was told only that some of the weights were broken, and was made to search for the damaged locations and a way to repair them while solving text-based math problems.
To evaluate performance after repair, the team used 600 problems, 100 from each of six image-related benchmarks. One answer was generated per problem with the same random seed, with a limit of 16,384 tokens. As a result, overall accuracy, which had fallen to 7.3% after the corruption, recovered to 70.2% after repair. Accuracy before corruption was 84.3%, so the model regained performance equivalent to about 83% of that level.
In particular, on ScreenSpot-v2, which involves locating a specified target on a screen, the corrupted model got 0 of 100 correct, whereas after repair it answered 89 correctly. That approaches the pre-corruption level of 93. Only text-based math problems were used when searching for the repair method, yet the effect extended to multiple image-related tasks. This suggests the repair restored the corrupted model's functioning itself rather than adapting it to particular math problems. On the other hand, for the experiment improving a healthy model's weights, it was not examined whether performance also improves on tasks other than math.
Success at self-editing depends on model size
The team also compared self-editing ability in the 2-billion-, 4-billion-, 9-billion- and 27-billion-parameter models of the Qwen3.5 series. The 2-billion-parameter model could not produce an edit proposal, and the 4-billion-parameter model withdrew its proposal because none of the problems could be answered correctly after the change. For the edit proposal submitted by the 9-billion-parameter model, accuracy on the 200-problem evaluation fell from 47.5% to 0.0%. Under these conditions, only the 27-billion-parameter model succeeded at self-editing.
However, even the 27-billion-parameter model withdrew its proposal in the session that explored edits with the 16,384-token limit shared with the other models. In the trials where it found a valid edit proposal, the limit during exploration had been shortened to 4,096 tokens, which allowed more tests to be run within the limited time. The success therefore cannot be attributed to model size alone; the amount of computation during exploration and the number of trials also play a role.
This study showed that a language model can inspect its own internal states, change its weights, and improve its accuracy on math problems without gradient computation or additional training. Unlike conventional additional training, the effect of a change can be saved in the weights, so once an edit is made, the same exploration need not be repeated for each later inference.
As of November 20, 2026, no results of a replication under the same conditions by another research team had been made public. Also, each of the eight trials here started from unedited weights, and no experiment has been done that uses a modified model as the starting point for the next edit. Going forward, it will be important to measure whether math performance improves further, and whether improvements already obtained are maintained, when edits are stacked while carrying over modified weights. Evaluating performance on kinds of tasks not used in editing would also help determine whether the model's overall ability can be raised continuously, rather than the gains being limited to particular problems.
