Skip to content

Constrain certified cross-term gauge directions out of the solve space (#297) - #312

Open
schroedk wants to merge 1 commit into
design/caller-label-layoutfrom
feat/297-gauge-constraint
Open

Constrain certified cross-term gauge directions out of the solve space (#297)#312
schroedk wants to merge 1 commit into
design/caller-label-layoutfrom
feat/297-gauge-constraint

Conversation

@schroedk

@schroedk schroedk commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Closes part of #297 (goals 1 and 4; see below for 2 and 3). Stacked on #316.

A slope covariate another term reproduces per level puts an exact null in the design. The collinearity screen already finds it; here its warnings become proposals. After whitening, SlopeReparam builds a NullSpace — the one description of what the solve excludes: whitening's dropped columns plus the cross-term rows. Each proposal's direction is the per-level fit Aᵀc / diag(AᵀA) on its own term minus the fit on the other, net of the constant both share; the proposals are orthonormalized (pivoted, so a duplicate is spent against the row it duplicates) and each row n is certified by the backward error ‖An‖ ≤ 1e-11·√(nᵀdiag(AᵀA)n). Certified rows are projected out of the preconditioner apply (P M⁻¹ P); every warning records an AliasVerdict saying whether its direction was constrained or kept.

The LSMR audit measured Aᵀr in the preconditioner's metric, which cannot see a component in ker(M⁻¹) — exactly what the projector creates — so it now also requires the plain ‖Aᵀr‖ to have dropped.

Measured, 200k worker/firm/year panel, slope covariate = the year index, spectral floor off:

λmax(M⁻¹) iters converged max group mean
unconstrained 3.859e12 929 no 2.83
constrained 2.44 34 yes 1.7e-12
ridge 1e-10, unconstrained 2.036e6 34 yes 2.1e-12

Inert where the screen is silent (bit-identical), and declined where the direction carries information (near_collinear: λmax 1.2e8 kept, honest at ridge 0). The verdict is independent of the preconditioner and of a uniform weight scale.

Not in this PR:

@schroedk
schroedk force-pushed the feat/297-gauge-constraint branch from 4b97d1c to 14f958d Compare August 25, 2026 13:15
@schroedk
schroedk changed the base branch from main to design/caller-label-layout August 25, 2026 13:15
…the solve space (#297)

The collinearity screen proposes directions; a backward-error test on the
orthonormal basis certifies which are null; certified rows leave the solve
space via P M⁻¹ P. NullSpace, owned by SlopeReparam, is the one description of
what the solve excludes (whitening's drops and the certified rows), and each
warning records its AliasVerdict. The LSMR audit also checks the plain-metric
‖Aᵀr‖ so a singular M⁻¹ cannot hide a component.
@schroedk
schroedk force-pushed the feat/297-gauge-constraint branch from 14f958d to 130c848 Compare August 25, 2026 14:00
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