Skip to content

Gate-2 chronic-cell forensics: pathway, parity, and draw-noise decomposition - #94

Merged
MaxGhenis merged 1 commit into
masterfrom
gate2-forensics
Jul 8, 2026
Merged

Gate-2 chronic-cell forensics: pathway, parity, and draw-noise decomposition#94
MaxGhenis merged 1 commit into
masterfrom
gate2-forensics

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Gate-2 chronic-cell forensics (reported, not gated)

The registered diagnostic of issue #42, comment 4913512779 — evidence, not another spec draw. It reuses candidate 8's fit/simulate machinery (scripts/run_gate2_candidate8.py, #93; chain-imports c1–c7) on the TRAIN side: for each gate seed it fits on side B and simulates the same side B, scoring against side B's own empirical rate. The outer holdout (side A) is never simulated — the only side-A numbers used are the already-published per-seed scores read from the committed runs/gate2_hazard_v8.json. gates.yaml and every committed gate artifact are untouched. reported_not_gated: true.

Findings

1 — Marriage-count pathway (mean_lifetime_marriages|male): the deficit is a residual the hazard model cannot represent, not a remarriage-level miss. Train-side, the simulation exceeds the reference in-exposure marriage count (male sim 1.365 vs ref 1.315; in-exposure deficit −0.050). The whole +0.065/person deficit is carried by the reference residual = 0.116/person — marriages counted in n_marriages with no datable/scoreable in-exposure event — which reconciles exactly to undatable_na_start 0.062 + n_marriages_minus_datable_episodes 0.040 + remarriage_prior_dissolution_year_undatable 0.013 (+ ~0 separation-origin). The largest datable per-cell deficit is a specific after_divorced | 2nd | age 25–34 cell (+0.014/person) that the origin-split remarriage cells pool away. This sharpens the c8 grading's "compositional, not remarriage-level": lifting remarriage hazards cannot close it — the model needs to represent the residual pathway.

2 — completed_fertility.c1970s: a broad low-parity progression miss, not a "share reaching 2+" miss, and not censoring. The simulation under-produces completed parity by 0.122 child/woman (ref 2.121 vs sim 1.999). Decomposing mean = Σ_k P(parity ≥ k), the per-margin deficits decline monotonically — 0→1 +0.036, 1→2 +0.035, 2→3+ +0.020, 3+→4+ +0.014 — so the two low-parity steps carry 58% of the gap; the model runs low at every birth, most at the first two. Not censoring: only 0.24% of reference cohort births fall outside the sim's [15,49] window (convention effectively shared). Not timing: mean mother age ref 27.90 vs sim 27.76.

3 — RNG stability (20 draws/seed, sim-RNG seeds 5200+k; the c10-diagnostics analogue). Every failing cell carries a small, reproducible train-side under-production tilt (same sign on all 5 seeds), so none is pure noise around a matched level — they split by how close the tilt sits to the tolerance:

cell train tilt (signed) tol P(fresh draw clips) verdict
mean_lifetime_marriages|male −0.046 0.047 0.49 BOUNDARY
share_widowed.75+|female −0.157 0.185 0.34 BOUNDARY
share_divorced.45-54|female −0.103 0.212 0.03 NOISE-DOMINATED
widowhood.75+|female −0.102 0.373 0.00 NOISE-DOMINATED
mean_lifetime_marriages|female −0.036 0.051 0.10 NOISE-DOMINATED
completed_fertility.c1970s −0.060 0.171 0.00 NOISE-DOMINATED

The outer FAIL 0/5 is largely draw/split luck around a model that runs slightly low across the board. The registration's knife-edge share_divorced.45-54|female (outer 0.212 clip decomposes to 49% level / 51% split+draw) and the seed-specific widowhood.75+ incidence (26% level / 74% noise) are noise-dominated — real but sub-tolerance tilts. Only mean_lifetime_marriages|male (on its boundary, clipP 0.49) and share_widowed.75+|female (85% of tol) sit close enough to be honest level targets.

Candidate-9 implications

Move the two boundary cells — the male marriage-count residual pathway (Q1) and the 75+ widowed stock — and the c1970s low-parity progression (Q2). Do not chase the noise-dominated knife-edges (share_divorced.45-54|female, widowhood.75+ incidence): their clips are split/draw excursions, not level misses. Register c9 only after citing this evidence, under the one-shot rule.

Delivered

  • scripts/gate2_forensics.py — the runner (reuses c8 fit/simulate train-side; ~155 s per-seed compute over 5 seeds × 20 draws, plus load).
  • runs/gate2_forensics_v1.json — the artifact (reported_not_gated, registration pointer, per-question blocks with every headline recomputable from stored per-seed values, per-seed + total compute time).
  • tests/test_gate2_forensics.py — consistency tier (headline / residual-reconciliation / outer-score / tolerance / verdict recompute) + two skipif-PSID live pins (seed-0 train reference and first draw reproduced bit-for-bit).

Additive only; nothing existing modified.

🤖 Generated with Claude Code

…osition

Registered diagnostic (reported, not gated) of issue #42 comment
4913512779. Reuses candidate 8's fit/simulate machinery
(scripts/run_gate2_candidate8.py, #93) on the TRAIN side only; the outer
holdout is never simulated (only its already-published c8 scores are read).

Q1: the mean_lifetime_marriages|male deficit (+0.065/person) is carried by
the reference residual (0.116/person of marriages with no datable/scoreable
in-exposure event), not the modelled remarriage hazards (the simulation
exceeds the reference in-exposure count) -- the hazard tables cannot generate
that pathway.

Q2: the completed_fertility.c1970s gap (-0.122 child/woman) is a broad
low-parity progression miss (0->1 and 1->2 carry 58%), declining
monotonically with parity; not the [15,49] censoring (0.24% outside, shared)
and not timing.

Q3: 20 sim-RNG draws/seed (5200+k) train-side. Every failing cell has a small
reproducible under-production tilt; graded by clip probability,
mean_lifetime_marriages|male (clipP 0.49) and share_widowed.75+|female (0.34)
are BOUNDARY (the honest c9 targets), the registration's knife-edge
share_divorced.45-54|female (0.03) and widowhood.75+ incidence (0.00) are
NOISE-DOMINATED.

Adds scripts/gate2_forensics.py, runs/gate2_forensics_v1.json (every headline
recomputable), tests/test_gate2_forensics.py (consistency tier + two
skipif-PSID live pins). gates.yaml and committed gate artifacts untouched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
social-security-model Ready Ready Preview, Comment Jul 8, 2026 10:59am

Request Review

@MaxGhenis
MaxGhenis merged commit da64d7e into master Jul 8, 2026
7 checks passed
@MaxGhenis
MaxGhenis deleted the gate2-forensics branch July 8, 2026 11:02
MaxGhenis added a commit that referenced this pull request Jul 8, 2026
…unt initial state + unsmoothed low-parity fertility (#42 comment 4914111252) (#95)

Candidate 8's spec (run_gate2_candidate8.py, #93) with EXACTLY two frozen
deltas registered off the gate-2 forensics (#94):

- DELTA 1 (RNG-neutral count add): each holdout person's simulated lifetime-
  marriage count initializes at their OBSERVED residual R = n_marriages minus
  the datable in-exposure first_marriage/remarriage transition-event count --
  the forensics Q1 residual (undatable start/dissolution, out-of-window/under-
  age, separation-origin and MH-count-excess marriages) at per-person
  resolution -- then accumulates the simulated datable transitions. Verified
  BEFORE the one-shot: R + datable == n_marriages per person (remainder 0.0),
  and R aggregated over the ever-married denominator equals the forensics
  reference residual and its five buckets (max remainder 2.9e-16); residual
  non-negative, integer-valued; hazards untouched.
- DELTA 2 (fertility threshold): parities 0->1 and 1->2 use the exact
  empirical single-year rate (no kernel) at ages 22-38 where cell exposure
  >= 200 weighted person-years, kernel elsewhere; higher parities unchanged.

Discipline as c1-c8: bit-exact precheck reproduced the committed floor
(ref/rate_a dev 0.0, holdout sha256 all match); delta-1 reconciliation hard-
gated before scoring; ONE outer run; published regardless. Because delta 1
adds no draw and delta 2 moves only the fertility threshold (parity-independent
draw sizes), the marriage draw stream is byte-identical to candidate 8: the
33 non-fertility, non-count gated cells match candidate 8 to 0.0 across all
five seeds (identity_vs_candidate8).

Outcome (FAIL 0/5, no seed clears all 46):
- seed 0 (44/46): delta 2 broke asfr.20-24 (0.096->0.109 > 0.101, 5/5->4/5),
  and the byte-identical share_divorced.45-54|female held (0.2123 > 0.212).
- seed 1 (45/46): delta 1 cured mean_lifetime_marriages|female, leaving only
  the byte-identical share_widowed.75+|female (0.2059 > 0.185).
- seed 2 (43/46): delta 1 OVERSHOT both counts (male 0.024->0.051 > 0.047,
  female 0.001->0.061 > 0.051) -- the in-exposure over-production the
  forensics flagged -- and delta 2 left completed_fertility.c1970s failing
  (0.186->0.198 > 0.171).
- seed 3 (45/46): delta 1 cured mean_lifetime_marriages|male, leaving only
  the byte-identical widowhood.75+|female (0.3915 > 0.373).
- seed 4 (45/46): delta 1 overshot mean_lifetime_marriages|female
  (0.008->0.057 > 0.051).

Movement vs candidate 8 (n_seeds_pass): mean_lifetime_marriages|male 3->4,
mean_lifetime_marriages|female 4->3, completed_fertility.c1970s 4->4 (worse
score), asfr.20-24 5->4; share_widowed.75+|female, share_divorced.45-54|female
and widowhood.75+|female unchanged 4->4 (byte-identical). Net: delta 1 helps
where the boundary under-produces and hurts where the hazards over-produce, and
the three byte-identical elderly-widow/divorce-stock cells no delta can touch
remain the structural blockers on seeds 0/1/3.

Artifact runs/gate2_hazard_v9.json (registration pointer, both deltas,
reconciliation record, forecast pointer). Tests tests/test_gate2_candidate9.py
(consistency + delta-1 reconciliation + delta-2 footprint + byte-identity to
c8 + live seed-0 pin). c1-c8 + forensics stay green; full suite 972 passed,
41 skipped.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant