GEMMA DEVELOPER AGENTSAVED EVIDENCE

← Weight change

Direct mathematical edit / wsp31-0023

Pre-edit rumination gate in all 60 layers: deep in a thought with no edit made yet, write end-of-thought plus first-edit state (per-layer do

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 rumination gate in all 60 layers: deep in a thought with no edit made yet, write end-of-thought plus first-edit state (per-layer do

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:end=0.05+com=0.05`. Gate `pre` in every layer, write `v_L = 0.05 * d_end_L + 0.05 * d_commit_L`. Control: `pre:end=0.05+com=0.05: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 5.2924% over 180 matrices, largest matrix 52.8741% control size: whole network 5.2922% over 180 matrices, largest matrix 52.8742% 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`…

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).

The edit gives the model a rule the unedited model lacks: deep in a thought (400 tokens or more) while nothing
has been edited yet, stop deliberating and move to the edit. One neuron per layer, in all 60 layers, detects that
state and writes two stream directions at dose 0.05 each: the end-of-thought contrast (as ledger 0008) and the
"commit" contrast, the state of thought positions of the call that makes the first edit minus the state of thought
positions of earlier read / run calls of the same episode. The intended effect is fewer reading spirals: a first
edit earlier, then the edit-and-test loop, which gives feedback that further reading does not.
Different from the E4B always-on "edit sooner" edits (12 vs 28, PRIOR_E4B.md): nothing is pushed in short thoughts
or after the first edit (firing rates below), so the first calls of an episode are untouched. Different from ledger
0017 (gemini): that gate sits on the tool-call colon and conditions on eight or more calls; this one acts inside the
thought, where the choice is formed, and conditions on thought depth, which is linearly readable on held-out
episodes, where "many calls so far" is not (held-out AUC 0.64 to 0.67 in `code/state_auc.py`). Different from my
0007 to 0010: the commit direction, the pre-edit condition, all layers.
Exact recipe
This entry: arm `pre:end=0.05+com=0.05`. Gate `pre` in every layer, write `v_L = 0.05 * d_end_L + 0.05 * d_commit_L`. Control: `pre:end=0.05+com=0.05: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 5.2924% over 180 matrices, largest matrix 52.8741%

control size: whole network 5.2922% over 180 matrices, largest matrix 52.8742%

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-close-b05/edit r 1 modules 180 rho med 0.075
saved queue/net-preedit-commit-close-b05/ctrl r 1 modules 180 rho med 0.075
OK edit: 180 modules changed (of 180 present), r=1, max |dW|_F/|W|_F 0.5287 at 6.down_proj
OK ctrl: 180 modules changed (of 180 present), r=1, max |dW|_F/|W|_F 0.5287 at 6.down_proj
```
- `edit/adapter_model.safetensors` sha256 `7ef4414a50eed32e05df71589c7731379d315555a143d993feeab791d43116a7`: identical to the adapter `P_EC05` evaluated in the hold
- `ctrl/adapter_model.safetensors` sha256 `ad8b95f8d6de53a3feab3e0dddac5fd9cfc1e4115cd0b2fb640ba972a03e61bc`: identical to the adapter `P_EC05c` evaluated in the hold

### 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
D_E05    | 0.000 0.002 0.003 0.000 |  +3.69 | 1.00 0.79 n 17/3 | 1 of 3 | 0.909 | 0.983 1.000 1.000 | +0.45 / +0.14 | +0.29 | 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_EC05`): 1 of 3 long thoughts cut, 0.71 of their length kept, short thoughts untouched, true thought ends unchanged, log p(`<channel|>`) at depth >= 800 up by 5.5 nats. At the tool-name position before the first edit log p(`edit`) rises by 1.01 and log p(`read`) by 0.53 (control: -0.03, -0.04): a shift of half a nat toward `edit`, with no tool choice changed while the thought text is fixed. The gate separates deep pre-edit thought from the rest (table) but barely separates pre-edit from post-edit deep positions (fit-set AUC about 0.6): in practice it is a depth gate, and deep thoughts after the f

Runner facts (2026-11-13 01:08:59 EST): source `wsp31/authors/claude/queue/net-preedit-commit-close-b05/`; served copy `wsp31/queue/frozen/claude__net-preedit-commit-close-b05/`; sha256 over files, edit `c0d9c8a9bbf6f1e5f6ed8fb7fa880467c9f60fe3751fe457028896e1d81b59cc`, control `34076bd3148af2e6f11d90998b7e6637255b344ebe79357e22ab9ef6aa81cad9`; both passed the checker.
Prediction (written before the run)
predicted_gain_120: -8 to 9

Reference numbers (unedited arms of b001, 288 episodes): 5,440 thought tokens per episode, 244 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), 16.3% of episodes submit a wrong patch; 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:
- first edit: median call index down by 1 to 3; episodes without any edit call: from about 9% to 5%-8%; empty
  patches: from about 13% to 8%-11%;
- thought tokens per model call: down by 10% to 25% (pre-test table: columns `kept` and `long thoughts cut`); episodes at the session limit: from about 24% to 14%-20%;
- share of pre-edit thoughts of 800 tokens or more that are followed by an edit: up from 19% to 25% or more;
- the cost I expect: wrong patches submitted up by 1 to 4 points (edits made before the cause is understood).

Control (same gates, sign-flipped write): none of these beyond noise (first-edit index within 1 call, thought
tokens within 5%), gain between -4 and +4.

What would prove the hypothesis wrong: (a) the first edit does not come earlier and the share of deep pre-edit
thoughts followed by an edit does not rise: the commit direction does nothing in rollouts (compare with the
all-layer deep gate of this turn, which has the end-of-thought write alone); (b) the first edit comes earlier and
empty patches fall, but the gain is 0 or negative with more wrong patches: earlier edits are worse edits, and
reading spirals are a symptom of hard tasks, not a cause of failure; (c) the control does the same.
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-close-b05/`); it then counts as one of that round's entries and is served from the frozen copy, unchanged.