Conversation
…oposed) Adopt RaBitQ-style binary sketches as a first-class cheap similarity sensor at four points in the RuView pipeline: AETHER re-ID hot-cache filter, per-room novelty / drift detection, mesh-exchange compression, and privacy-preserving event logs. Implementation home is ruvector-core::quantization::BinaryQuantized (already vendored, already SIMD-accelerated NEON+POPCNT, 32x compression, 1-bit sign quantization + hamming distance), re-exported through a thin RuView-flavored API in wifi-densepose-ruvector::sketch. Pattern at every site: dense embedding -> RaBitQ sketch -> hamming pre-filter to top-K -> full-precision refinement only on miss. Decision boundary unchanged; sketch is a sensor that gates *which* comparisons run, not *what* they decide. Acceptance test (per source proposal): - sketch compare cost reduction: 8x-30x vs full float - top-K candidate coverage: >= 90% agreement with full-float pass - end-to-end accuracy regression: < 1 percentage point Site-by-site rollback if any criterion fails at a given site; remaining sites continue. Five implementation passes, each independently testable: ruvector module wrap, AETHER re-ID pre-filter, cluster-Pi novelty sensor, mesh-exchange compression, privacy log. Sensor MCU unchanged; sketches happen at the cluster Pi (ADR-083). Validation requires acceptance numbers on >= 3 of 5 passes. Open question (out-of-scope until pass-1 benchmark): whether RuView embeddings need a Johnson-Lindenstrauss / RaBitQ-paper randomized rotation before sign-quantization, or whether pure 1-bit sign quantization (today's BinaryQuantized) is sufficient. Co-Authored-By: claude-flow <ruv@ruv.net>
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
Adopt RaBitQ-style binary sketches as a first-class cheap similarity sensor at five points in the RuView pipeline, using the already-vendored
ruvector-core::quantization::BinaryQuantized(32× compression, NEON+POPCNT-accelerated, 1-bit sign quantization + hamming distance).The pattern at every site:
The decision boundary is unchanged at every site — full precision still owns the final answer. The sketch is a sensor that gates which comparisons run, not what they decide.
Five implementation passes (each independently testable)
wifi-densepose-ruvector::sketchmodule — re-exportBinaryQuantizedwith a thin RuView-flavored API (Sketch::from_embedding,SketchBank::topk,sketch_version: u16).SketchBankof normal-state sketches; emitnovelty_scoreon the WebSocket update envelope; CNN wake gate uses it.(sketch_bytes, sketch_version, novelty_score, witness_sha256)instead of raw embeddings.Acceptance test (per source proposal)
Site-by-site rollback if any criterion fails at a given site; remaining sites continue. Acceptance requires the numbers to hold on ≥ 3 of the 5 passes (the load-bearing ones: AETHER re-ID, cluster-Pi novelty, event log).
Composes with ADR-083
The cluster Pi (ADR-083 / PR #428) is the natural home for the sketch bank. Sensor MCU is unchanged by this ADR; sketches happen at the cluster Pi.
Status
Proposed — not committing to implementation. The ADR formalizes the pattern and the implementation home; actual implementation lands as five separate work items, gated by the acceptance numbers above.
Open question
Whether RuView embeddings need a Johnson-Lindenstrauss / RaBitQ-paper randomized rotation before sign-quantization (the published RaBitQ algorithm by Gao & Long, SIGMOD 2024 includes this for theoretical error bounds). Today's
BinaryQuantizedis pure 1-bit sign — works when embeddings are roughly zero-centered and isotropic. AETHER and CSI spectrogram embeddings need to be benchmarked for this; if either fails the assumption, the rotation pre-pass becomes load-bearing and warrants a follow-up ADR. Decided after pass-1 benchmark, not in this ADR.Test plan
ruvector-core::quantization::BinaryQuantized(already in tree)v2/(rebased on top of chore(repo): rename rust-port/wifi-densepose-rs → v2/ (flatten to one level) #427's rename merge)🤖 Generated with claude-flow