SO-CODE with unit-norm input to V_θ's bank (SO-CODE-VTUN): the switch costs a healthy model 5.8%, and the sixth channel pays it back (Gen 3)
The question of this collection: why did a sixth context channel cost SO-CODE 43% on Python code? Its second layer's potential wells died: they drifted away from the states, where a well exerts no force and gets no gradient, so it cannot come back. The root cause and the analysis are in
Dead_Wells_in_the_Joint_V_theta_Bank.md; this card reports one model of it.This model (SO-CODE-VTUN): SO-CODE, five context channels, trained with every context channel scaled to unit norm before V_θ's well bank reads it: the switch of screen A, the second dead-well fix, on a model whose wells never died. Verdict: unit-norm input costs a healthy model 5.8%, so it is a fix, not a default. It settles at 6.34 against SO-CODE's 6.00. Screen A, the same switch with a sixth channel, settles at 5.95: under unit-norm input the sixth channel pays the cost back, and no more. The dead-wells collection holds the baseline, two fixes and their two controls.
Result
| model | context channels | the switch | layer-1 wells | settled perplexity | against SO-CODE |
|---|---|---|---|---|---|
| SO-CODE, the baseline | 5 | — | alive | 6.00 | — |
| XI6-CODE (not on the Hub) | 6 | — | dead | 8.55 | +42.6% |
| screen B, fix 1 | 6 | V_θ's learning rate × 0.25 | alive | 5.98 | −0.3% |
| SO-CODE-VTLR, fix 1's control | 5 | V_θ's learning rate × 0.25 | alive | 6.09 | +1.6% |
| screen A, fix 2 | 6 | unit-norm input to V_θ's bank | alive | 5.95 | −0.7% |
| SO-CODE-VTUN (this model), fix 2's control | 5 | unit-norm input to V_θ's bank | alive | 6.34 | +5.8% |
The matched GPT-2 on the same code tokens settles at 4.96.
- This model: settled 6.34 (mean of the evals at steps 18,000, 18,500 and 19,000: 6.23, 6.37, 6.43); best 6.23 at step 18,000. Validation perplexity at block 512, on the first 2M tokens of CodeParrot's validation files (a file-level split, so no file is in both).
- Trained on exactly 315,392,000 tokens (19,250 steps × 32 × 512): the ladder's WSD schedule over 16,250 steps, then 3,000 steps at its floor learning rate. All six models in the table start from step 0 at seed 0 on the same batches, so their evaluations are paired step by step.
- 76,572,109 parameters, exactly SO-CODE's: the switch rescales an input and adds no parameters.
- Pre-registered (
Code_Dead_Wells_and_Screens.md, entryp-so-code-vtun, before the run): VU1 (SO-CODE-VTUN settles within ±2% of SO-CODE), called 65%: MISS, +5.8%. VU2 (its paired gap to SO-CODE over steps 16,000–19,000 is below +0.015 nats, the slower V_θ's cost), called 55%: MISS, +0.056. VU3 (its layer-1 wells stay alive: occupancy of the strongest well above 0.05 and removal cost above +100%), called 85%: MISS on the removal cost, 0.25 and +83%. VU4 (Cell 6b-7 Gate 3 at N = 3 above 0.45 nats), called 75%: HIT, 0.473. Proposed before the run, not confirmed by the author, and scored on the letter. - Run health: 19,250 steps in 6.1 h in one session from step 0; 0 watchdog triggers; largest rise between logged training losses 0.075 (step 13,050, where SO-CODE's largest is 0.073); gradient norm median 0.39 after step 2,000, maximum 1.09 (step 200, warmup); SCAF leak monitor CLEAN at all 4 audits.
The sixth channel pays for the switch
Read by pairs, the table above gives the sixth channel's effect under each setting of V_θ's bank: the six-channel model against the five-channel model trained the same way.
| V_θ's bank | five channels | six channels | six against five |
|---|---|---|---|
| as trained (SO-CODE, XI6-CODE) | 6.00 | 8.55 | +42.6%: layer 1's wells die |
| V_θ's learning rate × 0.25 (SO-CODE-VTLR, screen B) | 6.09 | 5.98 | −1.8%, within the paired noise |
| unit-norm input (this model, screen A) | 6.34 | 5.95 | −6.1% |
- Neither fix is free on five channels. The slower V_θ costs SO-CODE 1.6%, unit-norm input 5.8%. Both are fixes for a model whose wells die, not defaults.
- The sixth channel wins back what each fix costs, and no more. With either fix the six-channel model is level with SO-CODE (5.98 and 5.95 against 6.00); no setting beats SO-CODE.
- Of the two fixes, the slower V_θ is the cheaper on a healthy model.
Two conjectures
Neither is tested; both are stated with their evidence and their tests in Dead_Wells_in_the_Joint_V_theta_Bank.md, §8.
- Why the sixth channel does not help: the readout, not the retrieval, limits the model on code. SO-CODE's longest layer-1 channel already finds earlier occurrences 65 or more tokens back at 26 times an even spread, and the first-order twin finds them as well yet trails by 9.2%. With live wells, screen B's two long channels both retrieve (19 and 27 times), and the perplexity does not move. The bank turns all channels into a few well centres, and layer 1 acts through one or two wells (67–89% of its force), so a second retrieved state lands in the same centre. Capacity added after retrieval (depth, more or per-layer wells) should help where capacity before it did not; L = 4 on code is the next test.
- Why unit-norm input costs five channels: it discards how sharply a channel found something. A channel is a weighted average of earlier states, so its norm is at most a state's, reached only when its weight sits on one state (or on states pointing the same way). Its size therefore measures how concentrated its weight is, and dividing by it leaves the bank only the direction. Without the switch the channels' sizes vary systematically (SO-CODE's layer 0: 1.54 for the shortest channel to 0.33 for the longest). With it, both unit-norm models turned one far-back channel into a lookup of a single position, and a second long channel (screen A) removes the cost, perhaps because two channels' agreement stands in for the lost size. A test: normalise the channels but also give the bank each channel's log-norm.
Paired by step
The mean difference in log perplexity (nats) between two models over a span of evaluations, with the standard deviation of the per-evaluation differences.
| steps | SO-CODE-VTUN − SO-CODE | screen A − SO-CODE-VTUN | SO-CODE-VTUN − SO-CODE-VTLR |
|---|---|---|---|
| 2,000–4,000 (5 evals) | +0.058 (SD 0.120) | −0.048 (0.067) | +0.179 (0.118) |
| 8,000–13,000 (11 evals) | +0.103 (SD 0.048) | −0.109 (0.073) | +0.103 (0.053) |
| 16,000–19,000 (7 evals) | +0.056 (SD 0.002) | −0.058 (0.034) | +0.041 (0.003) |
- Ahead early, then a stall, then a fixed deficit. This model leads SO-CODE before step 2,500 (−20% at step 500), within 1.8% of screen A over those steps. From step 3,000 it falls behind and stalls (12.8 at step 3,500, 12.1 at 5,000, while SO-CODE goes from 11.0 to 9.3), up to 30% behind at steps 5,000–6,000. The gap closes through the decay phase, and from step 13,500 every evaluation is 5.5–6.0% above SO-CODE's.
- The late cost is consistent: +0.056 nats with an SD of 0.002 per evaluation. The two runs differ only in the switch, so their evaluations move together. One seed each.
- Training loss over steps 16,000–19,250: 1.726 for this model, 1.687 for SO-CODE, 1.669 for screen A, 1.704 for SO-CODE-VTLR. The model fits the training data worse; it does not overfit.
Through training
| step | phase | SO-CODE | SO-CODE-VTLR | screen B | screen A | SO-CODE-VTUN |
|---|---|---|---|---|---|---|
| 500 | warmup | 44.02 | 51.13 | 50.22 | 35.75 | 35.23 |
| 1,000 | stable | 25.13 | 29.19 | 28.30 | 22.03 | 21.71 |
| 1,500 | stable | 20.33 | 21.45 | 20.57 | 18.12 | 17.80 |
| 2,000 | stable | 17.67 | 16.27 | 15.87 | 16.21 | 16.03 |
| 2,500 | stable | 15.80 | 13.08 | 13.25 | 15.30 | 15.36 |
| 3,000 | stable | 12.96 | 11.32 | 11.27 | 13.54 | 13.94 |
| 4,000 | stable | 10.62 | 9.70 | 9.10 | 10.93 | 12.78 |
| 5,000 | stable | 9.27 | 8.81 | 9.00 | 9.89 | 12.05 |
| 8,000 | stable | 7.96 | 7.86 | 7.83 | 7.77 | 9.66 |
| 10,000 | stable | 7.45 | 7.43 | 7.04 | 6.96 | 8.30 |
| 13,000 | decay | 6.38 | 6.45 | 6.70 | 6.67 | 6.79 |
| 16,000 | decay, end | 6.12 | 6.21 | 5.86 | 5.85 | 6.47 |
| 18,000 | floor | 5.87 | 5.96 | 5.99 | 5.96 | 6.23 |
| 19,000 | floor, last eval | 6.10 | 6.20 | 6.04 | 6.03 | 6.43 |
The layer-1 wells
In layer 1 the states lie on a sphere of radius ‖h‖ = √384 = 19.6. The nearest-well ratio is the distance from a token's state to the nearest well centre, divided by ‖h‖; the occupancy of a well is exp(−½ (h − μ)ᵀ P (h − μ)), the factor its force and its gradient both carry; n_eff is the effective number of wells in the layer's weights (the exponential of the entropy of the softmax weights, which depend on the context only, not on the state); the removal cost is the perplexity change when every layer-1 well is switched off on the trained model. Readings by debug/vtheta_well_probe.py on 16 validation windows.
This model along the run (screen A, the same switch with six channels, after the slash where it was probed):
| step | nearest-well ratio | ‖μ‖ | mu_proj | occupancy, strongest well | n_eff | largest well's share of the force | removal cost |
|---|---|---|---|---|---|---|---|
| 500 | 0.99 / 0.99 | 1.7 / 1.7 | 26.4 / 25.4 | 0.39 / 0.40 | 7.97 / 7.95 | 27% / 28% | +0.2% / +0.4% |
| 1,000 | 0.99 / 0.99 | 3.4 / 3.7 | 38.9 / 38.5 | 0.52 / 0.56 | 7.33 / 7.16 | 33% / 32% | |
| 1,500 | 0.99 | 4.3 | 49.1 | 0.53 | 7.13 | 32% | |
| 2,000 | 0.99 | 4.7 | 57.3 | 0.55 | 7.24 | 33% | |
| 2,500 | 0.99 | 5.1 | 64.3 | 0.52 | 7.30 | 31% | |
| 3,000 | 0.99 / 0.97 | 5.4 / 5.3 | 70.6 / 70.8 | 0.53 / 0.49 | 7.19 / 4.98 | 33% / 41% | +4.6% / +9.5% |
| end (18,000 / 16,000) | 0.79 / 0.68 | 7.6 / 7.7 | 135.1 / 136.7 | 0.25 / 0.29 | 2.33 / 2.30 | 67% / 72% | +83% / +136% |
SO-CODE at the end: ratio 1.03, ‖μ‖ 59.9, mu_proj 101.5, occupancy 0.18, removal cost +202%.
- Layer 1 is alive throughout, and its bank is screen A's. Through step 2,500 the two unit-norm models agree on every column. At step 3,000 they part: screen A's layer 1 begins to concentrate on fewer wells (n_eff 4.98), this model's does not (7.19), and screen A pulls ahead from there. The coincidence is in time only.
- At the end layer 1 carries less of this model: removing its wells costs +83%, against +136% for screen A and +202% for SO-CODE.
- Layer 0's wells sit further out than in any other live model probed (median nearest-well ratio 2.06; 0.90–1.80 in the others, SO-CODE 1.35, screen A 1.63), still in use because they are wide (occupancy 0.61, all eight in use).
- One lookup channel. Layer 1's channel 4 puts a median 0.996 of its weight on one earlier position, a median 71 tokens back, as screen A's channel 5 does. The models with live wells and without the switch have none, so the lookup comes with the switch, not with the sixth channel. The longest channel finds earlier occurrences 65 or more tokens back at 31 times an even spread (SO-CODE 26).
Diagnostics
| reading (best checkpoint) | SO-CODE | SO-CODE-VTLR | screen B | screen A | SO-CODE-VTUN |
|---|---|---|---|---|---|
| Cell 7, full model | 5.51 | 5.57 | 5.52 | 5.46 | 5.81 |
| Cell 6b-7 Gate 1: perplexity cost of resetting the velocity | +4.0% | +3.1% | +2.5% | +11.5% | +25.3% |
| Gate 2: one extra layer at the trained step | +42% | +28% | +37% | +48% | +21% |
| Gate 3: three steps over the trained time, nats | 0.639 | 0.312 | 0.290 | 0.587 | 0.473 |
| Cell 6b-13: median ω·Δt (layer 0 / layer 1) | 7.55 (9.58 / 4.94) | 6.16 (7.16 / 3.58) | 5.83 (6.37 / 4.34) | 4.72 (5.12 / 4.16) | 3.17 (2.94 / 3.91) |
- All five are maps, not flows: refinement grows away from the trained step. At four steps over the trained time this model's penalty is 0.803 nats, the lowest of the five (SO-CODE 1.418).
- Resetting the velocity costs a quarter of the perplexity, the most of any code model without the Fock register path (FOCK-CODE, with it, +35%). Both unit-norm models have large costs; these readings do not show why.
- The stiffness reading (3.17) is the lowest of the code models, mostly from layer 0 (2.94). It does not track the loss.
Reproduction
colab_fock_cfc_baoab_lowrank_depth_ladder_openwebtext_d384.ipynb, Cell 0 changed from the defaults:
REVERSE_CHANNEL=False, VPHI_GRAD_PATH='live', XI_GRAD_PATH='live',
LOWRANK_DAMPED_FLOW=True, # SR2
VPHI_ANALYTIC_FORCE=True, LAYER_CHECKPOINT=False, # speed switches, same arithmetic
CORPUS='code', LADDER_STEPS=16_250, EXTRA_FLOOR_STEPS=3_000 # Python code, then 3,000 steps at the floor
VTHETA_INPUT_UNIT_NORM=True # every context channel scaled to unit norm before V_θ's bank reads it (screen A's switch)
SNAPSHOT_STEPS=[1_000, 1_500, 2_000, 2_500, 3_000] # weights-only snapshots for the well probe
Run Cells 0, 1, 1b, 1c, 1d, 2, 3, 4, 5, 5b and 6, then 8, 7, 6b-7 and 6b-13. The first code run builds the token cache (about 25 minutes). The well probe is debug/vtheta_well_probe.py, the channels' reach debug/xi_reach.py (CPU, on the downloaded run folders).
Training artefacts were written to semsimula_fock_cfc_baoab_code_xi5long_topk16_dt32da16_mh4_aniso_dcvt5x8_vtjoint_cgqk_norc_vplive_xilive_sr2_st16250_vtun_L2probe_ob_untied_wsd_e5c_plgate_rep0.05_fockreg0.005_g0.1_baoab_cfc_lowrank_idt4_lr0p0012_noattn/.
Glossary
| term | meaning |
|---|---|
| settled PPL | validation perplexity at block 512, the mean of the last three evals (on this corpus, steps 18,000–19,000). Best is the lowest single eval |
| Gen 1 / Gen 2 / Gen 3 | the model generations. Gen 1: explicit integrators. Gen 2: the CfC/BAOAB ladder with the sources of Vφ and ξ (and of an exchange field) detached, which keeps every force causal, but no loss gradient ever reaches an earlier token through them. Gen 3: the same forward pass with those gradients live |
| live / detached gradients | whether the loss gradient flows into the earlier tokens that act as sources of a force. Detaching changes no forward value; it only cuts that backward path |
| Vθ | the learned scalar potential on a token's state h, given its context ξ: a bank of anisotropic Gaussian wells. Its negative gradient is the conservative force on the token |
| Vφ | a pair potential between a token and a few selected earlier tokens (sparse top-k) |
| ξ | the causal context channels: exponential moving averages of earlier states at several horizons, which condition Vθ |
| Fock mechanism, registers, reverse channel | a pool of register particles, created and destroyed from the token context. The reverse channel is the register-to-token force; it is not the gradient of any potential on the tokens, so it is the model's non-conservative part |
| exchange field | an attention-like token-to-token interaction added to the conservative core. Each token is pushed by earlier tokens through learned query, key and value projections, as in attention. The ladder tests it in two forms, attention and attention_potential |
attention (non-conservative exchange field) | the exchange term enters as a force directly. It is not the gradient of anything, so the step stops being a geodesic step |
attention_potential (attention as a potential) | the same interaction written as a scalar potential whose gradient is the force. The routing weights are computed from the hidden states and held fixed with respect to the state being moved, so the force stays an exact gradient and the model stays conservative |
no-exchange (LADDER_MECHANISM = 'none') | the arm with no exchange field at all: Vθ, Vφ and ξ, plus the Fock register mechanism unless the arm is conservative-only |
live exchange field (RELAX_GRAD_PATH = 'live') | attention_potential with the identical forward force written out over live tensors, so the loss gradient reaches the field's sources and routing. In Gen 2 these were detached, and the field sent no gradient into any hidden state |
| Gen 2 probe | a Gen 2 arm retrained with one gradient path changed, to test a hypothesis before the full Gen 3 ladder. The live-exchange-field probe (attention_potential with RELAX_GRAD_PATH = 'live', the full 32,500 steps) is the one that found the gradient starvation |
| gpt2-matched | the reference transformer: GPT-2 architecture, d = 384, L = 8, tied embeddings (33.7M parameters), trained on the same tokenizer, corpus, batches and token budget. Shared by Gen 2 and Gen 3 |
tag components (vplive, xilive, rglive, norc, L4probe, idt…) | pieces of the run's variant tag, so that every configuration gets its own Drive folder: live Vφ sources, live ξ, live exchange field, no reverse channel, the depth L, and the integrator step Δt |
| conservative-only | a model in which every force is a gradient: no reverse channel and no non-conservative exchange field |
| CfC/BAOAB low-rank propagator | the integrator. Each layer step is split into position (A), force kick (B) and friction (O) substeps, and the stiff harmonic modes of Vθ are integrated exactly in closed form |
| ω·Δt, θ | a stiff mode's frequency times the step size. Past 2, an explicit integrator would be unstable (the wall); the closed-form propagator is not. θ/sin θ is the factor by which a split step's dissipation depends on the mode's phase, largest near θ = π |
| geodesic step, R(geo), share | the step a damped particle would take under Vθ alone; R(geo) is the distance of the real step from it, relative to the step's length. A component's share is how much it moves that distance (6b-9 attribution) |
| Gates 1–3, FLOW / MAPS | see Terms in the geometry section |
| CG1–CG7, 6b-N | the CfC-geometry experiments, and the ladder-notebook cells that run them |
| SCAF, Tier A, Tier B | the in-flight causal-leak monitor. Its core test changes future tokens and requires the logits at earlier positions to stay bit-identical. Tier A asks the same of the hidden states, as 1 − cos between the clean and perturbed state at each earlier position and layer. Tier B asks whether the perturbation moves any earlier state into a different dominant Vθ well (the basin-crossing rate). All three read 0 for a causal model |
| leak tax, prefix-only | the loss difference between scoring a position with only its prefix and with the full sequence; about 0 for a causal model |
| clip-hit | the share of logged steps whose gradient norm exceeded the clipping threshold (1.0) |
| pre-registered | a prediction recorded, with its threshold, before the run |
Files
| path | what |
|---|---|
README.md | this card |
config.json | architecture, training, the switch, result and diagnostics |
checkpoints/fock_cfc_*noattn_step18000_best.pt | weights at the best eval (step 18,000), optimizer state stripped |
results/ | the training log, the diagnostic cells' outputs, the well probe at the step-500 checkpoint, the five snapshots and the best checkpoint (well_probe_*; _L1_none = layer 1's wells removed) and the channels' reach (xi_reach_*) |
code/ | the notebook and the model code the switches belong to (it also carries later, default-off switches) |
Companion notes
| note | what it covers |
|---|---|
Dead_Wells_in_the_Joint_V_theta_Bank.md | the dead wells: the symptom, the debugging, the root cause, the failed and the working mitigations, and these results (§7.2–§7.6) |
Code_Dead_Wells_and_Screens.md | the run records: entries p-xi6-code, p-dead-wells, p-dw-screen-a-full-result, p-so-code-vtun and its result |
Caveats
- One seed per model. The pairing removes the evaluation noise, not the training-seed spread, which has not been measured. The 5.8% is a consistent difference between these two runs, not a measured seed effect.
- Both conjectures are untested. The evidence for each is consistent with it; none of it isolates the mechanism.
- Not settled by the letter of the settling rule, like every code model: the evals still fall by about 0.02 nats over the last 3,000 steps, against a scatter of 0.014. The paired gap to SO-CODE is flat.
- L = 2, code only. Unit-norm input has not been tried on OpenWebText or TinyStories. Perplexities on code are not comparable with those corpora's.
Citation
@misc{Gueorguiev2026SemSim,
author = {Gueorguiev, Dimitar P.},
title = {Semantic Simulation: A Prescriptive Lagrangian Framework
for Semantic Inference --- Conservative Potentials,
Conservative and Non-Conservative Memory, and Competing Mechanisms},
year = {2026},
publisher = {Zenodo},
doi = {10.5281/zenodo.19712427},
url = {https://doi.org/10.5281/zenodo.19712427},
note = {Version v25 (Nov 9, 2026).
Companion code repository (DOI 10.5281/zenodo.24066016):
\url{https://github.com/dimitarpg13/semsimula-paper}}
}
Card generated from _ladder/ladder.json on 2026-11-17.