Manuscript Offprint
arXiv:2611.24596From Activity Recognition to Shift Detection: Variational Wi-Fi Sensing with Evidential Uncertainty
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
[orcid=0009–0004–6351–556X]
[orcid=0000–0002–1838–348X]
[orcid=0000–0003–2621–582X]
[orcid=0000–0002–3627–4471]
[orcid=0000–0002–3782–9192]
[orcid=0000–0003–2431–2749]
[orcid=0000–0001–6894–6108]
[orcid=0000–0002–6313–8563]
[orcid=0000–0002–3630–8483]
[orcid=0000–0003–0755–0358]
From Activity Recognition to Shift Detection: Variational Wi-Fi Sensing with Evidential Uncertainty
Abstract
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 Receiver Operating Characteristic (ROC) -Area Under the Curve (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.
1 Introduction
Human motion changes the multipath propagation of Wi-Fi signals and therefore leaves measurable signatures in the Channel State Information (CSI) observed by a receiver. These signatures make commodity Wi-Fi devices a practical platform for passive and device-free sensing, including gesture recognition, motion tracking, and human activity recognition [18]. Recent Wi-Fi 6 (i.e., IEEE 802.11ax) devices expose particularly fine-grained CSI measurements [26], further increasing the amount of information available for sensing.
The same dependence on the propagation environment that makes CSI useful for sensing also makes recognition models sensitive to deployment conditions. Changes in receiver position, participant, recording session, or room geometry alter the multipath channel and can move the observed CSI away from the distribution seen during training [9]. A classifier may therefore continue producing activity labels even after the physical conditions underlying those predictions have changed. High recognition accuracy under the original collection condition is insufficient for deployment: a sensing system should recognize activities under familiar conditions and indicate when its inputs no longer resemble those conditions.
We address these two requirements with Wi-HAR, a multi-antenna architecture based on Variational Auto-Encoders (VAEs) [16]. Four antenna-specific encoders independently map raw CSI magnitudes to compact Gaussian latent representations, and a delayed-fusion classifier combines their means and log-variances for activity recognition. The use of multiple antennas is central to the architecture because physically separated antennas observe different multipath channels and can therefore provide complementary views of the same activity. At the same time, the representation is deliberately compact: unlike autoencoder-based Human Activity Recognition (HAR) systems that use latent spaces with tens of neurons [23], Wi-HAR represents each antenna with only 2 to 12 distribution parameters. This compression keeps the fused representation small enough to examine directly while retaining sufficient information for activity discrimination.
We use the same latent backbone to determine whether the deployment conditions have shifted. We compare the conventional Softmax classifier with Evidential Deep Learning (EDL) [22] and Generative Evidential Neural Network (GEN) [21], and construct a class-conditional anomaly score that measures how unusual a prediction’s uncertainty is relative to training samples assigned to the same activity. We evaluate this score across eleven datasets that change collector position, participant, recording session, or room. No shifted dataset contributes to model selection, construction of the uncertainty reference, or threshold calibration, so the experiment tests whether uncertainty can expose previously unseen changes in sensing conditions rather than learn the particular shifts contained in the benchmark.
The experiments support three main findings. First, the compact multi-antenna representation reaches a median activity-recognition accuracy of 96.6%, whereas independently optimized single-antenna models reach 70.8–81.5%, showing that the four channels provide complementary information about the observed activities. Second, uncertainty in the same latent backbone provides a useful signal of changed deployment conditions: EDL attains a macro-average Receiver Operating Characteristic (ROC) -Area Under the Curve (AUC) of 0.897 across the eleven shifted datasets and detects 82.5% of shifted samples at a realized 5.2% in-distribution rejection rate. Detection performance nevertheless varies substantially across collector positions, showing that the same category of physical change does not produce a uniform uncertainty response. Third, the compact representation remains amenable to direct analysis: a depth-four decision tree reaches 96.5% accuracy on six activities and bases its decisions on latent variables from several antennas, providing an interpretable counterpart to the multi-antenna ablation results.
This article substantially extends the conference study in [8]. We expand the recognition task to all twelve activities in the public benchmark, search a broader set of encoder and fusion architectures, and compare multi-antenna fusion with independently optimized single-antenna models. More importantly, we extend Wi-HAR from closed-set activity recognition to deployment-shift detection by introducing the class-conditional uncertainty analysis described above, and evaluating both threshold-free and conformally calibrated operating points across eleven controlled changes in sensing conditions. We also examine the learned representation with a shallow decision tree. Together, these experiments test whether a compact variational representation can support accurate activity recognition while also providing an explicit signal that the deployment conditions underlying the classifier have changed.
2 Background
2.1 CSI Data Measurement
Let denote the signal transmitted by a generic Wi-Fi device. Within each Wi-Fi frame, contains consecutive Orthogonal Frequency-Division Multiplexing (OFDM) symbols (), each spanning orthogonal narrow-band subcarriers. To construct the th symbol in the frequency domain, the transmitter maps the input bits onto a vector of complex modulation symbols and then applies the Inverse Discrete Fourier Transform (IDFT) to obtain the time-domain waveform .
The value of depends on both the transmission bandwidth and the Wi-Fi standard. For example, Wi-Fi 4 (IEEE 802.11n) allocates subcarriers over channels, whereas Wi-Fi 6 (IEEE 802.11ax) can allocate up to subcarriers over channels.
Wireless channels are generally frequency-selective and therefore affect each subcarrier differently. Neglecting noise and interference, we express the th received OFDM symbol in the frequency domain as
where is the frequency response of the wireless channel and is the element-wise product (i.e., Hadamard product) that expresses the channel effect on the subcarriers of the OFDM frame.
To equalize the received signal, the receiver must estimate . Standard OFDM symbols, also called training symbols, in the Wi-Fi frame preamble enable this estimate through Eq. 2. The resulting CSI, , is the receiver’s quantized approximation of the channel response for a given frame. After computing , the receiver equalizes the remaining data symbols in the frame and recovers the transmitted symbols by computing
for successive values of . When the receiver has antennas spaced at least half a wavelength apart, we generalize Eqs. 1 and 2 by deriving for each receiving antenna , thereby measuring the CSI of several channels simultaneously from a single Wi-Fi frame transmission.
2.2 Related Work on Wi-Fi Sensing
Wi-Fi sensing emerged as a research field in 2011, following the release of the first public CSI extraction tool [13] and the pioneering work of [1]. Researchers have since developed numerous methods that use Wi-Fi signals for environmental monitoring. We focus here on HAR, the application most directly related to our contribution, while other representative applications include person detection and identification [6, 25], fall detection [29], and device-free localization [11].
Early works [12, 31, 7] established that human activities induce measurable variations in CSI, motivating the use of deep learning models to capture the complex relationship between wireless channel measurements and activity labels. Subsequent approaches explored a variety of architectures, including autoencoders [12], recurrent neural networks [31], and long short-term memory models [7]. Comprehensive surveys of CSI-based Wi-Fi sensing can be found in [20].
Despite strong In-Distribution (ID) performance, many of these methods exhibit limited robustness when deployed across different environments, out-of-distribution (OoD) humans, or various hardware configurations. To address this limitation, several studies proposed preprocessing techniques aimed at extracting environment-invariant features before classification. Representative examples include dimensionality reduction through principal component analysis [28], extraction of physically meaningful features such as micro-Doppler signatures [19], and signal processing pipelines for denoising and feature enhancement [15]. Few-shot learning has also emerged as a promising strategy for cross-domain adaptation, with encouraging results on limited activity sets [3, 30, 24]. However, recent benchmarks show that generalization across realistic deployment conditions remains an open challenge [9].
Recent work applies transformer-based architectures to CSI-based HAR [17], using self-attention to model long-range temporal dependencies across subcarriers. Although these models achieve strong predictive performance, they remain primarily discriminative because they map CSI measurements directly to activity labels without explicitly modeling the underlying data distribution. They consequently offer limited interpretability and no explicit mechanism for estimating uncertainty or separating environment-specific factors from activity-related information. Adversarial domain adaptation [20] provides another route to greater robustness, but it typically requires target-domain data during training.
In contrast, our approach adopts VAEs to learn compact and structured latent representations directly from CSI measurements. This enables both uncertainty-aware modeling and post-hoc interpretability without requiring environment-specific supervision.
2.3 Variational Auto-Encoders
We use generative models to analyze the dependencies within the CSI dataset. Given a set of target classes , these models estimate either the class-conditional density of a sample or the joint distribution [5].
The VAE is a widely used generative model because it makes relatively mild modeling assumptions and supports efficient optimization through backpropagation [16]. A VAE assumes a dataset containing independent and identically distributed (i.i.d.) samples of a random variable , generated through a process that involves an unobserved continuous random variable . Because both the generative parameters and the latent variables underlying the observations are unobserved, the model introduces a variational recognition model and learns its parameters . A probabilistic encoder approximates the intractable true posterior by producing a distribution over the latent values from which a datapoint could have arisen, while a probabilistic decoder produces a distribution over the observations associated with each latent value .
The marginal likelihood is the sum of the marginal likelihoods of the individual datapoints:
We can rewrite each term as
where is the non-negative Kullback-Leibler (KL) divergence from the approximate posterior to the true posterior, and is the variational lower bound on the marginal likelihood of datapoint , i.e.,
We can therefore rewrite Eqs. 4 and 5 as
where the chosen approximate posterior is obtained through the reparameterization trick [16] using a differentiable transformation with . We can often integrate the KL divergence analytically, whereas we estimate the expected reconstruction term by sampling values:
where with . Equation 7 is an estimator of the variational lower bound and is therefore maximized. Equivalently, we minimize its negative as a loss function: the KL divergence of the approximate posterior acts as a regularization term, while the negative expected log likelihood represents the reconstruction error.
3 Methodology and Hypotheses
The Wi-HAR architecture uses VAEs to learn compact latent representations of CSI measurements collected by passive Wi-Fi radars. It exploits the multi-antenna capabilities of modern Wi-Fi receivers by processing each antenna’s CSI with a separate VAE and combining the resulting latent representations for downstream classification. In this section, we describe the experimental testbed, data preprocessing steps, architectural details, hyperparameter optimization strategy, and the hypotheses tested by the activity-recognition and deployment-shift experiments.
3.1 Experimental Testbed
We evaluate Wi-HAR on the public CSI dataset introduced in [9], which was collected in a realistic indoor environment with two ASUS RT-AX86U devices configured as transmitter and receiver while a human subject performed predefined activities. The dataset contains CSI measurements from IEEE 802.11ax transmissions over channels with 2048 OFDM subcarriers, sampled at 150 frames per second for 80 seconds per activity. We focus on scenario S1, which records participant A performing the twelve activities in Table 1 in a laboratory, and use sub-scenario S1a, recorded by collector a, to train and evaluate the model.
Table 1: The twelve activities used in this study, with the labels from the original dataset [9].
| 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 |

Figure 1: Layout of the experimental testbed. The highlighted area in the middle of the room indicates where the activities are performed.
The activities take place in the central area of an approximately 46-square-metre room, with the transmitter on the west wall and the receiver on the east wall, as shown in Fig. 1. The receiver’s four physically separated antennas compute the CSI of their corresponding channels simultaneously and independently. Participants perform static activities (e.g., sitting and standing) at the center of the playground area and dynamic activities (e.g., walking and running) throughout the area.
3.2 Data preprocessing
In order to maintain the temporal structure of the CSI measurements while providing sufficient data for training, validation, and testing, we train each VAE on temporal windows obtained with a sliding-window procedure. Each window spans 3 seconds sampled at 150 frames per second, giving time steps, and consecutive windows begin 50 samples apart, which corresponds to a one-third-second stride. To reduce the data size while preserving the underlying physical channel response, we reduce the original CSI from 2048 to 256 subcarriers by discarding the upper half of the bandwidth and retaining every fourth remaining subcarrier. These reductions also make Wi-HAR compatible with the older 802.11ac standard, which uses channels. Each VAE therefore receives a CSI-magnitude window of shape , where is the number of time steps and is the number of subcarriers.
To prevent temporal data leakage caused by overlapping sliding windows while ensuring that evaluation sets remain representative of the full recording sessions, a deterministic block-wise temporal splitting procedure is applied to each activity recording. Because CSI is recorded continuously over extended time blocks, human activity execution naturally undergoes non-stationary variations, such as spatial drift or posture changes, causing early parts of a recording to differ physically from later parts. A simple single continuous split would create an unrepresentative test set containing only late-stage session dynamics, whereas random window shuffling would cause severe data leakage by placing overlapping adjacent windows into both training and testing sets. Instead, we partition each activity recording into four equal, contiguous temporal segments. Within each segment, the data is sliced sequentially without random shuffling into training, validation, and test sets using a 70:10:20 split ratio. The sliced subsets from all four segments are then aggregated for each activity class.
3.3 Architecture
Wi-HAR has two modules. The first contains four VAEs, one per receiving antenna, which independently map the raw CSI magnitude to compressed multivariate-Gaussian latent representations. The second concatenates these four representations and uses a Multi-Layer Perceptron (MLP) classifier to predict the target activity.
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.
Most Wi-Fi sensing studies still use the single-antenna CSI extraction system introduced in [13]. Current Wi-Fi devices, however, usually have multiple antennas that can observe several orthogonal wireless channels at the same time and thus provide a more informative description of the environment.
Different antennas on the same receiver capture distinct channels directly in their CSI measurements, as illustrated in Fig. 3. When the antennas are spaced by more than half a wavelength, complex indoor multipath effects make their CSI measurements uncorrelated. Wi-HAR therefore processes the antennas jointly so that the classifier can use the complementary information they provide.

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.
Although CSI is a complex vector that represents the wireless channel’s frequency response (cf., Section 2.1), we use only its magnitude and leave the effect of phase information for future work. We interpret each sequence of CSI-magnitude measurements as a spectrogram and normalize its amplitude by the maximum value in the dataset.
For each of the VAEs, we assume that the prior over is the centered isotropic multivariate Gaussian . We use a factorized Gaussian decoder likelihood with fixed unit covariance,
where is the decoder output and parametrizes the conditional mean; the decoder does not predict a covariance. Consequently, maximizing the log-likelihood term in Eq. 10 is, up to an additive constant, equivalent to minimizing the squared reconstruction error. To approximate the intractable true posterior , we assume it takes an approximate Gaussian form with diagonal covariance, so the variational approximate posterior is:
where the mean and standard deviation of the approximate posterior are the outputs of the encoder. Samples from the posterior are obtained via the reparameterization trick (cf., Eq. 7) as , where . If the latent space comprises independent Gaussian dimensions, the resulting -weighted Evidence Lower Bound (ELBO) estimator for datapoint is:
where is the number of Monte Carlo samples drawn from the posterior and weights the KL term. Equation 7 presents the standard ELBO, which is recovered from Eq. 10 when ; here, we use the -weighted variant and optimize its maximum value as described in Section 3.4.
Each antenna’s VAE uses the symmetric convolutional encoder and decoder summarized in Fig. 2. The encoder treats the subcarriers as channels and applies a stack of 2D convolutional layers only along the time axis, with kernel size and stride fixed at 1 along the subcarrier dimension, to compress the temporal dimension progressively. Batch normalization and a Gaussian Error Linear Unit (GELU) activation follow each convolutional layer, after which two independent linear heads produce the mean and log-variance of the approximate posterior. The decoder mirrors this structure: a linear layer projects the sampled latent vector to the pre-flatten feature-map shape, and a stack of transposed convolutions then upsamples it along the time axis, using batch normalization and GELU activations on every layer except the last. Optuna selects the convolutional layer count, kernel sizes, strides, and latent dimension (cf., Section 3.4).
Table 2: Structure of the per-antenna VAE. is the number of subcarriers, the window size, the number of convolutional layers (tuned via Optuna), and the kernel size and stride of the -th layer along the time axis, and the latent dimension.
| Encoder | |||
|---|---|---|---|
| Layer | Kernel size/Nodes | Stride | Activation |
| Input | - | - | |
| Conv2D | BatchNorm + GELU | ||
| Flatten | - | - | - |
| Linear | - | - | |
| Linear | - | - | |
| Latent space | |||
| Decoder | |||
| Layer | Kernel size/Nodes | Stride | Activation |
| Linear | flat dim | - | GELU |
| Reshape | - | - | - |
| ConvTranspose2D | BatchNorm + GELU† | ||
| Output | - | - | |
| † BatchNorm and GELU omitted on the final transposed convolution. |
The fusion module concatenates the four VAE representations and passes them to the MLP classifier, which predicts the target activity. We use a simple MLP that operates on this low-dimensional representation to keep training fast and inference lightweight. Its input has size , where is the per-antenna latent dimension and the factor of 8 accounts for the mean and log-variance vectors from all four VAEs, while its 12 outputs correspond to the target activities. Optuna selects the number and width of the hidden layers, the activation function, the learning rate, and the batch size.
3.4 Hyperparameters
The Wi-HAR pipeline involves two sets of hyperparameters: those governing the per-antenna VAEs, and those governing the MLP classifier. Given the number of interacting parameters and the cost of each training run, we use Optuna [2] with a Tree-structured Parzen Estimator (TPE) [4] sampler to drive the search.
The VAE hyperparameters subject to optimization are: the learning rate (log-uniform), the maximum KL weight (log-uniform), the batch size (sampled via its base-2 exponent), and the convolutional layer specification, chosen categorically from the three candidates listed in Table 3. Each specification defines a 3-layer encoder in which every entry gives the kernel size and stride along the time axis; the corresponding decoder uses the same specifications in reverse order. The MLP classifier hyperparameters include the number of fusion layers , fusion dropout rate (step ), learning rate, and batch size. Rather than including in the Optuna search space, we run an independent study for each value of , starting at 1 and increasing it across studies. This separation lets the TPE sampler build a focused surrogate model for each latent dimension without conflating the effect of with the other hyperparameters.
Each study runs for at most trials and may stop early through Optuna’s Expected Improvement to Median Ratio terminator [14]. We also stop the sequence of studies when the best median accuracy fails to improve by at least for two consecutive values of , thereby avoiding computation beyond the point of diminishing returns. Because VAE training is sensitive to random initialization, we evaluate each Optuna trial with independent seeds. We randomly choose the seeds at the start, keep them fixed across every trial in a study, and use the median accuracy as the trial objective.
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).
| Spec | Layer 1 | Layer 2 | Layer 3 |
|---|---|---|---|
| A | |||
| B | |||
| C |
3.5 Experimental Hypotheses
Our main hypothesis is that the per-antenna VAEs in Wi-HAR provide a concise yet informative representation of the activities observed by the Wi-Fi monitor. Each VAE receives raw CSI magnitudes without activity labels, so the reconstruction objective alone determines the structure of its latent space. We test this hypothesis quantitatively through the MLP classifier’s accuracy and qualitatively by inspecting the clusters formed by the latent representations.
A second hypothesis concerns the benefit of multi-antenna fusion. Since the four antennas of the monitor are spaced by more than half a wavelength, the received signals are generally uncorrelated due to indoor multipath effects (cf., Fig. 3). Each per-antenna VAE therefore captures an uncorrelated view of the same activity, and concatenating the four latent representations gives the downstream classifier a richer, higher-dimensional description of the performed activity than any single antenna alone. We thus expect the Wi-HAR architecture to achieve higher classification accuracy than a system relying on a single antenna’s latent space.
A third hypothesis concerns deployment-shift detection. Because the variational representation describes each input through a distribution rather than a single deterministic feature vector, evidential classification heads should expose changes in the support and strength of the evidence when the participant, collector, recording session, or room differs from the S1a training domain. We therefore expect class-conditional uncertainty scores to rank shifted samples above held-out S1a samples, and we test whether this ranking remains useful at a calibrated 5% in-distribution rejection level.
4 Activity Recognition Results
This section evaluates Wi-HAR across latent-space sizes and architectures, examines how the best model represents the activities in its VAE latent spaces, and compares Wi-HAR with independently optimized single-antenna models and their late fusion. To support reproducibility and further research on Wi-Fi sensing, we publicly release the code and data.
4.1 Architectures and Hyperparameters
Table 4: Hyperparameter search results across ten fixed random seeds. is the learning rate, the maximum KL weight, the batch size, and Conv. the convolutional specification from Table 3.
| 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 |
The Optuna results in Table 4 show that , which gives each antenna an eight-parameter latent representation, achieves the highest median accuracy. Its advantage over is marginal, however, which indicates that the additional latent parameters carry little information that helps the classifier distinguish the activities. Larger latent spaces also give the classifier more parameters to learn and process, increasing both the risk of overfitting and the computational cost.
We therefore define Wi-HAR as the Optuna-optimized architecture with , whose median accuracy is nearly identical to that of the larger latent spaces while requiring the classifier to process fewer parameters. The best-performing Wi-HAR seed reaches 98.3% test accuracy, compared with 70% for the state-of-the-art SHARP method [19] on the same dataset [9].

Figure 4: Confusion matrix for the best-performing VAE architecture with a latent space of 4 parameters.
The confusion matrix in Fig. 4 shows that the best model mainly confuses stretch, waving, and lie down. Stretching and waving both involve arm movements, which may produce similar CSI patterns, whereas the confusion with lying down is less intuitive because that activity changes the body’s overall position. We hypothesize that this larger positional change produces substantial channel variation that sometimes overlaps with the patterns generated by the other two activities.
4.2 Visualization of the VAE Latent Spaces
Figure 5: t-SNE projections of the latent spaces learned from different antennas, with . 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 5 visualizes the latent spaces learned by the antenna-specific VAEs for the bivariate-Gaussian case described in Section 3.3. We apply t-Distributed Stochastic Neighbor Embedding (t-SNE) [27] to each original latent space and project it onto two dimensions. Each colored point in the resulting plane represents a CSI window, with color indicating the activity performed during that window.
The antenna-specific VAEs separate several activity clusters despite receiving no activity labels, although the separation quality varies across antennas. Our preliminary tests found no clear disparity in the raw data collected by the four antennas, so data quality alone does not explain why some single-antenna latent spaces separate the activities more clearly than others for the four-parameter representation () in Fig. 5. We instead expect single-antenna performance to depend strongly on the room geometry and experimental conditions because each antenna observes a different channel from its physical position. The projections also show meaningful overlaps: run lies largely within walk, while run and jump, as well as sit and empty room, overlap partially. The overlap between sit and jump may reflect the three-second window, within which brief segments of these activities can produce similar channel dynamics. These patterns confirm that different activities induce distinct but sometimes overlapping CSI distributions and support fusing multiple antennas when the classifier must distinguish many activities.
4.3 Ablation Study
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.
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.
| 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 |
The ablation results show that every single-antenna architecture is less accurate and less stable than the fused alternatives. The best single-antenna model has a median accuracy below 85%, and some runs fall to approximately 60%, indicating strong sensitivity to room geometry and experimental conditions. The fused architectures maintain substantially higher accuracy across seeds, which supports our hypothesis that combining CSI measurements from multiple antennas improves HAR performance.
4.4 Interpreting the Learned Latent Space
We now examine what the compact variational representation encodes about activities, by training a shallow decision tree on the latent means and log-variances of the best-performing Wi-HAR model. This analysis is deliberately separate from the main recognition results because it explains the learned features rather than defining another deployment output.
(a) Representation of the decision tree. Each node shows the split condition, the number of samples in the node, and the predicted activity.

(b) Confusion matrix for the decision tree.
Figure 7: Decision tree with depth of four for the first six activities and the representation.
We replace the standard classifier in Wi-HAR with a shallow decision tree and restrict the analysis to the first six activities for readability. The tree operates directly on the means and log-variances of the approximate posterior distributions. We use and to denote the -th mean and log-variance from antenna . Although the tree in Fig. 7 is limited to four splits, it reaches an overall test accuracy of 96.5%.
The paths for walk and run are structurally similar, and the second latent mean of the second antenna, , provides the main split between them. Their remaining confusion is consistent with the difficulty of separating related locomotion patterns from short CSI windows. The initial paths for stand and jump use as the main discriminant, which suggests that the first antenna captures a feature related to vertical position or posture. The log-variance of the same latent dimension, , helps distinguish sit from empty room; both create relatively static channels, but only the former includes a person in the monitored area.
Variables from several antennas appear in the final decision boundaries, which gives an interpretable counterpart to the ablation result in Section 4.3: the fused classifier uses distinct views of the activity rather than relying on one dominant receiver channel. The tree also suggests different levels of compositional structure. Walking and running appear relatively atomic, whereas jumping may combine posture and translational components. This interpretation is consistent with [10], which studies atomic activity representations and their composition through neuro-symbolic event processing. These physical readings remain hypotheses, but the small latent space makes them explicit and testable.
5 Uncertainty-Aware Detection of Deployment Shifts
High activity-recognition accuracy on S1a does not show whether the same classifier can recognize when its deployment conditions have changed. We therefore treat deployment-shift detection as a second output of the Wi-HAR pipeline. The antenna-specific encoders and delayed-fusion backbone remain fixed, while alternative classification heads produce both activity predictions and scalar uncertainty scores.
5.1 Uncertainty Heads
We compare the Softmax classifier used in Section 4 with EDL [22] and GEN [21]. All three models use the same feature extractors and fusion backbone. We select the two evidential heads through the same Optuna workflow and validation split used for Softmax, with validation accuracy as the sole optimization objective; no shifted dataset contributes to model selection or calibration.
Both evidential heads produce non-negative evidence for each of the activity classes and define a Dirichlet distribution through
The predictive probability is the Dirichlet mean, while measures the absence of total evidence: it equals one when every evidence value is zero and decreases as the Dirichlet strength grows. The selected EDL head uses softplus evidence and the evidential cross-entropy Bayes risk with a 20-epoch regularization warm-up. The selected GEN head uses exponential evidence and an adversarial network with hidden width 128.
For the Softmax head, we use normalized predictive entropy,
which also lies in but has a different interpretation from Eq. 11: it measures dispersion in one categorical distribution rather than inverse Dirichlet strength.
5.2 Class-conditional Deployment-shift Score
The uncertainty distribution depends on the predicted activity, so a pooled reference can hide a shift that is clear within one predicted class. For model and predicted class , we construct the training reference
and evaluate a test uncertainty with the mid-rank empirical Cumulative Distribution Function (CDF) . We then define the two-sided anomaly score
A large value means that the uncertainty is unusual for S1a samples assigned to the same predicted class. Both tails matter because a deployment change can produce unusually high uncertainty or atypically confident predictions. The score measures disagreement with the class-conditional training reference; it is not a posterior probability that a sample is out of distribution.
5.3 Evaluation Protocol
The held-out S1a partition supplies the in-distribution samples for every comparison, while each shifted dataset is evaluated separately. The benchmark contains four controlled classes of deployment change: S1b-S1c change only the collector position; S2a-S2c replace participant A with participant B; S4a-S4c repeat participant A in the same laboratory a few hours later; and S6a-S6c move participant A to an office on the second collection day. Each comparison contains 480 held-out S1a samples and 480 samples from the corresponding shifted dataset. No shifted scenario is used for training, hyperparameter selection, empirical-CDF construction, or threshold calibration.
We first report ROC -AUC, which measures the probability that a randomly selected shifted sample receives a larger anomaly score than a randomly selected S1a sample. We then evaluate an explicit operating point with split-conformal calibration. Within every predicted class, 80% of the training samples form the uncertainty reference and 20% form a calibration set. For a sample , we use its uncertainty and predicted class to compute the anomaly score from Eq. 14, . Thus, high uncertainty relative to the predicted-class reference yields a high score, as can atypically low uncertainty because the score is two-sided. For calibration anomaly scores and test anomaly score , the in-distribution compatibility value is
We reject a sample when and repeat the class-stratified split 50 times, leaving held-out S1a untouched for measurement of the realized false-positive rate.
5.4 Shift-detection Results
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.
| 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 |
| S4b | 0.927 | 0.971 | 0.883 |
| S4c | 0.736 | 0.972 | 0.756 |
| S6a | 0.664 | 0.905 | 0.887 |
| S6b | 0.606 | 0.672 | 0.796 |
| S6c | 0.696 | 0.972 | 0.535 |
| Macro average | 0.662 | 0.897 | 0.821 |
Table 6 shows that EDL ranks shifted samples more consistently than the other models. It achieves the highest AUC in nine of eleven scenarios and a macro average of 0.897, compared with 0.821 for GEN and 0.662 for Softmax. The result is obtained even though validation accuracy, rather than shifted-data performance, selected the evidential heads.
Collector position alone causes a strong detectable shift. With the same participant, room, day, activities, and recording session, EDL reaches AUCs of 0.970 and 0.978 on S1b and S1c. Participant changes are collector-dependent: S2a is difficult for all three heads, while EDL reaches 0.970 and 0.974 on S2b and S2c. The later same-day session also changes the uncertainty distributions, with EDL AUCs from 0.790 to 0.972. In the office, performance again depends on the collector: EDL is strongest on S6a and S6c, whereas GEN is strongest on S6b. These differences show that the same physical change does not produce a uniform scalar response across receiver positions.
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.
| 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%] |
The calibrated operating point in Table 7 agrees with the AUC ranking. EDL realizes a 5.21% S1a false-positive rate, close to the nominal 5% target, and achieves a macro-average shift-detection rate of 82.51% across the eleven shifted datasets. GEN achieves 65.12%, while Softmax achieves 22.54%. The evidential advantage therefore persists when the detector is required to operate at a controlled in-distribution rejection level.
5.5 Comparison of the Uncertainty Heads
Several scenarios give similar AUCs for EDL and GEN, so we use a paired Bayesian bootstrap with a Region of Practical Equivalence (ROPE) of AUC. The same Dirichlet bootstrap weights are applied to both models in every draw, preserving the paired S1a and shifted observations. Differences smaller than two AUC points are treated as negligible; this margin is of the same order as the scenario-level sampling uncertainty and corresponds to two additional correctly ordered in-distribution-shifted pairs per 100 random pairs.
(a) Posterior median and 95% credible interval of .
(b) Probabilities of a meaningful GEN or EDL advantage, or practical equivalence.
Figure 8: Paired Bayesian-bootstrap comparison of EDL and GEN. Fig. 8(a) shows the posterior median and 95% credible interval of ; Fig. 8(b) gives the probabilities of a meaningful GEN advantage, practical equivalence, and a meaningful EDL advantage under the ROPE.
Table 8: Aggregate Bayesian comparison for under the ROPE.
| Estimand | Mean | 95% credible interval | |||
|---|---|---|---|---|---|
| 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 |
The scenario-level posteriors in Fig. 8 show practical equivalence for S1b and S2b and close results for S2c and S6a. They favor EDL decisively on S1c, S2a, S4b, S4c, and S6c, while S6b decisively favors GEN. The asymmetric failures matter: the largest EDL gains are 0.216 AUC on S4c and 0.437 on S6c, whereas the largest GEN gain is 0.124 on S6b.
At the benchmark level, Table 8 gives a mean EDL advantage of 0.0757 AUC with a 95% credible interval of [0.0581, 0.0934]. A second bootstrap over the mixture of deployment scenarios gives a 0.938 posterior probability that EDL retains an advantage larger than 0.02 AUC. The two evidential heads are therefore interchangeable under several specific shifts, but the benchmark as a whole supports EDL as the more reliable detector.
6 Conclusion and Future Challenges
This paper presents Wi-HAR as a compact multi-antenna framework for both activity recognition and deployment-shift detection from passive Wi-Fi radar measurements. Four antenna-specific VAEs learn distributional representations from raw CSI magnitudes, and delayed fusion combines their means and log-variances. On twelve activities from the public benchmark, the selected model reaches a median accuracy of 96.6%, while independently optimized single-antenna models remain below 82%. The ablation study therefore identifies multi-antenna fusion as a central source of recognition performance.
The uncertainty study extends the system beyond closed-set recognition. Using the same latent backbone, EDL reaches a macro-average ROC -AUC of 0.897 across eleven datasets that change collector position, participant, recording session, or room, and it detects 82.51% of shifted samples at a realized 5.21% S1a rejection rate. A paired Bayesian comparison shows that EDL and GEN are practically equivalent under several individual shifts, while the full benchmark favors EDL by about 0.076 AUC. Detection performance nevertheless varies substantially across scenarios, showing that the same type of physical change does not produce a uniform uncertainty response across receiver positions. These results show that deployment changes can be detected without using shifted samples during model selection or calibration, although the scalar score cannot identify which physical factor caused the change.
The separate interpretability analysis shows why the compact representation is useful beyond predictive accuracy. A depth-four decision tree reaches 96.5% accuracy on six activities and uses means and log-variances from several antennas, with individual splits suggesting relationships with locomotion, posture, and human presence. Future work should test these interpretations through controlled physical interventions, incorporate phase information, and evaluate recognition after a shift has been detected. The broader challenge is to combine shift awareness with adaptation so that a Wi-Fi sensing system can both flag an unfamiliar deployment and recover reliable activity predictions across people, receiver placements, and environments.
Declaration of Generative AI Use
During preparation of this work, the authors used GPT 5.6 to revise and improve the fluency of the text. The authors subsequently reviewed and edited the content and take full responsibility for the article.
Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
References
[1] F. Adib and D. Katabi (2013) See through walls with WiFi!. In SIGCOMM’13: ACM SIGCOMM 2013 Conference, Hong Kong China, pp. 75–86. External Links: Document, ISBN 978-1-4503-2056-6 Cited by: §2.2.
[2] T. Akiba, S. Sano, T. Yanase, T. Ohta, and M. Koyama (2019) Optuna: A Next-generation Hyperparameter Optimization Framework. arXiv. External Links: Document, 1907.10902 Cited by: §3.4.
[3] N. Bahadori, J. Ashdown, and F. Restuccia (2022) ReWiS: reliable wi-fi sensing through few-shot multi-antenna multi-receiver CSI learning. In 2022 IEEE 23rd International Symposium on a World of Wireless, Mobile and Multimedia Networks (WoWMoM), pp. 50–59. External Links: Document Cited by: §2.2.
[4] J. Bergstra, R. Bardenet, Y. Bengio, and B. Kégl (2011) Algorithms for hyper-parameter optimization. In Advances in Neural Information Processing Systems, Vol. 24, pp. 2546–2554. Cited by: §3.4.
[5] C. M. Bishop and N. M. Nasrabadi (2006) Pattern recognition and machine learning. Vol. 4, Springer. Cited by: §2.3.
[6] H. Cai, B. Korany, C. R. Karanam, and Y. Mostofi (2020) Teaching RF to sense without RF training measurements. Proc. ACM Interact. Mob. Wearable Ubiquitous Technol. 4 (4), pp. 120:1–120:22. External Links: Document Cited by: §2.2.
[7] Z. Chen, L. Zhang, C. Jiang, Z. Cao, and W. Cui (2019) WiFi CSI based passive human activity recognition using attention based BLSTM. IEEE Transactions on Mobile Computing 18 (11), pp. 2714–2724. External Links: Document, ISSN 1558-0660 Cited by: §2.2.
[8] M. Cominelli, F. Gringoli, L. M. Kaplan, M. B. Srivastava, and F. Cerutti (2023) Accurate passive radar via an uncertainty-aware fusion of wi-fi sensing data. In 2023 26th International Conference on Information Fusion (FUSION), pp. 1–8. External Links: Document Cited by: §1.
[9] M. Cominelli, F. Gringoli, and F. Restuccia (2023) Exposing the CSI: a systematic investigation of CSI-based wi-fi sensing capabilities and limitations. In 2023 IEEE International Conference on Pervasive Computing and Communications (PerCom), pp. 81–90. External Links: Document, ISSN 2474-249X Cited by: §1, §2.2, §3.1, Table 1, Table 1, §4.1.
[10] L. Cotti, L. Lavazza, M. Cominelli, L. Han, G. Dong, F. Gringoli, M. B. Srivastava, T. Bihl, E. P. Blasch, D. O. Brigham, K. Combs, L. M. Kaplan, and F. Cerutti (2026) Towards causally interpretable Wi-Fi CSI-based human activity recognition with discrete latent compression and LTL rule extraction. arXiv. External Links: Document, 2604.22979 Cited by: §4.4.
[11] L. Du, X. Tian, L. Zhang, S. Shang, and X. Ning (2023) Device-free indoor localization based on multidimensional CSI features classification. IEEE Access 11, pp. 32548–32563. External Links: Document, ISSN 2169-3536 Cited by: §2.2.
[12] Q. Gao, J. Wang, X. Ma, X. Feng, and H. Wang (2017) CSI-based device-free wireless localization and activity recognition using radio image features. IEEE Transactions on Vehicular Technology 66 (11), pp. 10346–10356. External Links: Document, ISSN 1939-9359 Cited by: §2.2.
[13] D. Halperin, W. Hu, A. Sheth, and D. Wetherall (2011) Tool release: gathering 802.11n traces with channel state information. SIGCOMM Comput. Commun. Rev. 41 (1), pp. 53. External Links: Document, ISSN 0146-4833 Cited by: §2.2, §3.3.
[14] H. Ishibashi, M. Karasuyama, I. Takeuchi, and H. Hino (2023) A stopping criterion for bayesian optimization by the gap of expected minimum simple regrets. In Proceedings of The 26th International Conference on Artificial Intelligence and Statistics, pp. 6463–6497. External Links: ISSN 2640-3498 Cited by: §3.4.
[15] W. Jiang, C. Miao, F. Ma, S. Yao, Y. Wang, Y. Yuan, H. Xue, C. Song, X. Ma, D. Koutsonikolas, W. Xu, and L. Su (2018) Towards environment independent device free human activity recognition. In Proceedings of the 24th Annual International Conference on Mobile Computing and Networking, MobiCom ’18, New York, NY, USA, pp. 289–304. External Links: Document, ISBN 978-1-4503-5903-0 Cited by: §2.2.
[16] D. P. Kingma and M. Welling (2022) Auto-encoding variational bayes. arXiv. External Links: Document, 1312.6114 Cited by: §1, §2.3, §2.3.
[17] B. Li, W. Cui, W. Wang, L. Zhang, Z. Chen, and M. Wu (2021) Two-stream convolution augmented transformer for human activity recognition. Proceedings of the AAAI Conference on Artificial Intelligence 35 (1), pp. 286–293. External Links: Document, ISSN 2374-3468 Cited by: §2.2.
[18] W. Li, R. J. Piechocki, K. Woodbridge, C. Tang, and K. Chetty (2021) Passive WiFi radar for human sensing using a stand-alone access point. IEEE Transactions on Geoscience and Remote Sensing 59 (3), pp. 1986–1998. External Links: Document, ISSN 1558-0644 Cited by: §1.
[19] F. Meneghello, D. Garlisi, N. D. Fabbro, I. Tinnirello, and M. Rossi (2023) SHARP: environment and person independent activity recognition with commodity IEEE 802.11 access points. IEEE Transactions on Mobile Computing 22 (10), pp. 6161–6175. External Links: Document, ISSN 1558-0660 Cited by: §2.2, §4.1.
[20] F. Miao, Y. Huang, Z. Lu, T. Ohtsuki, G. Gui, and H. Sari (2025) Wi-fi sensing techniques for human activity recognition: brief survey, potential challenges, and research directions. ACM Comput. Surv. 57 (5), pp. 107:1–107:30. External Links: Document, ISSN 0360-0300 Cited by: §2.2, §2.2.
[21] M. Sensoy, L. Kaplan, F. Cerutti, and M. Saleki (2020) Uncertainty-aware deep classifiers using generative models. Proceedings of the AAAI Conference on Artificial Intelligence 34 (4), pp. 5621–5627. External Links: Document, ISSN 2374-3468 Cited by: §1, §5.1.
[22] M. Sensoy, L. Kaplan, and M. Kandemir (2018) Evidential deep learning to quantify classification uncertainty. arXiv. External Links: Document, 1806.01768 Cited by: §1, §5.1.
[23] M. S. Seyfioğlu, A. M. Özbayoğlu, and S. Z. Gürbüz (2018) Deep convolutional autoencoder for radar-based classification of similar aided and unaided human activities. IEEE Transactions on Aerospace and Electronic Systems 54 (4), pp. 1709–1723. External Links: Document, ISSN 1557-9603 Cited by: §1.
[24] Z. Shi, J. A. Zhang, R. Y. Xu, and Q. Cheng (2022) Environment-robust device-free human activity recognition with channel-state-information enhancement and one-shot learning. IEEE Transactions on Mobile Computing 21 (2), pp. 541–554. External Links: Document, ISSN 1558-0660 Cited by: §2.2.
[25] E. Soltanaghaei, R. A. Sharma, Z. Wang, A. Chittilappilly, A. Luong, E. Giler, K. Hall, S. Elias, and A. Rowe (2020) Robust and practical WiFi human sensing using on-device learning with a domain adaptive model. In Proceedings of the 7th ACM International Conference on Systems for Energy-Efficient Buildings, Cities, and Transportation, BuildSys ’20, New York, NY, USA, pp. 150–159. External Links: Document, ISBN 978-1-4503-8061-4 Cited by: §2.2.
[26] L. Storrer, H. C. Yildirim, M. Crauwels, E. I. P. Copa, S. Pollin, J. Louveaux, P. De Doncker, and F. Horlin (2021) Indoor tracking of multiple individuals with an 802.11ax wi-fi-based multi-antenna passive radar. IEEE Sensors Journal 21 (18), pp. 20462–20474. External Links: Document, ISSN 1558-1748 Cited by: §1.
[27] L. Van der Maaten and G. Hinton (2008) Visualizing data using t-SNE. Journal of machine learning research 9 (11). External Links: ISSN 1532-4435 Cited by: §4.2.
[28] W. Wang, A. X. Liu, M. Shahzad, K. Ling, and S. Lu (2017) Device-free human activity recognition using commercial WiFi devices. IEEE Journal on Selected Areas in Communications 35 (5), pp. 1118–1131. External Links: Document, ISSN 1558-0008 Cited by: §2.2.
[29] Z. Yang, Y. Zhang, and Q. Zhang (2023) Rethinking fall detection with wi-fi. IEEE Transactions on Mobile Computing 22 (10), pp. 6126–6143. External Links: Document, ISSN 1558-0660 Cited by: §2.2.
[30] G. Yin, J. Zhang, G. Shen, and Y. Chen (2024) FewSense, towards a scalable and cross-domain wi-fi sensing system using few-shot learning. IEEE Transactions on Mobile Computing 23 (1), pp. 453–468. External Links: Document, ISSN 1558-0660 Cited by: §2.2.
[31] H. Zou, Y. Zhou, J. Yang, H. Jiang, L. Xie, and C. J. Spanos (2018) DeepSense: device-free human activity recognition via autoencoder long-term recurrent convolutional network. In 2018 IEEE International Conference on Communications (ICC), pp. 1–6. External Links: Document, ISSN 1938-1883 Cited by: §2.2.