Strategy and discriminatortwo-copy source correction with independent semantic regression
Replace both undercounts with twice the existing LayerNorm helper, test both shipped references compositionally, and independently compare them with fixed numeric oracles.
Hypothesis: At current upstream main, both unmodified references undercount by 2 * embedding_dim, while changing both to 2 * parameter_count_layer_norm(hyperparams) makes the block equal attention + MLP + two complete LayerNorms.
Test: At embedding dimensions 1, 128, and 256, require each LayerNorm to equal 2 * embedding_dim and each block to equal attention + MLP + 2 * LayerNorm in both source copies; independently check totals 461440 and 198272.
RationaleThe unpatched negative control fails both references by exactly 2 * embedding_dim. The final patch applies byte-for-byte to current main and passes both a repository regression and a separate fixed-oracle checker, satisfying the stated verification contract.
Claims requiring scrutiny- At upstream e37bc994, both unmodified transformer-block references produce 460928 instead of 461440 for embedding_dim=256 and mlp_dim=384.
- The run-2 patch changes both references to count two complete LayerNorm components.
- The run-2 patch passes the focused two-copy regression at embedding dimensions 1, 128, and 256.
- The separate checker passes fixed totals 461440 and 198272.
Evidence and scope- python3 scripts/audit_upstream_status.py returned 0 with issue state open, main e37bc994, and two zero-result PR searches.
- python3 scripts/replay_current_head.py --expected-commit e37bc99485767ebe68d8ff4db438721daa7ab966 --patch patches/issue-37-layernorm-count-run2.patch --checker checkers/layernorm_count_discriminator.py returned 0.
- The replayed diff SHA-256 equaled the saved patch SHA-256 e1d238c6fc02230734bd8161209b8b5afeb0954d93e66acf6fe74dab8ef94891.
- The repository unittest and independent checker both returned 0.
Computational experiments- .proof-experiments/20260722-183552-c97125: live issue, main-head, and matching-PR audit passed.
- .proof-experiments/20260722-183654-eb0ae2: failed safely because plain git diff omitted the new untracked test; no positive result was promoted.
- .proof-experiments/20260722-184123-54410d: final versioned patch replay passed the negative control, exact-diff check, static checks, focused test, and independent checker.
Independent checkercheckers/layernorm_count_discriminator.py independently extracts both references and checks fixed totals 461440 and 198272; experiment 20260722-184123-54410d reports PASS.
Contribution gatecandidate_eligible
No structured gate reasons were recorded in this legacy attempt; see the adjudication ledger.
- Original model outcome
- candidate
- Public classification
- candidate
Cross-domain transfers testedNone recorded.
Established facts- One modeled LayerNorm has gamma and beta vectors of length embedding_dim.
The upstream parameter_count_layer_norm helper returns embedding_dim + embedding_dim. · Course 4 Lab 4.5's stated LayerNorm model. · proved - Both unmodified transformer-block references are short by 2 * embedding_dim.
The checker observed a deficit of 512 when embedding_dim=256 in each source. · Upstream e37bc994 and the tested fixture. · computed - The versioned run-2 patch passes both semantic validators.
.proof-experiments/20260722-184123-54410d returned 0 with exact patch identity and both validators passing. · Patched e37bc994 and embedding dimensions 1, 128, and 256, with fixed-oracle checks at 128 and 256. · computed
Ruled out in this epoch- Repair only the packaged feedback reference.
The packaged-only change at e37bc994. · The notebook remains wrong. · .proof-experiments/20260722-182335-6094f5/stderr.txt · The notebook reference is removed or independently corrected upstream. - Repair only the notebook reference.
The notebook-only change at e37bc994. · The packaged feedback reference remains wrong. · .proof-experiments/20260722-182335-034d38/stderr.txt · The packaged reference is removed or independently corrected upstream. - Use plain git diff as a complete replay identity check.
Patches that add an untracked file. · Plain git diff omits untracked files. · .proof-experiments/20260722-183654-eb0ae2/stderr.txt · Mark new files intent-to-add or compare their contents separately. - Treat the existing learner-feedback test as independent validation.
The existing transformer-block learner test. · It derives expected values from the same reference implementation and can remain self-consistent with the defect. · artifacts/issue-37-verification-20260722.json · The upstream test adopts a direct or materially independent oracle.
Open leads- Human review and authorized upstream pull-request submission.
The complete patch and deterministic validators are ready; maintainer review is the remaining acceptance path. · Rerun the live-status audit and current-head replay immediately before submission. · high · open - Optional end-to-end Colab execution.
It could provide integration assurance but does not further discriminate the arithmetic correction. · Execute the patched notebook in its supported environment and retain the complete log. · low · open
Continuation checkpointObjective: Obtain human review and, if authorized, submit a freshly replayed upstream pull request.
First action: python3 scripts/audit_upstream_status.py
Stop condition: Stop or redirect if issue #37 closes, a matching PR appears, upstream already contains the correction, or the patch or validators fail at the new head.
Next moves- Have the human owner review patches/issue-37-layernorm-count-run2.patch.
- Immediately before any authorized submission, rerun scripts/audit_upstream_status.py.
- Replay the patch and both validators against the newly audited main commit.
- If approved and still novel, submit through the repository's normal pull-request process.
Citations
Tool disclosureGPT-5 Codex acted as Sol principal. The supplied GPT-5.6 Terra source-discriminator memo was advisory only and its status claims were independently rechecked. Python 3.12.3, unittest, ast, json, urllib, Git 2.43.0, SHA-256, curl, and the Proof Factory experiment harness were used. No CAS, solver, proof assistant, external publishing, credential change, system package installation, or host modification was used.; orchestration: gpt-5.6-sol principal with gpt-5.6-terra delegates.
- Duration
- 771.8s
- Review state
- needs isolated skeptic review
- Attempt ID
deepmind-ai-foundations-37-layernorm-count-20260722-184603-20e44d
Human review ledger- accept · Charlie Krug · 2026-07-22 18:50 UTC
Charlie reviewed the current-head patch, two-copy regression, independent checker, baseline controls, and novelty searches and approves this candidate for the next external contribution step.