Add residual top-up extraction to PPR forward push#702
Conversation
98d95fa to
a33f080
Compare
|
/unit_test |
GiGL Automation@ 19:37:48UTC : 🔄 @ 19:39:40UTC : ✅ Workflow completed successfully. |
GiGL Automation@ 19:37:49UTC : 🔄 @ 19:42:19UTC : ❌ Workflow failed. |
GiGL Automation@ 19:38:02UTC : 🔄 @ 19:49:31UTC : ✅ Workflow completed successfully. |
|
/unit_test |
GiGL Automation@ 19:58:29UTC : 🔄 @ 20:06:43UTC : ✅ Workflow completed successfully. |
GiGL Automation@ 19:58:29UTC : 🔄 @ 20:00:20UTC : ✅ Workflow completed successfully. |
GiGL Automation@ 19:58:30UTC : 🔄 @ 21:08:08UTC : ✅ Workflow completed successfully. |
kmontemayor2-sc
left a comment
There was a problem hiding this comment.
Thanks Matt! In generally I think we have a good amount of algorithmic changes here and it'd be nice if we could comment what / why the new code is doing.
@kmontemayor2-sc Done, added more context in the PR description and in the PR for the reasoning/change made here |
kmontemayor2-sc
left a comment
There was a problem hiding this comment.
Hi Matt, once we resolve the sorting questions this lgtm! thanks for the iterations here :)
Summary
Reasoning for Change
Previously, the PPR forward push would return all neighbors re-enqueued during forward push. This is how the base PPR forward push algorithm works, but results in small sequences volumes that could be more meaningful if they were larger. Decreasing epsilon previously provided a knob to get these larger sequence lengths, but came at heavy throughput costs. Instead of relying on epsilon for this behavior, this change exposes a way to allow us to "top-off" the existing PPR sequence with nodes that were found during forward-push but didn't meet the threshold for re-enqueue. The logic here is that these are the nodes that would have been re-enqueued next by decreasing epsilon, so this gives us a clean way to get these nodes and their ppr scores without having to pay heavy throughput costs.
On internal benchmarking, we have seen sequences toped off this way perform as good as the sequences with lower epsilon at a much faster runtime.
Changes Summary
Adds an configurable but opt-in residual top-up extraction API to
PPRForwardPush.The existing
extractTopKbehavior 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
extractTopKWithResidualTopUp(maxPprNodes, maxResidualNodes)in C++.ppr_score + residual.Validation
uv runvalidation in the temp worktree was blocked by local environment setup becausegigl-coreattempted to rebuild and could not find Torch CMake config.