REVIEWED PUBLIC SOURCE / HISTORICAL SNAPSHOT
REP-004: H fitting findings
This is the exact UTF-8 source text at the recorded commit. The implementation repository is private. Older records may describe earlier access, hosting or release decisions; their original wording is preserved. Links and commands inside the record remain inert source text and do not require repository access to read this record.
- Original path
docs/HEAD_FITTING_FINDINGS.md- Commit
e6d9e0584066ce0fb4cfb82088c1e7490a886e7b- SHA-256
d8205658febaf5bf34e9de92525a3b7c415a140510e51a7b4ba09225fb6932ea- Size
- 9,232 bytes
Download the exact original bytes · Read the source
# REP-004: latent-only H fitting repairs all tested composition errors Training only H with latent error repaired **all 2,062 original length-16 errors, with zero regressions**, across five frozen Fourier models. Each H started from its native REP-002 tensor and received exactly 1,000 fresh-state Adam updates. Encoder buffers, learned decoder and the other seven operation heads stayed unchanged. Every latent-only seed answered every declared case correctly at lengths 1, 2, 4, 8 and 16. Restarting the original prediction-plus-latent objective under the same frozen conditions repaired 1,186 errors but introduced 93 new errors. Four seeds became perfect on the length-16 cases; seed 3 retained 969 errors. Both fitted arms have 100% median accuracy, so the median alone hides the consequential difference. This supports latent-only recovery under the declared setup. It does not establish the cause of the original joint-training failure, universal superiority of this objective, new-world generalization or learned language understanding. ## Comparison and all-seed outcomes The [frozen protocol](HEAD_FITTING_PROTOCOL.md) implements R26 and R27 in the [specification](SPEC.md). All twenty supervised RTX 5070 trials completed: five seeds times native, prediction-plus-latent, latent-only and recorded H-only refit. Ten fitted trials used 10,000 optimizer updates in total; the native/refit arms used none. No intermediate evaluation selected a checkpoint. Only the original 84 H training edges entered fitting. Both objectives preserve H's 84/580 contribution to the original full-edge loss. The latent term retains weight .1; only the prediction term is removed in the latent-only comparison. Adam hyperparameters, initialization, budgets and numerical policy match between fitted arms. These models, states and evaluation words were previously evaluated. Exact complete-state accuracy at length 16, with 3,136 cases per seed and arm: | Seed | Native | Prediction + latent | Latent only | Recorded H refit | |---|---:|---:|---:|---:| | 0 | 94.23% | 100% | 100% | 100% | | 1 | 95.85% | 100% | 100% | 100% | | 2 | 92.06% | 100% | 100% | 100% | | 3 | 54.46% | **69.10%** | 100% | 100% | | 4 | 97.64% | 100% | 100% | 100% | | Median | 94.23% | 100% | 100% | 100% | | Mean | 86.85% | 93.82% | 100% | 100% | Paired answer changes across the same 15,680 length-16 cases: | Arm versus native | Correct stays correct | Correct becomes wrong | Wrong becomes correct | Wrong stays wrong | |---|---:|---:|---:|---:| | Prediction + latent | 13,525 | **93** | 1,186 | 876 | | Latent only | 13,618 | **0** | 2,062 | 0 | | Recorded H refit | 13,618 | **0** | 2,062 | 0 |  The [summary](evidence/head-fitting-summary.json) retains all shorter lengths, trajectory-support strata, H-count groups, relations and training logs. The prediction-plus-latent seed 3 reaches 100% one-step accuracy, then 97.70%, 93.46%, 79.56% and 69.10% at lengths 2, 4, 8 and 16. Thus perfect one-step decoding still does not certify repeated operational adequacy. ## What the gradients show, and what they do not In seed 3 the two weighted training gradients initially have cosine -0.84816. After 1,000 prediction-plus-latent updates their cosine is -0.999995. Their norms are approximately .00291350 and .00291256, while the summed gradient norm is 9.31e-6. The two components nearly cancel at that retained endpoint. Both use the same training states and frozen model; only the prediction component differentiates through the decoder. These are not held-out evaluation gradients. | Seed 3 training measurement | Initial native H | Prediction + latent endpoint | Latent-only endpoint | |---|---:|---:|---:| | Prediction MSE | .0119437 | .00940923 | .000106964 | | Latent MSE | .212107 | .112862 | 1.04e-12 | The latent-only endpoint has lower values of **both** errors than the combined objective's endpoint in this seed. Therefore these observations do not establish an unavoidable tradeoff between the two objectives. They are consistent with an optimization difficulty in the decoder-mediated objective: opposed local gradients accompany an inferior endpoint. They do not prove a local minimum, show why the original joint training arrived there, or show that more updates could never help. No extra updates or outcome-selected retry were performed. Gradient logs are recorded training evidence; the independent audit replays inference, not Adam's trajectory. Near-zero latent-only gradients should not be interpreted from their cosine alone. Coefficient equality with the refit is also unnecessary because the constant Fourier coordinate and affine bias allow nonunique coefficient representations. ## Preserved consequences and numerical scope Native outputs reproduce the pinned parent. All encoder buffers, decoder tensors and non-H slices remain exact. All 180 H-free comparisons across the three changes, five seeds, six case families and two backends pass bit-for-bit within their own backend. This proves the measured intervention isolation; the same cases are reused, not independent samples. For seed 3, H followed by H returns the correct state in 87.76% of cases after combined-objective fitting and 100% after latent-only fitting. H-S-H-S reaches 41.84% and 100%, respectively. The latent-only H-squared normalized residual is about 2.03e-6; the recorded refit residual is about 7e-16. Exact decoded answers therefore do not imply exact latent trajectories. At length 16, median mean normalized distance to the correct latent code is .26360 for native, .05965 for prediction-plus-latent, .04616 for latent-only, and .04614 for H-only refit. The seven unchanged native heads still contribute residual displacement. Distances are divided by sqrt(10); decoder regression scores are not calibrated probabilities. No additional context dimension was needed in this already adequate supplied representation. ## Verification and resources - **765 tests plus 27 subtests passed**, no skips or failures; one existing Ripser fixture-shape warning. The [log](evidence/head-fitting-tests.log) and [JUnit report](evidence/head-fitting-tests.xml) are retained. JUnit reports 792 cases including subtests and 765 testcase elements. - [Mathematical controls](evidence/head-fitting-math.json) passed. Initial CPU/CUDA forward, loss and gradient comparisons passed for both objectives and all five seeds at rtol=1e-4/atol=1e-6; maximum tolerance ratio .454. - The [independent NumPy replay](evidence/head-fitting-replay.json) matched all **331,240 decoded answers** and all **8,631,840 compared scalars** within the frozen tolerances. Maximum absolute discrepancy was 7.75e-7 and maximum tolerance ratio .697. All 75 paired comparisons, 180 isolation checks and 320 aggregate relation comparisons passed. Torch imports were blocked during this replay. Relation arrays were not saved per example; their audit is aggregate. This is separate inference code on the same host. - The worker ran for 55.09 seconds; supervised execution and verification took 70.97 seconds overall. Peak allocated CUDA memory was 66.71 MiB, reserved memory 68 MiB, and process-tree host RSS approximately 1.43 GiB. Actual CUDA FP32 execution used deterministic algorithms with TF32 disabled. These are resource measurements, not a GPU speed comparison. - The receipt verifies 324 payload files. The completed returned-trial and saved-checkpoint counts both equal 10,000 updates. Failure handling separately records saved progress after a hard kill without inventing unsaved updates. Official run: `G:/RenigmaLLM_Artifacts/head-fitting-runs/rep-8d3baca72c53`. There was one official attempt and no outcome-guided probe or rerun. Runtime SHA-256: `69fe95edc0f488df05e974528ddd5eba17bcc69934923e2c4c19d694f576c573`. Receipt SHA-256: `cf50bd54f71a55690e3aac7e28ca33cc63f07b750964c221e2e306dab0f73125`. Execution source commit: `d56d2ec`. See the [source manifest](evidence/head-fitting-source.json) and [review ledger](evidence/head-fitting-review.json). The new runner explicitly records the exact published license-metadata change relative to REP-002; every inherited runtime code file remains unchanged. Historical archives and earlier failed replay reports remain intact. Complete run/checkpoint archives remain local; public summary evidence does not substitute for those inputs. ## Next discriminating test Freeze a new finite world, state split and operation-word inventory before running the same two fitting rules and reference controls. Change the world size and holdout pattern, retain inverse/periodic/context-dependent/idempotent relations, and report every seed and regression without transferring selected checkpoints from this study. This should test whether the recovery pattern survives a new registered setting. If that transfers, separately compare learning coordinates with supplying them before integrating bounded language. This experiment required explicit adequate coordinates and known operation supervision. Human meaning, unseen phrasing and user intent remain later acceptance boundaries, not conclusions of REP-004.