Skip to content

aa: use ||S||·||Y|| for type-II regularization#53

Open
bodono wants to merge 2 commits into
masterfrom
aa-symmetric-regularization
Open

aa: use ||S||·||Y|| for type-II regularization#53
bodono wants to merge 2 commits into
masterfrom
aa-symmetric-regularization

Conversation

@bodono
Copy link
Copy Markdown
Member

@bodono bodono commented May 14, 2026

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:

  • type-II `last_regularization ≈ 1e-15` (underflowed)
  • type-II `last_aa_norm ≈ 700` (γ blew up)
  • type-I `last_regularization ≈ 1e-12` (one-axis healthier)
  • type-I `last_aa_norm ≈ 12` (γ bounded)

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

  • `make test` passes all 34 existing tests
  • Verified on Maros-Meszaros + netlib LP/QP problems: type-II improvements on a subset, no regressions on previously-working problems

🤖 Generated with Claude Code

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>
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>
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