From Activity Recognition to Shift Detection: Variational Wi-Fi Sensing with Evidential Uncertainty
Authors: Luca Cotti, Marco Cominelli, Francesco Gringoli, Lance M. Kaplan, Mani B. Srivastava, Trevor Bihl, Erik Blasch, Kara Combs, Daniel O. Brigham, Federico Cerutti
Organizations: Department of Information Engineering, University of Brescia, Via Branze 38, Brescia, 25123, Lombardy, Italy · Department of Electronics, Information and Bioengineering, Politecnico di Milano, Piazza Leonardo da Vinci 32, Milan, 20133, Lombardy, Italy · U.S. Army DEVCOM Army Research Laboratory, 2800 Powder Mill Road, Adelphi, 20783, Maryland, USA · Electrical and Computer Engineering Department, University of California, 405 Hilgard Ave, Los Angeles, 90095, California, USA · College of Business and Engineering, Shawnee State University, 940 2nd St, Portsmouth, 45662, Ohio, USA · Air Force Research Laboratory, 1864 4th Street, Wright-Patterson AFB, 45433, Ohio, USA · Air Force Research Laboratory, 2241 Avionics Circle, Wright-Patterson AFB, 45433, Ohio, USA · Cardiff University, Cardiff CF10 3AT, Cardiff, UK · University of Southampton, University Road, Southampton, SO17 1BJ, UK · Imperial College London, Exhibition Rd, London, SW7 2AZ, UK
Human motion perturbs wireless channels, making commodity Wi-Fi devices a practical platform for device-free activity recognition. Yet Channel State Information (CSI) also depends strongly on the person, receiver position, recording session, and surrounding environment, so a classifier can continue producing activity labels after its deployment conditions have moved away from those seen during training. We propose Wi-HAR, a multi-antenna architecture in which four Variational Auto-Encoders learn compact distributions from raw Wi-Fi 6 CSI magnitudes and a delayed-fusion classifier combines their means and log-variances. On twelve activities from a public benchmark, Wi-HAR reaches 96.6% median recognition accuracy, compared with 70.8-81.5% for independently optimized single-antenna models, showing that the antennas provide complementary views of the same activity. We then use the same latent backbone to detect deployment shifts without using shifted samples for model selection or calibration. A class-conditional uncertainty score derived from Evidential Deep Learning achieves a macro-average ROC-AUC of 0.897 across eleven datasets that change receiver position, participant, recording session, or room, and detects 82.5% of shifted samples at a realized 5.2% in-distribution rejection rate. Detection performance nevertheless varies substantially across receiver positions, showing that the same physical change does not induce a uniform uncertainty response. The compact representation also supports shallow decision-tree analysis using variables from several antennas.
Figures & tables
A. Walk
B. Run
C. Jump
D. Sit
E. Empty room
F. Stand
G. Wave hands
H. Clap
I. Lie down
J. Wipe
K. Squat
L. Stretch
Table 1: The twelve activities used in this study, with the labels from the original dataset [ 9 ] .
Figure 1: Layout of the experimental testbed. The highlighted area in the middle of the room indicates where the activities are performed.
Figure 2: Scheme of the Wi-HAR architecture. Each CSI magnitude spectrogram is processed by a separate VAE to extract a compressed latent representation. The latent representations from the four VAEs are then concatenated and fed to an MLP classifier to predict the target activity.
Figure 3: Time-frequency representation of the CSI magnitude collected by the four antennas of a single Wi-Fi receiver while a person is walking inside the room. The four channels exhibit different properties because the antennas are physically spaced by more than half of the wavelength; thus, the indoor multipath effects on different antennas appear to be uncorrelated. We argue that combining the CSI collected simultaneously at different antennas can provide a more descriptive representation of the target activity.
Encoder
Layer
Kernel size/Nodes
Stride
Activation
Input
T×M
-
-
Conv2D ×C
(ki,1)×M
(si,1)
BatchNorm + GELU
Flatten
-
-
-
Linear →μ
J
-
-
Linear →logσ2
J
-
-
Table 2: Structure of the per-antenna VAE . M=256 is the number of subcarriers, T=450 the window size, C the number of convolutional layers (tuned via Optuna), ki and si the kernel size and stride of the i -th layer along the time axis, and J the latent dimension.
Spec
Layer 1
Layer 2
Layer 3
A
(5,5)
(5,5)
(3,3)
B
(5,5)
(5,5)
(2,2)
C
(3,3)
(5,5)
(5,5)
Table 3: Candidate convolutional layer specifications for the per-antenna VAE encoder. Each row defines a 3-layer stack; each entry is (kernel size, stride) along the time axis. The subcarrier dimension is never convolved (kernel size and stride fixed to 1).
J
η
βmax
B
Conv.
Fusion layers
Dropout
P25
Median
P75
1
0.0036
3.3460
128
C
2
0.01
0.9031
0.9323
0.9411
2
0.0032
17.8439
64
C
2
0.02
0.9594
0.9656
0.9703
3
0.0033
12.3290
64
A
1
0.30
0.9526
0.9646
0.9688
4
0.0068
19.0895
64
C
1
0.24
0.9547
0.9688
0.9750
5
0.0099
6.2654
32
C
1
0.15
0.9521
0.9677
0.9688
6
0.0016
3.7391
64
B
1
0.30
0.9563
0.9677
0.9724
Table 4: Hyperparameter search results across ten fixed random seeds. η is the learning rate, βmax the maximum KL weight, B the batch size, and Conv. the convolutional specification from Table 3 .
Figure 4: Confusion matrix for the best-performing VAE architecture with a latent space of 4 parameters.
Figure 5: t-SNE projections of the latent spaces learned from different antennas, with J=2 . Each original four-parameter point describes a bivariate Gaussian distribution, and the encoder maps each CSI window to one such point. Colors indicate the corresponding activities; clearer separation between activity clusters is associated with higher classification accuracy.
Figure 6: Ablation study comparing the best-performing VAE architecture with a latent space of 4 parameters against single-antenna architectures. “Fusion of best” trains a classifier on the latent representations of independently optimized single-antenna VAEs , whereas Wi-HAR jointly optimizes the VAEs and classifier end-to-end.
Name
Median
P25
P75
Antenna 1
0.8146
0.8036
0.8313
Antenna 2
0.8063
0.7224
0.8313
Antenna 3
0.7875
0.7432
0.8036
Antenna 4
0.7083
0.6505
0.7313
Fusion of best
0.9375
0.9266
0.9411
Wi-HAR
0.9646
0.9594
0.9703
Table 5: Ablation study results. “Fusion of best” trains a classifier on the latent representations of independently optimized single-antenna VAEs , whereas Wi-HAR jointly optimizes the VAEs and classifier end-to-end.
Figure 7: Decision tree with depth of four for the first six activities and the J=2 representation.
Scenario
Softmax
EDL
GEN
S1b
0.918
0.970
0.968
S1c
0.327
0.978
0.901
S2a
0.512
0.693
0.571
S2b
0.648
0.970
0.965
S2c
0.541
0.974
0.956
S4a
0.702
0.790
0.814
Table 6: ROC - AUC of the predicted-class-conditional two-sided uncertainty score. S1a is the in-distribution reference; each remaining scenario is treated independently as the positive (shifted) class. Bold values indicate the highest AUC per scenario. Blue-highlighted scenarios are the most similar to S1a; orange-highlighted scenarios are the most dissimilar.
Model
S1a false positives
90% interval
Mean shift detection
90% interval
Softmax
5.57%
[4.58%, 6.99%]
22.54%
[19.52%, 30.26%]
EDL
5.21%
[4.03%, 6.04%]
82.51%
[81.95%, 82.94%]
GEN
3.91%
[3.13%, 5.53%]
65.12%
[62.84%, 66.45%]
Table 7: Performance at the nominal 5% split-conformal rejection level. Values are averaged over 50 class-stratified splits; shift-detection rates are macro-averages across the eleven shifted datasets, and intervals contain the central 90% of results.
Figure 8: Paired Bayesian-bootstrap comparison of EDL and GEN . Fig. 8(a) shows the posterior median and 95% credible interval of AUCEDL−AUCGEN ; Fig. 8(b) gives the probabilities of a meaningful GEN advantage, practical equivalence, and a meaningful EDL advantage under the ±0.02 ROPE .
Estimand
Mean
95% credible interval
P(GEN)
P(ROPE)
P(EDL)
Fixed eleven scenarios
0.0757
[0.0581, 0.0934]
0.000
0.000
1.000
Scenario bootstrap
0.0764
[0.0069, 0.1721]
0.003
0.059
0.938
Table 8: Aggregate Bayesian comparison for Δ=AUCEDL−AUCGEN under the ±0.02 ROPE .
Recently, Wi-Fi sensing has played a significant role in Human Activity Recognition (HAR), as it enables the detection of various activities using only Wi-Fi signals, ensuring privacy and remaining non-intrusive for the user. However, environmental characteristics such as reflective surfaces, hardware offsets, and other physical impairments affect recognition by the neural network, subsequently causing errors and significantly reducing model accuracy. To overcome this problem we present the WiFuse framework, a dual-stream Channel State Information (CSI) framework for human activity recognition (HAR) that pairs denoised time-domain amplitude variations with 2D-FFT-derived Delay-Doppler motion representations computed from the sanitized channel phase. The fused representation feeds a hybrid ResNet-Temporal Convolutional Network (TCN) neural architecture augmented with channel and spatio-temporal attention, where the ResNet extracts spatial-spectral features and the TCN models long-range temporal dependencies; a decoupled two-stage transfer learning strategy is employed to improve optimization stability and feature reuse. We conduct extensive experiments on two public datasets, including comparisons against state-of-the-art methods and alternative hybrid architectures, ablation studies, and cross-dataset and domain-adaptation evaluations. The proposed framework reaches an overall accuracy of up to 95.28% across the four environments of the XRF55 dataset and up to 98.20% on the multi-user Wi-MIR dataset. Overall, the results indicate that combining amplitude and Delay-Doppler representations within a dual-stream strategy, enhanced by transfer learning, improves recognition performance under conditions that typically degrade deep neural networks, such as class overlap, multipath propagation, noise, and interference.
Alison M. Fernandes, Hermes I. Del Monego, Bruno S. Chang +3
Universidade Tecnol´ogica Federal do Paran´a (UTFPR), Programa de P´os-Graduac¸˜ao em Engenharia El´etrica e Inform´atica Industrial (CPGEI-CT), Av. Sete de Setembro, 3165, Curitiba, 80230-901, Brazil · INESC TEC, Faculdade de Engenharia, Universidade do Porto, Rua Dr. Roberto Frias, Porto, 4200-465, Porto, Portugal
Human Activity Recognition (HAR) using WiFi signals has emerged as a transformative technology for smart homes, healthcare monitoring, security systems, and ambient assisted living. Unlike traditional camera-based systems that raise significant privacy concerns and fail in low-light conditions, or wearable sensors that require user compliance, WiFi-based HAR is non-intrusive, privacy-preserving, cost-effective, and works seamlessly in any lighting condition. This paper presents a comprehensive approach to recognize three distinct human activities: "No Presence" (empty room), "Walking", and "Walking + Arm-waving" using the Wallhack1.8k WiFi spectrogram dataset. We propose three key improvements to address the main challenges in WiFi-based HAR. First, to address high performance variance, we implement ensemble learning with five different CNN architectures (Deep CNN, Wide CNN, MobileNetV2, ResNet50V2, and EfficientNetB0). Second, to address the small dataset size limitation, we apply aggressive data augmentation techniques including time-warping, frequency masking, and noise addition. Third, to evaluate real-world generalization capability, we perform cross-scenario evaluation (training on Line-of-Sight and testing on Non-Line-of-Sight) and cross-antenna evaluation (training on Biquad antenna and testing on PIFA antenna). Our ensemble model achieved a test accuracy of 94.87% on the LOS scenario with Biquad antenna, outperforming the best individual model by 0.66%. Data augmentation improved Random Forest performance from 60% to 95%. Cross-scenario evaluation showed minimal accuracy drops of only 1.37% and 2.07%, demonstrating strong generalization capabilities. The results indicate that the proposed approach is robust, reliable, and suitable for real-world deployment in diverse environments with different hardware configurations.
Maheen Arshad, Qindeel E Zahra, Muhammad Khuram Shahzad
Department of Computing, School of Electrical Engineering and Computer Science National University of Sciences and Technology (NUST), Islamabad, Pakistan
We address Human Activity Recognition (HAR) utilizing Wi-Fi Channel State Information (CSI) under the joint requirements of causal interpretability, symbolic controllability, and direct operation on high-dimensional raw signals. Deep neural models achieve strong predictive performance on CSI-based HAR (CHAR), yet rely on continuous latent representations that are opaque and difficult to modify; purely symbolic approaches, in contrast, cannot process raw CSI streams. We propose a fully automatic and strictly decoupled pipeline in which CSI magnitude windows are compressed by a categorical variational autoencoder with Gumbel-Softmax latent variables under a capacity-controlled objective, yielding a compact discrete representation. The encoder is then frozen and used as a deterministic mapping to one-hot latent trajectories. Causal discovery is performed on these trajectories to estimate class-conditional temporal dependency graphs. Statistically supported lagged dependencies are translated into Linear Temporal Logic (LTL) rules, producing a fully symbolic and deterministic classifier based solely on rule evaluation and aggregation, without any learned discriminative head. Because rules are defined over discrete latent variables, antenna-specific rule sets can in principle be combined at the symbolic level, enabling structured multi-antenna fusion without retraining the encoder. Results from CHAR Latent Temporal Rule Extraction (CHARL-TRE) indicate competitive performance while preserving explicit temporal and causal structure, showing that deterministic symbolic classification grounded in unsupervised discrete latent representations constitutes a viable alternative to end-to-end black-box models for wireless HAR.
Luca Cotti, Luca Lavazza, Marco Cominelli +10
University of Brescia, Italy. · Università La Sapienza Roma, Italy. · DEIB, Politecnico di Milano, Italy. +8