Self-WSP: Can Language Models Improve Themselves Through Weight-Space Programming?
Organizations: Carnegie Mellon University · 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.
Figures & tables
| 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 |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Call | What the editor newly sees | Required JSON output | Constraint |
|---|---|---|---|
| 1 Layer | System prompt, tensor catalog and practice feedback | {"stop": false, "layer": } | from 0 to 23 |
| 2 Tensors | All tensors of the chosen layer | {"tensors": [...]} | One or two identifiers |
| 3 Edit | Statistics, sampled values and row and column norms of the one or two chosen tensors | {"action": "edit", "edits": [...], "hypothesis": "..."} | One or two edits |
| Tensor | Role |
|---|---|
| Linear-attention layers | |
| A_log | How fast each head forgets |
| dt_bias | Per-head bias of the forgetting rate |
| in_proj_a | Input-dependent forgetting rate |
| in_proj_b | Strength of writes to memory |
| in_proj_z | Output gate |
| GSM8K | MATH | |
| Training split | ||
| Official training split | 7,473 | 7,500 |
| Removed questions | 2,378 | 227 |
| Usable training questions | 5,095 | 7,273 |
| Practice pool | 3,559 | 5,737 |
| Held-out questions | 1,536 | 1,536 |
| Shuffled | Ordered | |
| Catalog and calls | ||
| Catalog order | random | by layer |
| Editor picks | tensors | layer, tensors |
| Calls per proposal | 2 | 3 |
| Practice and validation | ||
| Practice questions per batch | 32 | 128 |
| Sampling | |
| Random search | |
| Tensor | One drawn uniformly, or two with probability 0.2 |
| Layout, start | Uniform, with flat entries, rows or columns for matrices |
| Count | 1 to 131,072, half at fixed levels and half log-uniform |
| Operation | Zero, scale, redraw, add or fill a number, remove a direction |
| Scale factors | 0, 0.2, 0.5, 1, 2, 3, |
| Proposal | Layer | Tensor | Block | Operation | Note |
| Shuffled interface, from the original model | |||||
| Top-1, model A test accuracy 31.9%, 8,192 values changed | |||||
| g1#1 | 12 | in_proj_b | rows 12–15, 0–3 | scale | Hypothesis says first 8 entries |
| Top-2, model B test accuracy 28.7%, 1,048,686 values changed | |||||
| g2#0, g2#4 | 4 | linear_attn.norm | [10:14] | redraw, | Both edits in both proposals |
| 7 | post_attention_layernorm | [10:14] | redraw, | ||
| Proposal | Layer | Tensor | Block | Operation | Note |
| Shuffled interface, batch 1, from the original model | |||||
| Top-1 test accuracy 17.3%, 16,374 values changed | |||||
| g1#1, g1#3 | 12 | in_proj_b | all 16 rows | redraw, | The same edit is kept twice |
| Top-2 test accuracy 10.4%, 3,237 values changed | |||||
| g2#3 | 9 | out_proj | flat [147:1171] | scale | |
| g3#2 | 23 | q_norm | [0:165] | zero | |
| Proposal | Layer | Tensor | Block | Operation | Note |
| Ordered interface, from the original model | |||||
| Top-1 test accuracy 24.2%, 16 values changed | |||||
| g1#6 | 0 | A_log | all 16 | add | |
| g3#1 | 0 | A_log | [0:3] | scale | Only these 16 values change |
| Top-2 test accuracy 21.9%, 16,634 values changed | |||||
| g1#17 | 0 | input_layernorm | [0:245] | scale | |
Language Model Self-Improvement
Language model self-improvement studies how models use their own outputs, feedback, and experience to improve with less external supervision.
See all 205 papers