Skip to content

Normalize outgoing edge weights in ppr_diffusion - #751

Open
kg290 wants to merge 1 commit into
JuliaGraphs:masterfrom
kg290:codex/739-ppr-normalization
Open

kg290 wants to merge 1 commit into
JuliaGraphs:masterfrom
kg290:codex/739-ppr-normalization

Conversation

@kg290

@kg290 kg290 commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

Fixes #739

ppr_diffusion used raw edge weights, so scaling the weights changed the result and could produce negative PageRank values. It now divides each source’s outgoing weights by their sum before computing diffusion. Sources with zero outgoing weight keep a zero transition column.

The regression tests cover a weighted directed graph, a complete graph, large parallel-edge weights, and differentiation with respect to edge weights. The GNNGraphs CPU suite on Julia 1.12.7 had 1,406 passes and the same eight marked broken on master.

This branch has not been deployed

No deployments
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.

ppr_diffusion doesn't normalize the adjacency matrix, giving negative / scale-dependent PPR weights

1 participant