AI guides

Qwen3.5-27B self-rewriting experiment: up to 6.6 points higher accuracy on 490 math problems

By 孙小雯0 viewsSource: 智东西
Qwen3.5-27B self-rewriting experiment: accuracy on 490 math problems improves by up to 6.6 percentage points

A research team lets models inspect internal states and edit their weights with code, without gradient training. After reserved-problem checks, Qwen3.5-27B's accuracy on 490 held-out math problems rises from 57.2% to as much as 63.8%. Smaller models fail; results remain task- and protocol-specific.

Editor's fact check (November 26, 2026): Accuracy changes in the paper are measured in percentage points: moving from 57.2% to 63.8% is an increase of 6.6 percentage points, and from 57.2% to 58.3% approximately 1.1 points. The three submitted versions' gains of 0.5, 4.0, and 6.6 likewise denote percentage points, not relative percentages. The 0.5-point version did not reach statistical significance in the paper's test. Results come from the specified Qwen3.5 models, problem sets, tool permissions, and reserved-problem checking procedure; they do not establish that any model can keep improving itself. The reported few hours on a single GPU refers to some sessions yielding the largest gains. In the repair experiment, an undamaged model modifies a damaged copy; its 70.2% image accuracy is approximately 83% of the original model's accuracy.Language Models Can Rewrite Their Own Weights paper (opens in a new tab)

Article illustration

Completed in a few hours on one GPU.

RSI research has found another route!

Zhidongxi reported on November 24 that a team from six universities, including the University of Illinois Urbana-Champaign (UIUC) and Carnegie Mellon University, recently jointly released Language Models Can Rewrite Their Own Weights. It proposes an approach to model self-evolution called self-rewriting (Self-rewriting). In the abstract, the researchers write: “We believe self-rewriting is a necessary step toward recursive self-improvement (RSI).”

Article illustration

▲ The Language Models Can Rewrite Their Own Weights paper page (source: arXiv)

The experiments use four open-source Qwen3.5 models, with two, four, nine, and 27 billion parameters. After self-rewriting, the 27-billion-parameter Qwen3.5-27B raises its accuracy on 490 math problems not used in rewriting from 57.2% to 63.8%, an increase of 6.6 percentage points.

Article illustration

▲ Weight self-rewriting and copy-repair results for models of different sizes, and the 27B copy's image-test performance before and after repair (source: paper)

Previously, there were two main ways to further improve an already trained model. The first is retraining: computing gradients and running an optimizer to update model weights, as in pretraining and post-training. The second is optimizing the inference process: changing prompts or adjusting the model's external execution framework, or harness, to alter the information it receives and the process used to complete tasks, while keeping its weights unchanged.

The paper's weight-editing method lets the model, without computing gradients or retraining, read its own hidden states and underlying weights, analyze the causes of errors, and then write code to modify its weights directly.

The study's first author, Jiajun Fan, received a bachelor's degree in intelligence science and technology from Nankai University in 2021 and a master's degree in computer technology from Tsinghua University in 2024. He is currently pursuing a PhD in computer science at UIUC, focusing on reinforcement-learning post-training and self-improvement of generative models.

In 2023, he was the first author of a paper on Learnable Behavior Control (LBC), accepted as an oral presentation at ICLR 2023, a leading AI conference. The AI agents trained in that research broke 24 human world records standing at the time in Atari game evaluations.

Article illustration

▲ Jiajun Fan (source: Jiajun Fan's personal website)

The study's last author, Ge Liu, received his bachelor's degree from Tsinghua University's Department of Electronic Engineering in 2015 and his PhD in computer science from MIT in 2020. He is now an assistant professor of computer science at UIUC, researching deep generative models, reinforcement learning, and AI-assisted scientific discovery. According to his personal website, the paper's authors Jiajun Fan, Neil He, Chaoran Cheng, and Ruihan Guo are all his students.

Article illustration

▲ Ge Liu (source: Ge Liu's personal website)

“The wall between training and inference is a limit of our tools, not a property of intelligence. (The boundary between training and inference stems from the limitations of our existing tools, rather than being an inherent property of intelligence.)” the researchers write in the paper.

Paper: https://arxiv.org/abs/2611.21885

01.

Analyzing its own answer records

Accuracy improves by up to 6.6 percentage points after weight edits

The researchers use the 27-billion-parameter open-source model Qwen3.5-27B to design two groups of self-improvement experiments. The groups differ in how edits are screened. In the first, the model decides whether to retain edits based on its own tests. The second adds an independent check before submission, letting the model consult performance on another reserved set of problems before deciding.

All submitted versions undergo final evaluation on the same 490 math problems not used for editing. Each problem is answered eight times, with up to 16,384 tokens generated per answer.

Experiment 1: comparing internal differences between answers to find effective edit locations

In the first experiment, the model generates at most 4,096 tokens per problem. Tests show that many answers fail to finish because the reasoning runs too long, while approximately 96% of completed answers are correct. The model therefore focuses on shortening excessive reasoning and producing answers promptly.

The model first compares the hidden states of completed and unfinished answers: the intermediate computations at each layer during generation. Because the two types differ more in later layers, it first tries editing those layers' weights, but its answering performance deteriorates instead.

It then examines hidden states in earlier layers, finding that differences between the two types start small and grow across layers. It hypothesizes that the behavior causing excessive reasoning may already form in relatively early layers, and turns to layer 8 to try a small edit.

Specifically, the model selects 20 completed and 20 unfinished answers and calculates each group's mean hidden state at layer 8. It uses the direction from the completed-answer mean toward the unfinished-answer mean as the basis for its edit. It then adjusts two output matrices in layer 8, reducing the component of that layer's output along this direction by 5%.

The edited model outperforms the original in all three paired tests on practice problems. In the final evaluation, the researchers test it on 490 math problems not used for editing, with eight answers per problem. Accuracy increases from 57.2% to 58.3%, an improvement of 1.1 percentage points.

Experiment 2: adding an independent check, with gains of up to 6.6 percentage points across three submitted versions

The second experiment comprises eight independent sessions. In each, the model starts from its original weights, searches for edits, and tests them itself.

Edits retained after the model's own tests must also undergo an independent check on 256 reserved practice problems. These problems have not previously been available for analysis or trial edits. The experimental system uses them to compare performance before and after editing, then gives the results to the model to decide whether to submit or withdraw.

Of the eight sessions, the model abandons edits during self-testing in three, and withdraws another two because gains on the reserved problems are limited. It ultimately submits three edited versions.

The researchers evaluate those three versions on the same 490 math problems, with eight answers per problem. The original model's accuracy is 57.2%; the three versions improve on it by 0.5, 4.0, and 6.6 percentage points, respectively, reaching as high as 63.8%. The best-performing version also reduces the proportion of answers truncated after exhausting their token budget from 33.6% to 26.1%.

On one problem asking it to count in base four and write the 20th number, the original model repeats “I will write the answer” 549 times, exhausting 16,384 tokens without answering. After editing, with the same random seed, the model gives the correct answer, 110, in 5,341 tokens.

Article illustration

▲ Results of the eight sessions and an example answer (source: paper)

According to the researchers, each of the sessions producing the largest improvements ran for a few hours on a single GPU. Every edit is recorded as model-written code that can be inspected, compared, and rolled back. The improvement resides directly in the weights, so the edited model can answer subsequent problems without an additional computational procedure for each answer.

02.

Locating damaged weights on its own

Accuracy across six image tests recovers to 83% of the original model's level

Next, the researchers test fault-repair ability. They make a copy of Qwen3.5-27B and overwrite eight rows of one weight matrix with random noise, leaving the copy almost unable to answer normally. They then ask the undamaged model to diagnose and repair its own copy.

The model is told only that some values in the copy have been corrupted. It must find the damaged location and determine how to edit it; the researchers do not provide the weight values from before the damage.

After inspecting 112 matrices, the model finds an anomaly in the feed-forward output matrix of layer 30. One weight has an absolute value 1,397 times the median absolute weight value in that matrix. This is precisely the matrix where the researchers injected noise.

The model then writes code to reduce the abnormally large weights and tests the edits on textual math problems. On 200 math problems not used for repair, the damaged copy's accuracy rises from zero to 33.0%. Further testing by the researchers finds that repairing only the anomalous matrix in layer 30 restores accuracy to 55.0%, close to the undamaged model's 58.5%.

Notably, the repair found through text problems also restores the copy's ability to handle image tasks. The researchers draw 100 problems from each of six image tests, covering visual math, image understanding, object recognition, and screen-element localization.

Across these 600 problems, the damaged copy's overall accuracy rises from 7.3% before repair to 70.2% afterward, approximately 83% of the undamaged model's accuracy. On the screen-element localization test ScreenSpot-v2, its accuracy rises from zero to 89%, close to the undamaged model's 93%.

Article illustration

▲ Accuracy of the damaged copy across six image tests before and after repair (source: paper)

03.

Self-rewriting ability is related to parameter scale

Only 27B succeeds among the four tested models

The researchers also find that self-rewriting ability is related to parameter scale. They test the two-, four-, nine-, and 27-billion-parameter Qwen3.5 versions with the same task and tools. Ultimately, only the 27-billion-parameter model successfully improves itself and repairs a damaged copy.

Article illustration

▲ How far the four model sizes progress through the stages of self-rewriting (source: paper)

The two-billion-parameter model fails to use tools effectively. Approximately 90% of its generated code encounters execution errors; it neither completes a weight edit nor successfully calls itself for testing. It also states in its reply that it is only a text model and cannot directly modify neural-network weights.

The four-billion-parameter model can edit weights and run tests, but does not inspect its hidden states, adjusting parameters mainly by guessing. Across 17 paired tests, the original model's accuracy is 40%–50%, while the edited version scores zero each time. The model ultimately withdraws all edits.

The nine-billion-parameter model inspects hidden states once and conducts 18 paired tests. However, it mainly uses a few problems the original model already gets wrong, failing to test effectively for accuracy losses caused by editing. After it submits its final edit, accuracy on 200 math problems not used for editing falls from 47.5% to zero. Every answer generates garbled text until the 16,384-token budget is exhausted.

The 27-billion-parameter model, by contrast, combines internal-state analysis with failure diagnosis, writes code to edit weights, and adjusts or abandons changes based on test results. From tool use and diagnosis to edit selection, it completes the entire self-rewriting process. Among the four sizes, it is also the only model to succeed in both improving itself and repairing a copy.

04.

Conclusion: RSI reaches into model weights

Gradually breaking down the separation between training and inference

On November 2, MIT researchers unveiled work on “weight-space programming,” having GPT-6 Astra write code to analyze and directly edit Qwen3.5-0.8B's weights, alleviating the smaller model's tendency to think repeatedly without producing an answer. This study goes further by having an open-source model diagnose errors and edit its own weights autonomously, moving from AI improving other AI to AI improving itself and exploring a new implementation route for recursive self-improvement.

Previously, AI could improve performance by editing prompts and external code. Now the target of self-improvement extends into the model itself, and the benefits of edits can persist in its weights for subsequent tasks. The paper's authors view self-rewriting as a necessary step toward RSI. Their longer-term vision is for models to adjust themselves to problems found in use, gradually breaking down the separation between training and inference. Starting from specific failures, this research offers a new direction for models to continue learning and improving after deployment.

This article is from Zhidongxi, by Sun Xiaowen.

Related topics

After reading

Join the AINRK community

Read how to join the community and connect with people working in AI.

Community information (opens in a new tab)