research: mincut-gated proximity-graph insertion (nightly 2026-08-30) — REJECT - #947
Draft
ruvnet wants to merge 2 commits into
Draft
research: mincut-gated proximity-graph insertion (nightly 2026-08-30) — REJECT#947ruvnet wants to merge 2 commits into
ruvnet wants to merge 2 commits into
Conversation
… crate Nightly research (2026-08-30): a write-time structural defense against RAG corpus-poisoning insertions into a graph-based ANN index. Implements a from-scratch NSW-style proximity graph plus three insertion gates (NoGate baseline, CoherenceRatio similarity-shape heuristic, MinCut local graph min-cut heuristic) and a deterministic synthetic poisoning attack model, with a benchmark binary and 18 unit tests. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01KWcZBxrCtbCQgYnqtaG9dS
…rtion Documents the 2026-08-30 nightly cycle: hypothesis, attack model, benchmark methodology, and the pre-registered REJECT verdict for ruvector-graft-gate's MinCut gate (0/200 poison caught vs CoherenceRatio's 122/200), with the measured root cause (local neighborhood threshold-graph saturation at the tested cluster tightness). Regenerates docs/adr/INDEX.md via scripts/adr-index.mjs. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01KWcZBxrCtbCQgYnqtaG9dS
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 cycle (2026-08-30): tests whether a graph-based ANN index can refuse a RAG-corpus-poisoning insertion at insertion time, using only the graph structure the index already builds — a stage no defense in the reviewed 2025-2026 literature (PoisonedRAG, GMTP, RADAR, Semantic Chameleon) operates at.
New crate
crates/ruvector-graft-gate(zero external dependencies) implements a from-scratch NSW-style proximity graph plus three insertion gates, benchmarked against a deterministic synthetic poisoning attack model.Verdict: REJECT (pre-registered hypothesis's central claim was falsified, in the opposite direction — reported as a genuine, mechanistically-explained negative result, not forced into a positive spin). An unplanned side finding (
CoherenceRatio, a cheap similarity-shape heuristic) performed well and is flagged as a candidate for a follow-up, separately pre-registered experiment.Hypothesis
Architecture
flowchart LR Data[Deterministic data:\n20 clusters, 50 target queries,\n200 poison vectors] --> Boot[Bootstrap: 5,000\nvectors, ungated NSW graph] Boot --> Clone1[NoGate] Boot --> Clone2[CoherenceRatio] Boot --> Clone3[MinCut] Mix[Fixed shuffled insertion order\n1,000 legit + 200 poison] --> Clone1 Mix -->|search + gate.evaluate| Clone2 Mix -->|search + gate.evaluate| Clone3 Clone1 --> M[gate latency, poison catch,\nfalse-reject, attack success, recall@10] Clone2 --> M Clone3 --> MBenchmark command + real results
Root cause (verified via a temporary, since-reverted instrumentation pass): 97.25% of all 1,200 evaluated candidates saturated the min-cut metric near its structural maximum (flow=9 or 10 of ≤10) because a candidate's k-NN at this cluster tightness are almost always one tight, already-mutually-similar cluster — the adaptive edge threshold never thinned the local subgraph enough to expose a bridge signature.
CoherenceRatiosucceeded because it measures similarity shape, which survives that saturation.cargo test --release -p ruvector-graft-gate: 18 passed, 0 failed (includes 3 hand-verified max-flow correctness tests confirming the 0% MinCut result is a calibration finding, not a max-flow bug).cargo clippy --release -p ruvector-graft-gate --all-targets: clean.cargo fmt --check: clean.Acceptance verdict
REJECT. Both subject-to validity conditions held (latency and recall), so clauses (a) and (c) are a clean falsification, not an invalid measurement. Clause (b) held. Per the pre-registration rule, thresholds were fixed before the first benchmark run and were not adjusted afterward.
Security review notes
unsafecode.MinCut's max-flow primitive is unit-tested against hand-computed triangle/bridge/disconnected graphs — confirms correctness independent of the gate's effectiveness finding.ruvector-proof-gate(ADR-227): this crate answers "is this insertion locally coherent," not "is this insertion honestly attributed" — the two are complementary, not substitutes (documented in Governance).CoherenceRatio's 61% catch rate and 39% miss rate are both stated explicitly.Main limitations
MinCut's threshold calibration is shown to saturate at this cluster tightness but was deliberately not adjusted mid-experiment (pre-registration rule) — recalibration is deferred to a new, separately pre-registered follow-up.Production recommendation
Do not ship
MinCutas specified — measurable overhead for zero measured defensive value at this calibration.CoherenceRatiois a plausible candidate for a follow-up experiment, not a production recommendation yet.Links
docs/research/nightly/2026-08-30-mincut-gated-insertion/README.mddocs/research/nightly/2026-08-30-mincut-gated-insertion/gist.mddocs/adr/ADR-340-mincut-gated-insertion.mdGenerated by Claude Code