feat(graph): personalized PageRank primitive [HELD]#37
Draft
RioPlay wants to merge 3 commits into
Draft
Conversation
added 2 commits
June 16, 2026 00:39
Deterministic power-iteration PPR (damping 0.85, anchor-sorted node order, no RNG — preserves model-invariance), seeded by a per-anchor relevance vector and spread along graph topology. Core split out for unit testing on integer adjacency. Graph-only (no embeddings) so it works in the lean build. Intended to refine asm/ask frontier relevance with multi-hop salience; not yet wired to the ask path pending an eval that exercises multi-hop.
Third arm alongside structural and direct-relevance ordering. On flask's hand-authored cases PPR ties direct relevance ([1,1,2,2]) — but those cases are 1-hop (gold is a direct neighbor of the hub), which cannot exercise PPR's multi-hop propagation. A multi-hop query eval is needed before wiring PPR into ask.
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.
What
aden-graph::personalized_pagerank— a Personalized PageRank primitive over the knowledge graph.personalized_pagerank<N: GraphNode, E: GraphEdge>(graph, seed: &HashMap<String, f32>) -> HashMap<String, f32>; power-iteration core (DAMPING = 0.85, EPS = 1e-6, MAX_ITERS = 100), no RNG → deterministic.assembly_abextended to a 3-way structural vs relevance vs PPR comparison.cmd_askis unchanged (the wiring was applied, then reverted).Why held
The point of PPR is multi-hop salience (a node relevant because it sits near several relevant nodes). The current
assembly_abis largely 1-hop, where PPR and direct relevance coincide — hence the tie. Merging an unproven ranking into the production path would violate the gate discipline; the primitive lands behind the eval instead.Validation
cargo test --workspacegreen; PPR unit tests pass. Inert in production (not called from any command).Stack
Based on
feat/dense-prose-foundation. Not part of the merge sequence.