Skip to content

prompt: regularization JAX gradient gaps — leg 2 re-derived and shipped - #169

Merged
Jammy2211 merged 2 commits into
mainfrom
claude/automind-task-planning-gm4flt
Aug 9, 2026
Merged

prompt: regularization JAX gradient gaps — leg 2 re-derived and shipped#169
Jammy2211 merged 2 commits into
mainfrom
claude/automind-task-planning-gm4flt

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Mind bookkeeping for PyAutoLabs/PyAutoArray#437.

Why this touches the prompt at all

The prompt's leg 2 was written before PyAutoArray#391 landed and had gone stale in three ways. Re-checked against source (efaf3041) rather than assumed:

  • log det H implicit — already shipped. Present on all four kernel schemes behind log_det_method == "slogdet". Nothing was owed.
  • jitter as a kwarg — already shipped. Only the scaling was outstanding.
  • "keep H implicit" in general — not achievable. curvature_reg_matrix is a dense F + H feeding the dense solve for the reconstruction, so H is still formed there. Only the evidence terms can avoid the explicit inverse. Recorded so it isn't re-opened without an iterative-solver design first.

Starting dev on the prompt as written would have burned a session rediscovering all three.

What shipped

Both remaining legs, in PyAutoArray#437:

  • 2as^T H s from one Cholesky solve. Measured 5.99e-08 → 2.93e-16 relative error at cond(C) = 3.2e9, confirming this prompt's own ~1e-6..4e-5 noise-floor measurement was the explicit inverse.
  • 2b — relative jitter. Investigation found the prompt's "cheaper interim" framing understated it: at inner=0.1/outer=100 the fixed absolute jitter is 100% of the faintest pixel's variance, and those are free model parameters, so a sampler can reach that regime mid-fit.

The record also keeps one rejected design (jitter = N*eps*max(diag), which pushed cond(C) to 3.2e15) so it isn't retried.

Sizing note

Difficulty: mediumsmall. The Feature Agent scored this prompt too-large and proposed a four-phase split, but that was an artefact of prompt length — the file is long because legs 1 and 3 carry their completion records inline. The actual open work was one leg in one library repo.

lifecycle.py check OK. This prompt now has no open work and is ready to advance to complete/ once #437 merges.


Generated by Claude Code

claude added 2 commits August 9, 2026 17:34
The leg 2 remedies were written before PyAutoArray#391 landed and had gone
stale in three ways. Re-checked against source rather than assumed:

- `log det H` implicit: ALREADY SHIPPED on all four kernel schemes behind
  `log_det_method == "slogdet"`. Nothing owed.
- jitter as a kwarg: ALREADY SHIPPED. Only the scaling is missing — split out
  as leg 2b, its own task, since it moves a numerical default.
- "keep H implicit" in general: NOT ACHIEVABLE. `curvature_reg_matrix` is a
  dense `F + H` feeding the dense solve, so H is still formed there. Recorded
  so it is not re-opened without an iterative-solver design.

Leg 2a (`s^T H s` via one Cholesky solve) was the one genuinely open piece and
is now shipped on `claude/automind-task-planning-gm4flt` in PyAutoArray, behind
a new opt-in `Settings.regularization_term_method`. Measured 5.99e-08 ->
2.93e-16 relative error at cond(C) = 3.2e9, confirming this prompt's noise-floor
measurement was the explicit inverse.

Difficulty medium -> small: only leg 2b remains.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KazMzMZYPLfaZoYQ79YQ8Q
Investigation found the prompt's "cheaper interim" framing understated the
problem. The fixed absolute 1e-8 jitter assumes diag(C) ~ 1, true for the three
unweighted kernels but not MaternAdaptKernel, whose C_ii = w_i^2 spans the
adaptive-weight range. At inner=0.1/outer=100 the jitter is 100% of the faintest
pixel's variance — and those coefficients are free model parameters, so a
sampler can reach that regime mid-fit, silently.

Fixed by an opt-in correlation-relative jitter. Records the rejected
N*eps*max(diag) rule, which fixed distortion but pushed cond(C) to 3.2e15.

Both legs of this prompt are now shipped; it is ready to advance to complete/
once the PyAutoArray branch merges. The JAX leg of the gate remains owed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KazMzMZYPLfaZoYQ79YQ8Q
@Jammy2211
Jammy2211 merged commit 8499ecd into main Aug 9, 2026
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.

2 participants