Skip to content

Published weight edit on Qwen3.5-0.8B: audit and repair

Date: 2026-11-15. Model: Qwen/Qwen3.5-0.8B, revision 2fc06364715b967f1860aea9cf38778875588b17. Edit: p50c from Sparks of Weight-Space Programming (Takehi, Teoh, Zhang & Khattab, 2026), 64 columns of mlp.down_proj in each of layers 15 and 19. Texts and reference numbers: EditLens. No closed model was called. Hardware: one RTX PRO 6000; transformers 5.23.0, torch 2.15.

What was run: the weight-edit tools of evalrx.wsp on a real checkpoint, with an edit written by someone else. The structure read-out, the teacher-forced audit and the generation-level repair reproduce the published findings. An attempt to DERIVE a comparable edit from the model's own behaviour recovered part of the neurons and neither the direction nor the layers.

1. Structure, read from the weights

python tools/check_astra_edit_qwen35.py --edit-dir <edit-lens>/astra_logs/exp8_math/runs/p50c/edit

Layer 15 Layer 19
Base hash / rebuilt hash match the manifest yes / yes yes / yes
Changed columns / rows 64 / 1024 64 / 1023
Relative change 0.1064 0.0811
Effective rank 1.036 1.046
Rank-one residual 0.0023 0.0029
Alpha (± spread over columns) 6.0006 ± 0.0018 6.0004 ± 0.0021
Projection selectivity 4.57 3.29

The loader rebuilds the evaluated checkpoint bit for bit. The change is the rule w' = w - 6 u (u^T w) on 64 columns per layer; |cos| between the two layers' directions is 0.849.

2. Teacher-forced audit along the unedited model's generations

python tools/audit_astra_edit_qwen35.py --edit-lens <edit-lens>

Twelve GSM8K generations of the unedited model that never left the thinking block, first 4,096 tokens, 48,099 scored positions. A position counts as in-loop when the 32 tokens before the predicted token occurred earlier. Values are the change in NLL of the recorded next token, loop / productive.

State This run EditLens (6 texts)
Unedited NLL 0.022 / 0.488 0.021 / 0.505
p50c edit +0.079 / +0.047 +0.093 / +0.053
Random direction, same columns and norms +0.011 / +0.010 +0.006 / +0.011
Same rule, 64 other columns -0.000 / +0.000 +0.001 / +0.001
Constant activation shift +0.029 / +0.125 +0.038 / +0.125 (their c = 1)

Dose curve of the fitted rule on twelve other generations (tools/recover_astra_edit_qwen35.py):

Alpha This run EditLens
1 +0.003 / +0.004 +0.005 / +0.005
2 +0.008 / +0.009 +0.012 / +0.012
6 +0.082 / +0.046 +0.093 / +0.053
10 +0.707 / +0.150 +0.744 / +0.150

The edit is specific to its direction and its neurons, acts more inside loops, and is not free on ordinary text: the most likely token changes at 4.9% of productive positions. Removing the component along u (alpha = 1) does almost nothing; the effect comes from the overshoot. A constant activation shift of the edit's mean size does less in loops and more damage outside them.

3. Generation through the L4 fix path

python tools/generate_astra_edit_qwen35.py --edit-lens <edit-lens>

64 GSM8K test problems (every 20th), one sample each, thinking on, T = 0.6, top_p = 0.95, top_k = 20, presence penalty 1.5, up to 16,384 new tokens, run as FixAgent(weight_edit={"edit_dir": ...}). 74 minutes.

Unedited p50c edit Random-direction control
Correct 6 / 64 37 / 64 7 / 64
Left the thinking block 10.9% 92.2% 9.4%
Stopped on its own 10.9% 85.9% 9.4%
Ran to the token cap 89.1% 14.1% 90.6%
Ended in a verbatim loop 87.5% 1.6% 90.6%
Mean share of loop tokens 57.4% 7.6% 58.6%
Mean new tokens 15,077 9,509 15,282

Paired validation, edit against the unedited model: 31 fixed, 0 broken, effect +0.484 (CI +0.375 to +0.609), e-value 6.7e7 against a threshold of 20. The published accuracies at a 32,768-token budget are 13.8% and 67.1%.

4. Deriving the edit from loop vs productive positions

python tools/recover_astra_edit_qwen35.py --edit-lens <edit-lens>

Derived on the twelve generations of section 2, audited on twelve others.

Result
Layers the contrast would pick 9 and 12; the published layers rank 10th and 16th of 24
|cos| with the published direction 0.351 (layer 15), 0.444 (layer 19)
Published neurons in the derived top 64 (chance: 1.1) 33 (layer 15), 22 (layer 19)
The same with the published direction supplied 45, 34
Derived edit at layers 15 + 19, alpha 6 +0.050 / +0.026
Random direction on the derived neurons +0.187 / +0.022
Derived edit at its own layers 9 + 12, alpha 6 +0.088 / +0.004, on 6 of 12 texts only

The contrast finds which neurons matter. Its direction is not validated: on the derived neurons a random direction disturbs loops more than the derived one. A positive loop NLL change is cheap, because the unedited loop NLL is near zero and can only rise; it means something only against controls. The layer 9 + 12 edit has no controls yet.

Limits

  • One model, one edit, one benchmark. Sections 2 and 4 use 12 + 12 texts; section 3 uses 64 problems, one sample, one seed and one control draw.
  • Section 3 differs from the original evaluation: half the token budget, Hugging Face generate instead of vLLM, numeric grading of the last boxed answer instead of math-verify.
  • "0 broken" rests on the 6 problems the unedited model got right. Harm on tasks the model already does well is not measured here.
  • The unedited model writes a boxed answer in 43.8% of runs and is correct in 9.4%; most of those boxes sit inside an unfinished thinking block. Whether the numeric grader misses correct ones has not been checked.
  • Batched generation pads prompts on the left. In float32 the padded-vs-alone gap is 0.016 against 0.004 for one prompt repeated; in bfloat16, batching alone moves the output by 0.13 to 0.25. All arms share the same batches.
  • Sections 2 and 4 are teacher-forced on text the unedited model wrote. Positions within one generation are correlated.