Skip to content

Fix calibration: AGI-conditional geography + relative loss#671

Open
baogorek wants to merge 2 commits intomainfrom
fix/pipeline-resilience
Open

Fix calibration: AGI-conditional geography + relative loss#671
baogorek wants to merge 2 commits intomainfrom
fix/pipeline-resilience

Conversation

@baogorek
Copy link
Copy Markdown
Collaborator

Summary

  • AGI-conditional geographic assignment: Route top-10% AGI households to congressional districts proportional to CD AGI targets instead of uniform random. Prevents optimizer from zeroing extreme-income records in low-AGI districts (which was destroying population targets).
  • Revert loss to "relative": Restores AGI gradient signal that "capped_relative" (commit 1c47b20) was clipping.
  • Includes prior pipeline resilience, SOI target refresh, and mortgage interest support work from the branch.

Results (epoch 1000)

  • Population: 337.89M vs 340.11M target (-0.65% error)
  • AGI: $15.70T vs $15.89T target (-1.25% error)

Test plan

  • Verify correlation between extreme-record count and CD AGI target is strongly positive
  • Confirm AGI converges toward $15.8T national target
  • Confirm population stays near 340M
  • Spot-check high-AGI CDs (Manhattan, Silicon Valley) have more extreme records than low-AGI CDs

🤖 Generated with Claude Code

baogorek and others added 2 commits March 29, 2026 19:10
…rgets

- Switch loss_type from "relative" to "capped_relative" in L0 optimizer.
  Caps relative error at ±10 (max loss 100 per target) to prevent extreme
  PUF-inflated targets from hijacking gradients.
- Disable state_income_tax targets: ETL hardcodes $0 for WA and NH, but
  PolicyEngine computes non-zero tax (WA capital gains, NH interest/dividends).
  The $0 targets produced catastrophic loss crushing WA/NH weights to zero.
- Enable district AGI, AGI bins, and JCT reform targets in config.
- Result: 15,900 targets, median error 0.6% at epoch 500.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Route top-10% AGI households to congressional districts proportional
to CD AGI targets instead of uniform random assignment. This prevents
the optimizer from having to zero out extreme-income records in
low-AGI districts, which was destroying population targets.

Also reverts loss_type from "capped_relative" back to "relative"
to restore AGI gradient signal.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant