Hugging Face Papers ↗ · 2026-11-21
Self-WSP: Can Language Models Improve Themselves Through Weight-Space Programming?
Media reports Hugging Face Papers Source language: Chinese
Research shows language models like Qwen3.5-0.8B can improve themselves via Weight-Space Programming, raising GSM8K and MATH500 accuracy to 62.2% and 32.2%, though…
Full text
Self-WSP: Can Language Models Improve Themselves Through Weight-Space Programming?
Guoming Ling Affiliation: Carnegie Mellon University Affiliation: MilkThink Shanshan Zhong Affiliation: Carnegie Mellon University Kaixuan Zhang Affiliation: MilkThink Zhongzhan Huang Affiliation: MilkThink
Abstract
Frontier language models can now read and edit the weights of a neural network much like code and thereby improve a small model, an approach known as Weight-Space Programming (WSP). We further explore applying WSP to a language model itself, which we call Self-WSP. Specifically, Qwen3.5-0.8B reads its own weights, proposes an edit, and then continues with the edited weights as both problem solver and editor. We find many cases of genuine self-improvement. Self-edits can raise GSM8K accuracy from 11.8% to 62.2% and MATH500 accuracy from 7.0% to 32.2%, sometimes by changing only 16 parameters, and in some cases repeated self-editing keeps improving the model. A closer look, however, reveals that these gains lack interpretability. The model shows little understanding of the edits it makes, and WSP driven by random search sometimes performs comparably. Self-WSP thus holds promise as a path toward recursive self-improvement (RSI), but realizing this promise requires further exploration.
1 Introduction
A system that improves its own intelligence, and with it its ability to improve itself further, is a long-standing idea known as recursive self-improvement (RSI) (Good, 1966; Schmidhuber, 2007). Language models already improve themselves in several ways. They train on rationales, data or rewards they generate themselves (Zelikman et al., 2022; Huang et al., 2023; Yuan et al., 2024), rewrite the code that calls them (Zelikman et al., 2024; Zhang et al., 2026), or learn to write their own finetuning data (Zweiger et al., 2025). In each case, however, the model changes its weights only indirectly, through data, code or training.
Figure 1: The Self-WSP loop. One model plays two roles. As the editor, it reads its own current weights and proposes an edit. As the solver, it answers practice questions using a copy of the weights with the edit applied. The outer loop checks whether more answers are correct, and if so the copy replaces the current weights, so that the next proposal comes from the edited model.
Figure 2: Test accuracy of the best model of each method. Each method contributes its Top-1 model, the one with the largest gain on validation questions. In the Self-WSP experiments of Section 2, the shuffled interface lists the tensor catalog in random order and the ordered interface lists it by layer. Continued runs let the best shuffled models keep editing themselves under the ordered interface. Bold values mark the highest Self-WSP score shown for each dataset. Random search replaces the editor with a random sampler under the same budget as the shuffled interface. The single random edit is the best of the edits tested individually on the original model, as described in Section 5. GPT-6’s two edits come from Takehi et al. (2026) and are re-evaluated in our pipeline.
Weight-Space Programming (WSP) offers a more direct route. Takehi et al. (2026) show that GPT-6 Astra, hereafter GPT-6, can read the weights of a neural network and edit them much like code. Asked to make Qwen3.5-0.8B better at math without gradients, it traced the small model’s failures to a single direction in two MLP layers, removed that direction from 0.016% of the weights, and raised MATH500 accuracy from 7.9% to 48.1%. Their experiments leave open whether a model can improve its performance by editing its own weights.
We study this possibility directly. In Self-WSP, Qwen3.5-0.8B edits itself. As Figure 1 shows, the model reads its own weights, proposes an edit, and continues with the edited weights, both as the solver that answers questions and as the editor that proposes the next edit. A fixed outer loop decides which edits to keep, and for this purpose we divide questions into three kinds. Practice questions come from the training split with reference answers, and are used to test whether an edit helps. Validation questions also come from the training split but are never shown to the editor, and serve only to select models after the search. The test sets are the standard GSM8K and MATH500 test questions, used only for the final evaluation. With this setup we ask four questions, and Figure 2 summarizes the test accuracy of the best model of each method.
•
Can a model improve itself through its weights? Yes. Self-edits raise GSM8K accuracy about fivefold and MATH500 accuracy more than threefold, sometimes by changing a handful of numbers.
•
Does the model know what it is doing? Hardly. It edits whichever tensors are listed first, reuses numbers it has just read, and often gives hallucinated explanations. Many of the edits it keeps make the model worse.
•
Can random edits do the same? To some extent. Random search matches self-editing on GSM8K but falls short on MATH500, and the best single random edit is as good as the simpler of GPT-6’s two published edits.
•
Can Self-WSP keep improving the model? In lucky cases. Continued self-editing lifts the best models further, to more than four times the original MATH500 accuracy, while typical runs make little further progress.
Self-improvement through the weights is therefore within reach of even a 0.8B model. Its current successes, however, come mostly from search and selection rather than from understanding, and closing this gap is the main challenge ahead.
2 Self-Weight-Space Programming
Self-WSP is a loop in which a single model alternates between editing its weights and using them.
One model, two roles.
Both roles are played by Qwen3.5-0.8B (Qwen Team, 2026), a 24-layer model in which three of every four layers use linear attention (Yang et al., 2025b) and the fourth uses standard attention. A linear-attention layer stores what it has read in a fixed-size state and forgets old information at a rate set by its weights. As the editor, the model proposes edits with thinking turned off. As the solver, it answers math questions with thinking turned on, using the sampling settings of Takehi et al. (2026). Both roles always use the current weights, so every kept edit changes both how the model solves problems and how it then proposes the next edit.
Reading its own weights.
The editor sees a catalog of the 318 tensors it may edit, which covers all 24 layers and gives the name and shape of each tensor. After it picks one or two tensors, it receives their shape, statistics such as the mean and standard deviation, up to 64 of their values with positions, and the norms of their rows and columns. It also sees how the current model does on a batch of practice questions, including the reference answers and the end of the model’s responses for a few examples. This matches the setting of Takehi et al. (2026), where GPT-6 also reads the actual weight values, can check its edits only on practice questions from the training split, and never sees the test sets. The difference is that GPT-6 could analyze the weights freely in a Python environment, whereas our editor sees only the information above, precomputed by the system. Appendix A describes the full interface.
Writing its own weights.
A model this small does not reliably follow output formats, so the editor writes its edits as JSON under a grammar built from the tensor shapes (Willard and Louf, 2023; Geng et al., 2023). Each proposal contains one or two edits. An edit selects a block of consecutive entries, rows or columns in a tensor and applies one of seven operations to it. It can set the block to zero, multiply it by a number, add a number, fill it with a number, redraw it at random from the tensor’s mean and standard deviation, remove a direction, or apply a short NumPy expression. Removing a direction applies only to matrices. The editor names one column of the matrix as the direction, and every selected column subtracts its component along that direction, scaled by a coefficient. A coefficient of 1 removes this component entirely. GPT-6’s most effective edit also removes a direction, but computes it from the model’s activations. The grammar guarantees the format but not the content, and edits that repeat an earlier one, rescale a whole tensor uniformly or change no value are discarded at once. We call the remaining edits valid edits.
Keeping edits.
Each run proceeds in rounds from a starting model. Every round has a fixed budget, the largest number of valid edits it may try, and the editor proposes edits until the budget is spent. A round also ends early after 24 proposals or after several valid edits in a row are rejected. Each valid edit is first applied to a copy of the weights and then checked on two disjoint practice batches. It is kept only if the edited model solves enough additional questions on the two batches combined without doing worse on either, in which case the copy becomes the new current weights. The budget, the batch size and the required gain depend on the interface, which we describe next.
Two interfaces.
We run the loop with two interfaces, which differ mainly in how the tensor catalog is ordered. The shuffled interface lists all tensors in a random order, and the editor picks tensors directly. It uses 32 practice questions per batch, keeps any edit that gains a single answer in total, and runs three rounds with budgets of 4, 6 and 12 valid edits. The ordered interface lists the tensors in layer order, and the editor first picks a layer and then tensors within it. It uses 128 questions per batch, requires a total gain of at least three answers, and spends a budget of 8 valid edits per round. Appendix B gives the full settings.
Selection and testing.
After every round we score the current model on validation questions, without ever feeding the result back to the editor. The round with the largest validation gain gives the best model of each run. A setting is one combination of dataset, interface and starting point and contains 12 or 24 runs. In each setting we take the best models of the three runs with the largest validation gain, name them Top-1, Top-2 and Top-3, and call them the selected models. Only the selected models are evaluated, once each, on the full GSM8K (Cobbe et al., 2021) and MATH500 (Hendrycks et al., 2021; Lightman et al., 2024) test sets. Being the best three of 12 or 24 runs, they show the best case. To see what an ordinary run achieves, we also designate several runs by a fixed rule before the search and test them whatever their outcome. Because they are never selected, these runs act as random spot checks, and we therefore refer to them as spot-check runs.
Continued runs.
To study continued self-improvement, we also let the selected models of the shuffled interface keep running under the ordered interface, and call these continued runs. We write +kk for kk rounds of ordered self-editing accumulated on top of a selected shuffled model, and Section 6 gives the details.
3 Can a Model Improve Itself
Through Its Weights?
Setting Original Top-1 Top-2 Top-3
GSM8K Shuffled 12.5 31.9 28.7 16.5
Ordered 11.8 61.0 59.9 54.0
Continued +8 11.8 62.2 53.3 48.1
MATH500 Shuffled, batch 1 6.9 17.3 10.4 8.1†
Shuffled, batch 2 7.0 17.7 22.0 8.3†
Ordered 7.0 24.2 21.9 24.7
Continued +4 7.0 25.4 25.4 28.4
Continued +12 7.0 31.8 32.2 28.6
Table 1: Test accuracy in % of all 24 selected models, ranked within each row by validation gain. Shuffled and ordered rows start from the original model. Continued rows start from selected models of the shuffled interface and keep running under the ordered interface, with +kk counting the accumulated ordered rounds, so the MATH500 +12 models come from eight more rounds on the selected +4 models. On MATH500 the shuffled interface ran in two batches of 24 runs. Original is the unedited model evaluated on the same hardware and sampling seeds. All gains over the original model are significant except those marked †.
It can. Of the 24 selected models in Table 1, 22 are significantly better than the original model, and the remaining two gain just over one point. Under the ordered interface, self-editing lifts GSM8K accuracy from 11.8% to 61.0% and MATH500 accuracy from 7.0% to 24.7%. Continued runs raise them further to 62.2% and 32.2%. The best self-edited GSM8K model comes within five points of GPT-6’s best edit, which reaches 66.9% in our evaluation, whereas on MATH500 GPT-6’s best edit stays far ahead at 49.5%.
A few numbers suffice.
The successful edits are remarkably small. The 24.2% MATH500 model differs from the original model in only 16 numbers, the A_log of the first linear-attention layer, which sets how quickly each head of that layer forgets the past. A GSM8K model that changes 32 numbers in the same layer reaches 59.9%. One continued MATH500 model differs from its starting point in just two numbers yet gains another 6.8 points. No selected model changes more than 0.2% of its weights, and Appendix D lists every kept edit.
4 Does the Large Language Model Know What It Is Doing?
The model clearly improves itself. How it does so is less flattering.
Figure 3: The kept proposal behind the 61.0% GSM8K model, abridged. The editor reuses the mean it has just read in both edits, while its explanation claims to undo a scaling by that same number. The catalog assigns each tensor an opaque identifier such as p273 or p298, as described in Appendix A.
A lucky edit.
Figure 3 shows the key proposal behind the best GSM8K model started from the original model. The editor picks layer 0, reads the first two tensors of that layer, multiplies the first by the mean −1.979-1.979 of the second, and adds the same number to the second. Its explanation claims that these weights had been multiplied by −1.9795-1.9795 by mistake and that this scaling should be removed. Undoing a multiplication by −1.9795-1.9795, however, would require dividing by that number, yet the editor multiplies by it once more. The scaling it claims to remove is exactly the one it now applies, so the explanation contradicts the edit itself. The edit nevertheless raises the correct answers on the two practice batches from 12 and 20 to 78 and 87, and the resulting model scores 61.0% on the test set.
Most proposals fail.
This proposal is typical in everything but its luck. Of the 11,580 proposals the editor made, 69% are invalid even though the grammar guarantees their format. Most of them repeat an edit already tried or rescale a whole tensor uniformly, which the prompt explicitly forbids. Only 12% of the valid edits are kept. The editor never uses the two operations that can express structured changes, removing a direction and writing an expression, and almost always just multiplies or shifts a block of numbers.
Figure 4: Layer of every valid edit. Each cell gives the rounded percentage of valid edits that fall in that layer. The first row, in grey, is each layer’s share of the catalog, the distribution an editor would follow if it treated all tensors alike. Under the shuffled interface, which lists the catalog in a random order, edits spread over the layers roughly in this proportion. Under the ordered interface, which lists the catalog by layer, 62% of valid edits fall in layer 0, the first entry of the catalog.
Where it edits follows the catalog.
With a shuffled catalog, the editor spreads its edits over all layers, and layer 0 receives 2.9% of them, close to its 4.4% share of the catalog. With a catalog ordered by layer, layer 0 receives 62%, as Figure 4 shows. This preference appears already in the first proposal of each round, before the editor has seen the outcome of any proposal in that round. The first two tensors of layer 0 are exactly the two edited in Figure 3. All 15 selected models from the ordered interface edit A_log in layer 0, while none of the nine from the shuffled interface do. Changing how fast the first layer forgets is a reasonable target, but the editor seems to have arrived at it simply by reading the catalog from the top.
Its numbers copy the statistics it reads.
The numbers in its edits are often copied as well. Between 9% and 28% of the values in valid edits equal a statistic the editor has just read, such as a mean, a standard deviation or a norm. The layer-0 A_log mean of −1.979-1.979 alone appears as a scale or a shift in four selected models.
Its explanations are often hallucinated.
The explanations attached to kept edits are no more reliable. Many are empty, describe a block other than the one edited, or have nothing to do with weights at all. They are hallucinations in the usual sense for language models, fluent text that is unfaithful to the input or to the facts (Ji et al., 2023). The most extreme one reads, in full, “The cost of one chair is $11.” This sentence is copied word for word from the end of a solver response to a chair-pricing question in the practice feedback of the same call, and has nothing to do with the edit it accompanies.
Figure 5: Validation accuracy of all runs started from the original model under the ordered interface, 24 per dataset. Two runs per dataset are highlighted to represent typical trajectories, thin light lines show the other runs, and the dashed line marks the original model.
Kept edits often hurt.
Doing better on practice questions does not guarantee a better model. Estimating a model’s ability from a small set of questions saves time (Huang et al., 2025; Ling et al., 2026c), but the estimate has a long-tailed error and can occasionally land far from the full evaluation (Ling et al., 2026a). Because the outer loop decides from practice scores alone, it inevitably keeps some edits that pass by luck. Under the shuffled interface, more than 40% of the rounds that keep an edit lower validation accuracy. The larger batches of the ordered interface help, yet a third of such rounds on MATH still do. Figure 5 shows the resulting variety. Some runs jump in a single round, some climb steadily, some first fall below the original model and then recover, and some drift downward. On GSM8K, eleven of the 24 runs gain more than 23 points while the other thirteen gain less than 10. Spot-check runs, which are never selected, better represent an ordinary run. The ordered interface has six per dataset, and on the test sets they gain on average 24.7 points on GSM8K and 7.7 points on MATH500, far less than the selected models.
The edits are thus the model’s own, made from its own weights without any test information. Yet where it edits follows the catalog it is shown, what it writes copies what it reads, and the reasons it gives are often hallucinated. The large gains come from a few lucky proposals, and it is the outer loop that keeps them.
5 Can Random Edits Do the Same?
If lucky proposals drive the gains, random edits might do as well. We test this by replacing the editor with a random sampler that calls no model.
Figure 6: Final validation change of every run under the shuffled interface. Each dot is one run, the shaded curve above the dots shows their distribution, and the black bar marks the mean. The frozen editor always uses the original weights while only the solver is edited. Random search uses the same tensors, operations and selection rules, and its larger budget is about twice the self-editing budget on GSM8K and 1.7 times on MATH.
Random search.
For each proposal, the sampler draws one tensor uniformly from the catalog, or two with probability one fifth. It then picks a random layout, start and count, and a random operation with its value, choosing among setting to zero, scaling, adding or filling a small number, redrawing and removing a direction. Appendix C gives the exact distributions. The sampler runs through the same loop with the same selection rules as the shuffled interface. With the same budget, it spends exactly as many valid edits per round as the self-editing run with the same random seed. With the larger budget, it spends a fixed 4, 6 or 12 valid edits per round. On GSM8K, random search matches self-editing. Its best model scores 32.8% against 31.9% for self-editing, and Figure 6 shows that the two sets of runs look much alike. We also test a frozen editor, which always uses the original weights while only the solver is edited. On average it behaves much like the other two, so letting the editor itself be edited brings no clear benefit. MATH500 is different. With the same budget, random search finds no improvement, while self-editing reaches 17.3%. Only with about 70% more budget does random search find a 13.6% model, by zeroing 256 rows of one linear-attention layer.
Figure 7: The 352 single random edits applied to the original model, ranked from best to worst by the accuracy change they cause in the screening. The screening uses 128 held-out training questions with one sample each and an 8,192-token limit, so the vertical axis is meant for comparison within the figure and not against test accuracy. The grey band is the range of sampling noise when no edit is made. The solid blue line is the selected shuffled-interface model with the largest screening gain. Like the random edits, it starts from the original model, and its test accuracy is 31.9% on GSM8K and 17.7% on MATH500. The stronger models of the ordered interface were not part of this screening. The dashed line is GPT-6’s simpler zeroing edit.
Single random edits.
Random search still selects and accumulates edits. To see what a single random edit does on its own, we remove both steps. For each dataset we draw 352 random edits, apply each alone to the original model, and evaluate it on 128 held-out training questions that are neither practice nor validation questions. We call this step the screening, and to save compute it samples each question once with an 8,192-token limit. Judging whether an edit really helps also requires knowing how much the score moves without any edit. The original model answers with some randomness, and merely answering again with another random seed moves its score on these 128 questions by a few points. We call this movement sampling noise and take its 5th to 95th percentile as the noise range, shown as the grey band in Figure 7. An edit inside the band cannot be told apart from doing nothing.
As Figure 7 shows, most random edits fall inside the grey band or below it. On GSM8K, 78 edits fall below the band and only 24 rise above it. Large edits that touch tens of thousands to millions of weights do the most damage, and almost every kind of operation hurts on average. A few random edits nevertheless help. We rescore the best eight per dataset on 512 further questions from the practice pool and test the winner. It reaches 22.3% on GSM8K by scaling 4,096 weights of a convolution by −2-2, and 14.0% on MATH500 by scaling 64 rows of a query projection by −2-2. Appendix C gives the sampling details.
GPT-6’s simpler edit is a random edit.
One of GPT-6’s two published edits sets 256 columns of the attention output matrix of layer 15 to zero. Such an edit lies within the range of the single random edits, although the sampler would draw it only about once in 130 million tries. In our evaluation it scores 22.0% on GSM8K and 13.8% on MATH500, as good as the best single random edits, and in the screening it merely ranks among the better random edits. GPT-6’s stronger edit removes a direction computed from the model’s activations, which lies outside what the sampler can produce.
Where self-editing beats chance.
Self-editing does beat chance in places. In the same screening, the best self-edited model of the shuffled interface gains more than all 352 random edits on both datasets. On MATH500, the selected continued +4 models gain up to 17.2 points in the screening, more than twice the best random edit, and self-editing also beats random search with the same budget. Its proposals are thus better than random draws, though only modestly, and not because the model knows why they work.
6 Can Self-WSP Keep Improving the Model Round After Round?
A model that truly improves itself should keep improving when given more time. We therefore let the selected models of the shuffled interface keep running under the ordered interface. On GSM8K, the three selected shuffled models, which we call A, B and C, each run eight more rounds, reaching +8. On MATH500, the six selected shuffled models first run four rounds each, reaching +4, and the three selected +4 models then run eight more rounds, reaching +12 in total. Each continued setting again yields three selected models. In the eight-round settings each starting model has four runs, and we designate the first in advance as a spot-check run, tested after its 4th and 8th rounds.
Figure 8: Continued self-editing. The horizontal axis shows the original model and the selected shuffled models, with +4, +8 and +12 marking the cumulative rounds of ordered self-editing from the shuffled models. Solid lines connect each selected model with its starting model. Each selected model comes from the round of its run with the best validation score and is drawn at the end of its setting. Dashed lines are spot-check runs. They start from the same models as the selected ones but are fixed before running and never selected, so they represent an ordinary run. Each is tested after its 4th and 8th rounds, which correspond to +4 and +8 on GSM8K and +8 and +12 on MATH500. Labels A, B and C mark the selected GSM8K models of the shuffled interface.
The best models keep climbing.
The solid lines of Figure 8 show that the selected models do improve further. On GSM8K, model B rises from 28.7% to 62.2% at +8. On MATH500, a selected shuffled model at 8.3% grows into models of 25.4% to 28.4% at +4, and one of these reaches 32.2% at +12 while differing from its starting point in just two numbers. Most of these gains arrive soon after the switch to the ordered interface, when runs find the layer-0 edit of Section 4.
Typical runs stall.
The selected models are the best three of 12 runs and naturally favor the lucky ones. The spot-check runs, the dashed lines in Figure 8, show what an ordinary run achieves, and they tell a different story. On GSM8K the spot-check runs gain little after +4, and the best of them slips from 53.3% at +4 to 51.6% at +8. On MATH500 all three start from selected +4 models, and by +12 one gains three points, one ends where it started, and one falls steadily from 28.4% to 23.4%. Across all 12 eight-round runs on MATH, kept edits leave validation accuracy unchanged on average.
More rounds give the outer loop more chances to find a good model, but although its weights keep changing, the model itself does not become any better as an editor.
7 Discussion
The outer loop does much of the work.
The model proposes every edit and is changed by every kept one, but the outer loop does the rest. Using practice questions with reference answers, it decides which edits to keep, when to stop and which run to test. Self-WSP is therefore best seen as a search in which the model supplies the proposals, and these proposals beat random ones on MATH500 but merely match them on GSM8K.
Why small edits go a long way.
As its model card warns, Qwen3.5-0.8B often gets stuck repeating itself while thinking, and the original model fails to finish within its 32k-token budget on about 90% of questions. Almost every answer that an edit makes correct is one the original model never finished, and across all evaluated models accuracy falls almost linearly with the share of unfinished answers. Any edit that breaks the repetition can therefore raise accuracy sharply. This fits reports that a few parameters can have outsized effects (Yu et al., 2024), that correcting a small fraction of thinking tokens during reasoning clearly raises accuracy (Ling et al., 2026b), and that Qwen models improve at math even when trained with spurious rewards (Shao et al., 2026). It may also explain why GPT-6 could not improve Gemma 3 270M, a model that rarely repeats itself (Takehi et al., 2026).
Toward genuine self-improvement.
A model that improves itself because it understands its weights must act on what it reads. Natural next steps include tools for analyzing weights, which GPT-6 had and our editor lacked, training a model to propose edits (Zweiger et al., 2025), and solvers whose failures run deeper than repetition. Progress along this path is best measured against random search with the same interface and budget, and reported together with spot-check runs.
8 Related Work
Large language models.
Scaling models and data has given language models broad abilities (Kaplan et al., 2020; Brown et al., 2020; Touvron et al., 2023; OpenAI, 2023; Yang et al., 2025a). Chain-of-thought prompting elicits intermediate reasoning steps (Wei et al., 2022). Reinforcement learning trains models to reason at length (Guo and others, 2025), and test-time scaling trades more inference compute for higher accuracy (Snell et al., 2025; Wan et al., 2026), for example by searching for better reasoning paths (Ling et al., 2026b). Mathematical reasoning is a common testbed for testing and improving these abilities (Cobbe et al., 2021; Hendrycks et al., 2021; Qin et al., 2024). These advances rely on training, prompting or extra inference compute, whereas Self-WSP lets a model directly rewrite its own weights without gradients.
Self-improvement.
Models can refine their outputs with their own feedback (Madaan et al., 2023) or generate more creative data and train on the best of it (Zhong et al., 2024), although they often fail to correct their own reasoning (Huang et al., 2024). Other work lets a model rewrite its own prompts, agent designs or running logic and keeps the better versions (Fernando et al., 2024; Hu et al., 2025; Yin et al., 2025). All of these methods act on data, prompts or code, whereas Self-WSP acts on the weights themselves. The idea of a neural network that modifies its own weights is old (Schmidhuber, 1993), and modern self-referential weight matrices can rewrite themselves at run time (Irie et al., 2022). These networks, however, are trained for this purpose, while Self-WSP lets a general-purpose language model read and write its own weights from instructions in natural language.
Editing and writing weights.
Model editing changes facts or behaviors through targeted weight updates (Meng et al., 2022; Meng et al., 2023), trained editor networks (Mitchell et al., 2022), arithmetic on weight differences (Ilharco et al., 2023) or the removal of single directions (Arditi et al., 2024), usually guided by interpretability (Elhage et al., 2021). Pruning research uses weight statistics such as norms to judge which parameters can be removed, finds that these statistics often fail to tell parameters apart (Huang et al., 2021), and turns to search to blend several criteria (He et al., 2021). Hypernetworks use one network to generate the weights of another (Ha et al., 2017), and language models have been used to explain the neurons of other models (Bills et al., 2023). WSP instead asks a general-purpose language model to read and write weights toward a goal stated in natural language (Takehi et al., 2026). Fan et al. (2026) improved Qwen3.5-27B’s math accuracy using a frozen copy as editor. Other WSP studies include Kundu (2026); Hu et al. (2026); Fischetti (2026); Salloum and Ali (2026).
Propose and select.
Our loop resembles methods in which a language model proposes candidates and an evaluator keeps the best. Such methods have been applied to prompts, pipelines, programs and algorithms (Yang et al., 2024; Khattab et al., 2024; Romera-Paredes et al., 2024; Novikov et al., 2025), and a language model can even act directly as an evolution strategy over numerical parameters (Lange et al., 2024). Evolutionary search has also been used to find ways of merging the weights of several models (Akiba et al., 2025). In Self-WSP, the language model that proposes the candidates is itself the object being optimized.
Gradient-free and random baselines.
Evolution strategies and zeroth-order methods optimize networks with forward passes alone (Salimans et al., 2017; Malladi et al., 2023), now even for language models with billions of parameters (Qiu et al., 2026). Random search is a strong baseline in hyperparameter optimization and reinforcement learning (Bergstra and Bengio, 2012; Mania et al., 2018), and in benchmark compression a randomly drawn subset of questions often comes close to the full benchmark (Ling et al., 2026a). Repetition and overthinking are known failures of text generation and reasoning models (Holtzman et al., 2020; Xu et al., 2022; Chen et al., 2025). Our results connect these threads. When models fail mainly through repetition, random perturbations can also be useful.
9 Conclusion
We asked whether a language model can improve itself by editing its own weights. Our results show that a 0.8B model can. Its own edits raise GSM8K accuracy fivefold and MATH500 accuracy more than fourfold, sometimes by changing a handful of numbers, and in lucky runs continued self-editing keeps paying off. Despite the improvements, the model shows little understanding of its edits, and random edits sometimes achieve comparable gains. Self-WSP is a promising path toward RSI, and turning it into a reliable ability is the work ahead.
Limitations
We study a single small model on two math benchmarks, and its main weakness, repetitive thinking, is unusually easy to repair. The outer loop uses the reference answers of practice questions to decide which edits to keep, so the improvement is supervised. The ordered interface was designed after we had seen the results of the shuffled one. We have not yet run random search under it, nor tested the source of the layer-0 preference directly by reversing the catalog. Finally, the comparison with GPT-6 is only indicative, since GPT-6 used different tools, feedback and budgets.
Ethics Statement
Self-editing of weights may introduce behaviors that a math benchmark does not measure. All edits in this study are logged and reproducible and concern a 0.8B model evaluated on public benchmarks. We use Qwen3.5-0.8B under the Apache-2.0 license, GSM8K and MATH under the MIT license, and the GPT-6 edits under CC BY 4.0.
References
Akiba et al. (2025) T. Akiba, M. Shing, Y. Tang, Q. Sun, and D. Ha Evolutionary optimization of model merging recipes. Nature Machine Intelligence 7. External Links: Document Cited by: §8.
Arditi et al. (2024) A. Arditi, O. Obeso, A. Syed, D. Paleka, N. Panickssery, W. Gurnee, and N. Nanda Refusal in language models is mediated by a single direction. In Advances in Neural Information Processing Systems, Vol. 37. Cited by: §8.
Bergstra and Bengio (2012) J. Bergstra and Y. Bengio Random search for hyper-parameter optimization. Journal of Machine Learning Research 13, pp. 281–305. Cited by: §8.
Bills et al. (2023) S. Bills, N. Cammarata, D. Mossing, H. Tillman, L. Gao, G. Goh, I. Sutskever, J. Leike, J. Wu, and W. Saunders Language models can explain neurons in language models. Note: https://openaipublic.blob.core.windows.net/neuron-explainer/paper/index.html Cited by: §8.
Brown et al. (2020) T. B. Brown, B. Mann, N. Ryder, M. Subbiah, J. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell, et al. Language models are few-shot learners. In Advances in Neural Information Processing Systems, Vol. 33, pp. 1877–1901. Cited by: §8.
Chen et al. (2025) X. Chen, J. Xu, T. Liang, Z. He, J. Pang, D. Yu, L. Song, Q. Liu, M. Zhou, Z. Zhang, R. Wang, Z. Tu, H. Mi, and D. Yu Do NOT think that much for 2+3=? on the overthinking of long reasoning models. In Proceedings of the 42nd International Conference on Machine Learning, Proceedings of Machine Learning Research, Vol. 267, pp. 9487–9499. Cited by: §8.
Cobbe et al. (2021) K. Cobbe, V. Kosaraju, M. Bavarian, M. Chen, H. Jun, L. Kaiser, M. Plappert, J. Tworek, J. Hilton, R. Nakano, C. Hesse, and J. Schulman Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168. Cited by: §2, §8.
Elhage et al. (2021) N. Elhage, N. Nanda, C. Olsson, T. Henighan, N. Joseph, B. Mann, A. Askell, Y. Bai, A. Chen, T. Conerly, N. DasSarma, D. Drain, D. Ganguli, Z. Hatfield-Dodds, D. Hernandez, A. Jones, J. Kernion, L. Lovitt, K. Ndousse, D. Amodei, T. Brown, J. Clark, J. Kaplan, S. McCandlish, and C. Olah A mathematical framework for transformer circuits. Transformer Circuits Thread. Cited by: §8.
Fan et al. (2026) J. Fan, N. He, C. Yang, A. Mao, X. Zhu, C. Cheng, K. Liang, S. Shen, Z. Li, R. Guo, et al. Language models can rewrite their own weights. arXiv preprint arXiv:2611.21885. Cited by: §8.
Fernando et al. (2024) C. Fernando, D. Banarse, H. Michalewski, S. Osindero, and T. Rocktäschel Promptbreeder: self-referential self-improvement via prompt evolution. In Proceedings of the 41st International Conference on Machine Learning, Proceedings of Machine Learning Research, Vol. 235, pp. 13481–13544. Cited by: §8.
Fischetti (2026) M. Fischetti Just sort it! a note on the lp behind rank-one anti-loop edits. arXiv preprint arXiv:2611.21432. Cited by: §8.
Geng et al. (2023) S. Geng, M. Josifoski, M. Peyrard, and R. West Grammar-constrained decoding for structured NLP tasks without finetuning. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pp. 10932–10952. Cited by: §2.
Good (1966) I. J. Good Speculations concerning the first ultraintelligent machine. In Advances in Computers, F. L. Alt and M. Rubinoff (Eds.), Vol. 6, pp. 31–88. External Links: ISSN 0065-2458, Document, Link Cited by: §1.
Guo et al. (2025) D. Guo et al. DeepSeek-R1 incentivizes reasoning in LLMs through reinforcement learning. Nature 645 (8081), pp. 633–638. Cited by: §8.
Ha et al. (2017) D. Ha, A. M. Dai, and Q. V. Le HyperNetworks. In International Conference on Learning Representations, Cited by: §8.
He et al. (2021) W. He, Z. Huang, M. Liang, S. Liang, and H. Yang Blending pruning criteria for convolutional neural networks. In Artificial Neural Networks and Machine Learning – ICANN 2021, Lecture Notes in Computer Science, pp. 3–15. Cited by: §8.
Hendrycks et al. (2021) D. Hendrycks, C. Burns, S. Kadavath, A. Arora, S. Basart, E. Tang, D. Song, and J. Steinhardt Measuring mathematical problem solving with the MATH dataset. In Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks, Cited by: §2, §8.
Holtzman et al. (2020) A. Holtzman, J. Buys, L. Du, M. Forbes, and Y. Choi The curious case of neural text degeneration. In International Conference on Learning Representations, Cited by: §8.
Hu et al. (2026) J. Hu, C. Tang, W. Li, H. Zhu, C. Feng, Q. Zhang, Y. Chen, and M. Hu Exploring weight-space programming: capabilities, generalization, and limitations. arXiv preprint arXiv:2611.09382. Cited by: §8.
Hu et al. (2025) S. Hu, C. Lu, and J. Clune Automated design of agentic systems. In The Thirteenth International Conference on Learning Representations, Cited by: §8.
Huang et al. (2023) J. Huang, S. S. Gu, L. Hou, Y. Wu, X. Wang, H. Yu, and J. Han Large language models can self-improve. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pp. 1051–1068. Cited by: §1.
Huang et al. (2024) J. Huang, X. Chen, S. Mishra, H. S. Zheng, A. W. Yu, X. Song, and D. Zhou Large language models cannot self-correct reasoning yet. In The Twelfth International Conference on Learning Representations, Cited by: §8.
Huang et al. (2025) Z. Huang, G. Ling, S. Zhong, H. Wu, and L. Lin MiniLongBench: the low-cost long context understanding benchmark for large language models. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 11442–11460. Cited by: §4.
Hua