research(nightly): Graph-Neighbour Cascade ANN — INT8 scan + uncertain-zone graph expansion - #756
Draft
ruvnet wants to merge 4 commits into
Draft
research(nightly): Graph-Neighbour Cascade ANN — INT8 scan + uncertain-zone graph expansion#756ruvnet wants to merge 4 commits into
ruvnet wants to merge 4 commits into
Conversation
Topic selected 2026-08-02. Graph-Neighbour Cascade ANN combines INT8 compressed first-pass scan with targeted uncertain-zone expansion via a prebuilt k-NN graph, recovering boundary rank inversions caused by quantization noise without a second full scan. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_013RaauWJHETd6NQimKoLjoB
Implements three ANN variants sharing the AnnVariant trait: - LinearFull: brute-force f32 ground-truth reference - QuantizedCascade: INT8 scan + exact f32 re-rank of top-(k×ef_mult) - GraphNeighbourCascade: INT8 scan + uncertain-zone detection + k-NN graph expansion of boundary candidates + exact f32 re-rank Includes INT8 global scalar quantizer (QuantizedCorpus), brute-force k-NN graph builder (KnnGraph, flat u32 adjacency), deterministic Gaussian dataset generator, and benchmark binary. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_013RaauWJHETd6NQimKoLjoB
Records decision, benchmark evidence, failure modes, security considerations, migration path, and open questions for the Graph-Neighbour Cascade ANN technique (ADR-273). Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_013RaauWJHETd6NQimKoLjoB
Full nightly research document with algorithm walkthrough, distance concentration analysis, memory math, competitor comparison, benchmark table, and 10-20 year forward-looking thesis. SEO gist summarises the key result (GNC recall 0.988 vs QC(ef=1) 0.975 at +11µs latency, 0.61 MB graph overhead) with runnable code example. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_013RaauWJHETd6NQimKoLjoB
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.
Summary
Nightly research branch for 2026-08-02 introducing Graph-Neighbour Cascade ANN (
crates/ruvector-cascade-ann): a three-stage retrieval algorithm that fixes INT8 quantization rank inversions at the k-NN boundary without a second full corpus scan.ef_mult=1, pool = k)Benchmark Results
All numbers from
cargo run --release -p ruvector-cascade-ann --bin benchmark(N=5000, D=128, K=10, K_graph=32, 300 queries, x86_64 Linux):GNC recall gain over QC(ef=1): +0.013 (threshold 0.005) ✅
GNC uses ef=1 initial pool (same as QC(ef=1)) but achieves recall 77% of the way from QC(ef=1) to QC(ef=4), at only +0.61 MB graph overhead.
Acceptance Tests
Files Changed
crates/ruvector-cascade-ann/src/lib.rsAnnVarianttrait,Hit,recall_at_k,dist_sqcrates/ruvector-cascade-ann/src/dataset.rscrates/ruvector-cascade-ann/src/quantize.rscrates/ruvector-cascade-ann/src/graph.rscrates/ruvector-cascade-ann/src/variants.rscrates/ruvector-cascade-ann/src/bin/benchmark.rscrates/ruvector-cascade-ann/tests/acceptance.rsdocs/adr/ADR-273-graph-neighbour-cascade-ann.mddocs/research/nightly/2026-08-02-graph-neighbour-cascade-ann/README.mddocs/research/nightly/2026-08-02-graph-neighbour-cascade-ann/gist.mdTest Plan
cargo test -p ruvector-cascade-ann— all 6 acceptance tests passcargo run --release -p ruvector-cascade-ann --bin benchmark— all 5 assertions PASS, no FAILcargo build --workspace— no compile errors introducedGenerated by Claude Code