Wi-Fi routers can sense human motion. When a person moves, the radio reflections between a transmitter and a receiver change. These changes can be read from channel state information (CSI): the per-frequency amplitude and phase of the radio channel that every modern Wi-Fi chip already measures. The trouble is that CSI mixes the moving body with every wall and piece of furniture in the room. A gesture recognizer trained in one apartment fails in the next. Nobody can fix this by labeling data on site, because raw CSI means nothing to a human annotator without a synchronized camera. We propose to pretrain a CSI encoder by masked reconstruction: hide most of the small time-by-subcarrier patches in a recording and train the network to fill them in from nearby visible ones. Then, after deployment, the router keeps running that same cheap fill-in-the-blanks task on the unlabeled CSI it observes. It updates only a handful of normalization parameters so that its internal picture of the new room's background matches what it sees. No source data, no target labels, and no predicted class labels are involved in the update.
The practical point is that one objective does three jobs. It is the pretraining task that lets a few labeled recordings go a long way. Because each reconstruction is confined to a small local window, it is cheap enough to run on a router. And it is a label-free adaptation signal that does not trust the model's own predictions. That last property matters because the standard alternative, making predictions more confident, fails exactly when severe multipath shift makes the model confidently wrong. Since every CSI recording contains dozens of local windows, the signal also exists for a single sample. Batch-dependent methods do not have that.
Core Claim
A CSI encoder pretrained with local masked reconstruction can be adapted to a new room, day, or receiver placement without source data and without labels. The adaptation minimizes the same local reconstruction loss on incoming target recordings, updating only the per-channel scale and shift of the encoder's normalization layers while the task head stays frozen. The claim has two halves, and either can fail. The first half is accuracy: this test-time update recovers more cross-domain accuracy than re-estimating normalization statistics or minimizing prediction entropy on the same backbone. The second half is cost: per-sample adaptation cost stays near the unadapted inference cost and below that of the domain-adversarial test-time adaptation the field currently relies on. If the reconstruction update is no better than simply re-estimating normalization statistics, the method has no reason to exist, and the experiments are built to show that directly.
Written out, the deployment-time update is
$$\min_{\phi}\; \sum_{w \in W(x)} \big\| D\big(E_{\theta,\phi}(x_w^{\text{vis}})\big) - x_w^{\text{mask}} \big\|^2 \;+\; \lambda \,\|\phi - \phi_{\text{src}}\|^2,$$
where the symbols are as follows. $x$ is one incoming target CSI recording and $W(x)$ is the set of local time-by-subcarrier windows sampled from it. $x_w^{\text{vis}}$ and $x_w^{\text{mask}}$ are the visible and hidden patches of window $w$. $E_{\theta,\phi}$ is the encoder with frozen weights $\theta$ and adaptable normalization scale/shift parameters $\phi$, and $D$ is the small frozen reconstruction head. The final term is a cheap anchor that pulls $\phi$ back toward its value at deployment, $\phi_{\text{src}}$, with strength $\lambda$.
What Exists and What Is Missing
Four lines of prior work bear on this proposal, in different ways.
Two lines motivate it, because they show that self-supervision helps CSI sensing but stop short of label-free adaptation. The systematic studies by Xu et al. (Evaluating Self-Supervised Learning for WiFi CSI-Based Human Activity Recognition; Self-Supervised Learning for WiFi CSI-Based Human Activity Recognition: A Systematic Study) compare contrastive, clustering, and masked-autoencoder pretraining on CSI. They find that a masked autoencoder on a Vision Transformer transfers best across rooms, by more than 29% in some room-transfer settings, and they also flag that this model is data-hungry and expensive. However, they evaluate transfer only by probing or fine-tuning with target labels. We keep their finding that masked reconstruction is the right pretext for CSI, and we drop their reliance on target labels. AutoFi pretrains on unlabeled ambient CSI with a distance-preserving objective and then calibrates with one to three labeled gestures per class, reaching 83.31% and 89.71% on its router testbed. Our proposal removes that calibration step entirely.
Three papers occupy the source-free adaptation side for radio signals, and each fixes a design choice we avoid. DATTA is the closest competitor. It does unsupervised test-time adaptation for Wi-Fi activity recognition by aligning feature statistics and periodically resetting random weights to source values. But it requires a source model trained adversarially across several labeled source environments. It also raises per-sample latency from about 2 ms to about 10 ms, and to about 20 ms with resetting. Our proposal needs one labeled source environment plus unlabeled pretraining CSI, and it replaces random resetting with a parameter anchor. MTLoc handles source-free adaptation of coordinate regression on RFID with a mean-teacher model and nearest-neighbor correction in input space. That correction is impractical for high-dimensional CSI. It also shows that regression is where prediction-based adaptation struggles, which is a case where a reconstruction loss applies unchanged. Source-Free Open-World RF Fingerprint Identification prevents forgetting by fixing classifier geometry, but it addresses device identity rather than human motion. We note it as a complementary head design rather than a competitor.
The compute side supplies the method. LoMaR restricts masked reconstruction to small local windows with a lightweight multilayer-perceptron decoder. That makes attention cost linear in the number of windows and gives a 2.5× pretraining speedup over a standard masked autoencoder on ImageNet at 384×384, at 84.5% top-1. It is evaluated only on images and only as a pretraining speedup. LoMaR also reports a constraint we must respect: local reconstruction yields weaker features under a frozen linear probe and needs fine-tuning. We accept this, because the encoder is fully fine-tuned on source labels on a server before deployment. On the router, only the normalization parameters move.
The normalization-based adaptation methods supply the parameter subset we update and also act as the strongest simple competitors. These are Unsupervised BatchNorm Adaptation, which re-estimates normalization statistics, and Tent, which updates normalization scale and shift by entropy minimization and reaches 44.0% ImageNet-C error. Tent's own authors note its vulnerability to overconfident errors and its dependence on batch size. Those two weaknesses are what a per-sample, prediction-free loss is meant to address. The input-adapter approach of Adapt the Data, Not the Model gives +10.1 Macro-F1 over the best test-time method on AdaTime, but it trains with target labels, so it serves as an upper-reference rather than a competitor.
Research Program
Encoder design. We build a small Transformer encoder over CSI recordings tokenized into time-by-subcarrier patches, using amplitude and sanitized phase together, since Xu et al. found that combination helps self-supervised training. We use layer normalization rather than batch normalization, so the deployment update never depends on a batch.
Pretraining. We pretrain with local masked reconstruction. Windows span a fixed number of packets and a fixed fraction of the available subcarriers, so the same design covers 30-subcarrier Intel and 114-subcarrier Atheros hardware. About 80% of patches inside each window are masked, following LoMaR, and a small multilayer-perceptron decoder fills them in. The physical intuition for why this objective tracks domain shift is simple. The static multipath background is the most predictable part of a local window. When the room changes, the encoder's learned background prior is wrong, and reconstruction error rises before any class prediction is involved. Moving the normalization parameters to absorb the new background should then restore both reconstruction and the features the frozen head reads.
Training phase. On a server, we pretrain on an unlabeled CSI pool that excludes every evaluation target environment. We then fine-tune encoder and head jointly on one labeled source environment, keeping the reconstruction loss as an auxiliary term so the two objectives share features.
Deployment phase. Only the weights ship. For each incoming recording, the router takes one or a few gradient steps of the objective above on $\phi$ and then predicts.
Analysis. Three analyses accompany the method. The first measures, on held-out source data, how often the reconstruction gradient and the task gradient point in compatible directions with respect to $\phi$. If they conflict, the premise fails, and we want to see that before any target experiment. The second tests whether target reconstruction error, computed without labels, tracks target accuracy across domains. If it does, the same quantity doubles as a deployment-time health monitor. The third places the anchor strength $\lambda$ against DATTA's random resetting on long alternating-shift streams.
Regression extension. As a secondary test of task-independence, we apply the identical update to a continuous target. This will be location or pose regression on MM-Fi if its annotations support it; the file does not confirm which annotations MM-Fi provides. There, entropy methods do not apply, and MTLoc's idea, with neighbor search moved from input space into the encoder's feature space, is the comparison.
Baselines
Do nothing. The naive reference is the same pretrained and source-fine-tuned encoder deployed unchanged. Every method shares its weights, so all gains are measured from one starting point.
Statistics re-estimation. The first adaptation competitor is Unsupervised BatchNorm Adaptation in its layer-norm-compatible form, which re-estimates feature statistics on target data with no gradient steps. It is the cheapest serious rival, and a reviewer would expect it to capture most of the room-background shift on its own. It runs on the identical backbone and stream.
Entropy minimization. Tent runs on the identical backbone, updating the same $\phi$ with the same step count and learning-rate search budget, at batch sizes of 1, 8, and 64. This isolates whether the reconstruction loss is a better adaptation signal than prediction confidence at equal cost.
The strongest existing method. DATTA runs under its own Widar3.0-G6D protocol (sequential, reversed, and alternating domain orders) with its multi-environment adversarial source training. That means DATTA gets more labeled source environments than our method, which is the honest form of the comparison. We also run a second DATTA variant restricted to our single labeled source environment. The file reports DATTA only as up to 8.1% F1 above prior methods on Widar3.0-G6D; no reported absolute F1 was found on Lacuna for DATTA on Widar3.0-G6D, so we re-run it and report both versions. Its reported latencies, about 10 ms per sample with test-time adaptation and about 20 ms with resetting on an RTX 2070, set the cost bar. Beating it means matching or exceeding its F1 under the restricted setting, staying within a few points under its full multi-environment setting, and doing so at lower per-sample adaptation latency on the same GPU class.
Label-using references. AutoFi few-shot calibration, with one and three labeled shots, is a reference that uses target labels. Its reported 83.31% and 89.71% come from its own router testbed, so we re-run it on our benchmarks.
Ablations of the key ingredient. Two ablations isolate the proposal. One replaces local windows with global masked reconstruction, at the same pretraining data and step count, both at pretraining and at test time. The other keeps local pretraining but adapts with statistics re-estimation only. If this second ablation matches the full method, the gain comes from the pretraining, not the test-time objective, and we will report it that way.
Why not just…?
Why not just re-estimate normalization statistics on the self-supervised backbone? This is the real threat. If the room change is mostly a shift in feature mean and variance, statistics re-estimation will capture it at near-zero cost, and the reconstruction update adds little. Nothing in the file settles it for CSI, so the head-to-head comparison on the same backbone is the central experiment, and the outcome decides the paper's claim. We expect the reconstruction update to win on shifts that change the structure of the multipath background rather than its scale, such as receiver relocation and cross-room transfer. We expect statistics re-estimation to be competitive on the mild day-to-day drift of 3DO. If it wins everywhere, the honest contribution reduces to "local masked pretraining plus statistics re-estimation," and the note will say so.
Why not just collect a few labeled gestures in each new room, as AutoFi does? The file gives two reasons this falls short in deployment. Xu et al. stress that CSI cannot be labeled by eye, so calibration needs a camera or a scripted session. DATTA's use of the 3DO dataset shows CSI drifting across consecutive days, which a one-time calibration does not follow. We test the second point directly: we calibrate AutoFi on day one of 3DO and evaluate it on later days against our continuously adapting model. If few-shot calibration still wins after drift, that is a legitimate finding about where label-free adaptation is and is not worth its complexity.
Why not just train a global masked autoencoder in the cloud and adapt it with DATTA-style feature alignment? Pretraining compute is indeed cheap in the cloud, and we do not rest the case on pretraining speed. The cost that matters is the test-time loss, which runs on every sample on the router. Global reconstruction there costs attention that is quadratic in the number of patches, whereas local windows bound it. Xu et al. also report that global masked autoencoders degrade when unlabeled CSI is limited. The global-reconstruction ablation measures accuracy and per-sample latency at matched pretraining data, which settles whether locality is needed or merely convenient.
Decisive Experiments
Benchmarks. The primary benchmark is Widar3.0-G6D under DATTA's sequential, reversed, and alternating domain orders, scored by macro-F1. 3DO tests drift across days, and MM-Fi tests transfer across Wi-Fi standards. UT-HAR and SignFi test whether local pretraining retains the label efficiency of global pretraining. On those two, the reported linear-probe references are 87.50% for SwAV with a ResNet on UT-HAR and 88.77% for a masked autoencoder with a ViT on SignFi, both from Xu et al. On Widar, their masked autoencoder reaches 69.24% under linear evaluation. Because LoMaR warns that local features probe poorly, we report both linear-probe and fine-tuned numbers and do not hide a probe gap.
Cost measurements. Cost is per-sample adaptation latency, peak memory, and floating-point operations, measured on an RTX 2070-class GPU for comparability with DATTA and on an embedded CPU board representative of a router.
What would refute or confirm the claim. Five outcomes decide the proposal. It is refuted if statistics re-estimation matches the reconstruction update on Widar3.0-G6D and MM-Fi. It is weakened if Tent matches it at batch size 1. It is undercut on cost if local and global test-time reconstruction give equal accuracy but local is not meaningfully cheaper. It is supported if target reconstruction error predicts target F1 across domains without labels, which would make the method's failure detectable in the field. Finally, if the regression extension on MM-Fi shows gains where entropy methods cannot run at all, that supports the claim that the adaptation signal is independent of the task.
References
- Evaluating Self-Supervised Learning for WiFi CSI-Based Human Activity Recognition
- Self-Supervised Learning for WiFi CSI-Based Human Activity Recognition: A Systematic Study
- AutoFi: Towards Automatic WiFi Human Sensing via Geometric Self-Supervised Learning
- DATTA: Domain-Adversarial Test-Time Adaptation for Cross-Domain WiFi-Based Human Activity Recognition
- MTLoc: A Confidence-Based Source-Free Domain Adaptation Approach for Indoor Localization
- Source-Free Open-World RF Fingerprint Identification
- Efficient Self-supervised Vision Pretraining with Local Masked Reconstruction
- Unsupervised BatchNorm Adaptation (UBNA): A Domain Adaptation Method for Semantic Segmentation Without Using Source Domain Representations
- Tent: Fully Test-Time Adaptation by Entropy Minimization
- Adapt the Data, Not the Model: Input-Space Adaptation for Frozen Time-Series Predictors