Recursive Self-Improvement at 4B via Self-Play Weight Editing

Can a model get better at improving itself? After training itself to edit its own weights, Qwen3.5-4B lifts its own accuracy on 200 sealed competition math problems from 35.0% to 67.0%—beating intact Qwen3.5-27B (56.0%) with no teacher and no test-time tools.

Shin Megami Boson

November 2026

On this page
Horizontal bar chart on 200 held-out DeepScaleR problems (AIME, AMC, Omni-MATH, Still) at 16K thinking tokens with no tools. Six cumulative editing rounds by a self-trained 4B editor lift intact Qwen3.5-4B from 35.0% to 67.0%, surpassing intact Qwen3.5-27B (56.0%), intact 9B (45.0%), and intact 2B (6.5%).
Figure 1. Accuracy on 200 sealed problems held out from DeepScaleR (AIME 1984–2023, pre-2023 AMC, Omni-MATH, and Still) with thinking enabled and zero tools at test time (16,384-token ceiling). Six cumulative editing rounds by the self-trained Gen-2 4B editor lift intact Qwen3.5-4B from 35.0% (70/200, 13,522 mean tokens) to 67.0% (134/200, 3,551 mean tokens; +72/−8, two-sided p = 5.4 × 10−14), beating intact Qwen3.5-27B (56.0%) by 11.0 points on the identical 200-problem split. Shared-weight (closed-loop) variants that merge each math update back into the editor reach 62.5% (Gen 3) and 58.0% (Gen 2) and are reported in Table 2.

Qwen3.5-4B [5] can train itself to edit its own weights and then compound that editing skill across sequential rounds—with no teacher model and no Python or external tools at test time. On 200 sealed problems held out from DeepScaleR [9] (native thinking enabled, exact \boxed{} grading), six cumulative rounds by a self-trained 4B editor lift intact Qwen3.5-4B from 35.0% to 67.0% at 16K tokens (+72/−8, p = 5.4 × 10−14), from 20.0% to 63.5% at 10K (p = 8.6 × 10−22), and from 7.0% to 58.5% at 4K (+103/−0, p = 2.0 × 10−31). At 16K, the self-edited 4B model beats intact Qwen3.5-27B (56.0%) by 11.0 points on the identical split using 3.8× fewer tokens (3,551 vs 13,522) while leaving MMLU (65%), HellaSwag (79% → 80%), prior solved anchors (5/5), and general prose (KL = 0.0041 nats) intact.

Training the model to edit itself is what unlocks this jump. Given the exact same Python editing workspace and reserve commit gate, untrained Qwen3.5-4B (Gen 0) fails to pass a single cumulative math round (0/3 commits; 7.0% at 4K, 20.0% at 10K). Two generations of reinforcement learning on math-editing episodes via our backing weight-editing engine cut the editor’s code errors by 71% (1.75 to 0.50 per episode) and lift unseen single-episode editing accuracy on EditBench-4 (192 sealed problems) from 11.5% to 20.3% (p = 7.6 × 10−5), enabling multi-round compounding. The backing engine is currently closed and will be released in the future.

Because math practice still verifies derivations against practice-split answers, we also test the same 4B recursive editor-training loop in a strictly label-free control with zero answer keys: across 72 unseen behavioral rules (1,152 prompt pairs, scored solely by unedited θ0), two recursive self-play rounds [8] lift edits monotonically from 41.5% (Gen 0) to 55.6% (Gen 1) and 57.6% (Gen 2), beating an equal-compute one-round flat control (51.0%) by 6.7 points (pair p = 2.0 × 10−7, per-rule p = 0.054).

1. How a 4B model trains itself to edit and compound its own weights

Prior work on self-editing either failed below 27B when given raw tensor writes [1], or relied on labeled datasets, external teachers, or a fixed editing policy [2] [3] [4] [7]. Here Qwen3.5-4B plays all three roles—editor, evolving solver θt, and bit-identical reference θ0—switching between modular adapters [6] on the fly. Both editor training and cumulative math updates run on our backing weight-editing engine, which isolates each edit from general language capabilities and previously solved problems; we are keeping the engine and training recipe closed for now and plan to release them in the future.

  1. Train the editor (Gen 0 → Gen 2)Reinforcement learning over editing episodes rewards validation gains without collateral drift and penalizes workspace errors, cutting errors 71% while holding editor prose KL to 0.0045.
  2. Compound across six roundsOn each disjoint practice batch, Qwen verifies its own derivations inside a sandboxed Python workspace and applies a constrained weight update via our backing engine—breaking its early truncation cliff before shifting exclusively to 100% native <think> traces.
  3. Gate and verify tool-freeAn update merges into θt only if it gains on a hidden reserve split while holding prior anchors and general-prose KL within a tight drift budget; final testing disables Python completely.

Intact Qwen3.5-4B’s failure on DeepScaleR starts with severe budget truncation: at 4,096 tokens it runs out of budget on 91% of sealed problems (7.0% accuracy), and even at 16,384 tokens it truncates on 57.0% (35.0% accuracy). Early rounds break this truncation cliff (Figure 2, Rounds 2–3: 7.0% → 50.5% at 4K), after which Rounds 4–6 train exclusively on 100% native <think> traces—compounding 4K accuracy further to 58.5% without collapsing reasoning depth. Table 1 summarizes the evaluation protocol.

Six-round cumulative accuracy at 4K thinking tokens on 200 held-out DeepScaleR problems (AIME, AMC, Omni-MATH, Still). The trained Gen-2 editor lifts intact Qwen3.5-4B from 7.0% to 50.5% after Round 3 and continues climbing to 58.5% across Rounds 4 to 6 using 100% native thinking traces, while the untrained Gen-0 editor stays flat at 7.0% with zero accepted edits.
Figure 2. Cumulative accuracy at 4,096 thinking tokens across six sequential editing rounds on disjoint practice batches. The self-trained Gen-2 editor passes the reserve commit gate in 5/6 rounds (hollow circle marks Round 1, rejected by the gate): Rounds 2–3 cure intact 4B’s 91% truncation cliff (7.0% → 50.5%), and Rounds 4–6 compound further to 58.5% (+103/−0, p = 2.0 × 10−31) exclusively on 100% native <think> traces. The untrained Gen-0 editor fails the reserve gate in 0/3 rounds.

Table 1. Competition-math evaluation and self-editing protocol shared across all six-round runs. No teacher model is used at any stage, and Python is disabled during evaluation.

ComponentSetting
Splits & held-out isolationDisjoint practice batches, internal reserve gate, and 200-problem sealed held-out split drawn from DeepScaleR (AIME 1984–2023, pre-2023 AMC, Omni-MATH, and Still) after removing exact and 8-gram overlaps with MATH-500 and AIME 2024 and deduplicating internally.
Zero-teacher self-verificationOn missed practice problems, Qwen generates and verifies its own derivations inside a sandboxed Python workspace against practice-split answers; no external teacher model is used at any stage.
Native thinking progressionEarly rounds cure intact 4B’s 91% truncation cliff at 4K; Rounds 4–6 train exclusively on 100% native <think> traces to compound accuracy without compressing away reasoning depth.
Backing weight-editing engineConstrained modular weight updates applied via our internal engine to prevent collateral drift on general prose and previously solved anchors. Implementation details and training code are withheld from this preview and will be released in the future.
Reserve commit gateA candidate update merges cumulatively into θt only if it improves a disjoint reserve split, retains prior solved anchors, and stays within a strict general-prose KL guard.

2. Competition math: 67.0% at 16K, beating intact 27B with zero collateral loss

Table 2 reports every intact Qwen3.5 baseline, three-round generational comparison, and six-round compounding arm on the identical 200-problem sealed DeepScaleR split (enable_thinking=True, temperature 0.6, top-p 0.95, top-k 20, zero Python at test time). Passing the reserve gate in 5/6 rounds with just 2 workspace code errors total, the frozen Gen-2 editor lifts sealed accuracy by +51.5 points at 4K (7.0% → 58.5%), +43.5 points at 10K (20.0% → 63.5%), and +32.0 points at 16K (35.0% → 67.0%), while raising the disjoint reserve from 7.3% to 56.2%. Average 16K response length drops 3.8× (13,522 to 3,551 tokens), finished problems more than double (86/200 to 177/200 at 75.7% conditional accuracy), and MMLU (65%), HellaSwag (79% → 80%), prior solved anchors (5/5), and general-prose KL (0.0041 nats) remain clean.

We also tested closing the weight loop directly—merging each accepted math delta Δθt back into the editor itself before the next round. Naively adding math weights into the Gen-2 editor still beats intact 27B at 58.0% (+64/−18, p = 3.3 × 10−7), but trails the frozen Gen-2 specialist by 9.0 points (p = 0.025). Retraining a Gen-3 editor on closed-loop editing trajectories closes most of that gap: closed-loop Gen 3 ties the frozen specialist at 10K (63.0% vs 63.5%, p = 1; +9.0 over closed-loop Gen 2, p = 0.0096) and reaches 62.5% at 16K (p = 0.3 vs frozen) with only 1 code error across 6 rounds.

Table 2. Sealed competition-math accuracy on 200 DeepScaleR problems (thinking enabled, zero tools at test time). Rightmost columns report 16K average tokens and truncation rate, 16K accuracy conditional on finishing within budget, and collateral checks (MMLU-100, HellaSwag-100, 5 prior-solved anchors B0, and general-prose KL in nats).

Model / Editor 4K acc 10K acc 16K acc 16K tok · cut 16K acc | fin MMLU · HS · B0 · KL
Intact Qwen3.5 baselines (same 200 DeepScaleR problems, thinking enabled, no tools)
Intact Qwen3.5-2B1.5%—6.5%— · 93.5%——
Intact Qwen3.5-4B (θ0)7.0% (14)20.0% (40)35.0% (70)13,522 · 57.0%81.4% (70/86)65% · 79% · 5/5 · 0.0000
Intact Qwen3.5-9B6.0%—45.0%— · 49.5%——
Intact Qwen3.5-27B9.0%—56.0%— · 37.5%——
Three cumulative editing rounds on Qwen3.5-4B (by editor generation)
Gen 0 untrained editor (0/3 commits)7.0% (14)20.0% (40)———65% · 79% · 5/5 · 0.0000
Gen 1 editor (2/3 commits)37.5% (75)45.5% (91)———65% · 80% · 5/5 · 0.0031
Gen 2 editor (3/3 commits)28.0% (56)42.0% (84)———65% · 80% · 5/5 · 0.0022
Six cumulative editing rounds on Qwen3.5-4B (adaptive 100% native thinking)
Frozen Gen-2 editor (separate editor, 5/6 commits)58.5% (117)63.5% (127)67.0% (134)3,551 · 11.5%75.7% (134/177)65% · 80% · 5/5 · 0.0041
Shared-weight Gen-3 editor (closed loop, 4/6 commits)49.0% (98)63.0% (126)62.5% (125)4,573 · 14.0%72.7% (125/172)65% · 78% · 4/5 · 0.0046
Shared-weight Gen-2 editor (closed loop, 4/6 commits)48.5% (97)54.0% (108)58.0% (116)3,754 · 11.5%65.5% (116/177)65% · 79% · 5/5 · 0.0037

Intact Qwen3.5-2B, 9B, and 27B baselines were scored on the identical 200-problem DeepScaleR manifest (SHA-256 prefix d3dcd5aa) under the same thinking decode (temperature 0.6, top-p 0.95, top-k 20, exact \boxed{} equivalence), where intact 4B reproduced within 0.5 points (34.5% vs 35.0% here; all paired p-values use the same-run 35.0% baseline). Disjoint reserve accuracy at 4K rises from 7.3% to 56.2% (frozen Gen 2), 54.2% (closed-loop Gen 3), and 53.1% (closed-loop Gen 2).

Table 3. Editor skill itself improves across reinforcement-learning generations on EditBench-4 (four unseen math-editing episodes, 192 sealed problems; intact base 9.9%). Two-sided exact binomial p-values compare Best-of-2 edited checkpoints against the unedited base on paired problems.

Editor s1 submits Errors / ep Single-attempt Best-of-2 vs base (p)
Intact Qwen3.5-4B (unedited base)——9.9% (19)9.9% (19/192)—
Gen 0 (untrained 4B editor)2/41.759.9% (19)11.5% (22/192)+8/−5 (p = 0.58)
Gen 1 (1 training generation)3/41.009.9% (19)9.9% (19/192)+7/−7 (p = 1)
Gen 2 (2 training generations)4/40.509.9% (19)20.3% (39/192)+21/−1 (p = 1.1 × 10−5)
Gen 3 (retrained on closed-loop rollouts)3/41.258.8% (17)8.8% (17/192)+6/−8 (p = 0.79)
Self-edited 4B (67% math) + Gen-2 editor2/40.5011.5% (22)11.5% (22/192)+3/−0 (p = 0.25)

Trained via reinforcement learning on our backing weight-editing engine (editor prose KL = 0.0045). Gen 2 beats Gen 0 by +18/−1 (p = 7.6 × 10−5), lifting the 39.6%-base episode to 81.2%. Gen 3 cracks a 0%-base episode (2.1%) but over-submits a negative-dev edit on the 39.6% episode (33.3%); combining the 67%-math model with the Gen-2 editor sets a new single-attempt high (11.5%) and cracks a 0%-base episode at 6.2% (+3/−0) with 0.25 Best-of-2 errors per episode.

3. Label-free control: recursion beats equal-compute flat training with zero answer keys

Competition-math practice still checks derivations against practice-split ground-truth answers, and compares trained editors against untrained Gen 0. Two questions remain for the self-improvement mechanism itself: does the 4B editor still improve monotonically when all external answer keys are removed, and does multi-round recursion actually outperform spending the same rollout budget on one flat Gen-0 round?

To isolate both questions, we run the same 4B Python-workspace self-editing loop on 72 unseen behavioral rules (four rule families: API migration, untagged extraction, symbolic algebra, and scoped reply policies; 1,152 target/sibling prompt pairs plus 24 contradiction traps and 576 factual controls) with rules removed from the prompt at test time. During practice (256 episodes per round across a disjoint practice pool), unedited θ0 supplies every reward with zero ground-truth labels: the editor synthesizes its own practice examples, proposes a constrained weight edit through our backing engine, and updates its editing policy via self-play reinforcement learning that rewards clean rule compliance while penalizing sibling bleed and workspace errors.

Across the 72 unseen rules, two recursive rounds lift paired pass rate monotonically from 41.5% (Gen 0) to 55.6% (Gen 1) and 57.6% (Gen 2; +16.1 points, pair p = 4.6 × 10−25, per-rule p = 0.0016), closing 48% of the gap to keeping the rule in the prompt (75.1%) while keeping sibling bleed 3.5× lower than the prompted model (3.0% vs 10.3%) and cutting active workspace code errors 79% (87 to 18). At matched 512-rollout compute, two recursive rounds beat one flat round on Gen 0’s rollouts by 6.7 points (57.6% vs 51.0%; better on 153 pairs and worse on 76, pair p = 2.0 × 10−7, per-rule p = 0.054; Figure 3, Table 4) because each improved editor generates cleaner training episodes for the next round—raising unique practice rules solved cleanly from 25 → 41 → 45 (vs 30 flat) while cutting practice errors fourfold (407 → 168 → 102).

On 72 unseen behavioral rules (1,152 prompt pairs), Qwen3.5-4B’s label-free paired pass rate rises monotonically from 41.5% untrained to 55.6% after 256 practice rollouts and 57.6% after 512 rollouts. A one-round control trained on 512 Gen 0 rollouts reaches 51.0%.
Figure 3. Label-free control on 72 unseen behavioral rules (1,152 target/sibling prompt pairs), tested with the rule removed from the prompt and trained with zero answer keys. Each recursive round adds 256 self-play practice episodes (blue), beating the 512-rollout one-round Gen-0 flat control (51.0%) by 6.7 points. Unedited Qwen3.5-4B passes 7.6%; keeping the rule in the prompt passes 75.1%; Gen 3 (768 rollouts) plateaus at 55.0% (Table 4).

Table 4. Label-free control across five unseen behavioral-rule suites (72 active rules, 1,152 pairs) and 24 traps, tested with the rule removed from the prompt. The last column reports active rules submitted, average sibling bleed, traps refused, and active workspace code errors.

Editor Dev-16
192 pairs
Confirm-16
192 pairs
Blind-16
192 pairs
Fresh-16
192 pairs
Holdout-32
384 pairs
All 72 rules
1,152 pairs
Submits · bleed ·
traps · errors
Baseline
Unedited Qwen3.5-4B (θ0)7.3%14.6%2.6%10.4%5.2%87 (7.6%)— · 0.0% · — · —
Recursive self-play lineage
Gen 0 (untrained editor, 0 rollouts)39.6%22.9%33.3%50.0%51.6%478 (41.5%)32/72 · 0.5% · 21/24 · 87
Gen 1 (1 round, 256 rollouts)40.6%58.9%59.4%51.6%61.7%641 (55.6%)46/72 · 1.3% · 19/24 · 26
Gen 2 (2 rounds, 512 rollouts)48.4%49.5%58.3%56.8%66.4%664 (57.6%)50/72 · 3.0% · 19/24 · 18
Gen 3 (3 rounds, 768 rollouts)60.9%42.7%50.5%42.2%66.9%634 (55.0%)48/72 · 2.0% · 18/24 · 17
Equal-compute control for Gen 2
Flat Gen-0 control (1 round, 512 Gen-0 rollouts)40.1%42.7%53.6%43.8%62.8%587 (51.0%)43/72 · 2.3% · 20/24 · 20
Reference (rule stays in prompt, no weight edit)
Prompted Qwen3.5-4B87.5%55.2%76.0%79.7%76.0%865 (75.1%)— · 10.3% · — · —

Single-attempt pass rates (temperature 0.0, before internal Best-of-2 selection): Gen 0 29.7%, Flat Gen-0 control 44.0%, Gen 1 47.9%, Gen 2 45.8%, Gen 3 43.7%. Unrelated factual-control accuracy stays at 96.5%–97.7% across all edited models versus 97.9% unedited and 93.9% prompted.

4. Limits and what remains open

References

  1. Language Models Can Rewrite Their Own Weights. Fan et al., 2026. arXiv:2611.21885
  2. Self-Adapting Language Models (SEAL). Zweiger et al., 2025. arXiv:2506.10943
  3. Agentic Test-Time Training (Agentic-TTT). 2026. arXiv:2610.12002
  4. Transformer-Squared: Self-Adaptive LLMs. Sun et al., 2025. arXiv:2501.06252
  5. Qwen3.5 Technical Report & Model Family. Qwen Team, 2026. huggingface.co/Qwen/Qwen3.5-4B
  6. LoRA: Low-Rank Adaptation of Large Language Models. Hu et al., ICLR 2022. arXiv:2106.09685
  7. SOAR: Self-Improving Language Models for Hard Math via Promotion Curricula. Sundaram et al., ICML 2026. arXiv:2601.18778
  8. Self-Play Fine-Tuning Converts Weak Language Models to Strong Language Models (SPIN). Chen et al., ICML 2024. arXiv:2401.01335
  9. DeepScaleR: Surpassing O1-Preview with a 1.5B Model by Scaling RL. Luo et al., 2025. huggingface.co/datasets/agentica-org/DeepScaleR-Preview-Dataset

Citation

@misc{boson2026recursive4b,
  title  = {Recursive Self-Improvement at 4B via Self-Play Weight Editing},
  author = {{Shin Megami Boson}},
  year   = {2026},
  month  = nov
}