Skip to content

Add typed channel quotas to distributed PPR sampler#701

Closed
mkolodner-sc wants to merge 14 commits into
mkolodner/ppr-residual-topupfrom
mkolodner/typed-channel-ppr-sampler
Closed

Add typed channel quotas to distributed PPR sampler#701
mkolodner-sc wants to merge 14 commits into
mkolodner/ppr-residual-topupfrom
mkolodner/typed-channel-ppr-sampler

Conversation

@mkolodner-sc

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

Copy link
Copy Markdown
Collaborator

Summary

Adds typed-channel support to the distributed PPR sampler.

Previously, our PPR-based graph construction effectively collapsed heterogeneous graphs into a homogeneous-style PPR view. That gave us useful seed-to-neighbor relevance scores, but it also lost important information about how a node was reached: which edge types contributed to the PPR signal, and whether different relation paths should be treated differently.

This change keeps the benefits of PPR sampling while preserving edge-type structure through configurable traversal channels.

Motivation

For heterogeneous graphs, edge types often carry important semantic meaning. Collapsing all relations into one PPR traversal can blur together very different paths, even when those paths should provide distinct modeling signals.

Typed-channel PPR lets us preserve that information by running PPR over configured edge-type channels and emitting channel-aware edge attributes. This gives downstream models access to both:

  • the overall best calibrated PPR relevance score
  • per-channel scores
  • per-channel presence indicators

So instead of only knowing “this neighbor is relevant,” the model can also learn which typed relation channels made it relevant.

What Changed

  • Added typed_channel_quotas to PPRSamplerOptions.

    • Keys can be a single canonical edge type, e.g. ("user", "to", "item").
    • Keys can also be a tuple of canonical edge types to define one grouped traversal channel.
    • Values are positive top-k quotas for that channel.
  • Added typed-channel validation and normalization in DistPPRNeighborSampler.

    • Rejects invalid channel keys.
    • Rejects non-positive quotas.
    • Rejects edge types that are not traversable or are label edge types.
    • Restricts typed PPR to heterogeneous sampling.
  • Added per-channel PPR execution.

    • Builds one PPRForwardPush state per typed channel.
    • Each state traverses only the edge types allowed by that channel.
    • Overlapping channel frontiers share one-hop fetches to avoid duplicate RPCs.
  • Added typed PPR merge logic.

    • Deduplicates candidates across channels.
    • Calibrates scores within each channel/seed pool.
    • Emits multi-column PPR edge attributes:
      [best_score, channel_scores..., channel_presence_bits...].
  • Wired typed_channel_quotas through sampler construction.

Tests

Added unit coverage for:

  • channel key normalization
  • invalid quota/key validation
  • channel traversal map construction
  • shared fetches for overlapping channel frontiers
  • typed merge calibration
  • residual top-up behavior in typed PPR
  • disabling residual top-up for typed PPR

@mkolodner-sc
mkolodner-sc marked this pull request as draft July 10, 2026 19:56
@mkolodner-sc
mkolodner-sc force-pushed the mkolodner/typed-channel-ppr-sampler branch 4 times, most recently from 997f5ac to d29e983 Compare July 13, 2026 18:21
@mkolodner-sc
mkolodner-sc force-pushed the mkolodner/ppr-residual-topup branch from 98d95fa to a33f080 Compare July 13, 2026 18:35
@mkolodner-sc
mkolodner-sc force-pushed the mkolodner/typed-channel-ppr-sampler branch 4 times, most recently from c5b84b4 to f880381 Compare July 13, 2026 19:55
@mkolodner-sc

Copy link
Copy Markdown
Collaborator Author

/unit_test

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

GiGL Automation

@ 19:58:07UTC : 🔄 C++ Unit Test started.

@ 20:00:03UTC : ✅ Workflow completed successfully.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

GiGL Automation

@ 19:58:07UTC : 🔄 Python Unit Test started.

@ 20:02:41UTC : ❌ Workflow failed.
Please check the logs for more details.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

GiGL Automation

@ 19:58:09UTC : 🔄 Scala Unit Test started.

@ 20:06:48UTC : ✅ Workflow completed successfully.

@mkolodner-sc
mkolodner-sc force-pushed the mkolodner/typed-channel-ppr-sampler branch 3 times, most recently from bd2880f to d3ef1af Compare July 14, 2026 22:20
@mkolodner-sc
mkolodner-sc force-pushed the mkolodner/typed-channel-ppr-sampler branch from b8cebc3 to ef2bcf6 Compare July 14, 2026 23:16
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