Skip to content

[POC] Add NaviX neighborhood budgets and one-hop bridges - #1116

Draft
lerman25 wants to merge 3 commits into
omer-navix-filter-cache-pocfrom
omer-navix-traversal-poc
Draft

lerman25 wants to merge 3 commits into
omer-navix-filter-cache-pocfrom
omer-navix-traversal-poc

Conversation

@lerman25

Copy link
Copy Markdown
Collaborator

Describe the changes in the pull request

NaviX can repeatedly scan shared second-hop neighborhoods even after filter decisions are cached. Add opt-in controls to skip fully scanned neighborhoods, cap second-hop inspections per expansion, and replace two-hop expansion with one-hop navigation through rejected nodes while filtering result admission.

Stacked on #1114. Zero-initialized controls preserve existing traversal. Deduplication uses another byte per encountered internal-ID slot and resets with the iterator. Partial lists stay eligible; the budget can trade recall for work and does not provide fallback. Bridge mode can cross rejected chains but is approximate and can scan the reachable graph when nothing matches. Use a fully built stable graph for comparisons: completed neighborhoods are not revisited for concurrent topology changes.

This is a draft POC with no benchmark or performance claim. Focused Debug validation covers all eleven NaviX cases, including completed/partial scans, budget accounting, rejected chains, empty results, batches, and reset.

Which issues this PR fixes

N/A

Main objects this PR modified

  1. HNSW batch iterator: completed-list tracking, inspection budget, and one-hop bridge traversal.
  2. Query parameters and profile statistics: opt-in controls and work counters.
  3. POC documentation and deterministic traversal checks.

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

The parameter and statistics structs extend the C ABI. Consumers must rebuild with matching headers and library; exact filtering remains the consumer's responsibility.

Review limits: bridge mode retains NaviX's >= batch-bound tie rule, so tied bridges may be deferred. Cached decisions require stable labels and filter data across batches; relabel invalidation is not implemented. These drafts are for stable-data experiments, not concurrent-mutation validation.

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