Skip to content

feat(graph): personalized PageRank primitive [HELD]#37

Draft
RioPlay wants to merge 3 commits into
mainfrom
feat/asm-ppr-ordering
Draft

feat(graph): personalized PageRank primitive [HELD]#37
RioPlay wants to merge 3 commits into
mainfrom
feat/asm-ppr-ordering

Conversation

@RioPlay

@RioPlay RioPlay commented Jun 16, 2026

Copy link
Copy Markdown
Owner

HELD — do not merge. Draft for review/tracking. The PPR primitive is sound and tested, but not wired into ask: on the assembly_ab eval it tied direct relevance ordering on the 1-hop cases the harness covers, so wiring it is not yet justified. Hold pending a multi-hop assembly eval that can actually exercise PPR's multi-hop salience propagation.

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.
  • 5 unit tests; assembly_ab extended to a 3-way structural vs relevance vs PPR comparison.
  • No production-path wiringcmd_ask is 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_ab is 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 --workspace green; 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.

RioPlay (Ernest Hamblen) 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.
@RioPlay RioPlay changed the base branch from feat/dense-prose-foundation to main June 16, 2026 12:56
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