#1751·RuView

experiment: benchmark subcarrier aware respiratory selection before weighted fusion

Author: ruvnetCreated Aug 31, 2026Updated Sep 16, 2026
Labelsenhancement

Problem

The current wifi-densepose-vitals::BreathingExtractor collapses per-subcarrier residuals into one weighted scalar before bandpass filtering and periodicity estimation. That is simple and efficient, but it can dilute a small set of respiratory-sensitive subcarriers with many weak or multipath-cancelled subcarriers.

Fresh experimental work suggests that subcarrier heterogeneity is large enough to justify an explicit selection stage. This should be tested against the current extractor on real captured data before changing production behavior.

Why it matters

A Subcarrier-Aware Approach for Robust Respiratory Monitoring with Commodity Wi-Fi, arXiv 2608.25612, submitted 2026-08-26, uses group-wise normalization, four-dimensional sensitivity features, unsupervised K-means clustering, optimal subcarrier selection, and amplitude/phase fit-quality selection.

The authors collected real CSI with a Raspberry Pi 4B using Nexmon, 256 subcarriers at 5 GHz and 80 MHz, sampled at 50 Hz. Four volunteers participated in 58 tests, plus 30 tests from a public dataset. Their method reports 97% average breathing-rate accuracy and 0.48 bpm MAE on normal breathing, roughly 2.8 percentage points and 0.45 bpm better than the second-best compared method. They report 3.26 seconds to process one minute of CSI on an i7-13700KF with less than 100 MB memory. At 20 m they report 84% accuracy versus 65% for WiRe. Under breath holds they report 88% accuracy and 1.6 bpm MAE, with both false and missed detection rates below 10% at their selected threshold.

These numbers are paper results, not RuView results. The dataset is small and health-adjacent, so they are not sufficient for a production medical claim.

Current architecture

Target file:

v2/crates/wifi-densepose-vitals/src/breathing.rs

Current path:

  1. accept per-subcarrier residuals and attention weights
  2. weighted fusion into one scalar
  3. IIR 0.1 to 0.5 Hz bandpass
  4. sliding history
  5. zero crossing frequency estimate
  6. autocorrelation-derived confidence
  7. fail closed reset when the estimate leaves the breathing band

The current implementation already has non-finite guards, bounded VecDeque history, stable filter poles, stale-lock reset, and tests for the extractor.

Observed limitation

The weighted fusion happens before the system can determine which subcarriers actually contain strong respiratory periodicity. Attention weights may encode body sensitivity generally without being calibrated to respiratory periodicity in the current room.

The extractor also consumes amplitude residuals only at this interface, while the new paper shows complementary amplitude and calibrated phase sensitivity.

Proposed experiment

Add an opt-in subcarrier_select experimental mode behind a feature flag or explicit constructor. Do not change current defaults.

Phase 1 should remain amplitude-only and use existing RuView residuals:

  1. retain a bounded per-subcarrier history
  2. compute group-normalized standard deviation, breathing-band energy, and autocorrelation periodicity
  3. cluster or rank subcarriers deterministically
  4. select the most respiratory-sensitive subset
  5. feed the selected aggregate into the existing stable bandpass and confidence path

Phase 2 may test calibrated phase only if the upstream capture explicitly marks phase as calibrated and preserves the required provenance.

Do not copy a MATLAB implementation or introduce a new machine-learning runtime for this experiment. A small Rust implementation is sufficient.

Expected measurable improvement

Promotion requires a frozen real-capture benchmark and comparison to current main.

Primary gate:

  1. at least 15% lower breathing-rate MAE at equal evaluation windows on held-out subjects or rooms, or
  2. at least 20% lower error under weak-signal distance or posture shifts without degrading the normal-condition MAE by more than 5%

Operational gates:

  1. p95 per-frame CPU cost no more than 2x current extractor on ARM64
  2. memory below 8 MB for the extractor at the supported subcarrier count and window
  3. zero regression in non-finite, stale-lock, and out-of-band rejection tests
  4. five replay runs produce identical estimates

The paper's 97% figure is not a target or a release claim.

Data plan

Use real captured RuView CSI with an external respiration reference where available. Split by person, room, and session. Do not allow adjacent windows from one capture to cross train/tune/test boundaries.

If adequate RuView labeled data is not available, use the public dataset from the paper only as a reproduction aid and keep the feature experimental.

Security review

  1. Bound subcarrier count, history length, group count, and clustering iterations.
  2. Reject non-finite CSI before feature calculations.
  3. Never allow malformed weights or phase metadata to bypass existing guards.
  4. Treat phase as unavailable unless calibration provenance is explicit.
  5. Fuzz the new history and feature input boundary.
  6. Preserve existing resource-exhaustion limits.

Privacy and safety

Respiration is sensitive biometric or health-adjacent information. Preserve the existing privacy classification and consent requirements. Do not expose raw CSI or per-subcarrier respiratory traces through a new network API.

No apnea, medical diagnosis, or safety-critical claim may be made from this experiment without a separate validated clinical and regulatory program.

Backward compatibility

Current BreathingExtractor behavior remains default. The experiment is additive and gated.

Testing

  1. unit tests for group normalization and subcarrier ranking
  2. property tests for finite bounded feature output and input permutation behavior where appropriate
  3. fuzz tests for malformed residual vectors and pathological sample rates
  4. deterministic replay tests
  5. x86 and ARM64 performance benchmarks
  6. held-out real data accuracy benchmark

Rollback

Disable or delete the experimental selection path. Current weighted fusion remains intact.

Definition of done

A second engineer can run one frozen real-data manifest against current main and the experimental selector, reproduce MAE, confidence calibration, p95 CPU time, and memory numbers across at least five runs, and see the feature remain disabled unless it clears the promotion gates.