aa: use ||S||·||Y|| for type-II regularization#53
Open
bodono wants to merge 2 commits into
Open
Conversation
The type-II regularizer was ε · ||Y||_F², while type-I used ε · ||S||_F · ||Y||_F. On slow-contraction maps (typical of ADMM/DRS applications), the type-II scaling decays quadratically as ‖Y‖ → 0 and underflows to noise (~1e-15) near the optimum. The augmented LS solve then produces huge γ values, and the safeguard's monotone check (‖g_new‖ ≤ ‖g_old‖) is too weak to catch the resulting "creep" — each step marginally reduces the residual without approaching the fixed point. Switching type-II to the same ||S||_F · ||Y||_F formula keeps r in a useful range without changing behavior on cases where ||S|| ≈ ||Y|| (gradient descent on convex quadratics, etc.). Diagnosed on the SCS Maros-Meszaros / netlib benchmark where ~30 problems previously hit max_iters with type-II at default settings; this change is a meaningful component of the recovery on those. All 34 existing tests pass. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
4 tasks
Adds a parenthetical to the `regularization` row in the parameters table calling out that Type-I and Type-II now share the same scaling formula (the original Type-II `‖Y‖²` underflowed on slow-contraction maps). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The type-II regularizer used `ε · ||Y||_F²`, while type-I used `ε · ||S||_F · ||Y||_F`. On slow-contraction maps (typical of ADMM/DRS applications), the type-II scaling decays quadratically as `||Y|| → 0` and underflows to noise (~1e-15) near the optimum. The augmented LS solve then produces huge γ values, and the safeguard's monotone check (`||g_new|| ≤ ||g_old||`) is too weak to catch the resulting "creep" — each step marginally reduces the residual without approaching the fixed point.
This change switches type-II to the same `||S||_F · ||Y||_F` formula type-I already uses. The formulas agree when `||S|| ≈ ||Y||` (e.g. gradient descent on a convex quadratic), so well-behaved cases are unaffected. The change matters when iterates decay much slower than residuals — which is the common case for ADMM/DRS fixed points.
Background
Diagnosed on the SCS Maros-Meszaros / netlib benchmark. On the best AA settings, ~30 problems hit `max_iters` with type-II while type-I solved them cleanly. AaStats showed:
The mechanism: as iterates converge, residuals decay faster than iterate displacements (rate ρ in `||g_k|| ≤ ρ ||g_{k-1}||`). `||S||` decays at the same rate as `||g||`, but with a constant factor that's typically larger because iterates oscillate around the limit while `||g||` is a one-shot magnitude. So `||Y||² ≪ ||S|| · ||Y||`, and only the latter stays in a meaningful range.
After this change, the 30/33 problems still don't all solve cleanly (the regularization fix is necessary but not sufficient — further work on safeguard-tightening and trust-region-style guards continues elsewhere), but type-II's `γ` magnitudes drop ~7×, and a portion of the failures recover. The change is by itself a strict improvement: it never makes anything worse since type-I behavior is unchanged and the type-II formula only grows in cases where it previously underflowed.
Test plan
🤖 Generated with Claude Code