Repository navigation
Rogue SPR: score leaf-pair candidates from parent split overlaps - #224
Open
ms609-agent wants to merge 4 commits into
Open
ms609-agent wants to merge 4 commits into
ms609-agent wants to merge 4 commits into
Conversation
Extends SingleDrop (now LeafDrop) to depth-2 candidates: removing leaves i
and j replays two removals on the parent ledgers, recording the split that
vanishes from each tree at each step; child overlaps are parent overlaps
less the popcount of shared membership of {i, j} (2-bit masks; the
single-leaf kernel is unchanged via a template). Pairs fall back to
ScoreWithout() if either leaf is leaf 1, removing either leaf alone makes
two splits identical, the trees have splits differing in exactly {i, j},
or reduce_trees() would reduce the smaller trees.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #224 +/- ##
==========================================
+ Coverage 97.74% 97.76% +0.01%
==========================================
Files 60 60
Lines 6575 6626 +51
==========================================
+ Hits 6427 6478 +51
Misses 148 148 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Follow-up to #223: extends the parent-overlap route from single-leaf to depth-2 pair Rogue candidates.
Change
SingleDrop→LeafDrop, withPrepare(i, j). Two removals are replayed on copies of the parent ledgers (leaf i once per outer loop, then j per candidate), recording the split that vanishes from each tree at each step. This covers cherries, sib(i) = par(j), the mirror case and root-child transitions without enumerating them. The root-child test is now structural (parent[parent[tip]] == parent[1]): after removing i, sib(i) can become the root's child while still owning a row.mutual_clustering_bounded_counts()dispatches onSplitCounts::pairto a template, so the depth-1 kernel is unchanged.ScoreWithout()if either leaf alone makes a shared split, if either leaf is leaf 1, or if the reduction predicate fires on the doubly-reduced ledgers.Results (min of 3 interleaved runs vs main, Windows, 1 core)
SPRDistsums are identical on all workloads. 75% of incremental pair candidates are scored from overlaps. The rest are leaf 1 or disabled trees (14%), single-leaf shared splits (7%), pair-shared splits (1.6%) and reductions (1%).Verification
-DDEBUG(ASSERTs on): argmin sets of single and pair score vectors are identical toincremental = FALSE. The largest difference among near-best scores is 7e-15.test-tree_distance_spr.Rpasses (itsCompare()already checks depth 2 against the rebuild path). All new C++ lines are covered (covr). Spelling is clean.Note: a
-DDEBUGbuild fails innni_distance.cpp:212(n_splitsis undeclared in an ASSERT). This predates the PR and is unrelated.🤖 Generated with Claude Code