From 442f734113e92e3db62c440ae252be2949315c1c Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Tue, 10 Nov 2026 23:22:02 -0500 Subject: [PATCH 1/2] Add a candidate with SSA-file donors to the draft H1 registration Max ruled on 10 November 2026 (d2712) that the Microcosm start's draft registration gain an administrative-donor candidate before it returns to him for posting. This commit adds that candidate as H-D. H-D draws each career from a person in SSA's 2006 Earnings Public-Use File, matched on sex, age and rank in the file's last year. It carries the donor's rank in each year forward to the anchor year and reads earnings levels from the target's own cohort. The PSID supplies levels for the years after the file ends, and a tilt by marital status and disability. H-D's donor pool leaves out both sealed test partitions: H1's own and gate_epuf_fill's. The draft now also: - scores H-D in arm E with its donor file cut at 1988, so the gate tests the 18-year bridge a 2024 frame needs; - states arm E's pass rule: every gating cell within tolerance; - orders adoption H-A, H-B, H-D, H-C; - records the frame Max chose, populace-us-2024-spm-20260915. The plan changes only where it counts or names H1's candidates. Nothing here is registered or posted. An independent review of H-D comes next. Co-Authored-By: Claude Fable 5.2 --- .../microcosm-start-registration-draft.md | 69 ++++++++++++++++--- docs/plans/microcosm-start.md | 18 +++-- 2 files changed, 73 insertions(+), 14 deletions(-) diff --git a/docs/plans/microcosm-start-registration-draft.md b/docs/plans/microcosm-start-registration-draft.md index 98228eab0..b124c1971 100644 --- a/docs/plans/microcosm-start-registration-draft.md +++ b/docs/plans/microcosm-start-registration-draft.md @@ -6,7 +6,7 @@ Placeholders: `N` is the next free registration number when posted (20 if nothin --- -**Registration N: tests for starting the projections from Microcosm's US population. Two gates (H1 and gate 3's first cells) and two report-only checks (W2 and A1), registered before any code, floor or candidate run exists, with H1's three candidates frozen here.** +**Registration N: tests for starting the projections from Microcosm's US population. Two gates (H1 and gate 3's first cells) and two report-only checks (W2 and A1), registered before any code, floor or candidate run exists, with H1's four candidates frozen here.** A gate, in this repository, is a pass-or-fail test whose rules we publish before running it. A part of the model counts as tested only after it passes. A report-only check is published the same way, with no pass or fail. @@ -50,13 +50,19 @@ Today the projections follow a PSID cohort. Starting them from the frame needs t **Question.** Given only what a cross-section observes in one year, does the procedure the plan deploys produce careers whose benefit-relevant features match real careers it has not seen? -**What a pass certifies.** The procedure as deployed: +**What a pass certifies.** The passing candidate's procedure as deployed. For the three candidates with PSID donors (H-A, H-B and H-C): 1. PSID donors, matched by rank from one observed year. 2. Years the PSID lacks, filled by the procedure gate_epuf_fill certifies, or by the current rules if it certifies none. 3. Conversion to covered, capped shares of the wage base. -It is scored on SSA's records (arm E) and on the PSID (arm P). It does not certify the transfer of a rank from CPS or PUF records into the PSID, which W2 reports. +For the candidate with donors from SSA's file (H-D): + +1. EPUF careers, matched by sex, age and rank in the last year the file records, and carried forward to the anchor year. +2. Earnings levels from EPUF's own distributions through that year and from the PSID's after it. +3. In arm P and on the frame, a tilt learned on the PSID that decides which kind of career a person draws. + +Each candidate is scored on SSA's records (arm E) and on the PSID (arm P). No pass certifies the transfer of a rank from CPS or PUF records into the donor data, which W2 reports. **The observable set.** For each person a candidate receives only: @@ -91,6 +97,7 @@ That mirrors the frame, which ranks people within itself. - Draws come from counter-based uniforms keyed by the draw seed, the person id and the year, so a person's draw does not depend on which other persons are scored. - Every fitted component (H-A's participation model, H-C's forests, the fill refit) is seeded from `numpy.random.default_rng([7400, arm, seed, component])`. The arm code is 1 for E and 2 for P. The seed is 0 in arm E and the split seed in arm P. Component codes are listed in the second comment. +- H-D fits nothing from a random seed. It draws one class and one donor for each person and draw seed, from counter-based uniforms keyed by the draw seed, the person id and a component code. #### Arm E: SSA's earnings records @@ -99,7 +106,7 @@ That mirrors the frame, which ranks people within itself. - TRAIN is `u` below 0.6, DEV is 0.6 to 0.8, and TEST is 0.8 and above. - The salt differs from gate_epuf_fill's, so H1's TEST is not the set gate_epuf_fill reads and publishes. No EPUF statistic has been computed under this split. - TEST is read only through an accessor that refuses until `gates.yaml` locks gate_h1. -- **Two configurations, both scored on H1-TEST.** +- **Two configurations for the candidates with PSID donors, both scored on H1-TEST.** H-D has its own two, set out with that candidate below. - **Deployed (gated).** - The donors are PSID heads and spouses. The 2006 anchor rank is applied in the PSID's 2006 cell, the same transfer the frame makes into the PSID's 2022 cell. - Years the PSID lacks are filled by the procedure gate_epuf_fill certifies (or the current rules, if it certifies none), refit on H1-TRAIN so that no fitted parameter has seen an H1-TEST person. Which procedure that is follows from gate_epuf_fill's verdict, so H1's registered run waits for it, and the second comment names the procedure by gate_epuf_fill's run artifact. The frame itself uses gate_epuf_fill's own fit, not this refit. @@ -135,6 +142,7 @@ That mirrors the frame, which ranks people within itself. - `n` is the effective sample size (Kish, from household weights) of the frame pinned at lock, among the frame's persons the group counts. For the zero-anchor block, that means the frame's zero earners of that sex and age. - `sigma` is the root mean square of `[m(A) - m(B)] / sqrt(2)` over the replicates. - The tolerance is `tau = K x sigma`, with **proposed K = 1**: the procedure may move a cell by at most one frame-size sampling error. Max ratifies K at lock. +- **Pass.** A gating cell passes if `|gap| <= tau`. A candidate passes arm E if every gating cell passes in its deployed configuration. For H-D, the gating cells for ages 22 to 59 decide (see H-D, below). #### Arm P: the PSID @@ -183,11 +191,11 @@ That mirrors the frame, which ranks people within itself. - **Arm E:** it is scored on DEV. - **Arm P:** it is fitted on the 80 percent of the bite part whose hash of `populace_dynamics.history_attachment.psid_bite_inner.v1|` and the unit id is 0.2 or above, and scored on the other 20 percent. No scored seed's held-out unit is read. - **Margin:** in each arm the strawman must fail at least one gating cell by more than 2 tau, gate_epuf_fill's margin (`BITE_MULTIPLE = 2.0`). In arm P the bite is scored on a sample about a quarter the size of a seed's held-out set, so its `tau` comes from a floor built at the bite sample's own size, by the same rule. If the strawman does not fail, H1 does not lock without an amendment. -- **Gate pass.** H1 passes if arm E's deployed configuration and arm P both pass. +- **Gate pass.** A candidate passes H1 if it passes arm E in its deployed configuration and passes arm P. #### Candidates, frozen here, run together -Every constant below is fixed by this comment. The fill procedure is not a free choice: it follows from gate_epuf_fill's verdict, as stated in arm E. The second comment adds only the code commit, the component codes, the SHA-256 of any fitted artifact, the name of that fill procedure, and a forecast for each candidate. All three candidates and the strawman are scored in one registered run, after lock, and their results are published together. No candidate's result is seen before another's is fixed. +Every constant below is fixed by this comment. For H-A, H-B and H-C the fill procedure is not a free choice: it follows from gate_epuf_fill's verdict, as stated in arm E. H-D uses no fill. The second comment adds only the code commit, the component codes, the SHA-256 of any fitted artifact, the name of that fill procedure, and a forecast for each candidate. All four candidates and the strawman are scored in one registered run, after lock, and their results are published together. No candidate's result is seen before another's is fixed. 1. **H-A, rank-kNN.** Gate 1's candidate 11, unchanged in its draw and distances (`runs/gate1_rank_knn_v5.json`, `model`): k = 25, distance weights 1, 0.5 and 0.25, the fixed blend of 0.1 for the permanent rank, and the zero-anchor regime. - Earnings distributions are sex-specific. @@ -200,10 +208,40 @@ Every constant below is fixed by this comment. The fill procedure is not a free 3. **H-C, a QRF with the predictors H1 can align across the PSID and the frame.** A backward chain of populace-fit's regime-gated QRF at its default hyperparameters: 100 trees, `zero_atol = 1e-6`, no leaf cap (as `runs/gate1_qrf_baseline_v1.json`, `model.hyperparameters`). - It predicts each earlier year from the next year's earnings, age, sex and anchor-year earnings. - In arm P it also uses marital status, disability status, annual hours and self-employment. +4. **H-D, administrative donors.** H-D takes each person's path through the earnings distribution from an EPUF career, and takes no career from a PSID donor. The PSID supplies two things: earnings levels where EPUF has none, and the tilt below. + - **Donor pool.** EPUF persons with sex coded 1 or 2 who fall in H1-TRAIN and in TRAIN or DEV of gate_epuf_fill's registered split (`harness/epuf_fill_gate.py`, `SPLIT_SALT`). The two salts differ, so the pool holds about 48 percent of the file. No person in H1-TEST or in gate_epuf_fill's TEST enters the pool, and H-D reads no career of theirs at any stage. + - **File end and offset.** Each configuration fixes `E`, the last year of any EPUF career that H-D may read, and the offset `D`, the anchor year less `E`. A target born in year `b` draws from donors born in `b - D`, who had the target's anchor-year age in `E`. + - **The frame:** anchor 2024 for every record, `E` = 2006, `D` = 18. + - **Arm P:** anchor 2022, `E` = 2006, `D` = 16. + - **Arm E, deployed (gated):** anchor 2006, `E` = 1988, `D` = 18, the frame's offset. An accessor cuts every pool career at 1988. + - **Arm E, method only (report-only):** `E` = 2006 and `D` = 0, so donors share the target's birth year. The gap between the two arm-E configurations shows what the offset costs. + - **Cells and positions.** A cell holds the pool's persons of one sex and one five-year age band (15–19, 20–24 and so on) in one year. H-D gives each pool person a position in (0, 1) in each cell of their career, from the year they turned 16 (1951 at the earliest) through `E`. The position is the person's place in the cell's order of earnings, less one half, over the cell's count. Three kinds of tie get an order: + - people with no earnings that year sit lowest, ordered by one uniform per person, so a person keeps the same place among non-earners every year; + - people at the taxable maximum sit highest, ordered by a second uniform per person; + - EPUF's rounding produces every other tie, and a uniform keyed by person and year breaks it. + - **The match.** A target with anchor-year earnings draws among donors with earnings in `E`, and a target with none draws among donors with none. + - **With earnings:** the harness ranks the target among the scored population's earners of the same sex and five-year age band. H-D ranks each donor the same way, among the pool's earners in `E`. Among donors of the target's sex and donor birth year, H-D keeps the 25 nearest the target's rank and draws one with equal probability. A hash of the donor id breaks equal distances. If fewer than 25 qualify, H-D keeps them all. + - **Without earnings:** H-D draws one donor with equal probability among the pool's persons of the target's sex and donor birth year with no earnings in `E`. + - **The tilt (arm P and the frame).** EPUF records a person's sex, birth year and earnings, and nothing else. So H-D learns from the PSID which kind of recent career a target draws from. + - **Classes.** A person's class counts the years with earnings among five: two, four, six, eight and ten years before `E` for a donor, and before the anchor year for a PSID person. The PSID's waves fall every other year, so it recorded each of the five. The four classes are none, one or two, three or four, and all five. A PSID year counts when it holds any labor income, and an EPUF year when it holds covered earnings, so the classes carry that difference of concept. + - **Shares.** In each seed H-D tabulates the weighted share of each class among the PSID persons it may learn from. The cells cross sex, age band (35–44, 45–54, 55–64), anchor-year earnings (some or none), marital group and disability status. A PSID person who lacks one of the five years enters no cell, and H-D counts those persons. + - **Small cells.** A cell with fewer than 250 persons drops disability status, then marital group, then age band, until it holds 250. The last cell, sex by earnings status, stands at any count. + - **The draw.** H-D draws a class from the target's cell and matches only among donors of that class. If no donor of that class shares the target's sex, donor birth year and earnings status, H-D matches without the class for that draw and counts the case. + - **Under 35.** A target under 35 draws without a class. Ten years before the anchor year most such people were under 25, and the PSID records labor income only for heads and spouses. + - **On the frame** the shares come from every arm-P person. Marital group comes from `A_MARITL` and disability from `is_disabled`. A frame person aged 65 or over uses the 55–64 cells. + - **Arm E** has no marital or disability item, so H-D applies no tilt there. + - Education would join the tilt by amendment once the frame carries it. + - **From positions to earnings.** For each year `y` of the target's career before the anchor year, H-D reads the donor's position in year `y - D`. It returns the earnings at that position in the target's own cell for `y`. + - **Arm P:** the cell is the weighted distribution of labor income in `y`, zeros included, for the target's sex and five-year age band. It covers the PSID heads and spouses H-D may learn from. H-D returns dollars. + - **Arm E and the frame, `y` through `E`:** the cell is the pool's, for the target's sex and age band in `y`. H-D returns a share of the wage base. + - **Arm E and the frame, `y` after `E`:** EPUF records no such year in that configuration, so the cell is the PSID distribution above. H-D converts each amount to a share of the year's wage base and caps it at 1. The PSID skipped the odd years after 1996. For each of those, H-D pools the two adjacent years' distributions after scaling both to `y` by the national average wage index. + - **A donor year before 1951.** The file starts in 1951. Where `y - D` falls before it, H-D returns no earnings for `y`, as the career assembler does today for years before 1968, and counts those years per cell. + - **What arm E gates for H-D.** With `E` = 1988 the file holds no donor year for a target's years before 1969. From age 22 on, that reaches targets born before 1947, who were 60 to 69 in 2006. On the frame the same limit reaches careers from age 22 only for people aged 78 and over. So H-D's arm-E verdict rests on the gating cells for ages 22 to 59. The run computes and publishes its cells for ages 60 to 69 with the counts above, and they decide nothing. For targets born from 1947 to 1952 the limit reaches only years before age 22. Arm P gates H-D on every cell: its earliest scored year, 1968, needs donor year 1952. + - **A limit arm E cannot see.** EPUF records no deaths or emigration, so the pool's cells and its donors without earnings include people who had died or left by `E`. H1-TEST holds such people too, so arm E does not score the difference. Arm P does, on PSID respondents interviewed in 2023, and H-D's class draw answers it. **Adoption rule.** -- **Order:** H-A if it passes H1; otherwise H-B if it passes; otherwise H-C if it passes. +- **Order:** H-A if it passes H1; otherwise H-B if it passes; otherwise H-D if it passes; otherwise H-C if it passes. - **None passes:** no history procedure is certified. Any later use of histories on the frame is labeled uncertified, and no text may call it tested. - **Lower-order passes:** a passing candidate lower in the order is reported, not adopted. @@ -313,7 +351,7 @@ Every constant below is fixed by this comment. The fill procedure is not a free ### Rules - **Before lock.** No candidate reads held-out data before lock. Floors read real data only and score no candidate. -- **One run.** H1's three candidates and its strawman run once, together, after gate_epuf_fill's verdict. +- **One run.** H1's four candidates and its strawman run once, together, after gate_epuf_fill's verdict. - One disclosed re-execution is allowed, only for an infrastructure failure before scoring begins, and only after a comment here. - Nobody reads the failed attempt's outputs. - A failure after scoring begins, or a failed re-execution, ends this registration for H1. @@ -327,6 +365,7 @@ Every constant below is fixed by this comment. The fill procedure is not a free - The results then follow this repository's merge rules for a gate run. - **Amendments** are public and prospective, and cannot rescue a run already scored. - **Frame pin.** The frame release is fixed at lock by repository, revision, file and SHA-256. + - Max chose `populace-us-2024-spm-20260915` on 10 November 2026 (d2712): file `populace_us_2024.h5` in the Hugging Face dataset `policyengine/populace-us`, SHA-256 `6496cc4393d4d3c6574f76eca231de5898c803b9067645591fd5c4d3e65aee84`. It holds the bytes of `populace-us-2024-spm-20260909`, the release the plan read. - Changing it is an amendment. - The tolerances that depend on its effective sample size are re-derived before any further run. @@ -348,6 +387,7 @@ Every constant below is fixed by this comment. The fill procedure is not a free Tests use invented data only. - **Refusals.** - H1's TEST accessor refuses until `gates.yaml` locks gate_h1. + - H-D's pool accessor refuses every person in H1-TEST or in gate_epuf_fill's TEST, and returns no earnings after the configuration's `E`. - Every scored entry point refuses a pointer that is not a comment on this issue, a commit that is not the full SHA of a clean HEAD, and an existing output. - The frame reader refuses the real frame's hash outside a registered entry point, as Registration 19's population code does. @@ -360,6 +400,7 @@ Every constant below is fixed by this comment. The fill procedure is not a free - the candidates and the adoption order; - the partition and bite rules; - the platform. +- **A second session** (Claude Code, Fable 5.2) added H-D on 11 November 2026, after Max ruled that the draft gain an administrative-donor candidate (d2712). It chose H-D's design and constants, its arm-E configurations, its place in the adoption order, and the sentence that states arm E's pass rule. - **The independent referees** shaped it: the review rounds below changed the split, the candidates' freezing, gate 3's statistic and bite, and arm E's deployed configuration. - **Max's ruling** authorizes posting (d947, quoted above). He ratifies the multipliers at lock. @@ -403,6 +444,17 @@ The script and its output are `docs/plans/microcosm-start-evidence/frame_structu - No frame outcome. - No sealed comparator file listed in `EV/RESTRICTED-FILES.md`. +**The session that added H-D.** On 2026-11-11 it read: + +- this draft and the plan in full, including the plan's comparison of the frame's marital makeup with a MINT tabulation (Registration 19); +- the frame-structure evidence, and the hashes and manifests of the frame release; +- the docstrings and constants of the repository's EPUF and PSID readers, and the split definitions in `harness/epuf_fill_gate.py` and `harness/epuf_gate.py`; +- lines 2898, 5906 to 5935 and 5982 of `gates.yaml` (blob `6c1cf7674917d9ea40cee1f12cfac0729f8047b5`): the head of gate_epuf_fill's block and one line of its history. H-D takes nothing from them; +- a filtered listing of file names under `runs/`, and no file's contents; +- the titles of six Microcosm issues. Four state summaries of the frame. They cover its household and married-couple counts, the marital makeup of its people 65 and over beside a Census survey's, its Social Security beneficiary counts beside SSA's, and its count of people who hold all four benefit components. The third bears on W2's count cells. + +It saw no EPUF record, PSID record or frame record, no EPUF statistic under H1's split, and no sealed comparator file. + **Research lanes.** Five Subfleet research lanes were briefed (`~/reviews/microcosm-start-plan-20261004/briefs/`) and cancelled before they started, when every Codex lane was on hold. The drafter did that reading itself. **No forecast** is registered here. The second comment carries one for each candidate, written before the run. @@ -414,6 +466,7 @@ Independent of the drafter. Reports are in `~/reviews/microcosm-start-plan-20261 - **Round 1** (Subfleet lane, Opus 5.5; `review-r1.md`): CHANGES REQUIRED, with 3 blocking, 16 major and 19 minor findings. Each was answered (`response-r1.md`). - **Round 2** (Subfleet lane, Opus 5.5; `review-r2.md`): CHANGES REQUIRED, with 6 major findings (N1–N6) and 14 minor ones. Each was answered (`response-r2.md`). - **Round 3** (Subfleet lane, Opus 5.5; `review-r3.md`): APPROVE AFTER LISTED FIXES. Five findings were edited in (`response-r3.md`). A delta check of the changed lines follows: ``. +- **H-D's review** (Subfleet lane; independent of the session that added the candidate): ``. ### What comes next diff --git a/docs/plans/microcosm-start.md b/docs/plans/microcosm-start.md index ea1f232f6..a23b8cc9d 100644 --- a/docs/plans/microcosm-start.md +++ b/docs/plans/microcosm-start.md @@ -16,6 +16,7 @@ Microcosm Dynamics aims to follow a representative population of Americans throu - A QRF (quantile regression forest) chain that predicts each year from the next failed gate 1 because it forgets a person's history. Its correlation of log earnings ten years apart came out at 0.31 to 0.37, against 0.54 in the held-out PSID records and a pass band of ±0.07 (`runs/gate1_qrf_baseline_v1.json`). - QRF versions given a fixed effect for each person went the other way, at 0.62 to 0.67, and failed too. - A second candidate adds marital status to the match. A QRF using the predictors H1 can align across the frame and the PSID runs once as a registered comparison. + - A fourth candidate draws each career from SSA's earnings file, carries it forward from 2006 to the start year, and lets the PSID decide which kind of career a person draws. - Years the PSID cannot supply, such as before 1968 and the odd years after 1996, come from fills learned on SSA's earnings file once that gate locks. - **Income and wealth.** They come from Microcosm, not the PSID. In the first version each item grows with the projection's assumptions, and each person or household keeps its rank within its age group as it ages. A report-only check against the PSID's wealth panels measures how well that works. The two projection tests that exist today use no non-wage income or wealth at all. Only the static 13 percent cut test does, and the illustrative households set theirs by hand. - **New tests.** @@ -24,7 +25,7 @@ Microcosm Dynamics aims to follow a representative population of Americans throu - **W2 (report-only)** checks the starting population against SSA's published counts and averages. - **A1 (report-only)** reports how well income and wealth age. - The draft registration fixes their held-out data, cells, pass rules, H1's three candidates and the rule for adopting one, all before anything is built. + The draft registration fixes their held-out data, cells, pass rules, H1's four candidates and the rule for adopting one, all before anything is built. - **What comes first.** Two pieces of open work feed this one: - the fills learned on SSA's earnings file (gate_epuf_fill; Max ratified its tolerance on 10 October, d927, and its lock and candidates await pull requests #515 and #516); - forward earnings in the projections (Track B: Max ruled d765, d781, d782 and d1342 on 11 October, B1 v2 passed that day, and B2 awaits the B0.1 addendum's merge, #505, and its own registration). @@ -166,7 +167,7 @@ Two QRF designs with a person effect overshot, and the structural one, which als ### 1.4 The recommended design -Use rank-kNN as the primary method, and let H1 decide among it, a version matched on marital status, and a QRF with the predictors H1 can align across the two data sets. The three are frozen together in the registration, run once together, and adopted by a rule fixed in advance (H-A if it passes, else H-B, else H-C). +Use rank-kNN as the primary method, and let H1 decide among it, a version matched on marital status, a candidate whose donors are SSA's own earnings records, and a QRF with the predictors H1 can align across the two data sets. The four are frozen together in the registration, run once together, and adopted by a rule fixed in advance (H-A if it passes, else H-B, else H-D, else H-C). Why rank-kNN first: @@ -188,9 +189,14 @@ What has to be added, each as a registered change: - Work outside Social Security coverage is a separate gap. The repository has a draft design that would classify each person-year's earnings as covered wages, covered self-employment, uncovered or unresolved (`docs/design/covered_earnings_correction.md`, draft revision 2, which authorizes no implementation). - Until it lands, histories treat all labor income as covered up to the wage base, as the PSID projection does. -**The two other candidates:** +**The three other candidates:** - **Rank-kNN with marital strata (H-B).** It restricts donors to the person's sex and marital group, and adds no other constant. Education would join by amendment once the frame carries it (section 5.4). +- **Administrative donors (H-D).** It draws each career from an EPUF person of the same sex and age, matched on rank in the file's last year, 2006. It then carries the career forward by the gap between that year and the start year, which is 18 years for a 2024 frame. + - **Why try it.** EPUF records the benefit formula's own earnings concept for every year from 1951, for 4.4 million people against the PSID's 9,152 families. For the years the file covers, H-D needs no fill and no conversion from labor income to covered earnings. + - **What it takes from the PSID.** Earnings levels for the years after 2006, and a tilt by marital status and disability that decides which kind of career a person draws, since EPUF records neither. + - **Its risk.** A donor is 18 years older than the person who draws the career. H-D carries the donor's rank in each year into the person's own cohort, and leaves the donor's dollars behind. H1 tests that bridge twice: on EPUF, by cutting the donor file at 1988 and rebuilding careers observed in 2006, and on the PSID, from donors observed in 2006 to people observed in 2022. + - **Where it sits.** Third in the order. Gate 1's pass supports H-A and H-B, and no gate has scored H-D. H-C stays last, as the registered answer to "why not a QRF?". - **QRF with the predictors H1 can align across the PSID and the frame (H-C).** It uses age, sex, anchor-year earnings, marital status, disability, hours and self-employment. - It runs once as a registered comparison, so the answer to "why not a QRF?" rests on a scored run on the same held-out data. - Occupation and class of worker are left out because their codes differ across the PSID's years and the frame. @@ -339,7 +345,7 @@ The **effective sample size** (Kish) is the number of equally weighted people a Each test is drafted in full in the [draft registration](microcosm-start-registration-draft.md). In short: - **H1, earnings histories for a cross-section (gate).** Can a method, given only what the frame observes in one year, produce careers that look like real ones? - - **The SSA arm.** It hides every year of EPUF careers except 2006 and rebuilds them from 2006 earnings, sex and birth year, the way the plan deploys: PSID donors matched by rank, years the PSID lacks filled by gate_epuf_fill's certified procedure refit on H1's own training part, and conversion to capped shares of the wage base. It scores the rebuilt careers on people nothing learned from. The split is new, salted differently from gate_epuf_fill's, so it does not reuse a test set that gate will have published. A report-only configuration with EPUF donors shows how much of any miss comes from the PSID itself. + - **The SSA arm.** It hides every year of EPUF careers except 2006 and rebuilds them from 2006 earnings, sex and birth year, the way the plan deploys: PSID donors matched by rank, years the PSID lacks filled by gate_epuf_fill's certified procedure refit on H1's own training part, and conversion to capped shares of the wage base. It scores the rebuilt careers on people nothing learned from. The split is new, salted differently from gate_epuf_fill's, so it does not reuse a test set that gate will have published. A report-only configuration with EPUF donors shows how much of any miss comes from the PSID itself. H1 scores H-D with its donor file cut at 1988, so that it bridges the 18 years the frame asks of it. - **Cells:** what the benefit formula reads, by sex and age: the distribution of top-35-year indexed earnings, the share of years with no earnings, the share at the taxable maximum, insured status, and the correlations of the anchor year with the career and with years two, four and ten earlier. - **What a pass certifies:** the deployed procedure on SSA's records and on the PSID, but not the transfer of ranks from CPS or PUF records, which W2 reports. - **Tolerance:** the sampling error the frame itself carries in each cell. A method passes only if its error is no larger than what the frame's own sample would introduce. @@ -347,7 +353,7 @@ Each test is drafted in full in the [draft registration](microcosm-start-registr - **Cells:** the same features, plus cells by marital status and disability and the couple cells of section 1.7. Reported only: cells by education, which show what leaving education out costs, and the agreement of the forward law's `u_w` between real and generated histories. - **Tolerance:** from pairs of real held-out-size samples, the way gate 1 prices its geometry thresholds. - **Disclosure:** gate 1 selected rank-kNN on these same people, and gate_epuf_fill selected its fill procedure on EPUF people who overlap the SSA arm's test set. The registration says both. - - **Candidates.** All three are frozen in the registration, scored in one run, and adopted by the rule in section 1.4. + - **Candidates.** All four are frozen in the registration, scored in one run, and adopted by the rule in section 1.4. - **Gate 3, the first projected year (gate).** Project the frame one year forward. Score the projection's growth in retired- and disabled-worker counts and average benefits, measured as the frame measures them, against the growth in SSA's December figures. Comparing growth cancels the stable part of the gap between the frame's concept and SSA's. It does not cancel errors in the frame's makeup that change deaths, widowhood or claims, which gate 3 scores along with the engine. The cells are fixed now, and the partition comes from the start-year frame alone. Gate 3 locks separately from H1, after the engine exists and engines with no mortality or no new awards fail on an invented frame. - **W2, the starting population against SSA's records (report-only).** Do the frame's beneficiaries, with their inferred PIAs, match SSA's December counts and averages for the start year by type, age and sex? These are Annual Statistical Supplement tables 5.B1, 5.D1 and 5.G1; the evidence folder holds a capture of the 2023 edition (`~/microcosm-launch-evidence/dynasim-parity-20260909/ssa-supplement-2023/`). Microcosm calibrates Social Security dollars by type but not beneficiary counts (Registration 19), so counts and average PIAs are held out. - **A1, income and wealth aging (report-only).** Apply section 2.3's rule to PSID families' wealth and income at one wave, and compare with what the PSID recorded four years later, by age band. @@ -413,7 +419,7 @@ Effort is in agent-days of build work and days of human review. Every figure is | T2 | File the four Microcosm requests with evidence | — | 1–2 | 0–0.5 | | T3 | PSID readers: annual hours, self-employment, education, and wealth for 1999–2021 | — | 4–6 | 1 | | T4 | H1's floors, partition, bite checks and block draft; two referee rounds | the posted registration, T3 | 8–12 | 3–4 | -| T5 | H1's three candidates and strawman, built on invented data | T4's interfaces | 8–12 | 2–3 | +| T5 | H1's four candidates and strawman, built on invented data | T4's interfaces | 8–12 | 2–3 | | T6 | H1's lock and its one run, after the second comment | T4, T5, d947, gate_epuf_fill's verdict | 2–4 | 2 | | T7 | The starting stock: benefits as state, inferred PIAs for retired and disabled workers and their named limits, spouse and survivor links; gate 3's partition from the start-year frame (standard deviations only); then W2's first run | T1 | 6–9 | 2 | | T8 | Run the existing engine on frame people, on invented data: starting states, fixed trajectory weights, the selected baseline | T1, T6, T7, #512 (merged) | 10–15 | 3–4 | From 694a710f8159b01e1c7396f02aaac60a3318827a Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 25 Nov 2026 17:45:36 +0100 Subject: [PATCH 2/2] Revise H-D after the first independent review The first review of H-D (GPT-6.1 Sol) asked for changes: seven blocking findings, five major and five minor. This commit answers each. - H-D's rules now settle mid-ranks, the quantile convention, empty donor sets and cells, ties and every random draw, so two builders get the same careers from the same inputs and seeds. - One rule builds each odd year the PSID didn't record, from the wave before, scaled by the wage index. - H-D faces the same gating cells as the other three candidates, ages 22 to 69. Where a donor year falls before 1951, it reads the donor's 1951 position. That replaces the exemption for ages 60 to 69. - The pool accessor parses three columns of each EPUF file in chunks and drops sealed persons' rows inside each chunk. - The plan's general lines about the history procedure name the candidates they cover, and its branch lines say the work sits on master. Its section 5 doesn't change. - The disclosure lists every read the departures record holds. Nothing here is registered or posted. A second review round comes next. Co-Authored-By: Claude Opus 5.5 --- .../microcosm-start-registration-draft.md | 135 +++++++++++------- docs/plans/microcosm-start.md | 40 +++--- 2 files changed, 101 insertions(+), 74 deletions(-) diff --git a/docs/plans/microcosm-start-registration-draft.md b/docs/plans/microcosm-start-registration-draft.md index b124c1971..7ecf4f69c 100644 --- a/docs/plans/microcosm-start-registration-draft.md +++ b/docs/plans/microcosm-start-registration-draft.md @@ -6,7 +6,7 @@ Placeholders: `N` is the next free registration number when posted (20 if nothin --- -**Registration N: tests for starting the projections from Microcosm's US population. Two gates (H1 and gate 3's first cells) and two report-only checks (W2 and A1), registered before any code, floor or candidate run exists, with H1's four candidates frozen here.** +**Registration N: tests for starting the projections from Microcosm's US population.** We register H1 and gate 3's first cells as gates, and W2 and A1 as report-only checks, before any code, floor or candidate run exists, and we fix H1's four candidates here. A gate, in this repository, is a pass-or-fail test whose rules we publish before running it. A part of the model counts as tested only after it passes. A report-only check is published the same way, with no pass or fail. @@ -50,19 +50,19 @@ Today the projections follow a PSID cohort. Starting them from the frame needs t **Question.** Given only what a cross-section observes in one year, does the procedure the plan deploys produce careers whose benefit-relevant features match real careers it has not seen? -**What a pass certifies.** The passing candidate's procedure as deployed. For the three candidates with PSID donors (H-A, H-B and H-C): +**What a pass certifies.** H1 scores each candidate in the configurations specified for its deployment, on SSA's records (arm E) and on the PSID (arm P). H-A, H-B and H-C use PSID donors in three steps: -1. PSID donors, matched by rank from one observed year. -2. Years the PSID lacks, filled by the procedure gate_epuf_fill certifies, or by the current rules if it certifies none. -3. Conversion to covered, capped shares of the wage base. +1. They match PSID donors by rank in one observed year. +2. For years the PSID lacks, they use the procedure gate_epuf_fill certifies, or the current rules if it certifies none. +3. They convert the result to covered, capped shares of the wage base. -For the candidate with donors from SSA's file (H-D): +H-D uses SSA's own records as donors, in three steps: -1. EPUF careers, matched by sex, age and rank in the last year the file records, and carried forward to the anchor year. -2. Earnings levels from EPUF's own distributions through that year and from the PSID's after it. -3. In arm P and on the frame, a tilt learned on the PSID that decides which kind of career a person draws. +1. It matches EPUF donors by sex, age and earnings rank in the last permitted donor year, then shifts their years to the anchor. +2. It takes earnings levels from EPUF distributions through that year and PSID distributions afterward. +3. In arm P and on the frame, it draws a career class from shares it estimates on the PSID. -Each candidate is scored on SSA's records (arm E) and on the PSID (arm P). No pass certifies the transfer of a rank from CPS or PUF records into the donor data, which W2 reports. +A pass for H-D covers what each arm scores. Arm E scores the frame's 18-year offset, H-D's rule for donor years before 1951, and PSID levels after the donor file ends, with no class draw. Arm P scores the class draw with a 16-year offset, in recorded years only. No arm scores the frame's combination of the 18-year offset with the class draw. Nor does any arm score four parts only the frame uses: the odd-year rule for 2007 to 2023, class shares at 65 and over, the fallback for earners aged 86 and over, and the anchor that beneficiaries' histories take from inferred PIAs. Arm E scores the odd-year rule only for 1997 to 2005. H1 tests no candidate's transfer of a rank from CPS or PUF records into donor data; W2 reports the frame's earnings distributions beside the PSID's. **The observable set.** For each person a candidate receives only: @@ -97,7 +97,7 @@ That mirrors the frame, which ranks people within itself. - Draws come from counter-based uniforms keyed by the draw seed, the person id and the year, so a person's draw does not depend on which other persons are scored. - Every fitted component (H-A's participation model, H-C's forests, the fill refit) is seeded from `numpy.random.default_rng([7400, arm, seed, component])`. The arm code is 1 for E and 2 for P. The seed is 0 in arm E and the split seed in arm P. Component codes are listed in the second comment. -- H-D fits nothing from a random seed. It draws one class and one donor for each person and draw seed, from counter-based uniforms keyed by the draw seed, the person id and a component code. +- H-D fits nothing from a random seed. It draws one class and one donor for each person and draw seed, from the keyed uniforms its own section defines. #### Arm E: SSA's earnings records @@ -106,7 +106,7 @@ That mirrors the frame, which ranks people within itself. - TRAIN is `u` below 0.6, DEV is 0.6 to 0.8, and TEST is 0.8 and above. - The salt differs from gate_epuf_fill's, so H1's TEST is not the set gate_epuf_fill reads and publishes. No EPUF statistic has been computed under this split. - TEST is read only through an accessor that refuses until `gates.yaml` locks gate_h1. -- **Two configurations for the candidates with PSID donors, both scored on H1-TEST.** H-D has its own two, set out with that candidate below. +- **Configurations.** The harness scores H-A, H-B and H-C on H1-TEST in the two configurations below, and H-D in the two set out with its donor settings. - **Deployed (gated).** - The donors are PSID heads and spouses. The 2006 anchor rank is applied in the PSID's 2006 cell, the same transfer the frame makes into the PSID's 2022 cell. - Years the PSID lacks are filled by the procedure gate_epuf_fill certifies (or the current rules, if it certifies none), refit on H1-TRAIN so that no fitted parameter has seen an H1-TEST person. Which procedure that is follows from gate_epuf_fill's verdict, so H1's registered run waits for it, and the second comment names the procedure by gate_epuf_fill's run artifact. The frame itself uses gate_epuf_fill's own fit, not this refit. @@ -137,12 +137,12 @@ That mirrors the frame, which ranks people within itself. - For a correlation, the gap is the returned value minus the true value. - For every other cell, the gap is the log of the returned value over the true value. - The returned value is the cell's mean over the 20 draw seeds. Both are computed on the same TEST persons. -- **Floor and tolerance.** As gate_epuf_fill prices its cells (`harness/epuf_fill_gate.py`, docstring item 4, on branch `epuf-career-fill-20261003`). +- **Floor and tolerance.** As gate_epuf_fill prices its cells (`harness/epuf_fill_gate.py` on master, docstring item 4). - For each group, 200 replicates draw two disjoint samples of `n` persons from that group's DEV population, using the stream `default_rng([5100, group index, 200, n])`. - `n` is the effective sample size (Kish, from household weights) of the frame pinned at lock, among the frame's persons the group counts. For the zero-anchor block, that means the frame's zero earners of that sex and age. - `sigma` is the root mean square of `[m(A) - m(B)] / sqrt(2)` over the replicates. - The tolerance is `tau = K x sigma`, with **proposed K = 1**: the procedure may move a cell by at most one frame-size sampling error. Max ratifies K at lock. -- **Pass.** A gating cell passes if `|gap| <= tau`. A candidate passes arm E if every gating cell passes in its deployed configuration. For H-D, the gating cells for ages 22 to 59 decide (see H-D, below). +- **Pass.** A gating cell passes if `|gap| <= tau`. A candidate passes arm E if every gating cell passes in its deployed configuration. The same gating cells decide for all four candidates. #### Arm P: the PSID @@ -195,7 +195,7 @@ That mirrors the frame, which ranks people within itself. #### Candidates, frozen here, run together -Every constant below is fixed by this comment. For H-A, H-B and H-C the fill procedure is not a free choice: it follows from gate_epuf_fill's verdict, as stated in arm E. H-D uses no fill. The second comment adds only the code commit, the component codes, the SHA-256 of any fitted artifact, the name of that fill procedure, and a forecast for each candidate. All four candidates and the strawman are scored in one registered run, after lock, and their results are published together. No candidate's result is seen before another's is fixed. +This comment fixes every constant below. Builders use gate_epuf_fill's selected procedure for H-A, H-B and H-C, as arm E states. H-D uses no gate_epuf_fill procedure; its own rules below supply the years EPUF lacks. The second comment adds only the code commit, the component codes, the SHA-256 of any fitted artifact, the name of that fill procedure, and a forecast for each candidate. After lock, the harness scores all four candidates and the strawman in one registered run, and the runner publishes their results together. Nobody sees one candidate's result before the harness has fixed every candidate's result. 1. **H-A, rank-kNN.** Gate 1's candidate 11, unchanged in its draw and distances (`runs/gate1_rank_knn_v5.json`, `model`): k = 25, distance weights 1, 0.5 and 0.25, the fixed blend of 0.1 for the permanent rank, and the zero-anchor regime. - Earnings distributions are sex-specific. @@ -208,40 +208,61 @@ Every constant below is fixed by this comment. For H-A, H-B and H-C the fill pro 3. **H-C, a QRF with the predictors H1 can align across the PSID and the frame.** A backward chain of populace-fit's regime-gated QRF at its default hyperparameters: 100 trees, `zero_atol = 1e-6`, no leaf cap (as `runs/gate1_qrf_baseline_v1.json`, `model.hyperparameters`). - It predicts each earlier year from the next year's earnings, age, sex and anchor-year earnings. - In arm P it also uses marital status, disability status, annual hours and self-employment. -4. **H-D, administrative donors.** H-D takes each person's path through the earnings distribution from an EPUF career, and takes no career from a PSID donor. The PSID supplies two things: earnings levels where EPUF has none, and the tilt below. - - **Donor pool.** EPUF persons with sex coded 1 or 2 who fall in H1-TRAIN and in TRAIN or DEV of gate_epuf_fill's registered split (`harness/epuf_fill_gate.py`, `SPLIT_SALT`). The two salts differ, so the pool holds about 48 percent of the file. No person in H1-TEST or in gate_epuf_fill's TEST enters the pool, and H-D reads no career of theirs at any stage. - - **File end and offset.** Each configuration fixes `E`, the last year of any EPUF career that H-D may read, and the offset `D`, the anchor year less `E`. A target born in year `b` draws from donors born in `b - D`, who had the target's anchor-year age in `E`. +4. **H-D, administrative donors.** H-D takes each person's path through the earnings distribution from one EPUF career, and takes no career from a PSID donor. It uses PSID distributions for earnings levels in the years after the donor file ends, and PSID class shares to choose which kind of career a person draws. From EPUF, H-D reads each person's sex, year of birth and annual earnings. It reads none of EPUF's other fields: aggregate earnings and quarters of coverage for 1937–1950, quarters of coverage for 1951–1952, and each year's quarters of coverage. EPUF does not record marital status or disability. + - **Donor pool.** H-D admits an EPUF person only when the person has sex coded 1 or 2 and belongs both to H1-TRAIN and to TRAIN or DEV of gate_epuf_fill's registered split (`harness/epuf_fill_gate.py`, `SPLIT_SALT`). Under the two different salts, the pool holds about 48 percent of the file's persons. No career of a person in H1-TEST or in gate_epuf_fill's TEST enters any of H-D's cells, positions, classes or donors. The scoring harness reads H1-TEST's true careers after lock, for every candidate. + - **Pool accessor.** H-D reads EPUF only through an accessor. Pool membership follows two salted hashes of the person id, so pool and sealed persons' rows lie mixed through both EPUF files, and any read of either file decodes sealed rows along with pool rows. The accessor reads each file in chunks of 500,000 rows and parses three columns only: `person_id`, `birth_year` and `sex` from the demographic file, and `person_id`, `year` and `earnings` from the annual file. Each chunk therefore holds every row in its range, sealed persons' rows among them, once the accessor decodes it. Inside the chunk, before any other step reads it, the accessor drops every row of a person outside the pool and every annual row after the configuration's `E`. No function returns, stores, logs or caches a dropped row, and the accessor keeps no reference to a chunk after it filters it. No array, cache or file that H-D writes holds a row for a person outside the pool. H-D never calls the matrix reader in `harness/epuf_fill_gate.py`, which reads both whole files before it applies its split. A test on an invented file checks that no sealed id reaches any object the accessor returns, stores or caches, and that the accessor parses no other column. + - **File end and offset.** Each configuration fixes `E`, the last year of any EPUF career that H-D may read, and the offset `D`, the anchor year less `E`. A target born in year `b` draws from donors born in `b - D`, who had the target's anchor-year age in `E`. Target and donor therefore share their age, and their five-year band, in each pair of years `y` and `y - D`. - **The frame:** anchor 2024 for every record, `E` = 2006, `D` = 18. - **Arm P:** anchor 2022, `E` = 2006, `D` = 16. - - **Arm E, deployed (gated):** anchor 2006, `E` = 1988, `D` = 18, the frame's offset. An accessor cuts every pool career at 1988. - - **Arm E, method only (report-only):** `E` = 2006 and `D` = 0, so donors share the target's birth year. The gap between the two arm-E configurations shows what the offset costs. - - **Cells and positions.** A cell holds the pool's persons of one sex and one five-year age band (15–19, 20–24 and so on) in one year. H-D gives each pool person a position in (0, 1) in each cell of their career, from the year they turned 16 (1951 at the earliest) through `E`. The position is the person's place in the cell's order of earnings, less one half, over the cell's count. Three kinds of tie get an order: - - people with no earnings that year sit lowest, ordered by one uniform per person, so a person keeps the same place among non-earners every year; - - people at the taxable maximum sit highest, ordered by a second uniform per person; - - EPUF's rounding produces every other tie, and a uniform keyed by person and year breaks it. - - **The match.** A target with anchor-year earnings draws among donors with earnings in `E`, and a target with none draws among donors with none. - - **With earnings:** the harness ranks the target among the scored population's earners of the same sex and five-year age band. H-D ranks each donor the same way, among the pool's earners in `E`. Among donors of the target's sex and donor birth year, H-D keeps the 25 nearest the target's rank and draws one with equal probability. A hash of the donor id breaks equal distances. If fewer than 25 qualify, H-D keeps them all. - - **Without earnings:** H-D draws one donor with equal probability among the pool's persons of the target's sex and donor birth year with no earnings in `E`. - - **The tilt (arm P and the frame).** EPUF records a person's sex, birth year and earnings, and nothing else. So H-D learns from the PSID which kind of recent career a target draws from. - - **Classes.** A person's class counts the years with earnings among five: two, four, six, eight and ten years before `E` for a donor, and before the anchor year for a PSID person. The PSID's waves fall every other year, so it recorded each of the five. The four classes are none, one or two, three or four, and all five. A PSID year counts when it holds any labor income, and an EPUF year when it holds covered earnings, so the classes carry that difference of concept. - - **Shares.** In each seed H-D tabulates the weighted share of each class among the PSID persons it may learn from. The cells cross sex, age band (35–44, 45–54, 55–64), anchor-year earnings (some or none), marital group and disability status. A PSID person who lacks one of the five years enters no cell, and H-D counts those persons. - - **Small cells.** A cell with fewer than 250 persons drops disability status, then marital group, then age band, until it holds 250. The last cell, sex by earnings status, stands at any count. - - **The draw.** H-D draws a class from the target's cell and matches only among donors of that class. If no donor of that class shares the target's sex, donor birth year and earnings status, H-D matches without the class for that draw and counts the case. - - **Under 35.** A target under 35 draws without a class. Ten years before the anchor year most such people were under 25, and the PSID records labor income only for heads and spouses. - - **On the frame** the shares come from every arm-P person. Marital group comes from `A_MARITL` and disability from `is_disabled`. A frame person aged 65 or over uses the 55–64 cells. - - **Arm E** has no marital or disability item, so H-D applies no tilt there. - - Education would join the tilt by amendment once the frame carries it. - - **From positions to earnings.** For each year `y` of the target's career before the anchor year, H-D reads the donor's position in year `y - D`. It returns the earnings at that position in the target's own cell for `y`. - - **Arm P:** the cell is the weighted distribution of labor income in `y`, zeros included, for the target's sex and five-year age band. It covers the PSID heads and spouses H-D may learn from. H-D returns dollars. - - **Arm E and the frame, `y` through `E`:** the cell is the pool's, for the target's sex and age band in `y`. H-D returns a share of the wage base. - - **Arm E and the frame, `y` after `E`:** EPUF records no such year in that configuration, so the cell is the PSID distribution above. H-D converts each amount to a share of the year's wage base and caps it at 1. The PSID skipped the odd years after 1996. For each of those, H-D pools the two adjacent years' distributions after scaling both to `y` by the national average wage index. - - **A donor year before 1951.** The file starts in 1951. Where `y - D` falls before it, H-D returns no earnings for `y`, as the career assembler does today for years before 1968, and counts those years per cell. - - **What arm E gates for H-D.** With `E` = 1988 the file holds no donor year for a target's years before 1969. From age 22 on, that reaches targets born before 1947, who were 60 to 69 in 2006. On the frame the same limit reaches careers from age 22 only for people aged 78 and over. So H-D's arm-E verdict rests on the gating cells for ages 22 to 59. The run computes and publishes its cells for ages 60 to 69 with the counts above, and they decide nothing. For targets born from 1947 to 1952 the limit reaches only years before age 22. Arm P gates H-D on every cell: its earliest scored year, 1968, needs donor year 1952. - - **A limit arm E cannot see.** EPUF records no deaths or emigration, so the pool's cells and its donors without earnings include people who had died or left by `E`. H1-TEST holds such people too, so arm E does not score the difference. Arm P does, on PSID respondents interviewed in 2023, and H-D's class draw answers it. + - **Arm E, deployed (gated):** anchor 2006, `E` = 1988, `D` = 18, the frame's offset. The accessor cuts every pool career at 1988. + - **Arm E, method only (report-only):** `E` = 2006 and `D` = 0, so donors share the target's birth year. The harness reports the difference between the two arm-E configurations. That difference combines three changes: the donor cohorts, the years H-D reads from EPUF, and the years that take PSID levels. + - **Ages and career years.** In arm E, `b` is EPUF's year of birth. For a PSID person, in arm P and in the PSID cells below, `b` is `period` less `age` in the person's latest row of `demographic_panel` (`data/panels.py`) with an age from 1 to 120. On the frame, `b` is 2024 less the person's age, after the single-year allocation that the plan registers for the top-coded ages 80 and 85 (plan, section 5.4). In each arm H-D returns the years that arm hides. On the frame it returns every year from the year the person turned 16 through 2023, so a frame person aged 16 or under gets none, and the plan's cut at US entry applies afterward (section 5.4). + - **Uniforms.** Every uniform H-D uses is `U(k)`: the first eight bytes, big-endian, of the SHA-256 of the ASCII string `populace_dynamics.history_attachment.hd.v1|k`, divided by 2^64. The key `k` joins the fields below with `|`, writing integers in decimal. `c` is the configuration: `ae18` for arm E deployed, `ae0` for arm E method only, `p` followed by the split seed in arm P (for example `p100`), and `f24` on the frame. `s` is the draw seed, 7300 to 7319. Ids are EPUF's person id, the PSID's person id (the 1968 interview number times 1000 plus the person number) and the frame's `person_id`. + - `zero|id` orders a pool person among people with no earnings, and `cap|id` among people at the taxable maximum. Each gives the person a fixed ordering priority within that mass across years, while their position still moves as others enter or leave it. + - `tie|id|y` orders a pool person among other equal earnings in year `y`. + - `anchor|c|id` orders a target among equal anchor-year earnings, except where arm E's own tie rule for shares at the cap applies (above). + - `near|id` orders donors at equal distance from a target's rank. + - `class|c|s|id` draws a target's class, and `donor|c|s|id` its donor. + - Where two uniforms tie, an event of probability 2^-64, the smaller id goes first. + - **Mid-ranks.** For people in a fixed order, each with weight `w`, a person's mid-rank is `(W_ahead + w / 2) / W`. `W_ahead` sums the weights of the people ahead in the order, and `W` sums all of them. With unit weights that gives `(i - 1/2) / n` for the `i`-th of `n`. + - **Positions.** A cell holds every pool person of one sex whose age in year `y` falls in one five-year band (15–19, 20–24 and so on). H-D orders each cell from lowest to highest: people with no earnings in `y` by `zero|id`; then people below the taxable maximum by earnings, equal amounts by `tie|id|y`; then people whose earnings equal the year's taxable maximum by `cap|id`. A pool person's position in `y` is their unit-weight mid-rank in that cell. H-D computes positions from the year the person turned 16 (1951 at the earliest) through `E`. EPUF holds no earnings at ages 86 and over, so people at those ages sit in the zero mass. + - **Ranks for the match.** H-D ranks earners only. A target's rank is its mid-rank among the earners of its rank group, ordered by anchor-year earnings with ties ordered as above. A donor's rank is its unit-weight mid-rank among the pool's earners of its sex and five-year band in `E`, in the cell order above. + - **Arm E:** H1-TEST persons of the target's sex and five-year band in 2006, with unit weights. + - **Arm P:** arm-P persons of the target's sex and five-year band in 2022, weighted by the 2023 weight. + - **The frame:** records of the target's source year, channel, sex and five-year band, weighted by household weight, the plan's anchor convention (section 1.4). + - **Beneficiaries on the frame.** A beneficiary whose history serves for grouping (plan, section 1.6) takes as its rank the mid-rank of its inferred PIA among beneficiaries with an inferred PIA in its sex and five-year band, household-weighted. H-D ranks the pool's persons with a positive `PIAx` in `E` by `PIAx` within sex and five-year band, using arm E's definition with that year's bend points and wage index. It then matches the beneficiary as a target with earnings, with these ranks in place of earnings ranks. The beneficiary draws its class from its own anchor-year earnings status. That history leaves the person's benefit unchanged, and no arm scores it. + - **The match.** H-D matches a target with anchor-year earnings to donors with earnings in `E`, and a target with none to donors with none. A target has anchor-year earnings when the amount its arm gives (on the frame, the amount the plan's anchor convention ranks) is above zero; a zero or negative amount counts as none. + - **With earnings:** H-D takes the pool persons of the target's sex, born in `b - D`, with earnings in `E` and, where it draws a class, in that class. It sorts them by the distance between their rank and the target's, then by `near|id`, and keeps the first 25, or all of them if fewer qualify. From that list of `m`, counting from 0, it takes the donor at index `floor(m x U(donor|c|s|id))`. + - **Without earnings:** H-D takes the same set among pool persons with no earnings in `E`, sorts it by id, and takes the donor at index `floor(m x U(donor|c|s|id))` of the whole set. + - **No donor.** If the set is empty, H-D first drops the class for that draw. If the set is still empty, it moves the donor birth year one year at a time, later first (`b - D + 1`, `b - D - 1`, `b - D + 2`, …), and takes the first birth year with a qualifying donor. H-D counts every case by cell. For example, a frame earner aged 86 or over finds no donor with earnings in 2006, since EPUF holds no earnings at those ages, and draws from donors born in a later year. + - **Classes (arm P and the frame).** H-D estimates from the PSID which kind of recent career a target draws. + - **Class.** A person's class counts the positive years among five: two, four, six, eight and ten years before `E` for a donor, and before the anchor year for a PSID person. The PSID recorded each of 2020, 2018, 2016, 2014 and 2012. The four classes are none, one or two, three or four, and all five. H-D counts positive PSID labor income and positive EPUF covered earnings, and PSID labor income can include earnings outside Social Security coverage. + - **Who enters.** In arm P, the arm-P persons outside the seed's held-out units; on the frame, every arm-P person. Each enters with their 2023 weight. A person missing any of the five years enters no cell, and H-D counts those persons. + - **Shares.** H-D estimates the weighted share of each class within cells. The cells cross sex, age band in the anchor year (35–44, 45–54, 55–64), anchor-year earnings (some or none), marital group at the 2023 interview (married, widowed, divorced or separated, never married) and disability status. + - **Small cells.** When a cell holds fewer than 250 persons, H-D drops disability status, then marital group, then age band, until the cell reaches 250 or only sex and earnings status remain. It uses that last cell at any count above zero. If the last cell holds nobody, H-D draws no class for that target and counts the case. A PSID person or frame target missing a marital group or disability status enters the first cell in that order that drops the missing item, and H-D counts them. + - **The draw.** H-D orders the classes none, one or two, three or four, all five, and draws the first class whose cumulative share exceeds `U(class|c|s|id)`. It then matches the target only among donors of that class, under the rule for an empty set above. + - **Under 35.** For targets under 35, H-D matches donors without drawing a class. Ten years before the anchor year most such people were under 25, and the PSID records labor income only for heads and spouses. + - **On the frame.** H-D reads marital group from `A_MARITL`: codes 1 to 3 as married, 4 widowed, 5 and 6 divorced or separated, and 7 never married. It reads disability from `is_disabled`. For frame persons aged 65 or over, it uses the 55–64 cells. Arm P stops at 64, so no arm scores that extension. + - **Arm E** has no marital or disability item, so H-D draws no class there. + - Builders may add education to the classes by amendment once the frame carries it. + - **From positions to earnings.** For each career year `y`, H-D reads the donor's position `p` in year `y - D`. It returns `Q(p) = min{x : F(x) >= p}` in the target's own cell for `y`, where `F` is the cell's weighted distribution function, zeros included, with no interpolation. A position inside the zero mass therefore returns zero. + - **Arm P:** H-D uses the PSID cell for `y` (below) and returns dollars. + - **Arm E and the frame, `y` through `E`:** H-D uses the pool's cell for the target's sex and band in `y`, with unit weights, and returns a share of the wage base. + - **Arm E and the frame, `y` after `E`:** H-D uses the PSID cell for `y`, converts each amount to a share of the year's wage base, and caps it at 1. + - **PSID cells.** For an income year `y` the PSID recorded, the cell holds the heads and spouses of the wave that reports `y`, to whom `data/family.py` attaches labor income for `y`. Each has a positive weight in that wave (`weight` in `data/panels.py`'s `demographic_panel`) and an age in `y`, `y` less `b`, within the band. Each person enters with their labor income for `y`, a negative amount counting as zero, and their weight, normalized to sum to one in the cell. A person whose labor income for `y` is missing enters no cell for `y`. In arm P, H-D leaves out, in every year, each person who is a head or spouse in one of the seed's held-out units. Arm E and the frame use every such person. + - **Odd years from 1997.** The PSID did not record 1997, 1999 and every other odd year through 2023. For each of those years, H-D builds the cell from the wave that reports `y - 1`. It takes the persons whose age in `y` falls in the band, with their weights in that wave and their labor income for `y - 1`, scaled by the national average wage index of `y` over that of `y - 1`. Arm E uses this rule for 1997 to 2005, and the frame uses it for 2007 to 2023, including 2023, whose following year the PSID has not yet released. + - **Empty cells.** If a PSID cell or a pool cell holds nobody, H-D uses the nearest band of the same sex and year that holds someone, the younger band on a tie, and counts the case. + - **Donor years before 1951.** EPUF's annual records start in 1951. Where `y - D` falls before 1951, H-D reads the donor's 1951 position. With `D` = 18 that covers target years before 1969. + - **Arm E, deployed:** the rule reaches every target born before 1953. For those born from 1937 to 1946, aged 60 to 69 in 2006, it reaches years from age 22 on; for those born from 1947 to 1952, only years before age 22. Arm E's gating cells for ages 60 to 69 therefore score the rule over more of each career than the frame uses it for. + - **The frame:** the rule reaches years from age 22 on only for people aged 78 and over in 2024, and years before 22 for people aged 72 to 77. + - **Arm P** needs no such rule. Its oldest people, born in 1958, enter scoring at 22 in 1980, which maps to donor year 1964. + - **Dead and departed donors.** EPUF records no deaths or emigration, so the pool's cells and its donors without earnings include people who had died or left by `E`. H1-TEST holds such people too, so arm E does not score the difference. Arm P scores PSID respondents interviewed in 2023, and so tests some consequences of drawing careers from SSA's records. Matching on class leaves survival and residence differences within a class unresolved. + - **Diagnostics.** The run reports, by cell, H-D's class shares, back-off rates, cells and donor sets it found empty, donor counts, match distances and years it took from a donor's 1951 position. **Adoption rule.** -- **Order:** H-A if it passes H1; otherwise H-B if it passes; otherwise H-D if it passes; otherwise H-C if it passes. +- **Order:** we adopt the first candidate that passes H1, in the order H-A, H-B, H-D, H-C. +- **Chance passes.** Each candidate added raises the chance that some inadequate candidate passes H1 by chance, and the fixed order can then decide which one we adopt. Arm E's false-fail budget bounds the chance that a faithful procedure fails; it does not bound this chance, and we have no estimate of it. - **None passes:** no history procedure is certified. Any later use of histories on the frame is labeled uncertified, and no text may call it tested. - **Lower-order passes:** a passing candidate lower in the order is reported, not adopted. @@ -387,20 +408,20 @@ Every constant below is fixed by this comment. For H-A, H-B and H-C the fill pro Tests use invented data only. - **Refusals.** - H1's TEST accessor refuses until `gates.yaml` locks gate_h1. - - H-D's pool accessor refuses every person in H1-TEST or in gate_epuf_fill's TEST, and returns no earnings after the configuration's `E`. + - H-D's pool accessor decodes EPUF in chunks that hold sealed persons' rows. Inside each chunk, before any other step reads it, it drops every row of a person in H1-TEST or in gate_epuf_fill's TEST, and every row after the configuration's `E` (see H-D's pool accessor). - Every scored entry point refuses a pointer that is not a comment on this issue, a commit that is not the full SHA of a clean HEAD, and an existing output. - The frame reader refuses the real frame's hash outside a registered entry point, as Registration 19's population code does. ### Who chose what -- **The drafter** chose every design element in this comment: the orchestrating session, Claude Code, Opus 5.5. That covers: +- **The drafter** chose every design element in the draft of 4 October 2026: the orchestrating session, Claude Code, Opus 5.5. That covers: - the tests and their arms; - the cells and statistics; - the proposed multipliers; - the candidates and the adoption order; - the partition and bite rules; - the platform. -- **A second session** (Claude Code, Fable 5.2) added H-D on 11 November 2026, after Max ruled that the draft gain an administrative-donor candidate (d2712). It chose H-D's design and constants, its arm-E configurations, its place in the adoption order, and the sentence that states arm E's pass rule. +- **A second session** (Claude Code) added H-D on 11 November 2026, running on Fable 5.2, after Max ruled that the draft gain an administrative-donor candidate (d2712). On 25 November 2026, running on Opus 5.5, it revised H-D in answer to H-D's first review (below). It chose H-D's design and constants, its arm-E configurations, its rule for donor years before 1951, its place in the adoption order, the sentence that states arm E's pass rule, and the sentence that applies the same gating cells to every candidate. - **The independent referees** shaped it: the review rounds below changed the split, the candidates' freezing, gate 3's statistic and bite, and arm E's deployed configuration. - **Max's ruling** authorizes posting (d947, quoted above). He ratifies the multipliers at lock. @@ -437,24 +458,29 @@ The script and its output are `docs/plans/microcosm-start-evidence/frame_structu - Both referees read the frame-structure evidence and Registrations 13, 18 and 19. - Neither opened microdata or a sealed comparator file. -**Not seen.** +**Not seen by the drafter or the referees.** - No EPUF record and no PSID record. - No EPUF statistic under H1's new split. - No frame outcome. - No sealed comparator file listed in `EV/RESTRICTED-FILES.md`. -**The session that added H-D.** On 2026-11-11 it read: +**The session that added H-D.** Its departures record (`EV/microcosm-start-20261110/departures-20261111.md`) lists each read below that fell outside its brief, by path, blob and line range, with its coordinator's ruling where the coordinator made one. On 2026-11-11 it read: - this draft and the plan in full, including the plan's comparison of the frame's marital makeup with a MINT tabulation (Registration 19); -- the frame-structure evidence, and the hashes and manifests of the frame release; +- the frame-structure evidence: filtered lines of `frame_structure.txt` and the first 70 lines of `frame_structure.py`, both before its brief named those files. After its addendum 5 named them, it read lines 13 to 21 of `frame_structure.txt` (line 13 cut at 5,200 of its 6,057 characters) and lines 70 to 104 of `frame_structure.py`, the rest of that file. It also read the frame release's hashes and manifests, and its file's HDF5 metadata: each entity's row count and each field's name and dtype, with no value; - the docstrings and constants of the repository's EPUF and PSID readers, and the split definitions in `harness/epuf_fill_gate.py` and `harness/epuf_gate.py`; -- lines 2898, 5906 to 5935 and 5982 of `gates.yaml` (blob `6c1cf7674917d9ea40cee1f12cfac0729f8047b5`): the head of gate_epuf_fill's block and one line of its history. H-D takes nothing from them; -- a filtered listing of file names under `runs/`, and no file's contents; -- the titles of six Microcosm issues. Four state summaries of the frame. They cover its household and married-couple counts, the marital makeup of its people 65 and over beside a Census survey's, its Social Security beneficiary counts beside SSA's, and its count of people who hold all four benefit components. The third bears on W2's count cells. +- lines 2898, 5906 to 5935 and 5982 of `gates.yaml` (blob `6c1cf7674917d9ea40cee1f12cfac0729f8047b5`), including the head of gate_epuf_fill's block and one line of its history, and the names of that block's second-level keys within lines 5906 to 6400. Its coordinator ruled this a disclosed departure without an exposure, and H-D takes nothing from these lines; +- file names, and no file's contents: a listing under `runs/` filtered by three name patterns, which the coordinator ruled a disclosed departure, and listings under `docs/plans/` and `docs/amendments/`. H-D relies on none of the names; +- the titles of Microcosm issues 297, 880, 956, 1212, 1213 and 1214, and none of their bodies or labels, before its instructions set a labels-first step for issue 1212. Four titles summarize the frame: its household and married-couple counts, the marital makeup of its people 65 and over beside a Census survey's, its Social Security beneficiary counts beside SSA's, and its count of people who hold all four benefit components; +- two files in its own session store: its listing of peer sessions and its listing of sessions. + +On 2026-11-25 it read H-D's first review report, and the tool calls in its own session transcript to check this list. It also read the docstrings and column constants of `data/epuf.py`, `data/panels.py` and `data/family.py`, part of `data/family.py`'s wave-label table, and the function names and weight notes of `data/psid.py`. It checked by commit ids that pull request 515's merge sits on master, and checked with `git cat-file -e`, reading nothing, that `docs/amendments/gate_epuf_fill_registration_proposal.md` exists at the base. It saw no EPUF record, PSID record or frame record, no EPUF statistic under H1's split, and no sealed comparator file. +**Sealed rows in H-D's run.** No one has run H-D. When the registered run does, H-D's pool accessor will decode sealed persons' EPUF rows inside each chunk and drop them there, before any other step reads them (see H-D's pool accessor). No output, log or cache of the run holds them. + **Research lanes.** Five Subfleet research lanes were briefed (`~/reviews/microcosm-start-plan-20261004/briefs/`) and cancelled before they started, when every Codex lane was on hold. The drafter did that reading itself. **No forecast** is registered here. The second comment carries one for each candidate, written before the run. @@ -466,7 +492,8 @@ Independent of the drafter. Reports are in `~/reviews/microcosm-start-plan-20261 - **Round 1** (Subfleet lane, Opus 5.5; `review-r1.md`): CHANGES REQUIRED, with 3 blocking, 16 major and 19 minor findings. Each was answered (`response-r1.md`). - **Round 2** (Subfleet lane, Opus 5.5; `review-r2.md`): CHANGES REQUIRED, with 6 major findings (N1–N6) and 14 minor ones. Each was answered (`response-r2.md`). - **Round 3** (Subfleet lane, Opus 5.5; `review-r3.md`): APPROVE AFTER LISTED FIXES. Five findings were edited in (`response-r3.md`). A delta check of the changed lines follows: ``. -- **H-D's review** (Subfleet lane; independent of the session that added the candidate): ``. +- **H-D's review, round 1** (Subfleet lane, GPT-6.1 Sol; independent of the session that added the candidate; `EV/microcosm-start-20261110/job1-registration-h-d/review-r1/review-r1.md`): CHANGES REQUIRED, with 7 blocking, 5 major and 5 minor findings. The session that added H-D answered each in `response-r1.md` beside it. +- **H-D's review, round 2** (Subfleet lane, independent of the session that added the candidate): ``. ### What comes next diff --git a/docs/plans/microcosm-start.md b/docs/plans/microcosm-start.md index a23b8cc9d..8a3979c79 100644 --- a/docs/plans/microcosm-start.md +++ b/docs/plans/microcosm-start.md @@ -2,7 +2,7 @@ **Status:** proposal, 4 October 2026, revised after two rounds of independent review. Nothing in it has run. The tests it proposes are drafted as an issue #42 registration in [`microcosm-start-registration-draft.md`](microcosm-start-registration-draft.md). That draft is not posted; posting it waits for Max's go (decision d947). [Decisions needed](#decisions-needed) lists the calls. -**In one line:** the projections should start from the people in Microcosm's US population, the one PolicyEngine's model already runs on, with each person's past earnings matched from PSID donors and their income and wealth taken from Microcosm. Two new gates and two report-only checks, registered before any code exists, would decide whether each piece is fit to use. +**In one line:** the projections should start from the people in Microcosm's US population, the one PolicyEngine's model already runs on, with each person's past earnings matched from PSID donors or from SSA's earnings records, and their income and wealth taken from Microcosm. Two new gates and two report-only checks, registered before any code exists, would decide whether each piece is fit to use. A **gate**, in this repository, is a pass-or-fail test whose rules we publish before running it; a part of the model counts as tested only after it passes. A **report-only check** is published the same way, with no pass or fail. @@ -16,8 +16,8 @@ Microcosm Dynamics aims to follow a representative population of Americans throu - A QRF (quantile regression forest) chain that predicts each year from the next failed gate 1 because it forgets a person's history. Its correlation of log earnings ten years apart came out at 0.31 to 0.37, against 0.54 in the held-out PSID records and a pass band of ±0.07 (`runs/gate1_qrf_baseline_v1.json`). - QRF versions given a fixed effect for each person went the other way, at 0.62 to 0.67, and failed too. - A second candidate adds marital status to the match. A QRF using the predictors H1 can align across the frame and the PSID runs once as a registered comparison. - - A fourth candidate draws each career from SSA's earnings file, carries it forward from 2006 to the start year, and lets the PSID decide which kind of career a person draws. - - Years the PSID cannot supply, such as before 1968 and the odd years after 1996, come from fills learned on SSA's earnings file once that gate locks. + - A fourth candidate, H-D, draws careers from SSA's earnings file and shifts them forward 18 years, from 2006 to the start year. It estimates from the PSID which kind of recent career each person draws. + - For the three candidates with PSID donors, years the PSID cannot supply, such as before 1968 and the odd years after 1996, come from fills learned on SSA's earnings file once that gate locks. - **Income and wealth.** They come from Microcosm, not the PSID. In the first version each item grows with the projection's assumptions, and each person or household keeps its rank within its age group as it ages. A report-only check against the PSID's wealth panels measures how well that works. The two projection tests that exist today use no non-wage income or wealth at all. Only the static 13 percent cut test does, and the illustrative households set theirs by hand. - **New tests.** - **H1 (gate)** scores histories against careers no candidate has seen, in SSA's records and in the PSID. @@ -25,7 +25,7 @@ Microcosm Dynamics aims to follow a representative population of Americans throu - **W2 (report-only)** checks the starting population against SSA's published counts and averages. - **A1 (report-only)** reports how well income and wealth age. - The draft registration fixes their held-out data, cells, pass rules, H1's four candidates and the rule for adopting one, all before anything is built. + The draft registration fixes their held-out data, cells and pass rules, H1's four candidates and the order for adopting one, before anyone builds them. - **What comes first.** Two pieces of open work feed this one: - the fills learned on SSA's earnings file (gate_epuf_fill; Max ratified its tolerance on 10 October, d927, and its lock and candidates await pull requests #515 and #516); - forward earnings in the projections (Track B: Max ruled d765, d781, d782 and d1342 on 11 October, B1 v2 passed that day, and B2 awaits the B0.1 addendum's merge, #505, and its own registration). @@ -167,7 +167,7 @@ Two QRF designs with a person effect overshot, and the structural one, which als ### 1.4 The recommended design -Use rank-kNN as the primary method, and let H1 decide among it, a version matched on marital status, a candidate whose donors are SSA's own earnings records, and a QRF with the predictors H1 can align across the two data sets. The four are frozen together in the registration, run once together, and adopted by a rule fixed in advance (H-A if it passes, else H-B, else H-D, else H-C). +Use rank-kNN as the primary method. H1 tests it alongside marital-stratified rank-kNN, administrative donors from SSA's earnings records, and a QRF with the predictors the PSID and the frame share. We register all four before the run. The harness scores them together once, and we adopt the first that passes, in the order H-A, H-B, H-D, H-C. Why rank-kNN first: @@ -180,23 +180,23 @@ Its weakness is short-lag over-persistence (section 1.3), which H1 checks with t What has to be added, each as a registered change: -- **Anchor convention.** Records come from income years 2022, 2023 and 2024 on the CPS channel, and from the 2015 IRS file uprated on the PUF channel, which holds 58 percent of the weight in Registration 19's frame (`frame_structure.txt`). This plan has not established whether Microcosm carries the 2022 and 2023 amounts to 2024 dollars; `us_runtime/asec_pool.py` pools weights and population and shows no uprating step. So every record is ranked within its source year, channel, sex and five-year age band. That makes the rank independent of the dollar year on each channel: PUF-channel records also carry a source year of 2022–2024 (`frame_structure.txt`), and their amounts may be dated differently from the CPS records'. The rank is then applied in the PSID's 2022 cell. +- **Anchor convention.** Records come from income years 2022, 2023 and 2024 on the CPS channel, and from the 2015 IRS file uprated on the PUF channel, which holds 58 percent of the weight in Registration 19's frame (`frame_structure.txt`). This plan has not established whether Microcosm carries the 2022 and 2023 amounts to 2024 dollars; `us_runtime/asec_pool.py` pools weights and population and shows no uprating step. So every record is ranked within its source year, channel, sex and five-year age band. That makes the rank independent of the dollar year on each channel: PUF-channel records also carry a source year of 2022–2024 (`frame_structure.txt`), and their amounts may be dated differently from the CPS records'. H-A, H-B and H-C then apply the rank in the PSID's 2022 cell. H-D ranks earners only, within the same groups, and matches the rank to EPUF donors' earnings ranks in 2006. - A PUF clone and its CPS source record are separate weighted records. Each gets its own independent history draw. - - H1's SSA arm scores the same kind of transfer, from an administrative cross-section into the PSID's 2006 cell. It cannot score the CPS and PUF transfer itself, so W2 reports the frame's earnings distributions beside the PSID's by source year and channel. + - For H-A, H-B and H-C, H1's SSA arm scores the same kind of transfer, from an administrative cross-section into the PSID's 2006 cell. It cannot score the CPS and PUF transfer itself, so W2 reports the frame's earnings distributions beside the PSID's by source year and channel. - **Sex-specific earnings distributions.** Gate 1 fits one distribution per age band and year for both sexes. Gate w1's third candidate split the interior bands by sex and found no collateral damage (`models/transport_deployment_v3.py:34-43`). Histories for the frame do the same. -- **Ages and years outside gate 1's range.** Gate 1 scores ages 25 to 59 and income years 1998 to 2022 (`gates.yaml:50-58`). A frame person who is 70 in the start year has a career that began around 1976. Years 1968–1996 are annual in the PSID, and the generator steps one year at a time there. H1 scores whole careers, so it covers this extension. -- **Covered, capped earnings.** PSID labor income is converted to a share of each year's wage base and capped at 1, the step gate_epuf_fill defines (`docs/amendments/gate_epuf_fill_registration_proposal.md`, section 3, on branch `epuf-career-fill-20261003`). +- **Ages and years outside gate 1's range.** Gate 1 scores ages 25 to 59 and income years 1998 to 2022 (`gates.yaml:50-58`). A frame person who is 70 in the start year has a career that began around 1976. Years 1968–1996 are annual in the PSID, and the generator steps one year at a time there. H1 scores whole careers, so it covers this extension for every candidate. All four candidates face the same gating cells, which reach age 69 in H1's SSA arm. Where a donor year falls before 1951, H-D reads the donor's 1951 position. +- **Covered, capped earnings.** PSID labor income is converted to a share of each year's wage base and capped at 1, the step gate_epuf_fill defines (`docs/amendments/gate_epuf_fill_registration_proposal.md`, section 3, on master). - Work outside Social Security coverage is a separate gap. The repository has a draft design that would classify each person-year's earnings as covered wages, covered self-employment, uncovered or unresolved (`docs/design/covered_earnings_correction.md`, draft revision 2, which authorizes no implementation). - Until it lands, histories treat all labor income as covered up to the wage base, as the PSID projection does. **The three other candidates:** - **Rank-kNN with marital strata (H-B).** It restricts donors to the person's sex and marital group, and adds no other constant. Education would join by amendment once the frame carries it (section 5.4). -- **Administrative donors (H-D).** It draws each career from an EPUF person of the same sex and age, matched on rank in the file's last year, 2006. It then carries the career forward by the gap between that year and the start year, which is 18 years for a 2024 frame. - - **Why try it.** EPUF records the benefit formula's own earnings concept for every year from 1951, for 4.4 million people against the PSID's 9,152 families. For the years the file covers, H-D needs no fill and no conversion from labor income to covered earnings. - - **What it takes from the PSID.** Earnings levels for the years after 2006, and a tilt by marital status and disability that decides which kind of career a person draws, since EPUF records neither. - - **Its risk.** A donor is 18 years older than the person who draws the career. H-D carries the donor's rank in each year into the person's own cohort, and leaves the donor's dollars behind. H1 tests that bridge twice: on EPUF, by cutting the donor file at 1988 and rebuilding careers observed in 2006, and on the PSID, from donors observed in 2006 to people observed in 2022. - - **Where it sits.** Third in the order. Gate 1's pass supports H-A and H-B, and no gate has scored H-D. H-C stays last, as the registered answer to "why not a QRF?". +- **Administrative donors (H-D).** H-D matches each person to EPUF donors by sex, age and earnings rank in 2006. For the 2024 frame, it shifts the donor's career forward 18 years and takes each year's earnings level from the person's own cohort. + - **Why try it.** EPUF records covered, capped annual earnings from 1951, the concept the benefit formula reads. It samples 1 percent of Social Security numbers, 4.4 million people, and H-D's donor pool holds about 48 percent of them. For the years the file covers, H-D needs no fill and no conversion from labor income to covered earnings. + - **What it takes from the PSID.** H-D takes earnings levels after 2006 from the PSID. It also estimates from the PSID, by marital status and disability, which kind of recent career a person draws, because EPUF records neither. + - **Its risk.** H-D draws a donor born 18 years before the person. It carries the donor's rank in each year into the person's own cohort and leaves the donor's dollars behind. In arm E, H-D truncates donor careers at 1988 and reconstructs careers observed in 2006. Arm P tests a 16-year transfer from 2006 to 2022. + - **Where it sits.** We place H-D third in the order. Gate 1 passed rank-kNN, which supplies H-A's method and H-B's base; no gate has tested H-B's marital restriction or H-D. We place H-D ahead of H-C because H-D takes each career's whole path of ranks from SSA's records, while H-C rebuilds each career backward one year at a time, the structure of gate 1's failed QRF chain. We adopt H-C only if H-A, H-B and H-D fail H1. - **QRF with the predictors H1 can align across the PSID and the frame (H-C).** It uses age, sex, anchor-year earnings, marital status, disability, hours and self-employment. - It runs once as a registered comparison, so the answer to "why not a QRF?" rests on a scored run on the same held-out data. - Occupation and class of worker are left out because their codes differ across the PSID's years and the frame. @@ -206,7 +206,7 @@ What has to be added, each as a registered change: The career assembler fills two kinds of gap with fixed rules: each odd year after 1996 is the mean of its neighbors, and nothing counts before 1968 or before age 22, whichever is later (`docs/amendments/gate_epuf_fill_registration_proposal.md`, "What this gate is, in plain words"). Max approved the direction of learning replacements on EPUF on 3 October: "at a minimum seems like we could use it to improve the odd-year filling, we're overstating that form of persistence with our current method" (same document). Gate_epuf_fill scores those fills on EPUF people no fill has seen. Max ratified its tolerance on 10 October (d927); its lock is in pull request #515, and #516 adds the candidates. -Frame histories use whichever fills gate_epuf_fill certifies. If none is certified, they use the current rules and carry that label. For people born before 1946, whose careers began before 1968, the pre-1968 fill carries much of the career, and H1 reports its cells by birth cohort so that shows. +Under H-A, H-B and H-C, frame histories use whichever fills gate_epuf_fill certifies, and H-D uses its own registered rules for the years EPUF lacks. If none is certified, they use the current rules and carry that label. For people born before 1946, whose careers began before 1968, the pre-1968 fill carries much of the career, and H1 reports its cells by birth cohort so that shows. ### 1.6 People already receiving benefits @@ -225,7 +225,7 @@ The inference has limits. W2 names each, and counts the records it touches where - **WEP and GPO.** Benefits for income years 2022–2024 can reflect the windfall elimination provision and government pension offset. The Social Security Fairness Act repealed both for benefits after December 2023. - **Synthetic splits.** Registration 19 found that 16.9 percent of the frame's beneficiaries, by weight, carry a fixed-proportion split across all four Social Security components from the PUF channel. For them the benefit type is not observed. -W2 checks inferred PIAs against SSA's published average PIA by age and sex for retired workers (Annual Statistical Supplement, Table 5.B1). When a beneficiary needs a history for grouping (lifetime earnings quintiles, as MINT reports), it is generated with the inferred PIA's rank as the anchor in place of current earnings. Those histories do not change the beneficiary's benefit. +W2 checks inferred PIAs against SSA's published average PIA by age and sex for retired workers (Annual Statistical Supplement, Table 5.B1). When a beneficiary needs a history for grouping (lifetime earnings quintiles, as MINT reports), it is generated with the inferred PIA's rank as the anchor in place of current earnings. H-D matches that rank to donors ranked by `PIAx` in the donor file's last year. Those histories do not change the beneficiary's benefit. ### 1.7 Couples @@ -345,15 +345,15 @@ The **effective sample size** (Kish) is the number of equally weighted people a Each test is drafted in full in the [draft registration](microcosm-start-registration-draft.md). In short: - **H1, earnings histories for a cross-section (gate).** Can a method, given only what the frame observes in one year, produce careers that look like real ones? - - **The SSA arm.** It hides every year of EPUF careers except 2006 and rebuilds them from 2006 earnings, sex and birth year, the way the plan deploys: PSID donors matched by rank, years the PSID lacks filled by gate_epuf_fill's certified procedure refit on H1's own training part, and conversion to capped shares of the wage base. It scores the rebuilt careers on people nothing learned from. The split is new, salted differently from gate_epuf_fill's, so it does not reuse a test set that gate will have published. A report-only configuration with EPUF donors shows how much of any miss comes from the PSID itself. H1 scores H-D with its donor file cut at 1988, so that it bridges the 18 years the frame asks of it. + - **The SSA arm.** It hides every year of EPUF careers except 2006 and rebuilds them from 2006 earnings, sex and birth year, the way the plan deploys each candidate. For H-A, H-B and H-C that means PSID donors matched by rank, years the PSID lacks filled by gate_epuf_fill's certified procedure refit on H1's own training part, and conversion to capped shares of the wage base. It scores the rebuilt careers on people nothing learned from. The split is new, salted differently from gate_epuf_fill's, so it does not reuse a test set that gate will have published. A report-only configuration with EPUF donors shows how much of any miss comes from the PSID itself. For H-D, the accessor truncates donor careers at 1988, and H1 scores their transfer to 2006 with the frame's 18-year offset. - **Cells:** what the benefit formula reads, by sex and age: the distribution of top-35-year indexed earnings, the share of years with no earnings, the share at the taxable maximum, insured status, and the correlations of the anchor year with the career and with years two, four and ten earlier. - - **What a pass certifies:** the deployed procedure on SSA's records and on the PSID, but not the transfer of ranks from CPS or PUF records, which W2 reports. + - **What a pass certifies:** the parts of each candidate's deployed procedure that the SSA arm and the PSID arm score. The registration lists the parts of H-D that only the frame uses. No pass certifies the transfer of ranks from CPS or PUF records, which W2 reports. - **Tolerance:** the sampling error the frame itself carries in each cell. A method passes only if its error is no larger than what the frame's own sample would introduce. - **The PSID arm.** It does the same on PSID families held out by new splits, from 2022 earnings, age, sex, marital status, disability, hours and self-employment. - **Cells:** the same features, plus cells by marital status and disability and the couple cells of section 1.7. Reported only: cells by education, which show what leaving education out costs, and the agreement of the forward law's `u_w` between real and generated histories. - **Tolerance:** from pairs of real held-out-size samples, the way gate 1 prices its geometry thresholds. - **Disclosure:** gate 1 selected rank-kNN on these same people, and gate_epuf_fill selected its fill procedure on EPUF people who overlap the SSA arm's test set. The registration says both. - - **Candidates.** All four are frozen in the registration, scored in one run, and adopted by the rule in section 1.4. + - **Candidates.** We register all four before the harness scores them in one run, and adopt the first that passes, in the order section 1.4 gives. - **Gate 3, the first projected year (gate).** Project the frame one year forward. Score the projection's growth in retired- and disabled-worker counts and average benefits, measured as the frame measures them, against the growth in SSA's December figures. Comparing growth cancels the stable part of the gap between the frame's concept and SSA's. It does not cancel errors in the frame's makeup that change deaths, widowhood or claims, which gate 3 scores along with the engine. The cells are fixed now, and the partition comes from the start-year frame alone. Gate 3 locks separately from H1, after the engine exists and engines with no mortality or no new awards fail on an invented frame. - **W2, the starting population against SSA's records (report-only).** Do the frame's beneficiaries, with their inferred PIAs, match SSA's December counts and averages for the start year by type, age and sex? These are Annual Statistical Supplement tables 5.B1, 5.D1 and 5.G1; the evidence folder holds a capture of the 2023 edition (`~/microcosm-launch-evidence/dynasim-parity-20260909/ssa-supplement-2023/`). Microcosm calibrates Social Security dollars by type but not beneficiary counts (Registration 19), so counts and average PIAs are held out. - **A1, income and wealth aging (report-only).** Apply section 2.3's rule to PSID families' wealth and income at one wave, and compare with what the PSID recorded four years later, by age band. @@ -398,7 +398,7 @@ Comparing them is therefore a reported differential (task T13), not a property. ### 4.1 What has to land first -- **gate_epuf_fill.** Max ratified its tolerance on 10 October (d927). Next come its lock, then pull request #516's candidates and the one reading of its test data. Frame histories use the fills it certifies (section 1.5). H1's registered run waits for that verdict, because H1's deployed configuration uses the certified fill procedure (or the current rules, if none is certified), refit on H1's own training part. The frame itself uses gate_epuf_fill's own fit. +- **gate_epuf_fill.** Max ratified its tolerance on 10 October (d927). Next come its lock, then pull request #516's candidates and the one reading of its test data. Under H-A, H-B and H-C, frame histories use the fills it certifies (section 1.5). H1's registered run waits for that verdict, because H1's deployed configuration uses the certified fill procedure (or the current rules, if none is certified), refit on H1's own training part. The frame itself uses gate_epuf_fill's own fit. - **Track B.** Max ruled on B2's design on 11 October (d765, d781, d782 and d1342), and B1 v2, which B2 needs, passed that day. Next come the B0.1 addendum's merge (#505), B2's registration, then forward earnings in the projections (months 2 to 5), then a refit of the law at a 2024 boundary with its own gate (section 1.8). The history work (tasks T1 to T7 below) does not wait for Track B; any real-data projection from the frame does. - **Pull request #512**, which makes the 2026 Trustees Report and CBO's 2026 projections selectable as the projection's baseline, merged on 4 October 2026 (`ff3fe306`). A 2024 start needs one of them. The 2008 Trustees path that the DYNASIM3 tests use stops at 2030 and predates every year the frame describes (Registration 18). - **Four requests to Microcosm** (sections 5.1 and 5.4):