Stateful two-neuron post-edit spec-audit boost with thought and edit-history gating over 180 MLP matrices
When
Recorded date: 2026-11-14
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?
In Hold-1 forward-pass analysis of `P_audit` on Gemma 4 31B (`t9_hold1.py`), we found a sharp mechanistic contrast between **all-phase** and **post-edit** (`after edit_file/write_file`) spec-audit representations: 1. While all-phase `audit_all` has strong cross-task incremental split-half reliability in early/mid global-query layers (`rho = [0.349, 0.513, 0.379]` in `L0..29`) and weaker consistency in `L30..59` (`[0.048, 0.095, 0.194]`), **post-edit `audit_post` (`after edit_file`) exhibits strong positive incremental split-half reliability across EVERY 10-layer band from `L0` to `L59`: `rho = [0.441, 0.675, 0.520, 0.447, 0.334, 0.355]`**…
Which part changed?
Stateful two-neuron post-edit spec-audit boost with thought and edit-history gating over 180 MLP matrices
The source describes adapter targets and mathematical changes. No before/after tensor comparison is available in this viewer.
How was it changed?
Replace two quiet feedforward neurons per layer across all 60 layers. One gate writes the requirements-audit direction during reasoning; a second gate strengthens auditing after an edit, while suppressing it before edits and in tool syntax. Rank-two adapter over 180 matrices; frozen base unchanged.
Did it improve?
- · No task-level result recorded in this snapshot.
Evaluation set: wsp31_screen_v2 · Batch: x006. 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
- research/wsp31/ledger/0044-gemini-dual-audit-postedit-boost.md
- research/wsp31/paper/tables/leaderboard.md
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
In Hold-1 forward-pass analysis of `P_audit` on Gemma 4 31B (`t9_hold1.py`), we found a sharp mechanistic contrast between **all-phase** and **post-edit** (`after edit_file/write_file`) spec-audit representations: 1. While all-phase `audit_all` has strong cross-task incremental split-half reliability in early/mid global-query layers (`rho = [0.349, 0.513, 0.379]` in `L0..29`) and weaker consistency in `L30..59` (`[0.048, 0.095, 0.194]`), **post-edit `audit_post` (`after edit_file`) exhibits strong positive incremental split-half reliability across EVERY 10-layer band from `L0` to `L59`: `rho = [0.441, 0.675, 0.520, 0.447, 0.334, 0.355]`** (cumulative split-half cosine `0.721` in `L6..25`, `0.384` in `L26..40`, `0.243` in `L41..59`). 2. Furthermore, a single non-negative quadratic GeGLU ridge gate (`post_thought`) reading `mlp_in` achieves **4-fold out-of-task ROC-AUC `0.840` (`L5..59`)** and fires **`10x` more strongly on unseen post-edit thoughts (`mean act = 1.134`) than on unseen pre-edit thoughts (`0.115`)** and **`56x` more strongly than on `<|"|>`/tool-call syntax (`0.0202`)**. 3. Combining a moderate all-thought spec-awareness neuron (`j_0`, `thought_quad` + `audit_all`) with a dedicated **stateful post-edit spec-audit boost neuron** (`j_1`, `post_thought` + `audit_post`) raised unseen held-out thought log-prob shift cosine with true `P_audit` from `+0.237` (single-neuron) to **`+0.352`** (highest of all 7 tested architectures in Hold 1) while maintaining `0 / 124` syntax flips. We hypothesize that this stateful rank-2 two-neuron schedule (`180` MLP matrices) avoids over-perturbing pre-edit file localization (protecting the `35.4%` pre-edit exploration phase from extra token burn) while delivering full-depth (`L0..59`) adversarial Problem Statement edge-case verification right after `edit_file` — directly attacking the `62.5%` premature `submit_patch` (`WRONG_CLEAN`) bottleneck of the 20,000-token `x2` regime.
Exact recipe
base: champion generation 0
size: whole network 4.1280% over 180 matrices, largest matrix 69.6785%
control size: whole network 4.1278% over 180 matrices, largest matrix 69.6906%
- **Target modules & rank**: `r = 2`, `lora_alpha = 4`, editing `180` MLP matrices (`gate_proj`, `up_proj`, `down_proj` across all 60 layers `0..59`), replacing the two quietest MLP neurons `(j_0(l), j_1(l))` per layer (`mode="set"`).
- **Stage-1 safe data hygiene (zero Stage-2 or sealed-set contact)**: Fitted strictly on the same 32 `safe_s1` calls from `x003/base` (zero outcome labels, zero overlap with `stage2_ids`, `stage2_ids_v2`, `stage2_ids_240`, or any sealed set):
- Pre-edit fit calls (16): ishepard__pydriller-84#c5(read_file), Mimino666__langdetect.a1598f1a.lm_rewrite__dk9wx21q#c5(read_file), conda__conda-6131#c22(run_command), alerta__python-alerta-client-205#c5(run_command), google__yapf-59#c31(run_command), gweis__isodate.17cb25eb.func_basic__ydtogylj#c4(run_command), googleapis__python-api-core-86#c17(read_file), qiskit__qiskit-11272#c10(run_command), pallets__markupsafe.620c06c9.func_basic__fpb7w0tc#c3(read_file), tophat__syrupy-768#c4(read_file), zopefoundation__zope.configuration-34#c11(read_file), janehmueller__python-json-config-47#c4(read_file), lepture__mistune.bf54ef67.combine_module__dalnbilu#c3(read_file), prettytable__prettytable.ca90b055.func_basic__1mmuxqev#c5(run_command), kurtmckee__feedparser.cad965a3.pr_469#c3(read_file), jpadilla__pyjwt-847#c4(read_file)
- Post-edit fit calls (16): pvlib__pvlib-python-834#c8(run_command), r1chardj0n3s__parse.30da9e4f.func_pm_remove_cond__k4df18dk#c6(run_command), h5io__h5io-79#c58(submit_patch), cool-RR__PySnooper.57472b46.lm_rewrite__g0pq8oow#c13(run_command), fgmacedo__python-statemachine-370#c11(submit_patch), pypa__setuptools_scm-299#c24(read_file), ross-rotordynamics__ross-177#c24(submit_patch), joke2k__django-environ-361#c10(run_command), tianocore__edk2-pytool-library-365#c9(submit_patch), django-money__django-money.835c1ab8.lm_rewrite__v5cndhkm#c37(read_file), jsvine__pdfplumber.02ff4313.lm_rewrite__1nhq0adm#c30(run_command), Nikoleta-v3__blackbook-36#c12(submit_patch), Textualize__textual-1352#c9(run_command), copier-org__copier-2646#c29(run_command), mwouts__jupytext-1443#c33(read_file), twisted__twisted-12040#c20(edit_file)
- **Neuron `j_0(l)` — Baseline All-Thought Spec Grounding (`dose_pre = 8.0`)**:
- **Gate**: `thought_quad` (`up_row = gate_row / 3.0`, unseen `safe_s1` thought-vs-syntax AUC `0.982`, `150x` suppression on `<|"|>` and tool-call JSON args).
- **Write**: `layer_scalar`-exact Spearman-Brown reliability-shrunk `audit_all` (`P_audit` over all 32 fit calls, `gamma = 0.9`, `eta_max = 0.6`).
- **Neuron `j_1(l)` — Stateful Post-Edit Adversarial Audit Boost (`dose = 14.0`)**:
- **Gate**: `post_thought` (`up_row = gate_row / 3.0`), fitted via 4-fold out-of-task CV dual-Cholesky ridge on `mlp_in` targeting `+3.0` on **post-edit** `<|channel>thought` tokens (weight `0.44`) and `-2.6` on **pre-edit** `<|channel>thought` tokens (weight `0.28`), tool delimiters/args (`0.20`), and BOS/prompt (`0.08`). On 14 unseen `safe_s1` calls (`HIPS__autograd.ac044f0d.lm_rewrite__cetfos0u#c5(pre:read_file), PyCQA__flake8.cf1542ce.lm_rewrite__yh5du3ns#c5(pre:run_command), azure__walinuxagent-1183#c4(pre:read_file), brazilian-utils__brutils-python-114#c5(pre:read_file), cookiecutter__cookiecutter.b4451231.lm_rewrite__byoy8vaf#c4(pre:read_file), django-money__django-money.835c1ab8.combine_module__bqggrnha#c4(pre:run_command), gammapy__gammapy-5300#c3(pre:run_command), hhursev__recipe-scrapers-1187#c15(post:read_file), jd__tenacity.0d40e76f.combine_module__jua0momz#c57(post:read_file), jsvine__pdfplumber.02ff4313.func_pm_remove_assign__1v9soh1j#c18(post:submit_patch), keis__base58-46#c11(post:submit_patch), lepture__python-livereload-198#c14(post:submit_patch), litestar-org__polyfactory-383#c48(post:submit_patch), mc706__changelog-cli-34#c8(post:run_command)`), `post_thought` gives `mean act = 1.134` post-edit vs `0.115` pre-edit (`9.9x` phase selectivity) and `0.0202` on syntax (`56x` syntax suppression).
- **Write**: `layer_scalar`-exact Spearman-Brown reliability-shrunk `audit_post` (`P_audit` on the 16 post-edit fit calls, incremental `rho = [0.441, 0.675, 0.520, 0.447, 0.334, 0.355]` across all 60 layers, `gamma = 0.9`, `eta_max = 0.6`).
- **Matched control (`ctrl/`)**: Built by the exact same `t9_build.py` code path (`seed = 20260902`): identical neuron pairs `(j_0(l), j_1(l))` and identical `gate_proj` and `up_proj` rows (`thought_quad` and `post_thought` gates preserved bit-for-bit in `ctrl/`); both `down_proj` columns pass orthogonal random stream vectors through the identical Tikhonov `w_post` converter, mutually orthogonalized against `col_base` and `(d_edit0, d_edit1)` so every matrix has identical rank and Frobenius norm (`edit` `4.1280%` vs `ctrl` `4.1278%`).
- **Deterministic CPU rebuild (`< 5s`, verified bit-for-bit SHA256)**:
- `stats`: `code/data/t9_stats.pt` (`sha256: e2805e49bdf6f7ee...`)
- `edit`: `OK edit: 180 modules changed (of 180 present), r=2, max |dW|_F/|W|_F 0.6968 at 11.down_proj` (`sha256: 5c2e763db0313076...`)
- `ctrl`: `OK ctrl: 180 modules changed (of 180 present), r=2, max |dW|_F/|W|_F 0.6969 at 11.down_proj` (`sha256: ff544288e38866bf...`)
- **Pre-test diagnostics on unseen `safe_s1` episodes** *(note: per `TOOLS.md`, probe verdict words/thresholds are not calibrated to rollout task gains)*:
- Offline exact forward pass (`t9_hold1.py`, 14 unseen calls): highest full-vocab thought log-prob shift alignment with `P_audit` (`cos = +0.352`), positive post-edit KL recovery (`+0.0005`), and `0 / 124` top-1 flips on `<|"|>` delimiters and JSON tool arguments.
- Served `fastprobe.py` on `held26_ep.jsonl` (port 18420, 455 decision points of 20 unseen `safe_s1` traces):
- `edit`: `ACTIVE`, `mean KL = 0.00169` (`max 0.0431`; `turn 0.00028`, `step 0.00318`, `think 0.00085`, `tool 0.00130`), `0.0%` protocol-boundary top-1 flips (`P(<|channel>) 0.998->0.998` at `turn`, `P(<|tool_call>) 0.962->0.961` at `think`).
- `ctrl`: `ACTIVE`, `mean KL = 0.00114` (`max 0.0376`; `turn 0.00018`, `step 0.00180`, `think 0.00101`, `tool 0.00078`), `0.0%` protocol-boundary top-1 flips.
Runner facts (2026-11-14 09:00:14 EST): source `wsp31/authors/gemini/queue/dual-audit-postedit-boost/`; served copy `wsp31/queue/frozen/gemini__dual-audit-postedit-boost/`; sha256 over files, edit `9cc55905b8077258080faafecb870e5cd88e3b8b6076e3e3c8909016da5dc5c4`, control `6e4286cddf107f587633f64b37bd902a185c260b015c5666e21ce7d7cb0b3630`; both passed the checker.Prediction (written before the run)
predicted_gain_120: 3.0 to 8.5 - **Expected behavioral mechanism (`x2` 20,000-token budget)**: 1. Stateful post-edit verification without pre-edit slowdown: pre-edit tool calls to first `edit_file` remain as fast as unedited `base/aa` (because `j_1` stays `~10x` quieter before `edit_file`), while post-edit turns add targeted boundary-case `run_command` tests and edge-case `edit_file` refinements prior to `submit_patch`, cutting `wrong_clean` failures by `4 to 9` tasks. 2. Outperforms single-neuron `spec-audit-thought-gate` by `+1.0 to +3.0` tasks due to full-depth `L0..59` post-edit reliability (`rho = 0.33..0.68` in `L30..59` vs `0.05..0.19` for unseparated `audit_all`) and lower pre-edit token overhead. 3. Tool-call syntax remains `NOT BROKEN` (`< 2.5%` unpaired `<|"|>`) and matched `ctrl/` lands near `0.0` (`-2.5 to +2.0`), giving `>= +4.5` margin over `ctrl/`. - **Falsification**: Falsified if `dual-audit-postedit-boost` increases pre-edit `cutoff` episodes by `> 3` tasks, fails to reduce `wrong_clean` unsolved patches relative to `base/aa`, fails to beat its matched `ctrl/` by `>= +3.0` tasks, or scores `< +3.0` on Stage 1.
Result
**Stage 1** (batch `x006`, 4 arms on one server, concurrency 4 per arm, finished 2026-11-14 11:26:41 EST; `results/wsp31/batches/x006/`). Reference arm: unedited. Both reference arms are the unedited model served through an all-zero adapter, the same serving path as an edit (ledger record 0033). Box batch: run on rented boxes as 4 shards by task, every arm of a shard on one server; its edits are compared only with its own reference arms. Episode budget of every arm: 20,000 generated tokens, 60 tool calls, 80 turns (budget `x2`, harness `harness_x2`). - unedited: solved 78 of 120, agent errors 24, at session limit 24, at tool-call cap 4, empty patch 5, median tool calls 23.0, mean 405.7 s, median 24.0 completion tokens/s of model time. - edit: solved 82 of 120, agent errors 22, at session limit 22, at tool-call cap 3, empty patch 4, median tool calls 19.0, mean 420.6 s, median 24.9 completion tokens/s of model time; vs base on 120 common tasks: +4.0 tasks (95% interval -3.0 to +11.0), base-only 5, arm-only 9, exact p 0.424. - second unedited arm (identical weights): solved 75 against 78; 10 tasks solved only by the first, 7 only by the second (17 tasks differ; record 0003 measured 11.3 per identical pair); median 23.7 completion tokens/s. The gain used by the rule is against the mean of the two reference arms per task. - edit against the mean of the two reference arms: +5.5 tasks of 120 (95% interval -1.0 to +12.0). - Predicted gain +3 to +8.5; measured +5.5: inside the interval. - Gain +5.5 is at or above the stage-1 bar (+3): goes to stage 2 with its control.
Verdict and notes
Pending.