Why raw CSI fails
Every CSI sample arrives wrapped in hardware and protocol artifacts:- Packet boundaries — each measurement is tied to one received frame, so timing jitter between packets looks like motion even when nothing moved.
- Carrier frequency offset (CFO) — slight clock mismatch between transmitter and receiver rotates phase unpredictably across packets.
- Sampling offset (SFO) — misalignment between the receiver’s sample clock and the transmitted symbol timing shifts phase per subcarrier.
- Per-antenna phase offsets — on multi-antenna setups, each RF chain has its own static phase bias.
Feature families
Once CSI is cleaned, you need representations that highlight motion while suppressing environment drift.Time-domain statistics
The simplest features still work as baselines:- Subcarrier variance over a sliding window — spikes when any body part accelerates.
- Correlation structure across subcarriers — changes when a scatterer enters or leaves the channel.
- Entropy of amplitude distributions — rises with unpredictable multipath change.
Time-frequency representations
For activity recognition, the literature converges on spectrograms — short-time Fourier transforms (STFT) applied to CSI amplitude or sanitized phase along the time axis, producing a 2D tile of (time × frequency). Walking produces broadband energy in the 1–5 Hz band. Breathing concentrates near 0.1–0.5 Hz. Sitting down creates a brief impulse. Convolutional models trained on these tiles can separate activities that look identical in a single variance number. The subcarrier dimension adds a third axis: which frequencies moved. Stacking subcarrier spectrograms or treating (time × subcarrier) as an image is the representation behind most deep learning HAR pipelines.Environment fingerprint
An empty-room baseline is a reference CSI fingerprint — mean amplitude/phase profile and typical variance levels when no one is present. Live CSI compared against this baseline powers change-point detection for occupancy. Baselines drift when furniture moves, doors open, or HVAC cycles change multipath. Production systems need either periodic re-baselining, slow adaptive updates, or explicit scene-change detection to trigger a reset.Machine learning progression
WiFi sensing ML is not one model — it is a ladder of representations and complexity, built over a decade of published systems.Classical: model the physics first (CARM, MobiCom 2015)
Classical: model the physics first (CARM, MobiCom 2015)
The foundational approach does not jump straight to deep learning. It builds two quantitative models:
- CSI–speed model — amplitude change frequency maps to limb movement speed (one wavelength of path-length change = 2π phase rotation; Doppler frequency converts to speed).
- CSI–activity model — different activities are characterized by which body parts move at which speeds (walking = periodic leg motion; falling = rapid vertical acceleration).
Convolutional models on spectrograms
Convolutional models on spectrograms
Treat CSI spectrograms as images. A small CNN learns motion textures — the frequency spread of a stride, the impulse of a sit-down, the narrowband signature of respiration. The workhorse for HAR once you have labeled windows.
Two-stream architectures: THAT (AAAI 2021)
Two-stream architectures: THAT (AAAI 2021)
Most early deep HAR models (LSTM on CSI sequences) only extract channel-over-time features — how each subcarrier evolves. They miss time-over-channel structure — how subcarriers correlate at a single instant.THAT runs both streams in parallel through a Multi-scale Convolution Augmented Transformer (MCAT), with Gaussian range encoding to preserve spatial ordering across subcarriers. Result: +2.2 points accuracy over the best LSTM baseline, and 1.8–3.4× faster inference — because a single temporal point is too granular to represent a meaningful CSI pattern; you need both axes.
Domain adaptation and cross-site transfer
Domain adaptation and cross-site transfer
A model trained in one room fails in another because multipath fingerprints differ. Three distinct approaches from the literature:Roaming synthesis (CrossSense, MobiCom 2018). Train an offline roaming model on a small calibration set from source and target sites. It synthesizes CSI training samples as if they were collected in the target environment — then fine-tune activity experts on the synthetic data. For gesture recognition, this boosted accuracy from ~20% to >90% cross-site. At runtime, a mixture-of-experts selector uses DTW similarity to pick which expert handles the current signal — one model cannot cover diverse inputs at scale.Adversarial environment stripping (EI, MobiCom 2018). A feature extractor, activity recognizer, and domain discriminator play a minimax game: the extractor learns features that maximize activity accuracy while minimizing the discriminator’s ability to identify which room or subject produced the sample. Produces environment- and subject-independent features — validated across WiFi, ultrasound, mmWave, and visible light.Consensus adversarial adaptation (CADA, AAAI 2019). Both source and target encoders embed into a shared invariant space until they “achieve consensus” — neither room’s fingerprint dominates. F-CADA extends this for few-shot labeled target data. Tested on WiFi gesture recognition under spatial dynamics; relevant when you have labeled data from several rooms and need one model for a new deployment.Mitigations that work in practice for Wavey-scale deployments:
- Per-site baselines before any classifier runs.
- Few-shot calibration — a handful of labeled examples from the target room (BeamSense’s cross-domain FSL improved accuracy 30–80% over prior transfer methods using beamforming feedback, not raw CSI).
- Fine-tuning the last layers on target-room data.
Beyond raw CSI: beamforming feedback (BeamSense, SIGCOMM 2023)
Beyond raw CSI: beamforming feedback (BeamSense, SIGCOMM 2023)
City-scale measurements show CSI extraction is available on a tiny fraction of deployed WiFi chipsets. Most commercial APs already transmit compressed beamforming reports (CBR) as part of standard 802.11ac/ax operation — no firmware hack required.BeamSense maps bidirectional CBR to multipath channels via fingerprint matching, then runs existing CSI-based algorithms on the reconstructed signal. Reported ~10% accuracy gain over CSI-only methods, with better cross-environment generalization. This is the commodity path forward as 802.11bf matures — sensing from what routers already emit, not from ESP32 CSI alone.
Multimodal fusion and label bootstrapping
Multimodal fusion and label bootstrapping
WiFi-only labels are expensive. The field bootstraps classifiers by training with richer modalities and deploying WiFi-only:Decision-level fusion (WiVi, CVPR Workshop 2019). A WiFi CNN (100×114 CSI frames at 100 pkt/s) and a vision C3D model each produce softmax outputs; a 4-layer DNN fuses at the decision level — not feature level. Combined accuracy 97.5%; WiFi alone 95.83%. Under lights-off, vision drops to 46.67% while WiFi holds 95.83%. Brightness and SNR thresholds disable each modality independently — useful pattern for any multimodal deployment where one sensor can fail.Cross-modal supervision (MM-Fi, NeurIPS 2023). 320k+ synchronized frames across WiFi CSI, mmWave, LiDAR, depth, and RGB; 40 subjects, 27 action classes, 4 environment domains. Train with vision/mmWave labels, deploy WiFi-only. Not Wavey’s default path, but it explains why published HAR numbers often assume training pipelines you do not have at the edge.
Wavey’s pragmatic stack
Wavey is built as an open pipeline, not a black-box API:1
Capture
ESP32 nodes stream timestamped CSI to a host.
2
Clean
Outlier rejection, filtering, phase sanitization.
3
Baseline
Learn and maintain an empty-room reference per deployment.
4
Features
Variance, spectral energy, and spectrogram tiles depending on the detection task.
5
Infer
Lightweight models for occupancy, motion, and presence; heavier classifiers where labeled data justifies them.
6
Emit
Events to the Console and downstream automations.
Related reading
How It Works
The physics layer: CSI, OFDM, multipath, and micro-Doppler.
Detection Ladder
What each task requires and how hard it is on commodity hardware.
Get Started
Deployment architecture and how to pick your first detection task.
WiFi Motion Without Camera
Deep dive on building an activity classifier from CSI.
