Retrieved article excerpt
Open article · Retrieved 2026-11-17T17:22:37.922563+00:00
# Weight-Space Audit of MIT-p50c and DNA Weight Editing (SGNE-CC) at a 32,768-Token Generation Limit
> **Language / Язык:** **English** · [Русский](https://github.com/Nondual-Observer/dna-weight-editing/blob/main/README_RU.md)
Qwen3.5-0.8B is a hybrid language model with 752M text parameters, 18 recurrent GatedDeltaNet layers, and 6 attention layers. In the evaluated BF16 runs, it often leaves its reasoning unfinished at the generation limit of 32,768 new tokens. In MIT CSAIL's [*Sparks of Weight-Space Programming*](https://rikiyat.github.io/blog/weight-space-programming/) (Takehi, Teoh, Zhang, Khattab, 2026; run logs: [RikiyaT/lm\_understand-logs](https://github.com/RikiyaT/lm_understand-logs)), the training-free MIT-p50c weight edit raises MATH-500 accuracy from 7.9% to 48.1%, averaged across four vLLM runs under model-card settings with temperature 0.6 and a presence penalty of 1.5 for tokens already used. The base model reaches the length limit in 93.0% of generations in that reference. **Does the reduction in looping persist without random token sampling and a presence penalty? What differences in weight geometry accompany the change in behavior?**
This study audits the weight geometry of MIT-p50c and compares it with **SGNE-CC** (*Spherical Gated Norm-preserving Edit, Column-Constrained*), a 3.13 MiB weight patch obtained without gradient retraining by rotating output columns on their Euclidean spheres while preserving their original lengths. This approach is called **DNA Weight Editing**. All three BF16 models (base Qwen3.5-0.8B, MIT-p50c, and SGNE-CC) are evaluated in full across both decoding regimes — **greedy decoding (pure weights: T = 0, pp = 0)** and **model-card settings (T = 0.6, pp = 1.5)** — on all five benchmarks (`MATH-500`, `MGSM-240`, `BBH-160`, `HumanEval-164`, `MultiSpeech-64`; 30 full reasoning runs totaling 1,128 tasks per model per regime, plus non-thinking controls on MultiSpeech-64).
---
## Contents
1. [Geometry of the Weight Edits: MIT-p50c vs. SGNE-CC](https://github.com/Nondual-Observer/dna-weight-editing#1-geometry-of-the-weight-edits-mit-p50c-vs-sgne-cc)
2. [5-by-2 Summary Matrix and Mathematics (MATH-500 and MGSM-240)](https://github.com/Nondual-Observer/dna-weight-editing#2-5-by-2-summary-matrix-and-mathematics-math-500-and-mgsm-240)
3. [Out-of-Domain Transfer: Logic and Code (BBH-160, Web of Lies, HumanEval-164)](https://github.com/Nondual-Observer/dna-weight-editing#3-out-of-domain-transfer-logic-and-code-bbh-160-web-of-lies-humaneval-164)
4. [8-Language Text Generation (MultiSpeech-64)](https://github.com/Nondual-Observer/dna-weight-editing#4-8-language-text-generation-multispeech-64)
5. [Method Scope, Conclusion, and Reproducibility (SHA-256)](https://github.com/Nondual-Observer/dna-weight-editing#5-method-scope-conclusion-and-reproducibility-sha-256)
---
## 1. Geometry of the Weight Edits: MIT-p50c vs. SGNE-CC
Both weight patches are produced by directly modifying the pretrained weights of Qwen/Qwen3.5-0.8B. The model architecture, tokenizer, and inference code remain unchanged; layer indices below start at zero. Geometric properties of both edits can be checked in FP64 double precision from the open patch file `sgne_cc_dna_delta.npz` (3.13 MiB) and the base weights via `python3 apply_dna_patch.py --verify-only` (and side-by-side against the MIT checkpoint via `--compare`):
| Verifiable Weight Property (BF16) | Qwen3.5-0.8B | MIT-p50c | SGNE-CC (DNA Weight Editing) |
| --- | --- | --- | --- |
| Scalar elements in replacement region (of 752,393,024) | 0 (0%) | 131,072 (0.017%; 130,188 changed) | 2,032,640 (0.270%; 1,993,382 bitwise changed) |
| Edited feed-forward output columns (`mlp.down_proj`) | 0 | 128 (2 layers: indices 15 and 19) | 802 (15 feed-forward layers) |
| Edited recurrent GatedDeltaNet output columns (`out_proj`) | 0 | 0 (0 of 18 layers) | 1,182 (9 recurrent layers) |
| Edited attention output columns (`o_proj`) | 0 | 0 | 0 (0 of 6 layers) |
| Edited recurrent GatedDeltaNet gate rows (of 288) | 0 | 0 | **1** (layer 16, row 12, cosine 0.986582) |
| Column Frobenius norm of update | 0.000000 | 2.239452 | 3.570648 (full 3.574724) |
| Update energy per edited column | 0.0000 | 0.0392 | 0.0064 |
| Relative update norm on edited region | 0.0000 | 0.7349 | 0.2372 (different supports: 128 vs. 1,984 columns) |
| Column rotation angle (median / max) | 0° | 27.1° / 87.3° | **8.8°** / 93.7° |
| First singular mode energy share (layers 15 / 19 / 23) | — | **99.9995% / 99.9991%** / — | **67.58% / 73.43% / 55.92%** |
| Ratio of edited to original column norm | 1.000000 | **[1.002808, 2.142614]** | **[0.998375, 1.001620]** |
| Maximum column norm deviation | 0.0000% | **+114.2614%** (layer 19), **+70.5913%** (layer 15) | **0.1625%** (after BF16 rounding) |
| Minimum column rotation cosine | 1.000000 | 0.047701 (layer 19) | -0.063676 (layer 19, on original-norm sphere) |
Three structural differences separate the two edits:
1. **Column directions and norms.** In each of the two modified feed-forward output matrices of MIT-p50c (layer indices 15 and 19), the first singular mode accounts for over 99.999% of update energy. Individual column norms increase by up to 114.3%, reaching more than twice their pretrained length. In SGNE-CC, column directions are rotated while keeping norms close to their pretrained values: the largest measured deviation after BF16 rounding is about 0.16%, with a median rotation angle of 8.8° and a maximum of 93.7°. Preserving individual column norms does not by itself preserve pairwise angles between columns, output activation magnitudes, or model behavior.
2. **Distribution across feed-forward and recurrent blocks.** Three quarters of Qwen3.5-0.8B's depth consist of recurrent GatedDeltaNet layers, which MIT-p50c leaves untouched. SGNE-CC spreads a multi-rank update across the output matrices of 15 feed-forward layers and 9 recurrent layers, leaving all 6 attention layers unchanged.
3. **Single decay-gate row modification.** In the 13th of the 16 heads at layer index 16, one recurrent gate row is shifted in Euclidean norm from 1.0286 to 1.0452. This change is intended to alter recurrent state retention at the transition from reasoning to the final answer; whether it acts selectively at that boundary requires separate activation-level testing.
> **Working hypothesis.** Multi-step reasoning circuits are already formed in Qwen3.5-0.8B during pretraining, but become trapped inside a recurrent verification loop: output column angles steer reasoning trajectories, while stability across a 32,768-token horizon is linked to preserving the sphere of pretrained column norms. Because the two edits differ simultaneously across several factors — column norms, update rank, layer selection, edited block types, and the gate row in layer 16 — the empirical results below are consistent with this hypothesis, yet do not isolate the causal effect of norm preservation on their own. Direct causal testing requires separate ablations, such as rescaling MIT-p50c's edited columns back to their original lengths.
### Generation Protocol at a 32,768-New-Token Limit
To test sensitivity to decoding settings, models are evaluated with reasoning enabled, one run per task, random seed 0, and a ceiling of 32,768 newly generated tokens (the limit on generated output length, not the model's 262,144-token positional context window). Decoding parameters are stored in the `sampling` field of the main trace files, and recorded via the author's protocol in the manifest for the two post-freeze holdout files. The two regimes differ jointly in temperature, truncation thresholds, and presence penalty:
- **Greedy decoding (pure weights: T = 0, pp = 0)** — temperature 0, top\_p 1.0, top\_k 0 without random token sampling or a presence penalty: the most probable next token is chosen at every step. Unlike Qwen3.5-0.8B's factory `generation_config.json` (which also sets T = 0.6 and pp = 1.5), this regime isolates intrinsic weight dynamics without external sampler intervention.
- **Model-card settings (T = 0.6, pp = 1.5)** — temperature 0.6, top\_p 0.95, top\_k 20, and a presence penalty of 1.5 for tokens already used: at each step, 1.5 is subtracted once from the logit of any token that has already appeared in the generated response, regardless of count. Prompt tokens are excluded from this seen-token mask.
All ten benchmark slices (5 datasets × 2 regimes) across all three models (Qwen3.5-0.8B, MIT-p50c, SGNE-CC) include complete per-item traces from a unified batched PyTorch generator with BF16 weights. Under the author's run protocol, generations were executed on NVIDIA A100 and RTX PRO 6000 Blackwell accelerators in native hardware BF16, with selected shards run on NVIDIA T4 using FP16 Tensor Core matrix multiplications and FP32 normalizations. In `traces/audit_bf16_vs_t4_parity60_pure_t0.json`, a direct BF16 (RTX PRO 6000 Blackwell / A100) versus T4 FP16 numerical parity check across 60 greedy traces (20 per model) finds 20/20 grade agreement on Base (0 vs. 0), 19/20 (95%) on MIT-p50c (0 vs. 1), and 13/20 (65%) per-item agreement on SGNE-CC with matched aggregate counts (10/20 vs. 9/20) due to rounding sensitivity along long reasoning trajectories; per-file GPU assignment was not stored inside the `.jsonl` traces and rests on the author's protocol record.
Mathematical answers are graded symbolically with `math-verify`: strict grading (`strict_ok`) requires completed reasoning, normal generation end, and a correct expression in the final answer box; for MGSM, whitespace and thousands separators in integers are normalized beforehand. Both `MATH-500` charts (Fig. 1 and Fig. 2) show direct single-engine PyTorch comparisons across all three models, while MIT's external vLLM reference for `T = 0.6, pp = 1.5` is compared in §2.2.
---
## 2. 5-by-2 Summary Matrix and Mathematics (MATH-500 and MGSM-240)
Removing the presence penalty and random sampling (**greedy decoding, T = 0, pp = 0**) sharply reverses the comparison between the two edits. Without the external `-1.5` presence penalty, **MIT-p50c** drops by `2.2x–13.5x` across all five datasets, while its cutoff rate at 32,768 tokens jumps from `17.29%` to `85.11%` across all 1,128 prompts. By contrast, the norm-preserving spherical patch **SGNE-CC** beats MIT-p50c on **all five benchmarks (5 of 5)** in greedy accuracy, completion rate, and output length. Conversely, under model-card settings (`T = 0.6, pp = 1.5`), SGNE-CC remains `4.1x` shorter (`3,680.7` vs. `14,984.7` mean tokens across 1,128 prompts, `1.42%` vs. `17.29%` cutoffs) while trailing MIT-p50c in accuracy on `MATH-500`, `MGSM-240`, and numerically on `BBH-160` and `HumanEval-164`.
| Benchmark (tasks) | Decoding regime | Qwen3.5-0.8B (Acc / Cutoffs / Tok) | MIT-p50c (Acc / Cutoffs / Tok) | SGNE-CC (Acc / Cutoffs / Tok) | Paired test (SGNE-CC vs. MIT-p50c) |
| --- | --- | --- | --- | --- | --- |
| **MATH-500** (500) | Greedy (`T = 0, pp = 0`) | 0/500 (0.00%) · 100.0% · 32,768.0 | 25/500 (5.00%) · 95.00% · 31,350.5 | **215/500 (43.00%)** · **18.40%** · **8,558.0** | McNemar `+195 / −5`, p = 3.24 × 10⁻⁵¹ |
| **MATH-500** (500) | Card (`T = 0.6, pp = 1.5`) | 39/500 (7.80%) · 92.20% · 30,632.6 | **259/500 (51.80%)** · 28.20% · 21,052.9 | 235/500 (47.00%) · **1.60%** · **5,319.4** | `+56 / −80`, p = 0.048 *(vs. vLLM s0: +65/−71, p = 0.67)* |
| **MGSM-240** (240) | Greedy (`T = 0, pp = 0`) | 5/240 (2.08%) · 97.50% · 31,987.0 | 51/240 (21.25%) · 70.83% · 24,006.4 | **92/240 (38.33%)** · **20.42%** · **8,186.4** | `+54 / −13`, 40-block p = 1.67 × 10⁻⁶ |
| **MGSM-240** (240) | Card (`T = 0.6, pp = 1.5`) | 62/240 (25.83%) · 66.67% · 23,604.5 | **137/240 (57.08%)** · 3.75% · 8,625.3 | 100/240 (41.67%) · **2.08%** · **3,089.7** | `+15 / −52`, 40-block p = 9.04 × 10⁻⁵ |
| **BBH-160** (160) | Greedy (`T = 0, pp = 0`) | 0/160 (0.00%) · 100.0% · 32,768.0 | 6/160 (3.75%) · 94.38% · 31,670.9 | **66/160 (41.25%)** · **16.88%** · **7,249.2** | `+61 / −1