Context-Aware Predictive Coding: A Representation Learning Framework for WiFi Sensing

B. Barahimi,H. Tabassum,M. Omer,O. Waqar
2024-09-17
Abstract:WiFi sensing is an emerging technology that utilizes wireless signals for various sensing applications. However, the reliance on supervised learning, the scarcity of labelled data, and the incomprehensible channel state information (CSI) pose significant challenges. These issues affect deep learning models' performance and generalization across different environments. Consequently, self-supervised learning (SSL) is emerging as a promising strategy to extract meaningful data representations with minimal reliance on labelled samples. In this paper, we introduce a novel SSL framework called Context-Aware Predictive Coding (CAPC), which effectively learns from unlabelled data and adapts to diverse environments. CAPC integrates elements of Contrastive Predictive Coding (CPC) and the augmentation-based SSL method, Barlow Twins, promoting temporal and contextual consistency in data representations. This hybrid approach captures essential temporal information in CSI, crucial for tasks like human activity recognition (HAR), and ensures robustness against data distortions. Additionally, we propose a unique augmentation, employing both uplink and downlink CSI to isolate free space propagation effects and minimize the impact of electronic distortions of the transceiver. Our evaluations demonstrate that CAPC not only outperforms other SSL methods and supervised approaches, but also achieves superior generalization capabilities. Specifically, CAPC requires fewer labelled samples while significantly outperforming supervised learning and surpassing SSL baselines. Furthermore, our transfer learning studies on an unseen dataset with a different HAR task and environment showcase an accuracy improvement of 1.8 percent over other SSL baselines and 24.7 percent over supervised learning, emphasizing its exceptional cross-domain adaptability.
Signal Processing,Machine Learning
What problem does this paper attempt to address?
The main problem that this paper attempts to solve is the challenges brought by the reliance on supervised learning and the scarcity of labeled data in WiFi - sensing technology. Specifically, WiFi - sensing utilizes wireless signals for various sensing applications, such as human activity recognition (HAR). However, due to the following problems, the performance and generalization ability of existing methods in different environments are limited: 1. **Scarcity of labeled data**: It is very difficult and time - consuming to obtain a large amount of labeled CSI (Channel State Information) data because these data need to be labeled synchronously, and unlike computer vision datasets, CSI data is unreadable to humans. 2. **Complexity of CSI data**: CSI data contains complex information such as multipath effects, reflection, diffraction, and scattering, which are difficult to interpret and process. 3. **Adaptability and generalization ability of the model**: Existing deep - learning models perform poorly in new environments, especially in scenarios with low - labeled data. To solve these problems, the author proposes a new self - supervised learning (SSL) framework, called **Context - Aware Predictive Coding (CAPC)**. CAPC improves WiFi - sensing technology in the following aspects: - **Unsupervised pre - training**: Use unlabeled CSI data for pre - training to generate feature - rich representations, thereby reducing the dependence on a large amount of labeled data. - **Time - series and context consistency**: Combine Contrastive Predictive Coding (CPC) and the Barlow Twins method to ensure that the model can capture the time - dynamics and context consistency of CSI data. - **Novel data - enhancement method**: Introduce an enhancement method based on uplink and downlink CSI to isolate the free - space propagation effect and minimize the influence of transceiver electronic distortion. - **Mixed contrastive loss function**: Design a mixed contrastive loss function that combines the advantages of CPC and Barlow Twins to improve the robustness and generalization ability of the model. Through these innovations, CAPC not only significantly outperforms other SSL methods and supervised learning methods in low - labeled data scenarios but also shows excellent cross - domain adaptability. Experimental results show that CAPC has a significant performance improvement on unseen datasets, especially in human activity recognition tasks. ### Formula Summary 1. **CSI Representation**: \[ y_{t,s,a}=H_{t,s,a}x_{t,s,a}+\eta_{t,s,a} \] where \( H_{t,s,a} \) is the CSI matrix, \( x_{t,s,a} \) is the transmitted signal, \( y_{t,s,a} \) is the received signal, and \( \eta_{t,s,a} \) is the Additive White Gaussian Noise (AWGN). 2. **Contrastive Predictive Coding (CPC) Loss Function**: \[ L_{\text{CPC}} = -\mathbb{E}_{c_t, z_{t + k}}\left[\log\frac{\exp(f(c_t, z_{t + k}))}{\sum_{j = 1}^{N}\exp(f(c_t, z_j))}\right] \] where \( c_t \) is the context embedding, \( z_{t + k} \) is the future latent representation, and \( f(\cdot,\cdot) \) is the similarity function. 3. **Barlow Twins Loss Function**: \[ L_{\text{BT}}=\sum_{i = 1}^{D}(1 - C_{ii})^2+\lambda\sum_{i\neq j}C_{ij}^2 \] where \( C \) is the covariance matrix, \( D \) is the dimension of the embedding space, and \( \lambda \) is a hyperparameter. 4. **Mixed Contrastive Loss Function**: \[ L_{\text{hybrid}} = L_{\text{CPC}}+\alpha L_{\text{BT}} \]