Files
ruvnet--RuView/docs/research/sota-2026-05-22/R9-rssi-fingerprint-knn.md
T
rUv 2783f40bd1 feat(tools/ruview-mcp): M2 — wire real inference via cog health (#706)
* research(R9): RSSI fingerprint K-NN — 2.18x lift (MODERATE); surfaces counting-vs-localization asymmetry

Hypothesis: if temporal proximity correlates with RSSI-feature
proximity in the existing single-session data, RSSI fingerprinting is
viable. If K-NN of each query is random in time, RSSI sequences are
too noisy for fingerprint localization.

Test: 1077 samples, 20-dim RSSI proxy (band-mean across 56
subcarriers), cosine-NN with K=5, measure fraction of K-NN within
plus/minus 60s of each query timestamp. Compare to random baseline.

Result (honest):

  5-NN within +/-60s    0.169
  Random baseline       0.077
  Lift over random      2.18x   (verdict: MODERATE)
  Per-query stdev       0.183

Below the >=3x STRONG-fingerprint threshold but well above 1x random.
Real signal, but weaker than R8 counting result on the same data.

Important asymmetry surfaced (publishable distinction):

  Task            RSSI vs CSI retention   Verdict
  -------         -----                   -----
  Counting        94.82% (R8)             RSSI works well
  Localization    ~2x random (R9)         RSSI struggles in this regime

This is consistent with R5's band-spread observation: the count signal
integrates across the band, but localization may require per-subcarrier
shape that the band-mean discards.

Three actionable explanations for the MODERATE result:
1. 20-frame windows (~2s) too short for stable fingerprint while operator
   moves — longer windows might lift to 3-4x.
2. Within-room fingerprint space too narrow — multi-room data would
   show categorical lift jump (5-10x).
3. Band-mean discards the per-subcarrier shape needed for localization.

Once multi-room data lands (#645), this test should be re-run; if
hypothesis (2) is right, the lift will jump categorically.

Files:
* examples/research-sota/r9_rssi_fingerprint_knn.py
* examples/research-sota/r9_rssi_fingerprint_results.json
* docs/research/sota-2026-05-22/R9-rssi-fingerprint-knn.md
* docs/research/sota-2026-05-22/PROGRESS.md updated

* feat(tools/ruview-mcp): M2 — wire real inference via cog health subcommand

ruview_pose_infer and ruview_count_infer now run the cog binary's `health`
subcommand (ADR-100 contract) which performs real Candle forward-pass
inference on a synthetic CSI window and emits a structured health.ok JSON
event containing backend, confidence (pose) or count/confidence/p95_range
(count). The MCP tools parse this event and return typed inference results.

This satisfies the ADR-104 acceptance gate: "ruview_pose_infer returns a
finite output for a synthetic CSI window" when the cog binary is installed.
On machines without the binary, both tools still fail-open with {ok:false,
warn:true} and actionable install hints.

Also updates PROGRESS.md with cross-links: R7 (Stoer-Wagner) and R8
(RSSI-only 94.82% retained) marked done with cron-originated findings
distilled into the research vectors section.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-21 23:43:32 -04:00

4.9 KiB
Raw Blame History

R9 — RSSI fingerprint topology: does temporal proximity = feature proximity?

Status: first measurement — MODERATE result · 2026-05-22

Question

R8 just showed RSSI alone retains 95% of full-CSI accuracy for counting. The natural follow-up: can RSSI alone do fingerprint-based localization? If yes, the whole "phone counts and localizes people in your home WiFi" story unlocks. If no, R8's commercial enablement is bounded to counting-only.

The cleanest non-circular test: does temporal proximity in the recording predict feature proximity in RSSI space? A single 30-min recording captures one operator moving around one room. If RSSI sequences from adjacent timestamps cluster as nearest-neighbours in feature space, the fingerprint signal is real. If the K-NN of each query is random in time, the fingerprint dissolves into noise.

Method

  1. Take the 1,077 paired CSI windows. Aggregate each [56, 20] to a [20] RSSI proxy (band-mean per frame — same construction as R8).
  2. Z-score normalise across all samples (matches AGC behaviour).
  3. Compute the full 1077 × 1077 cosine-similarity matrix.
  4. For each query, find top-K (K=5) nearest neighbours, excluding self.
  5. Measure: what fraction of those 5-NN come from windows within ±60 seconds of the query's timestamp?
  6. Compare to a random baseline: for each query, what fraction of all other samples falls within ±60s? (Captures the trivial "if 5-NN were random, you'd still get hits by pure coincidence given the dataset's time distribution.")

Lift = K-NN fraction within window / random baseline.

Result

Metric Value
5-NN within ±60s 0.169
Random baseline 0.077
Lift over random 2.18×
Per-query stdev 0.183

Verdict — MODERATE. Below the ≥3× threshold for "strong fingerprint" but well above 1× random. The signal is real but noisy.

Honest interpretation

Three possible explanations for the moderate lift, each with different implications:

  1. 20-frame windows are too short. Each window is ~2 seconds of CSI. Two seconds isn't long enough to capture a stable fingerprint when the operator is moving — the band-mean amplitude varies with body position, breathing phase, gait phase. A 60-frame window (~6 s) might lift this to 3-4×.
  2. One-room data has a small fingerprint space. Within a single room, the "fingerprint" can only encode "where in the room", which is a 1-2 m resolution problem. RSSI doesn't have the bandwidth for that. Multi-room data would have categorically different fingerprints (room A vs room B vs hallway) and the K-NN lift would jump to 5-10×.
  3. Band-mean discards the per-subcarrier shape. R5 said the count-task signal is band-spread. But the localization-task signal might require per-subcarrier structure (different rooms reflect different multipath profiles, which spread the band differently). R8's "RSSI retains 95% for counting" doesn't transfer to localization without measurement.

The 2.18× lift is consistent with all three. Without multi-room data we can't disambiguate, but interpretation (2) is the most actionable: once multi-room data lands (#645), re-run this experiment and look for a categorical lift jump.

What this DOES prove

  • RSSI sequences are not purely noise — there's structure that correlates with temporal proximity, just not strongly enough for single-room fingerprinting at our window size.
  • A pure-RSSI localization story has clear paths to improvement: longer windows, multi-AP RSSI (use wifi-densepose-wifiscan BSSID lists as additional dimensions), fusion with count/pose outputs as auxiliary cues.

What this DOES NOT prove

  • That RSSI fingerprinting won't work cross-room. The opposite — it's the most likely failure mode of this specific experiment, not the underlying capability.
  • That CSI fingerprinting would work better. We didn't measure CSI K-NN here; would be a useful follow-up.

Connections

  • R8 showed RSSI keeps the count signal. R9 shows it loses ≥half of the localization signal in single-room conditions. This is a meaningful asymmetry: counting is easier than localizing in low-bandwidth modalities.
  • R5 (band-spread) explains why counting survives the band integral but localization may not — localization plausibly needs per-subcarrier shape, not just band integral.
  • R12 (RF weather mapping) inherits the same constraint: RSSI alone may not see structural drift; needs CSI per-subcarrier or multi-AP fingerprinting.

What's next on this thread

  • Re-run with 60-frame windows (3× more temporal context) to see if lift jumps.
  • Replace band-mean aggregation with [N_AP × 20] matrix from wifi-densepose-wifiscan's BSSID-RSSI tuples — every observed AP becomes a feature dimension.
  • Once multi-room data exists, repeat. Look for categorical lift jump (within-room 2× → across-room 8-10×).
  • Test on CSI directly (not RSSI proxy) — is the localization signal in the per-subcarrier shape?