Repository navigation
Smith series tolerance of the truncated pullbacks scaling like ΔA - #328
Conversation
…ht-hand side (stein_rtol) instead of degeneracy_atol Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
... and 14 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…e largest entry of each cotangent
Jutho
left a comment
There was a problem hiding this comment.
Aside for one more suggestion, approvid.
|
Not sure if the test failures are caused by this PR. There seem to be some |
|
I think this caused an actual NaN failure in the Enzyme tests, so I'll have to sort that out first. |
…res storage with A
|
Switching all pullback defaults to I added the same |
|
Seems reasonable to me. On a separate PR we should make that more generic in its own function. |
svd_trunc_pullback!,eigh_trunc_pullback!andeig_trunc_pullback!stop the Smith series for the part outside the kept vectors once its terms drop belowdegeneracy_atol. That tolerance scales like the singular values or eigenvalues, while the terms scale likeΔA, i.e. inversely with them. The result therefore depends on the scale ofA: forAscaled by 2^20 or more, the series stops after too few terms andΔAis off by 1e-3 (svd, eigh) up to 2e-1 (eig) on the reproducer below.This PR adds a keyword
complement_atolto the three pullbacks. Its default,default_pullback_complement_atol, iseps(T)^(3/4)times the largest entry of the cotangents that scale likeΔA:ΔDandΔV ./ transpose(D)(eig, eigh), orΔS,ΔU ./ transpose(S)andΔVᴴ ./ S(svd). The pullbacks then scale exactly withA, with errors of 1e-15 (eig: 5e-12) at every scale.Reproducer
c ΔA(c A)against the full pullback atA, withca power of two so the factors scale exactly (ΔS / cforc A), for spectra with kept values in [1, 10] and discarded ones at most 0.5 (mainagainst this PR, Julia 1.12):🤖 Generated with Claude Code