ruvnet / ruvnet/RuVector

research follow-up: pre-register CoherenceRatio (kNN similarity peakedness) as an insertion-time poisoning gate

Open
#964 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
4.5k
Forks
603
Avg merge
23h 32m
Merged PRs (30d)
59

Description

Side-finding from closed PR #947 (head 10adce1cb8), surfaced by the 2026-09-05 mission review (agent pr-review-ruview-ruvector). The PR's pre-registered candidate (MinCut) was rejected on its own evidence; this unplanned side result is the part worth keeping.

Where: crates/ruvector-graft-gate/src/gate.rs:84-90 at 10adce1cb8peakedness = max_kNN_sim / mean_kNN_sim, reject when > cfg.peakedness_threshold (1.35, config.rs::PEAKEDNESS_THRESHOLD). Results: docs/research/nightly/2026-08-30-mincut-gated-insertion/README.md:31 and :327-361 on that commit.

Observed (synthetic corpus: 5,000 vectors, 20 Gaussian clusters, 200 poison inserts shaped normalize(0.7*target + 0.3*random)): CoherenceRatio caught 122/200 poison (61%) with 0/1,000 legitimate false-rejects at 55 ns per gate; recall@10 rose from 0.598 to 0.844. MinCut caught 0/200 at 13.6 µs. No pre-registered acceptance criteria existed for this signal, so it is an observation, not a result.

Why it matters: the only insertion-time signal in that run with measurable defensive value, at the cost of one ratio over an already-computed kNN list. The 39% miss rate and the single synthetic attack model mean it is not a production recommendation yet.

Ask — a separately pre-registered nightly run that:

  1. fixes catch-rate / false-reject / recall thresholds before running;
  2. tests at least one real embedding model and a second attack shape;
  3. sweeps the 1.35 threshold;
  4. reports whether the recall@10 gain survives with no poison present.
    Reuse the #947 crate at that SHA as the harness rather than rewriting it.

🤖 Generated with RuFlo

https://claude.ai/code/session_019xHM4rAH4aaShb4DTr1n6s

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with crates/ruvector-graft-gate/src/gate.rs:84-90 and config.rs::PEAKEDNESS_THRESHOLD at commit 10adce1cb8, then read the cited nightly README sections. Reuse the #947 crate as the harness, pre-register thresholds, test a real embedding model and second attack shape, sweep 1.35, and report catch rate, false rejects, recall@10, and poison-free recall results.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases, machine-learning, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.