Dual-cap rescue stack: rank-4 exact-close writer subspace (0.38%) plus 13-layer late pre-edit commit gate
When
Recorded date: 2026-11-12
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 `b001`, unsolved episodes are squeezed between **two coupled hard caps**: the **7.5-minute wall-clock cap** (38 failures, driven by `>800`-token thought loops) and the **30-tool-call cap** (21+ empty-budget or late-edit failures, driven by 14--17 `read_file` calls before the first edit). Fixing only one cap leaks failures into the other: - Shortening thoughts alone gives indecisive episodes more wall-clock to execute `read_file` slices until they hit `BudgetExceeded` at call 30 with `patch_size: 0` (exactly as seen in `conda__conda-6131 [aa]` at `339.9s, tc=30, p=0` and `kayak__pypika [zero]` at `250.6s, tc=30, p=0`). - Nudging `read_file…
Which part changed?
Dual-cap rescue stack: rank-4 exact-close writer subspace (0.38%) plus 13-layer late pre-edit commit gate
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. base: champion generation 0 Designed and pre-tested on generation 0 (unedited checkpoint); entry contains only this combined change. The writer subspace (`120` matrices) and neuron gate (`39` MLP matrices in layers `30..39, 57..59`, sharing `down_proj` in those 13 layers for maximum rank `4 + 1 = 5 <= 32` across `146` changed matrices) act on disjoint positions (`close/cont` inside thoughts vs `:` of `<|tool_call>call:` at `call >= 8, n_edits == 0`). size: whole network 1.121525% over 146 matrices, largest matrix 9.659172% control size: whole network 1.121500% over 146 matrices, largest matrix 9.659172% Data and task split: `31` fit tasks…
Did it improve?
- · No task-level result recorded in this snapshot.
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
- research/wsp31/ledger/0018-gemini-dual-budget-rescue-r5.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 `b001`, unsolved episodes are squeezed between **two coupled hard caps**: the **7.5-minute wall-clock cap** (38 failures, driven by `>800`-token thought loops) and the **30-tool-call cap** (21+ empty-budget or late-edit failures, driven by 14--17 `read_file` calls before the first edit). Fixing only one cap leaks failures into the other: - Shortening thoughts alone gives indecisive episodes more wall-clock to execute `read_file` slices until they hit `BudgetExceeded` at call 30 with `patch_size: 0` (exactly as seen in `conda__conda-6131 [aa]` at `339.9s, tc=30, p=0` and `kayak__pypika [zero]` at `250.6s, tc=30, p=0`). - Nudging `read_file -> edit_file` at `call >= 8` alone cannot save episodes that stall in a 3,500-token single thought before reaching or verifying the edit (as in `hdmf-1270 [aa]` at `459.6s, max_think=4095`). Combining the **training-sized rank-4 exact within-call close writer subspace** (`exact_close_r4`, all 120 writers) with the **surgical 13-layer coordinate-whitened GeGLU late pre-edit commit gate** (`late_commit_gate`, layers `30..39, 57..59`) addresses both caps jointly in a single rank-5 adapter (`146` changed matrices): saved thinking wall-clock is converted into timely `edit_file` -> `pytest` -> `submit_patch` cycles rather than extra `read_file` loops.
Exact recipe
base: champion generation 0
Designed and pre-tested on generation 0 (unedited checkpoint); entry contains only this combined change. The writer subspace (`120` matrices) and neuron gate (`39` MLP matrices in layers `30..39, 57..59`, sharing `down_proj` in those 13 layers for maximum rank `4 + 1 = 5 <= 32` across `146` changed matrices) act on disjoint positions (`close/cont` inside thoughts vs `:` of `<|tool_call>call:` at `call >= 8, n_edits == 0`).
size: whole network 1.121525% over 146 matrices, largest matrix 9.659172%
control size: whole network 1.121500% over 146 matrices, largest matrix 9.659172%
Data and task split: `31` fit tasks and `10` strictly held-out check tasks from `wsp31_screen_v1` (`tools/data/probe_calls_b001.jsonl` plus exact per-call prefixes from `results/wsp31/batches/b001/{base,aa}/requests`, partitioned deterministically by `int(sha256(instance_id)[:8], 16) % 4 == 0` for check and `!= 0` for fit; `98` balanced 4-stratum calls, zero task-outcome labels used in any direction or gate, no trained adapter touched).
Construction (`code/fit_and_build.py`, family `dual_rescue_r5`, exact closed-form sum in `EditSet` without SVD truncation loss, `r = 5`, `146` changed matrices):
1. Add `exact_close_r4` across `o_proj` and `down_proj` of layers 0..59 equalized and scaled to `net_rel = 0.0038` (spectral-weighted rank-4 SVD of within-call identical-token `close - cont` writer contrasts orthogonalized to common thought write).
2. Add `late_commit_gate` at `gate_dose = 1.20` on the dormant neuron `j_L` of layers `30..39` and `57..59` (coordinate-whitened two-stage Woodbury ridge GeGLU gate opening at `<|tool_call>call:` with `n_edits == 0` and `n_tools >= 8`, writing the blended `mlp_raw(edit/write - read)` + post-norm `edit - read` logit direction).
Matched control (`ctrl/`): Exact closed-form sum of the orthogonal rank-4 writer control (`seed = 401000 + ...`) and the identical-gate orthogonal sign-flipped neuron write control (`seed = 603000 + L`), followed by `match_sizes` so all 146 changed matrices have the exact same ranks and Frobenius norms `|dW|_F` as `edit/`.
Approximations: bf16 storage; in layers `30..39, 57..59`, `down_proj[:, j_L]` receives both the `mode="set"` column replacement and the ~0.8% rank-4 writer projection term (negligible `<0.2%` interaction since `j_L` is dormant everywhere the gate is off); teacher-forced pre-test evaluation.
Component held-out diagnostics on `10` unseen check tasks: writer paired close AUC `o_proj = 0.9992`, `down_proj = 0.9898`; late-pre-edit gate AUC vs `early_pre = 0.7316`, vs `post_edit = 0.7265`, vs `non-tool = 0.9617`, firing `pos_late_pre = 0.308` vs non-tool `0.0019` and tool-args `0.0245`. Full-model check pass on `edit/` (`ACTIVE`, `mean KL = 0.0529`) confirms `+0.175` nats on `close all` (`+0.382` nats at `800+`), `-5.98` nats on `cont`, `P(call:run)` `+0.014` and `P(call:read)` `-0.003` (`d_lp_read = -0.300`, `d_lp_run = +0.794` at `pos_late_pre`, with deep-tail `d_lp_edit = -1.13` from the single-neuron GeLU negative dip on non-firing calls).
Rebuild: `bash build.sh [OUT_DIR]` executes `code/fit_and_build.py build` from saved `code/data/gemini_directions.pt` (fitted by `code/fit_and_build.py fit` from `code/capture_gemini_stats.py`). Verified byte-for-byte in an isolated scratch directory.
- Directions SHA256: `daa9e2b99a7d98fe9a8a52fe396b77ff5d7b0a19ba2b58f151949707336d04ee`
- Edit weights SHA256: `c90bed356e86fe3b4b372431393b625690209e446678894921fece10747e1691`
- Control weights SHA256: `ec4d6ff05632c2c8a42ac4722522cfe18283cf369ff93d136c28d1b5449068f3`
Checker output:
```
OK edit: 146 modules changed (of 146 present), r=5, max |dW|_F/|W|_F 0.09659 at 38.gate_proj
OK ctrl: 146 modules changed (of 146 present), r=5, max |dW|_F/|W|_F 0.09659 at 38.gate_proj
```
### edit: causal decision-point pre-test (offline `g31.G31`, verdict thresholds NOT VERIFIED YET in `TOOLS.md`)
Held-out check tasks (`probe_b001.jsonl` + exact per-call contexts, unseen during fitting): `99` decision points; verdict `ACTIVE` (mean KL 0.0529 (max 0.733), top-1 changed at 1.0% of points, mean d_logp(next) -0.0582).
| kind | n | mean d_logp(logged) | p(logged) base -> arm | KL(base to arm) | max KL | top-1 changed |
|---|---:|---:|---:|---:|---:|---:|
| all | 99 | -0.05818 | 0.9789 -> 0.9362 | 0.05288 | 0.7333 | 0.0101 |
| turn | 20 | -0.20621 | 0.9728 -> 0.8176 | 0.16402 | 0.7333 | 0.0000 |
| step | 15 | -0.06923 | 0.9586 -> 0.8996 | 0.07768 | 0.3639 | 0.0000 |
| think | 32 | +0.00199 | 0.9852 -> 0.9871 | 0.01250 | 0.1429 | 0.0000 |
| tool | 32 | -0.02066 | 0.9860 -> 0.9764 | 0.01219 | 0.3034 | 0.0312 |
Tool-token probability mass (`tool` points): `call:run` 0.444->0.458, `call:read` 0.408->0.405, `call:edit` 0.094->0.094, `call:write` 0.023->0.011, `call:get` 0.000->0.000, `call:submit` 0.031->0.031.
### edit: exact per-call `closeprobe` thought-end pre-test (`closeprobe.py`, NOT VERIFIED YET in `TOOLS.md`)
Exact generation contexts (`prompt_token_ids + completion_token_ids`, never re-rendered history prompts) on held-out check tasks:
| kind | depth band | n | base log p(close) | arm log p(close) | delta log p(close) | top=close base -> arm | d_logp(logged) |
|---|---|---:|---:|---:|---:|---:|---:|
| close | all | 16 | -0.259 | -0.084 | +0.175 | 0.938 -> 0.938 | +0.1747 |
| close | depth<200 | 8 | -0.327 | -0.167 | +0.160 | 0.875 -> 0.875 | +0.1599 |
| close | 200..799 | 5 | -0.076 | -0.002 | +0.074 | 1.000 -> 1.000 | +0.0737 |
| close | 800+ | 3 | -0.383 | -0.001 | +0.383 | 1.000 -> 1.000 | +0.3826 |
| cont | all | 92 | -19.372 | -25.348 | -5.977 | 0.000 -> 0.011 | -0.2289 |
| cont | depth<200 | 58 | -19.077 | -24.408 | -5.331 | 0.000 -> 0.017 | -0.2830 |
| cont | 200..799 | 31 | -20.159 | -26.852 | -6.692 | 0.000 -> 0.000 | -0.1292 |
| cont | 800+ | 3 | -16.928 | -27.990 | -11.062 | 0.000 -> 0.000 | -0.2129 |
### edit: held-out exact tool-selection & collateral-specificity pre-test (offline `g31.G31`, NOT VERIFIED YET against rollouts)
| held-out stratum | n | KL(base to arm) | top-1 flip | d_logp(edit) | d_logp(read) | d_logp(submit) | d_margin(edit-read) | p(edit)>p(read) base -> arm |
|---|---:|---:|---:|---:|---:|---:|---:|---:|
| pos_late_pre | 5 | 0.00266 | 0.0000 | -1.1324 | -0.2996 | +0.1504 | -0.8328 | 0.000 -> 0.000 |
| neg_early_pre | 6 | 0.05094 | 0.1667 | -1.2548 | -1.2089 | -0.8113 | -0.0459 | 0.333 -> 0.333 |
| neg_post_edit | 5 | 0.00006 | 0.0000 | -0.9061 | -0.1373 | -0.1717 | -0.7687 | 0.400 -> 0.400 |
| neg_arg (tool args) | 31 | 0.00521 | 0.0000 | - | - | - | - | - |
### ctrl component 1 (writer rank-4 orthogonal control): causal decision-point pre-test (offline `g31.G31`, verdict thresholds NOT VERIFIED YET in `TOOLS.md`)
Held-out check tasks (`probe_b001.jsonl` + exact per-call contexts, unseen during fitting): `99` decision points; verdict `ACTIVE` (mean KL 0.0008 (max 0.020), top-1 changed at 0.0% of points, mean d_logp(next) +0.0000).
| kind | n | mean d_logp(logged) | p(logged) base -> arm | KL(base to arm) | max KL | top-1 changed |
|---|---:|---:|---:|---:|---:|---:|
| all | 99 | +0.00002 | 0.9789 -> 0.9790 | 0.00076 | 0.0202 | 0.0000 |
| turn | 20 | -0.00181 | 0.9728 -> 0.9711 | 0.00094 | 0.0035 | 0.0000 |
| step | 15 | +0.00708 | 0.9586 -> 0.9648 | 0.00242 | 0.0202 | 0.0000 |
| think | 32 | -0.00002 | 0.9852 -> 0.9852 | 0.00044 | 0.0060 | 0.0000 |
| tool | 32 | -0.00211 | 0.9860 -> 0.9844 | 0.00018 | 0.0032 | 0.0000 |
Tool-token probability mass (`tool` points): `call:run` 0.444->0.444, `call:read` 0.408->0.409, `call:edit` 0.094->0.094, `call:write` 0.023->0.022, `call:get` 0.000->0.000, `call:submit` 0.031->0.031.
### ctrl component 1 (writer rank-4 orthogonal control): exact per-call `closeprobe` thought-end pre-test (`closeprobe.py`, NOT VERIFIED YET in `TOOLS.md`)
Exact generation contexts (`prompt_token_ids + completion_token_ids`, never re-rendered history prompts) on held-out check tasks:
| kind | depth band | n | base log p(close) | arm log p(close) | delta log p(close) | top=close base -> arm | d_logp(logged) |
|---|---|---:|---:|---:|---:|---:|---:|
| close | all | 16 | -0.259 | -0.262 | -0.003 | 0.938 -> 0.938 | -0.0032 |
| close | depth<200 | 8 | -0.327 | -0.322 | +0.005 | 0.875 -> 0.875 | +0.0048 |
| close | 200..799 | 5 | -0.076 | -0.095 | -0.019 | 1.000 -> 1.000 | -0.0189 |
| close | 800+ | 3 | -0.383 | -0.382 | +0.001 | 1.000 -> 1.000 | +0.0015 |
| cont | all | 92 | -19.372 | -19.366 | +0.006 | 0.000 -> 0.000 | -0.0004 |
| cont | depth<200 | 58 | -19.077 | -19.016 | +0.061 | 0.000 -> 0.000 | -0.0011 |
| cont | 200..799 | 31 | -20.159 | -20.258 | -0.098 | 0.000 -> 0.000 | +0.0007 |
| cont | 800+ | 3 | -16.928 | -16.906 | +0.022 | 0.000 -> 0.000 | +0.0011 |
### ctrl component 2 (13-layer identical-gate orthogonal write control): causal decision-point pre-test (offline `g31.G31`, verdict thresholds NOT VERIFIED YET in `TOOLS.md`)
Held-out check tasks (`probe_b001.jsonl` + exact per-call contexts, unseen during fitting): `99` decision points; verdict `ACTIVE` (mean KL 0.0002 (max 0.003), top-1 changed at 0.0% of points, mean d_logp(next) -0.0007).
| kind | n | mean d_logp(logged) | p(logged) base -> arm | KL(base to arm) | max KL | top-1 changed |
|---|---:|---:|---:|---:|---:|---:|
| all | 99 | -0.00068 | 0.9789 -> 0.9783 | 0.00021 | 0.0027 | 0.0000 |
| turn | 20 | -0.00039 | 0.9728 -> 0.9724 | 0.00025 | 0.0011 | 0.0000 |
| step | 15 | -0.00517 | 0.9586 -> 0.9542 | 0.00050 | 0.0027 | 0.0000 |
| think | 32 | -0.00082 | 0.9852 -> 0.9845 | 0.00020 | 0.0022 | 0.0000 |
| tool | 32 | +0.00140 | 0.9860 -> 0.9871 | 0.00007 | 0.0015 | 0.0000 |
Tool-token probability mass (`tool` points): `call:run` 0.444->0.444, `call:read` 0.408->0.407, `call:edit` 0.094->0.094, `call:write` 0.023->0.024, `call:get` 0.000->0.000, `call:submit` 0.031->0.031.
### ctrl component 2 (13-layer identical-gate orthogonal write control): held-out exact tool-selection & collateral-specificity pre-test (offline `g31.G31`, NOT VERIFIED YET against rollouts)
| held-out stratum | n | KL(base to arm) | top-1 flip | d_logp(edit) | d_logp(read) | d_logp(submit) | d_margin(edit-read) | p(edit)>p(read) base -> arm |
|---|---:|---:|---:|---:|---:|---:|---:|---:|
| pos_late_pre | 5 | 0.00001 | 0.0000 | -0.0079 | -0.0173 | +0.0327 | +0.0094 | 0.000 -> 0.000 |
| neg_early_pre | 6 | 0.00025 | 0.0000 | -0.0200 | -0.1095 | -0.0064 | +0.0895 | 0.333 -> 0.333 |
| neg_post_edit | 5 | 0.00000 | 0.0000 | -0.0500 | -0.0250 | -0.0430 | -0.0250 | 0.400 -> 0.400 |
| neg_arg (tool args) | 31 | 0.00005 | 0.0000 | - | - | - | - | - |
Runner facts (2026-11-12 23:54:16 EST): source `wsp31/authors/gemini/queue/dual-budget-rescue-r5/`; served copy `wsp31/queue/frozen/gemini__dual-budget-rescue-r5/`; sha256 over files, edit `733d0d722c1845340a2acdf1590935c8ec856fa4f729a7b39804f74fd3046246`, control `30eabd4c69235ef333d0b4eac3520c096cc01eb9e7cd746e6bb9b64f8e4b9836`; both passed the checker.Prediction (written before the run)
predicted_gain_120: -4 to 14 Behaviour that should move (stage 1, 120 screening tasks vs same-batch champion): - 7.5-minute wall-clock timeouts: down by 20% to 40% relative to reference (mean thought tokens down 18% to 35%); - empty-patch episodes (`patch_chars == 0`, both from 450s timeouts and from 30-call `read_file` exhaustion): down by 30% to 55% relative to reference (stronger reduction than either single-mechanism entry alone); - `read_file` calls per episode down by 1.0 to 2.5, with completed `run_command` verification calls after the first edit up by +0.5 to +2.0. Matched control (`ctrl/`): timeout rate, empty-patch rate, and `read_file` count all within +/-6% of reference; solved delta within `-5 to +4`. What would prove the hypothesis wrong: (1) empty-patch rate falls by >=30% yet solved tasks do not exceed `ctrl/` by at least +4 tasks (showing rescued timeout/over-read episodes are tasks the 31B model cannot solve even with time and edit budget); or (2) the combined edit underperforms both single-mechanism entries (`exact-close-r4-subspace` and `late-preedit-commit-gate`) due to adverse interaction between shorter pre-edit thoughts and earlier `edit_file` commitment.
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/gemini/queue/dual-budget-rescue-r5/`); it then counts as one of that round's entries and is served from the frozen copy, unchanged.