Skip to content
This repository was archived by the owner on Jul 7, 2026. It is now read-only.
This repository was archived by the owner on Jul 7, 2026. It is now read-only.

arch-calibrated RC crashes: microcalibrate non-finite loss on negative/tiny-support Arch targets #210

Description

@MaxGhenis

arch-calibrated RC crashes: microcalibrate non-finite loss on negative / tiny-support Arch targets

The arch_calibrated recalibration (microcalibrate backend, Arch NIPA+SOI targets from #200, from the post-imputation checkpoint) crashes:

ValueError: Relative error contains non-finite values (NaN or Inf).
Check the inputs: targets near -1, zero initial weights, or Inf/NaN from the estimate function.
  microcalibrate/utils/metrics.py:44 in loss

(artifacts ..._arch_calibrated_ce1e1b9_20260604/logs/recalibrate_microcalibrate_arch_from_post_imputation...log)

Cause

Many Arch targets are large negative values at ~0.01% support — the log warns on dozens, e.g.:

  • arch_target_5075 = -6.74e8, arch_target_4913 = -1.57e9, arch_target_5111 = -2.67e9, arch_target_4697 = -3.12e9 — each "supported by only 0.01% of records", initial estimate ~-1e5 (3–5 orders of magnitude off).

These are signed income-loss components (net capital losses, partnership/farm/rental losses — #209 added signed rental/farm income). microcalibrate's loss is (estimate - target)/target, which is non-finite for negative / near-zero / tiny-support targets (the "targets near -1" hint, after normalization).

Fix (any one unblocks the arch-calibrated RC → promotion)

  1. Exclude tiny-support targets (e.g. support < ~0.5%) and/or negative-loss targets from the microcalibrate set — they're statistically unstable at 0.01% support regardless (microcalibrate already warns). Likely a --min-support / target-filter in the arch-recalibrate CLI.
  2. Make microcalibrate's loss sign-robust — normalize by max(|target|, floor) or use abs/Huber on the relative error instead of dividing by a signed/near-zero target.
  3. Route signed income-loss aggregates through entropy (handles them; the prior RCs did) or keep them audit-only, calibrating only positive/magnitude aggregates.

Status

ce1e1b9 crashed; 8fe13c9 fell back to backend=entropy. No build running. Last good artifacts: the collapse-entropy RC + merged dividend #202 + prior-year #204. Detail in mp-ecps loop journal iter86.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions