← Preserve valid HMM marginals for padded sequences in Distrax2026-07-22 21:02 UTCgpt-5.6-sol · high
Replace the padded HMM backward-scan zero carry with beta_prev, add a Chex padded-prefix regression, and validate through failing-before/passing-after reproduction plus an independent NumPy recurrence.
Candidate — review neededA review-ready patch changes padded HMM backward steps from a zero carry to beta_prev and adds a regression comparing padded and sliced alpha, beta, posterior, and log-likelihood for L=1, 3, and 5. The pristine baseline failed as predicted; the patched issue reproduction, focused suite, repository regression, and independent NumPy/JIT checker passed. Evidence was repackaged without workspace virtualenv symlinks and bound by a checksum manifest.
Strategy and discriminatorlocal invariant-preserving carry correction
Freeze the reverse-scan carry during padded suffix steps so the terminal all-ones beta reaches the final valid timestep unchanged.
Hypothesis: Preserving beta_prev when t > length makes forward_backward(obs, length=L) equal forward_backward(obs[:L]) on valid alpha, beta, posterior, and log-likelihood without regressing existing forward-backward behavior.
Test: Run the issue's two-state, five-observation witness before and after the one-line change, then compare patched results with sliced inference and a separately implemented NumPy recurrence at L=1, 3, and 5.
RationaleThe source line has a direct causal role: reverse scanning encounters padded steps before valid steps, so substituting zero destroys the carry. A failing-before/passing-after witness isolates that mechanism, while the separate recurrence and existing focused tests guard against accidental agreement or regression.
Claims requiring scrutiny- At upstream commit 6701435c2b0796ec2d6dddf11bae0df615a62017, the issue witness returns zero beta values for all six valid state-time entries.
- With the one-line carry patch, padded and sliced forward_backward results agree within declared tolerances for valid alpha, beta, posterior, and log-likelihood at L=1, 3, and 5 in two fixed HMM parameterizations.
- The complete focused forward-backward selection passed 45 tests and 180 subtests, with 15 multi-device pmap variants skipped on the one-device host.
- The patch is byte-identical to the pinned checkout diff, passes git diff --check, and is reverse-applicable.
- This is a local candidate for human review, not an accepted upstream fix.
Evidence and scope- Baseline experiment 20260722-203956-645239 returned 1 at the beta equality assertion with all six padded valid-prefix beta entries zero.
- Focused suite 20260722-204153-3f9ac4 returned 0: 45 passed, 15 skipped, 180 subtests passed.
- Patched issue replay 20260722-205707-35db0b returned 0.
- Independent replay 20260722-205707-d2f290 returned 0 with six machine-readable profile results.
- Regression-only replay 20260722-205741-bec817 returned 0: 9 passed and 3 unavailable pmap variants skipped.
- sha256sum -c artifacts/run2-evidence.sha256 validated every listed artifact.
Computational experiments- .proof-experiments/20260722-203956-645239: pristine baseline failed at beta with all six valid padded beta entries zero.
- .proof-experiments/20260722-204153-3f9ac4: complete focused selection passed 45 tests and 180 subtests; 15 pmap variants skipped.
- .proof-experiments/20260722-205707-35db0b: repaired-environment issue reproduction passed.
- .proof-experiments/20260722-205707-d2f290: six independent NumPy/JIT profiles passed.
- .proof-experiments/20260722-205741-bec817: added regression passed 9 available variants; 3 pmap variants skipped.
Independent checkerartifacts/check_hmm_padding_numpy.py separately implements normalized forward and backward recurrences in NumPy, then compares them with JIT-compiled padded and sliced Distrax inference for two HMMs and lengths 1, 3, and 5.
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 tested- Numerical oracle design -> reproduce the target library's explicit stabilization contract while retaining an independent recurrence -> eliminating cross-dtype underflow confounding produced six clean comparisons.
Established facts- Upstream main and the pinned checkout were both 6701435c2b0796ec2d6dddf11bae0df615a62017 during the 2026-07-22 closeout.
git ls-remote and local rev-parse recorded in artifacts/run2-validation.md. · google-deepmind/distrax refs/heads/main at the status-check time. · computed - The zero-carry implementation fails the issue's padded-prefix beta invariant.
.proof-experiments/20260722-203956-645239/stderr.txt. · The sourced two-state Gaussian HMM, five observations, valid length 3. · computed - The carry-preservation patch satisfies padded-versus-sliced equality in the added regression.
.proof-experiments/20260722-205741-bec817/stdout.txt. · Valid lengths 1, 3, and 5 across nine variants available on the single-device host. · computed - Patched results agree with a separate NumPy recurrence.
.proof-experiments/20260722-205707-d2f290/stdout.txt. · Two fixed HMM parameterizations at valid lengths 1, 3, and 5. · computed - The decisive evidence set is hash-consistent.
sha256sum -c artifacts/run2-evidence.sha256 returned OK for every entry. · The 15 immutable paths listed in artifacts/run2-evidence.sha256. · computed
Ruled out in this epoch- Replacing the reverse-scan carry with zeros during suffix padding preserves valid-prefix marginals.
Issue #337's two-state reproduction at valid length 3. · Every valid padded beta entry becomes zero and differs from sliced inference. · .proof-experiments/20260722-203956-645239/stderr.txt · A documented API contract explicitly rejecting padded-versus-sliced valid-prefix equivalence. - Likelihood equality alone is sufficient to validate the padding fix.
The issue reproduction. · The baseline likelihood already matches while beta and posterior are wrong. · Issue #337 and .proof-experiments/20260722-203956-645239/stderr.txt · None; future checks must include beta and posterior, with alpha retained as a regression control. - A workspace-local virtualenv can be included in the immutable evidence receipt.
The prior receipt deepmind-distrax-337-hmm-padding-20260722-205223-8244a2. · Four virtualenv symlinks invalidated the receipt despite matching decisive artifact hashes. · evidence/deepmind-distrax-337-hmm-padding-20260722-205223-8244a2/evidence-receipt.json · A receipt format that explicitly permits and safely resolves external toolchain symlinks.
Open leads- Upstream pull request and CI validation.
This is the acceptance path for the completed local candidate. · Verify artifacts/run2-evidence.sha256, apply the patch in an authorized fork, and run upstream CI. · high · open - Multi-device pmap validation.
Fifteen complete-selection and three regression-only pmap variants skipped because the host exposes one device. · Run the focused regression on a host exposing multiple JAX devices. · normal · open
Continuation checkpointObjective: Obtain independent human review and upstream validation of the completed candidate.
First action: Run `sha256sum -c artifacts/run2-evidence.sha256`, then review artifacts/run2-validation.md and patches/0001-preserve-hmm-backward-carry.patch.
Stop condition: The patch is accepted upstream, superseded by another accepted fix, or rejected with a reproducible counterexample.
Next moves- Have a human verify artifacts/run2-evidence.sha256 and review the patch and validation record.
- After explicit authorization, apply the patch to a Distrax fork and open a pull request linked to issue #337.
- Run full upstream CI and the skipped multi-device pmap variants.
- Compare against any pull request or maintainer response that appears after the 2026-07-22 status check.
Citations
Tool disclosureGPT-5.6 Sol acted as principal, auditing rather than voting with the advisory GPT-5.6 Terra source-discriminator delegate memo. Deterministic tools used were Git, curl and the GitHub API, Python 3.12.3, NumPy 2.5.1, JAX/JAXLIB 0.11.0, Distrax at 6701435c, Chex 0.1.92, TensorFlow Probability nightly 0.26.0.dev20260722, pytest 9.1.1, sha256sum, and the computational-researcher experiment recorder. No model output was treated as independent validation.; orchestration: gpt-5.6-sol principal with gpt-5.6-terra delegates.
- Duration
- 499.6s
- Review state
- needs isolated skeptic review
- Attempt ID
deepmind-distrax-337-hmm-padding-20260722-210253-6fe0d4
Human review ledger- accept · Charlie Krug · 2026-07-22 21:09 UTC
I reviewed the evidence packet and approve this candidate for the next external contribution step.