Skip to content

Add the Becker–LeCun estimate of the Hessian diagonal - #75

Merged
timholy merged 1 commit into
mainfrom
teh/blc
Nov 14, 2026
Merged

timholy merged 1 commit into
mainfrom
teh/blc

Conversation

@timholy

@timholy timholy commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

becker_lecun(t, outidx) and becker_lecun(f, x0) compute the gradient and the Becker–LeCun estimate of diag(H) in one reverse sweep beside the adjoints, returning a BeckerLeCunEstimate. The estimate is signed and its magnitude is not guaranteed to bound the diagonal.

With exactness=true, a second sweep tracks the structural sparsity of the edge-pushing matrix V (Gower and Mello, 2012) and certifies, per input, that no dropped term 2 (∂v_ℓ/∂v_p) V[ℓ,p] can reach that input's diagonal entry. The check is conservative; its cost grows with the number of structurally nonzero entries of V, so it runs only on request. On interval tapes, certified entries enclose H[i,i] over the box.

A tape with a declared sub-map is refused, since it records no signed second partials.

Assisted-by: Claude Opus 5.5 noreply@anthropic.com

`becker_lecun(t, outidx)` and `becker_lecun(f, x0)` compute the gradient
and the Becker–LeCun estimate of diag(H) in one reverse sweep beside the
adjoints, returning a `BeckerLeCunEstimate`. The estimate is signed and
not guaranteed to bound the diagonal.

With `exactness=true`, a second sweep tracks the structural sparsity of
the edge-pushing matrix V (Gower and Mello, 2012) and certifies, per
input, that no dropped term `2 (∂v_ℓ/∂v_p) V[ℓ,p]` can reach that
input's diagonal entry. The check is conservative; its cost grows with
the number of structurally nonzero entries of V, so it runs only on
request. On interval tapes, certified entries enclose H[i,i] over the
box.

A tape with a declared sub-map is refused, since it records no signed
second partials.

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
@timholy
timholy merged commit 8c0923a into main Nov 14, 2026
9 checks passed
@timholy
timholy deleted the teh/blc branch November 14, 2026 20:22
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