GEMMA DEVELOPER AGENTSAVED EVIDENCE

← Weight change

Direct mathematical edit / wsp31-0022

Pre-edit commit gate in all 60 layers: deep in a thought with no edit made yet, write the first-edit thought state only (per-layer dose 0.12

Gemma 4 31B, frozen four-bit baseAuthor: claudeState: parkedVerdict: -

When

Recorded date: 2026-11-13

Ledger date only; exact weight-build/change timestamp is not recorded here. Not a live training event.

Exact tensor-change timestamp: unavailable.

Why change it?

Unedited batch b001 (three identical arms, 288 scored episodes of 120 stage-1 tasks, `code/seq_stats.py`): solved 54%. Of the 133 failures, 60 end at the 7.5-minute session limit (31 with an empty patch), 26 at the 30-call cap and 47 submit a wrong patch. Limit episodes carry about 8,500 thought tokens, 35% to 40% of them beyond depth 800 of one thought and 54% to 59% beyond depth 400 (solved episodes: 3,950 thought tokens, 16% and 35%). At about 25 generated tokens per second a cut at depth 800 returns about 3,200 tokens, 130 of the 450 seconds. The limit-with-empty-patch episodes are reading spirals: about 21 calls, 90% of their thought…

Which part changed?

Pre-edit commit gate in all 60 layers: deep in a thought with no edit made yet, write the first-edit thought state only (per-layer dose 0.12

The source describes adapter targets and mathematical changes. No before/after tensor comparison is available in this viewer.

How was it changed?

Computed directly by author-written code and packaged as a low-rank adapter over the frozen base; not gradient-trained. This entry: arm `pre:com=0.12`. Gate `pre` in every layer, write `v_L = 0.12 * d_commit_L`. Control: `pre:com=0.12:ctrl`. base: champion generation 0 No edit had passed when this entry was built (no `CHAMPION.md`); statistics, weights and pre-tests are those of the unedited model. The entry holds only this change. size: whole network 4.4709% over 180 matrices, largest matrix 18.9846% control size: whole network 4.4709% over 180 matrices, largest matrix 18.9846% Built by `code/net_job.py` (one GPU-0 hold, forward pass `tools/g31.py` only, no optimiser anywhere) and rebuilt bit for bit by `build.sh` (`code/net_build.py` from…

Did it improve?

- · No task-level result recorded in this snapshot.

Pending or parked proposal; not established as an applied or promoted update.

Evaluation set: wsp31_screen_v1 · Batch: -. Local screening and historical task scores are not competition scores unless explicitly identified in the source. Different evaluation sets cannot be compared as a gain.

Original evidence

Literal source excerpts follow. They may contain original predictions and superseded counts; use the measured-outcome summary and corrections above for the current result.

Hypothesis
Unedited batch b001 (three identical arms, 288 scored episodes of 120 stage-1 tasks, `code/seq_stats.py`): solved
54%. Of the 133 failures, 60 end at the 7.5-minute session limit (31 with an empty patch), 26 at the 30-call cap and
47 submit a wrong patch. Limit episodes carry about 8,500 thought tokens, 35% to 40% of them beyond depth 800 of one
thought and 54% to 59% beyond depth 400 (solved episodes: 3,950 thought tokens, 16% and 35%). At about 25 generated
tokens per second a cut at depth 800 returns about 3,200 tokens, 130 of the 450 seconds.

The limit-with-empty-patch episodes are reading spirals: about 21 calls, 90% of their thought tokens before any
file edit, 71% never edit. P(solved | no edit within the first 12 calls) is 0.31; episodes whose first edit comes at
calls 6 to 11 solve 70% to 80% (difficulty is confounded with this). After a pre-edit thought of 800 tokens or more
the next call is an edit only 19% of the time (61% another read or shell command); the thought before the first edit
is itself long (median 330 tokens in solved episodes, 550 in failed ones, 24% and 35% beyond 800).

This entry isolates the "commit" half of the pre-edit rumination gate (same turn, same gate): deep in a thought
(400 tokens or more) while nothing has been edited yet, one neuron per layer writes only the commit contrast (state
of thought positions of the call that makes the first edit minus state of thought positions of earlier read / run
calls of the same episode) at dose 0.12 per layer, and no end-of-thought direction. The thought is not pushed to
close; it is pushed toward the state from which the unedited model goes on to edit. If reading spirals cost tasks
because the model does not turn deliberation into a first edit, this should move the first edit earlier without
shortening thoughts by force; if the gain of the combined entry comes from thought length alone, this entry shows
nothing. Differences from E4B "edit sooner" and from ledger 0017: as stated in the combined entry (gated on deep
pre-edit thought, acts inside the thought, all 60 layers).
Exact recipe
This entry: arm `pre:com=0.12`. Gate `pre` in every layer, write `v_L = 0.12 * d_commit_L`. Control: `pre:com=0.12:ctrl`.

base: champion generation 0

No edit had passed when this entry was built (no `CHAMPION.md`); statistics, weights and pre-tests are those of the
unedited model. The entry holds only this change.

size: whole network 4.4709% over 180 matrices, largest matrix 18.9846%

control size: whole network 4.4709% over 180 matrices, largest matrix 18.9846%

Built by `code/net_job.py` (one GPU-0 hold, forward pass `tools/g31.py` only, no optimiser anywhere) and rebuilt
bit for bit by `build.sh` (`code/net_build.py` from `code/data/net_stats_slim.pt`).

Data. `tools/data/probe_b001.jsonl`: unedited arms `base`, `aa`, `zero` of batch b001, all 58 instances are stage-1
tasks. Instances sorted by name; every fourth (index % 4 == 1, 15 tasks) is held out for the pre-test, the other 43
are fit tasks. One episode per task (the one with most deep, post-edit and first-edit thought positions), truncated
to 11,000 tokens. Fit episodes (one per task, in capture order, 32 captured before the capture deadline): lepture__python-livereload-198, gcaufield__MonkeyPack-27, cool-RR__PySnooper.57472b46.lm_rewrite__g0pq8oow, benoitc__gunicorn.bacbf8aa.func_basic__3napqcbj, cool-RR__PySnooper.57472b46.lm_rewrite__031xvy9b, kinto__kinto-http.py-122, keras-team__keras-20443, celery__billiard-372, cloudtools__troposphere-1968, lepture__mistune.bf54ef67.combine_module__dalnbilu, beeware__briefcase-912, hhursev__recipe-scrapers-1187, DanielSank__constraintula-14, jd__tenacity.0d40e76f.func_basic__85q611gl, Mimino666__langdetect.a1598f1a.lm_rewrite__dk9wx21q, googlefonts__glyphslib-563, jd__tenacity.0d40e76f.combine_module__jua0momz, django-money__django-money.835c1ab8.lm_rewrite__v5cndhkm, jsvine__pdfplumber.02ff4313.func_pm_remove_assign__1v9soh1j, jsvine__pdfplumber.02ff4313.lm_rewrite__1nhq0adm, life4__textdistance.c3aca916.combine_file__ciwv50c6, gweis__isodate.17cb25eb.func_basic__ydtogylj, Textualize__textual-1352, django-money__django-money.835c1ab8.combine_module__bqggrnha, joke2k__django-environ-361, brazilian-utils__brutils-python-114, keis__base58-46, fgmacedo__python-statemachine-370, cookiecutter__cookiecutter.b4451231.lm_rewrite__byoy8vaf, azure__walinuxagent-1183, juju-solutions__charms.reactive-71, PyCQA__flake8.cf1542ce.lm_rewrite__yh5du3ns.
No task outcome enters any statistic.

Positions per fit episode (seeded sample, `sample_rows`): last token of a thought (E, the model's next token was
`<channel|>`; the token the history re-rendering merged with a newline is restored, `thinklib.positions`), thought
positions at depth < 100 (40), 100-399 (40), 400-799 (50), >= 800 (70), positions outside thoughts (40), up to 60
more thought positions at depth >= 300 after the episode's first edit, and up to 80 thought positions of the call
that makes the first file edit. Depth = tokens since `<|channel>`. "Edited" = an earlier call of the episode was
`edit_file` or `write_file`. Captured at all 60 layers: `mlp_in`, `resid_post`, `mlp_raw`, `mlp_act`.

Gate (one neuron per layer, replaced outright, mode "set"): the neuron with the smallest mean |activation| over the
sampled positions of the fit episodes (second smallest for the `pre` gate, so both gates can share a layer).
Gate row = `(12 / sigma) (w - (theta / cbar) m)`: `w` = unit ridge-LDA probe on `mlp_in[L]`, `w ~ (S + lam I)^-1
(mean+ - mean-)` with `S` the full within-class covariance (solved in the dual form on at most 4,000 rows, seed 0)
and `lam` = 10 times the mean coordinate variance; `m` = unit mean `mlp_in` (`m . x = cbar` at every position; the
model has no bias). Up row = `m / cbar` (reads 1). The probe direction is fitted on the fit episodes with index
% 3 != 0; `theta` (95% quantile of the probe on the negatives), `sigma` (sd on the positives) and the neuron's mean
activation `gbar` are taken on the remaining third, so they are out-of-sample values. (On the turn-0 capture this
probe has a held-out-episode AUC of 0.86 to 0.96 for depth >= 800, the diagonal probe of ledger 0008 0.76 to 0.91:
`code/probe_cmp.py`.)
- `deep` gate: positives = thought positions at depth >= 800; negatives = thought positions at depth < 200 and
  positions outside thoughts.
- `pre` gate: positives = thought positions at depth >= 400 while no file edit has been made; negatives = thought
  positions at depth < 150, positions outside thoughts, and every thought position after the first edit.
Layers whose AUC on the calibration third is below 0.75 are skipped: gate `pre`: none skipped (60 layers used); calibration AUC over the 60 layers min 0.75, median 0.83, max 0.88.

Write (down column of the same neuron) = `clipdiv(v_L, w_post_L) * rms_y_L / (gbar_L * layer_scalar_L)`: `v_L` the
stream vector below, `w_post_L` the post-feedforward norm weights (`clipdiv(d, w) = d / w`, zero where `|w|` is under
its 5% quantile), `rms_y_L` the rms of the raw MLP output at the gate's positives, `gbar_L` the neuron's mean
activation at its positives. At an average positive position the write moves `resid_post[L]` by `v_L`.
- `d_end_L` = mean `resid_post[L]` at E positions minus mean at the other thought positions (pooled over episodes).
- `d_commit_L` = mean over episodes of [mean `resid_post[L]` over the thought positions of the call that makes the
  first edit minus mean over the thought positions of earlier read / run calls of the same episode] (episodes with
  at least 8 positions on each side). d_commit fitted on 18 episodes; split-half cosine of d_commit (layers 0, 6, ..., 54): 0.22 0.54 0.71 0.70 0.59 0.40 0.34 0.24 0.21 0.16; cosine(d_end, d_commit) same layers: 0.43 0.55 0.50 0.51 0.21 -0.22 0.01 0.06 0.05 0.05.

Control (`ctrl/`): same code path, same neurons, identical gate and up rows (it fires at the same positions with the
same strength); the written stream vector `v_L` has the sign of every coordinate flipped at random (seed 1000 + L)
before the division by `w_post`: identical per-coordinate magnitudes, hence identical norm in the stream and
identical `|dW|_F` in every matrix. It tests the direction against an equal-sized, equally gated write.

Approximations: bf16 storage of the factors; the gate is a linear probe, so it fires on a share of other positions
(table); `clipdiv` zeroes 5% of the coordinates; the write formula ignores the change of the rms of the raw MLP
output. `d_commit` is a difference of thought states, not a verified control direction.

Checker and rebuild:

```
saved queue/net-preedit-commit-b12/edit r 1 modules 180 rho med 0.023
saved queue/net-preedit-commit-b12/ctrl r 1 modules 180 rho med 0.023
OK edit: 180 modules changed (of 180 present), r=1, max |dW|_F/|W|_F 0.1898 at 28.gate_proj
OK ctrl: 180 modules changed (of 180 present), r=1, max |dW|_F/|W|_F 0.1898 at 28.gate_proj
```
- `edit/adapter_model.safetensors` sha256 `1938741b536e0e74d8bbda953ee113a56088d74dc25e4f3c554d4d4c68ebd64c`: identical to the adapter `P_C12` evaluated in the hold
- `ctrl/adapter_model.safetensors` sha256 `0ff75e1c4666fea7adad367f5faed26d0a7110fd68b0c39bf8dfafc03ea9f60c`: no evaluated adapter of this name (built after the hold from the same statistics)

### Pre-test 1: teacher-forced, forward pass `tools/g31.py`, held-out tasks (episodes named in the table, prefix 8,000 tokens)

The forward pass agrees with the served unedited model (TOOLS.md section 3); its agreement on an edited model is
verified there only for the rank-4 comparison. Gate firing on held-out episodes (pre-activation > 0):

```
 pre  L0  auc 0.934 | fire d<100 0.00 100-400 0.03 400-800 0.19 >=800 0.41 | pre>=400 0.26 post>=400 - post all 0.00 | non 0.00 E 0.14 tool-pt 0.00
 pre  L6  auc 0.910 | fire d<100 0.00 100-400 0.09 400-800 0.24 >=800 0.50 | pre>=400 0.33 post>=400 - post all 0.00 | non 0.01 E 0.23 tool-pt 0.00
 pre  L12 auc 0.830 | fire d<100 0.00 100-400 0.06 400-800 0.13 >=800 0.26 | pre>=400 0.17 post>=400 - post all 0.00 | non 0.00 E 0.00 tool-pt 0.00
 pre  L18 auc 0.815 | fire d<100 0.01 100-400 0.07 400-800 0.17 >=800 0.33 | pre>=400 0.22 post>=400 - post all 0.00 | non 0.01 E 0.00 tool-pt 0.00
 pre  L24 auc 0.825 | fire d<100 0.00 100-400 0.08 400-800 0.14 >=800 0.19 | pre>=400 0.16 post>=400 - post all 0.00 | non 0.00 E 0.00 tool-pt 0.00
 pre  L30 auc 0.815 | fire d<100 0.00 100-400 0.09 400-800 0.16 >=800 0.19 | pre>=400 0.17 post>=400 - post all 0.00 | non 0.00 E 0.00 tool-pt 0.00
 pre  L36 auc 0.790 | fire d<100 0.00 100-400 0.08 400-800 0.17 >=800 0.17 | pre>=400 0.17 post>=400 - post all 0.00 | non 0.00 E 0.00 tool-pt 0.00
 pre  L42 auc 0.711 | fire d<100 0.01 100-400 0.07 400-800 0.17 >=800 0.22 | pre>=400 0.19 post>=400 - post all 0.00 | non 0.00 E 0.00 tool-pt 0.00
 pre  L48 auc 0.713 | fire d<100 0.01 100-400 0.08 400-800 0.15 >=800 0.21 | pre>=400 0.17 post>=400 - post all 0.01 | non 0.01 E 0.00 tool-pt 0.00
 pre  L54 auc 0.696 | fire d<100 0.02 100-400 0.07 400-800 0.13 >=800 0.18 | pre>=400 0.14 post>=400 - post all 0.02 | non 0.01 E 0.00 tool-pt 0.00
 pre  L59 auc 0.725 | fire d<100 0.01 100-400 0.04 400-800 0.09 >=800 0.15 | pre>=400 0.11 post>=400 - post all 0.01 | non 0.00 E 0.00 tool-pt 0.00
```

Greedy reading of the logged thoughts: "cut" = the arm's top token is `<channel|>` at a position where the agent
went on thinking; "kept" = share of a logged thought before the first cut (mean over thoughts); "E top=101" = share
of logged thought ends where `<channel|>` is still the top token; "agree" = same top token as the unedited model at
positions outside thoughts, after a thought, and at the tool name; "d lp(edit)" = change of log p(`edit`) at the
tool-name position before / after the first edit.

```
episodes 4 ['jpadilla__pyjwt-847', 'Nikoleta-v3__blackbook', 'borgbackup__borg-7448', 'janehmueller__python-j'] arms ['base', 'D_E05', 'P_EC05', 'D_E12', 'K_E03', 'K_E08', 'P_C12', 'K05t', 'D_E05c', 'P_EC05c', 'K_E03c']
rows by class {0: 22, 1: 1592, 2: 2157, 3: 2109, 4: 600, 5: 22, 6: 22} | thought rows pre-edit 5288 post-edit 570
arm      | cut share d<200 200-400 400-800 >=800 | dlp101 >=800 | kept short(<400) long(>=800) n | long thoughts cut | E top=101 | agree non think tool | d lp(edit) pre/post | d lp(read) pre | tool argmax changed
base     | 0.000 0.000 0.000 0.000 |  +0.00 | 1.00 1.00 n 17/3 | 0 of 3 | 0.909 | 1.000 1.000 1.000 | +0.00 / +0.00 | +0.00 | 0.000
P_EC05   | 0.001 0.003 0.007 0.000 |  +5.51 | 1.00 0.71 n 17/3 | 1 of 3 | 0.909 | 0.982 1.000 1.000 | +1.01 / +0.48 | +0.53 | 0.000
P_C12    | 0.000 0.000 0.000 0.000 |  +2.55 | 1.00 1.00 n 17/3 | 0 of 3 | 0.909 | 0.993 1.000 1.000 | +0.06 / +0.02 | +0.13 | 0.000
P_EC05c  | 0.000 0.000 0.000 0.000 |  +0.23 | 1.00 1.00 n 17/3 | 0 of 3 | 0.909 | 0.980 1.000 1.000 | -0.03 / +0.03 | -0.04 | 0.000
```

Reading of the table. Four held-out episodes hold only 17 short logged thoughts (under 400 tokens) and 3 long ones (800 or more), so `kept` and `long thoughts cut` are counts out of three. The matched controls evaluated in the same hold (`D_E05c`, `P_EC05c`) cut nothing and move log p(`<channel|>`) at depth >= 800 by +0.1 to +0.2 nats, against +2.6 to +6.6 for the edit arms. No arm changes the token after a thought or the top tool name. This entry (row `P_C12`): no thought cut, log p(`<channel|>`) at depth >= 800 up by 2.6 nats (the commit contrast has cosine 0.4 to 0.55 with the end-of-thought contrast in layers 0 to 18), tool-name log-probs unchanged (+0.06 for `edit`). Teacher-forced, with the thought text fixed, this entry does not move the tool choice: its claimed effect runs through the thought the model writes after the gate has fired, which only generation shows, and that check was not run. The commit contrast is consistent across episodes in layers 6 to 24 (split-half cosine 0.54 to 0.71) and weak beyond layer 40 (0.16 to 0.24). The matched control at this dose was built after the hold and not evaluated. Of the four entries of this turn this is the one most likely to do nothing.

### Pre

Runner facts (2026-11-13 01:08:58 EST): source `wsp31/authors/claude/queue/net-preedit-commit-b12/`; served copy `wsp31/queue/frozen/claude__net-preedit-commit-b12/`; sha256 over files, edit `3d904d97bdcbacbe7807c033dce4583a8f4211d9ae28be32fb9ebbd012f80522`, control `0f2a1d06ebadcb2c20f0299e7d602535f0b163e649d2ede1e08d4a99135888e8`; both passed the checker.
Prediction (written before the run)
predicted_gain_120: -7 to 7

Reference numbers (unedited arms of b001, 288 episodes): 244 thought tokens per model call, 23.6% of episodes at the
session limit, 13.2% empty patches, 9.4% of episodes without any edit call, first edit at call 9 (median); after a
pre-edit thought of 800 tokens or more the next call is an edit in 19% of cases.

Behaviour that should move in the edit arm against the reference arm of the same batch:
- share of pre-edit thoughts of 800 tokens or more that are followed by an edit: up from 19% to 25% or more; first
  edit: median call index down by 0 to 2; episodes without any edit call: from about 9% to 6%-9%;
- thought tokens per model call: within 10% of the reference (this entry does not push thoughts to close; the
  pre-test table shows how many long thoughts it cuts all the same);
- episodes at the session limit: down by 0 to 5 points.

Control (same gates, sign-flipped write): nothing beyond noise, gain between -4 and +4.

What would prove the hypothesis wrong: (a) no movement of the first edit and of the edit share after deep thoughts:
the commit contrast is not a control direction (it is a difference of thought states and was not causally checked
beyond the pre-test below); (b) the first edit moves earlier and the gain is negative: committing earlier hurts;
(c) this entry gains as much as the combined entry: then the end-of-thought write adds nothing there.
Result
Pending.
Verdict and notes
Parked 2026-11-13 09:12:02 EST, not screened: rounds began on 13 Nov 2026 and each author keeps two waiting entries. The author can put it back in a later round (an empty file `RESUBMIT` in `wsp31/authors/claude/queue/net-preedit-commit-b12/`); it then counts as one of that round's entries and is served from the frozen copy, unchanged.