Six context channels on Python code with unit-norm input to V_θ's bank (screen A): the dead wells fixed with V_θ at full speed, the sixth channel adds nothing (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 (screen A): XI6-CODE, which adds a sixth content-routed context channel to SO-CODE, trained with every context channel scaled to unit norm before V_θ's well bank reads it, V_θ at its full learning rate. Verdict: the second fix works too, and the sixth channel still adds nothing. The layer-1 wells stay alive and the model settles at 5.95, level with SO-CODE (6.00) and with screen B (5.98), the first fix (V_θ's learning rate × 0.25). XI6-CODE without a fix: 8.55. This card compares the two fixes and says what the sixth channel does. On five channels the same switch costs 5.8% (SO-CODE-VTUN settles at 6.34): here the sixth channel pays that cost back, and no more. Unit-norm input is a fix, not a default. 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% |
| screen A (this model), fix 2 | 6 | unit-norm input to V_θ's bank | alive | 5.95 | −0.7% |
| SO-CODE-VTLR, fix 1's control | 5 | V_θ's learning rate × 0.25 | alive | 6.09 | +1.6% |
| SO-CODE-VTUN, fix 2's control | 5 | unit-norm input to V_θ's bank | alive | 6.34 | +5.8% |
A first mitigation, a penalty that pulls each token's nearest well back within reach, failed: XI6-CODE-WR settled at 8.87 (also not on the Hub). Screens A and B keep that penalty so that the reach readout matches; at the end of this run no layer-1 token and 0.2% of layer-0 tokens are beyond its threshold. The matched GPT-2 on the same code tokens settles at 4.96.
- This model: settled 5.95 (mean of the evals at steps 18,000, 18,500 and 19,000: 5.96, 5.88, 6.03); best 5.85 at step 16,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 the models in the table start from step 0 at seed 0 on the same batches, so their evaluations are paired step by step.
- 83,690,702 parameters, exactly screen B's: the switch rescales an input and adds no parameters.
- Pre-registered (
Code_Dead_Wells_and_Screens.md, entryp-dw-screen-a-full, before the full-length run): VA1 (screen A settles within ±2% of SO-CODE), called 55%: HIT, −0.7%. VA2 (layer 1 alive at the best checkpoint: nearest-well ratio below 1, occupancy of the strongest well above 0.05), called 60%: HIT, 0.68 and 0.29, removal cost +136%. VA3 (Cell 6b-7 Gate 3 at N = 3 near SO-CODE's 0.639 nats, above 0.45), called 60%: HIT, 0.587. VA4 (paired gap to SO-CODE over steps 16,000–19,000 within ±0.02 nats), called 55%: HIT, −0.002. Registered before the full-length run, not confirmed by the author, and scored on the letter. - Run health: steps 1–3,000 as a screen (0.98 h), then resumed from its step-3,000 checkpoint (model and optimizer state, 89 of 89 tensors) for steps 3,001–19,250 in 5.3 h in one session; 0 watchdog triggers; largest rise between logged training losses 0.075; gradient norm maximum 1.20 in warmup (step 200) and 0.64 after the resume (median 0.39); SCAF leak monitor CLEAN at all 4 audits.
Two fixes for the same death
Each layer's well centres are placed by one map W (mu_proj), shared by both layers, from the context channels: μ = W (channels + depth code) + b. The centres' size is therefore bounded by the size of W times the size of its input. In XI6-CODE both grew, and the layer-1 centres moved out of reach of the states, which lie on a sphere of radius 19.6. Each fix cuts one of the two factors:
| screen B (fix 1) | screen A (fix 2, this model) | |
|---|---|---|
| the switch | V_θ's 9 tensors train at a quarter of the learning rate | every context channel enters V_θ's bank at norm 1 |
| the factor it cuts | the growth of W | the size of W's input |
W at the end (mu_proj, largest column norm; SO-CODE 102) | 36 | 137, the largest of any model |
| layer-1 centres, mean norm (SO-CODE 59.9) | 29.7 | 7.7 |
| settled perplexity (SO-CODE 6.00) | 5.98 | 5.95 |
| paired gap to SO-CODE, steps 16,000–19,000 | +0.002 nats | −0.002 nats |
| at step 3,000 (SO-CODE 12.96) | 11.27 (−13%) | 13.54 (+4.4%) |
| layer 1: occupancy of the strongest well / wells in use (n_eff) / largest well's share of the force | 0.17 / 1.12 / 83% | 0.29 / 2.30 / 72% |
| cost of removing layer 1's wells (SO-CODE +202%) | +242% | +136% |
| refinement penalty, Cell 6b-7 Gate 3 (SO-CODE 0.639 nats) | 0.290 nats | 0.587 nats |
| cost of resetting the velocity, Gate 1 (SO-CODE +4.0%) | +2.5% | +11.5% |
| cost of the switch on a healthy model (five channels) | +1.6% (SO-CODE-VTLR) | +5.8% (SO-CODE-VTUN) |
- Same outcome. Both fixes bring XI6 level with SO-CODE. From step 8,000 the two move together evaluation by evaluation (the SD of their paired difference is 0.003 nats), with screen A 0.4–0.8% lower. That difference is consistent but small, and comes from one seed each.
- Different routes there. Screen A leads SO-CODE before step 2,500 (−19% at step 500) and trails it over steps 3,000–5,500 (by 3–11%). Screen B is the reverse: behind early, ahead over steps 2,000–5,000. From step 6,000 both are level.
- Different banks. Screen B keeps W small and its centres inside the state sphere. Screen A lets W grow larger than in any model, yet its layer-1 centres are the smallest (mean norm 7.7), because each channel W reads has norm 1.
- Different use of layer 1. Screen B's layer 1 runs on one well, as SO-CODE's does. Screen A's spread over about five wide wells at step 3,000 (removing them cost +9.5%) and has narrowed to one main well at the end, less concentrated than in SO-CODE or screen B; removing its wells costs +136%, against screen B's +242%.
- Different dynamics. The slower V_θ halves the refinement penalty in both models that have it, with or without the sixth channel. Screen A, with V_θ at full speed, keeps a penalty close to SO-CODE's, so the halving comes from V_θ's speed, not from keeping the wells alive. Resetting the velocity costs screen A more (+11.5%, against 2.5–4.0%); it costs SO-CODE-VTUN, the same switch on five channels, +25%, so it goes with the switch. Why is open.
- Which fix to keep. Neither is a default. Screen B's switch costs a healthy model 1.5% (SO-CODE-VTLR), screen A's 5.8% (SO-CODE-VTUN). For a model whose wells die, the slower V_θ is the cheaper fix.
What the sixth context channel does
- Without a fix it kills layer 1's wells. XI6 lost them in 2 of 2 runs at full V_θ speed (XI6-CODE, XI6-CODE-WR), the five-channel models in 0 of 6. The cost was +43% (8.55 against 6.00). The sixth channel adds one more large term to the layer-1 centres; whether that alone tips the balance is not separated from the seed.
- With live wells it adds nothing. By either fix XI6 ends within 0.7% of SO-CODE (5.98 and 5.95 against 6.00). Against fix 1's matched control, SO-CODE-VTLR, screen B is −0.013 nats over steps 16,000–19,000, within the paired SD of 0.036. No gain is detected, and no loss. Under unit-norm input it pays the switch back: screen A is −6.1% against SO-CODE-VTUN (−0.058 nats over steps 16,000–19,000). Net, it adds nothing either way.
- It does retrieve. With live wells, layer 1's long channels find earlier occurrences 65 or more tokens back at 22 and 29 times an even spread here (channels 4 and 6; screen B's channels 5 and 6: 19 and 27; SO-CODE's longest channel: 26). On code, a second long-range channel duplicates a range SO-CODE's longest channel already covers.
- One lookup channel. Channel 5 of layer 1 has become a one-position lookup: a median 1.000 of its weight on a single earlier position, a median 114 tokens back. In XI6-CODE such lookups (channels 4 and 6) came with the dead wells, and handed the bank a full-size state, which fits its larger centres. Here the bank sees the lookup at norm 1, and the wells stay alive. A lookup is therefore not by itself a sign of dead wells.
- Its price is 9.3% more parameters (mostly V_θ's bank reading the sixth channel) and, without a fix, the risk to layer 1. On this evidence, five channels are enough on code at L = 2.
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 | screen A − SO-CODE | screen A − screen B | screen A − SO-CODE-VTLR |
|---|---|---|---|
| 2,000–4,000 (5 evals) | +0.010 (SD 0.070) | +0.143 (0.070) | +0.130 (0.081) |
| 8,000–13,000 (11 evals) | −0.005 (SD 0.041) | −0.008 (0.003) | −0.006 (0.038) |
| 16,000–19,000 (7 evals) | −0.002 (SD 0.035) | −0.004 (0.003) | −0.017 (0.036) |
Training loss over steps 16,000–19,250: 1.669 for this model, 1.687 for SO-CODE and screen B, 1.704 for SO-CODE-VTLR.
Through training
| step | phase | SO-CODE | screen B | screen A | SO-CODE-VTLR |
|---|---|---|---|---|---|
| 500 | warmup | 44.02 | 50.22 | 35.75 | 51.13 |
| 1,000 | stable | 25.13 | 28.30 | 22.03 | 29.19 |
| 1,500 | stable | 20.33 | 20.57 | 18.12 | 21.45 |
| 2,000 | stable | 17.67 | 15.87 | 16.21 | 16.27 |
| 2,500 | stable | 15.80 | 13.25 | 15.30 | 13.08 |
| 3,000 | stable | 12.96 | 11.27 | 13.54 | 11.32 |
| 4,000 | stable | 10.62 | 9.10 | 10.93 | 9.70 |
| 5,000 | stable | 9.27 | 9.00 | 9.89 | 8.81 |
| 8,000 | stable | 7.96 | 7.83 | 7.77 | 7.86 |
| 10,000 | stable | 7.45 | 7.04 | 6.96 | 7.43 |
| 13,000 | decay | 6.38 | 6.70 | 6.67 | 6.45 |
| 16,000 | decay, end | 6.12 | 5.86 | 5.85 | 6.21 |
| 18,000 | floor | 5.87 | 5.99 | 5.96 | 5.96 |
| 19,000 | floor, last eval | 6.10 | 6.04 | 6.03 | 6.20 |
The first 3,000 steps were the screen; the model resumed from its step-3,000 checkpoint with the optimizer state.
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, at the best checkpoint.
| model | nearest-well ratio, median | mean centre norm ‖μ‖ | mu_proj, largest column norm | occupancy, strongest well | removal cost |
|---|---|---|---|---|---|
| SO-CODE | 1.03 | 59.9 | 101.5 | 0.18 | +202% |
| XI6-CODE | 3.40 | 91.9 | 112.0 | 0.00 | — (nothing to remove) |
| screen B | 0.77 | 29.7 | 36.4 | 0.17 | +242% |
| screen A | 0.68 | 7.7 | 136.7 | 0.29 | +136% |
| SO-CODE-VTLR | 0.71 | 25.6 | 36.9 | 0.15 | +272% |
This model along the run:
| step | nearest-well ratio | ‖μ‖ | mu_proj | occupancy, strongest well | n_eff | largest well's share of the force | removal cost |
|---|---|---|---|---|---|---|---|
| 500 | 0.99 | 1.7 | 25.4 | 0.40 | 7.95 | 28% | +0.4% |
| 1,000 | 0.99 | 3.7 | 38.5 | 0.56 | 7.16 | 32% | |
| 3,000 | 0.97 | 5.3 | 70.8 | 0.49 | 4.98 | 41% | +9.5% |
| 16,000 | 0.68 | 7.7 | 136.7 | 0.29 | 2.30 | 72% | +136% |
- The nearest-well ratio alone is a weak test for this model. Wells near the origin give a ratio near 1 whatever their use (0.97–0.99 through step 3,000, when removing them cost at most +9.5%). The occupancy and the removal cost show that layer 1 is alive.
- Why the wells die in XI6-CODE (W and layer 1's large channel inputs grow together in steps 750–1,200, just after the learning-rate peak) is the subject of
Dead_Wells_in_the_Joint_V_theta_Bank.md, §4–§7; this model is §7.5.
Diagnostics
| reading (best checkpoint) | SO-CODE | screen B | screen A | SO-CODE-VTLR |
|---|---|---|---|---|
| Cell 7, full model | 5.51 | 5.52 | 5.46 | 5.57 |
| Cell 6b-7 Gate 1: perplexity cost of resetting the velocity | +4.0% | +2.5% | +11.5% | +3.1% |
| Gate 2: one extra layer at the trained step | +42% | +37% | +48% | +28% |
| Gate 3: three steps over the trained time, nats | 0.639 | 0.290 | 0.587 | 0.312 |
| Cell 6b-13: median ω·Δt (layer 0 / layer 1) | 7.55 (9.58 / 4.94) | 5.83 (6.37 / 4.34) | 4.72 (5.12 / 4.16) | 6.16 (7.16 / 3.58) |
- All four are maps, not flows: refinement grows away from the trained step.
- Layer 0's stiffness reading (5.12) is the lowest of the code models: the unit-norm input caps layer 0's channels too.
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
XI_OVERRIDE='6long' # a sixth content-routed context channel (XI6-CODE)
WELL_REACH_RHO=3 # the reachability penalty of XI6-CODE-WR, kept so the reach readout matches
VTHETA_INPUT_UNIT_NORM=True # every context channel scaled to unit norm before V_θ's bank reads it (screen A)
SNAPSHOT_STEPS=[1_000, 1_500, 2_000, 2_500, 3_000]
PROBE_MAX_STEPS=3_000 # the screen; set to None and rerun Cell 2 to resume to 19,250
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_xi6long_topk16_dt32da16_mh4_aniso_dcvt6x8_vtjoint_cgqk_norc_vplive_xilive_sr2_st16250_wr3l0p1_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_step16000_best.pt | weights at the best eval (step 16,000), optimizer state stripped |
results/ | the training log (the 3,000-step screen and its resume to 19,250), the diagnostic cells' outputs, the well probe at the checkpoints (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.5) |
Code_Dead_Wells_and_Screens.md | the run records: entries p-xi6-code, p-dead-wells, p-dead-wells-screens-result, p-dw-screen-a-full 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 0.4–0.8% between the two fixes is consistent between these two runs; it is not a measured seed effect.
- Unit-norm input costs a healthy model 5.8% (SO-CODE-VTUN); why is a conjecture (Dead Wells note §8).
- Whether XI6 loses its wells on every seed is open: it did in 2 of 2 runs, the five-channel models in 0 of 6.
- Trained in two parts (a 3,000-step screen, then a resume with the optimizer state), as screen B was. The first logged step after the resume continues the screen without a jump.
- 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.04. The paired gaps are flat.
- L = 2, and perplexities on code are not comparable with OpenWebText's or TinyStories'.
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.