Skip to content

Add residual top-up extraction to PPR forward push#699

Closed
mkolodner-sc wants to merge 1 commit into
mainfrom
codex/ppr-residual-topup
Closed

Add residual top-up extraction to PPR forward push#699
mkolodner-sc wants to merge 1 commit into
mainfrom
codex/ppr-residual-topup

Conversation

@mkolodner-sc

@mkolodner-sc mkolodner-sc commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds an opt-in residual top-up extraction API to PPRForwardPush.

The existing extractTopK behavior is unchanged. The new API returns the normal top-k finalized PPR nodes first, then appends additional candidates from residual mass that was discovered during forward push but did not necessarily cross the requeue threshold. This gives downstream samplers a way to fill more sequence slots without issuing extra neighbor fetches.

Changes

  • Adds extractTopKWithResidualTopUp(maxPprNodes, maxResidualNodes) in C++.
  • Exposes the new method through pybind and the Python stub.
  • Scores residual top-up candidates on the same scale as finalized candidates via ppr_score + residual.
  • Improves neighbor cache behavior so previously fetched (node, edge type) neighbor lists are reused within a PPR state.
  • Adds C++ tests for neighbor cache reuse and residual top-up extraction.

@mkolodner-sc

Copy link
Copy Markdown
Collaborator Author

Closing in favor of #702, which uses the renamed mkolodner/ppr-residual-topup branch.

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