feat(strategy): nystrom captures 3 subspaces, not 4 (drop redundant col(B) landmark block)#226
Draft
RenzoMXD wants to merge 1 commit into
Draft
feat(strategy): nystrom captures 3 subspaces, not 4 (drop redundant col(B) landmark block)#226RenzoMXD wants to merge 1 commit into
RenzoMXD wants to merge 1 commit into
Conversation
…ol(B) landmark block) Mirrors zeokin#156's rsvd fix: the reconstruction C-hat = P A P B P needs only col(A), row(A), row(B) in range(Q); col(B) is provably redundant, and that's a property of the projector P = QQ^T, not of how each space gets sketched. NystromTransform still split its landmark budget 4 ways (col(A), row(A), col(B), row(B)) -- the same pre-zeokin#156 waste rsvd had. Splits 3 ways now. basis_flops is unchanged (same total sketch width). Adds a numeric proof that the redundancy holds for landmark sampling specifically (not just assumed by analogy to rsvd's random projections): dropping col(A) or row(B) breaks exact reconstruction, dropping col(B) does not. DRAFT: GPU scorecard pending -- no GPU available yet. CPU-safe validation (270 passed, 24 skipped) is green; will mark ready for review once the eval scorecard is attached.
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.
PR kind
DRAFT -- GPU scorecard pending. No GPU available right now; opening as a draft to avoid the missing-scorecard auto-close (
close_missing_scorecardfires immediately for a non-draft feat PR with no scorecard). CPU-safe validation is green. Will mark this ready for review once I attach a realpython -m evalscorecard.Summary
Mirrors
#156's rsvd fix, applied tonystrom(#194).The reconstruction
Ĉ = P A P B P(P = QQᵀ) needs onlycol(A), row(A), row(B)inrange(Q)--col(B)is provably redundant.#156proved this forrsvd's random-projection sketches. That proof is about the projector algebra, not about how each space gets sketched, so it applies identically tonystrom's landmark-column sketches.NystromTransformstill split its landmark budget 4 ways (col(A), row(A), col(B), row(B))-- the same pre-#156wastersvdhad. This splits 3 ways instead, over{col(A), row(A), row(B)}.basis_flopsis unchanged (2 n m²) -- same total sketch width, just reallocated.What's new here versus just copying #156's reasoning
Added a numeric proof specific to landmark sampling (not just assumed by analogy to rsvd's random projections): construct Q from each pair of the three spaces and confirm reconstruction breaks when
col(A)orrow(B)is dropped, but not whencol(B)is dropped -- seetest_nystrom_col_b_is_redundant_but_col_a_and_row_b_are_not.CPU-safe validation
GPU Result (required for feat PRs only)
Pending -- will attach before marking ready for review. Plan: same regime
#156used (--n 8192 --pairs 3 --fill lowrank --data-rank 16 --rank-m 48 --transforms nystrom,rsvd --seed 0), before/after comparison againstmain.Scope
strategy/transforms.pyonly (Open -- "the main event" zone per CONTRIBUTING.md); no API change,basis_flopsunchanged, no protected-path edits.Checklist
Co-authored-byfooters for coding agents