An Improved Masking Strategy for Self- Supervised Masked Reconstruction in Human Activity Recognition

Jinqiang Wang, Wenxuan Cui, Tao Zhu, Huansheng Ning, Zhenyu LiuIEEE Sensors Journal 2024

TL;DR

This paper introduces "Channel Masking," a novel self-supervised learning strategy for human activity recognition (HAR) using wearable sensors. By masking data across sensor channels, it forces models to learn richer, inter-channel relationships, significantly improving performance over existing time-based masking methods, especially in low-data scenarios.

What Problem Does This Paper Address?

Human Activity Recognition (HAR) using wearable sensors is a powerful technology with applications in healthcare, sports, and smart homes. Deep learning models excel at this, but they typically require vast amounts of labeled data, which is expensive and time-consuming to collect. Self-supervised learning (SSL) offers a solution by training models on unlabeled data using "pretext tasks." Masked reconstruction is a popular pretext task, where models learn to reconstruct missing parts of the input. However, existing methods for HAR primarily mask data along the time dimension. This overlooks crucial information about how different sensors (channels) interact, limiting the model's ability to learn robust features, especially when sensor data might be noisy or anomalous.

Methods

The core innovation is Channel Masking. Instead of masking segments of data over time, this method randomly masks entire sensor channels for specific time points. This forces the model's encoder to learn dependencies between channels to reconstruct the missing information.

The authors also propose two combined strategies:

  • Time-Channel Masking: Combines traditional time-based masking with Channel Masking.
  • Span-Channel Masking: Combines span-based time masking (masking contiguous time segments) with Channel Masking.

To accommodate these new masking strategies, the reconstruction loss function was modified to account for both time and channel dimension reconstruction errors.

Datasets

The proposed methods were evaluated on three publicly available HAR datasets:

  • USC-HAD: Contains accelerometer and gyroscope data from 14 participants performing 12 daily activities.
  • UCI-HAR: Features accelerometer and gyroscope data from 30 volunteers performing 6 fundamental activities.
  • MotionSense: Includes accelerometer and gyroscope data from 24 volunteers performing 6 basic activities.

Key Insights and Ideas

  • Channel Information is Crucial: The paper strongly suggests that the relationships between different sensor channels are as important, if not more so, than temporal patterns for robust HAR.
  • Channel Masking Enhances Robustness: By forcing the model to learn from incomplete channel information, it becomes more resilient to sensor anomalies.
  • Synergy of Time and Channel Masking: Combining time and channel masking strategies yields better results than either alone, indicating a comprehensive approach to learning from sensor data.
  • Adaptability to Masking Ratios: Unlike previous work that suggested specific low masking ratios (10-15%), this study found that higher masking ratios (up to 90% for time masking) can be effective and even beneficial, suggesting self-supervised models are more adaptable than previously thought.
  • Optimal Channel Masking: The optimal number of channels to mask appears to be around half the total number of channels, providing a practical guideline.

Key Results

  • Superior Performance: The proposed Channel Masking, Time-Channel Masking, and Span-Channel Masking strategies consistently outperformed existing time-based masking methods (Time Masking, Span Masking) across all three datasets in both self-supervised and semi-supervised settings.
  • Self-Supervised vs. Supervised: In self-supervised settings, the proposed methods achieved performance comparable to or slightly better than supervised learning on the USC-HAD dataset, and slightly inferior on UCI-HAR and MotionSense, suggesting strong potential for reducing reliance on labeled data.
  • Semi-Supervised Advantage: In semi-supervised settings (limited labeled data), the proposed strategies showed significant improvements over previous methods and even outperformed supervised learning on the USC-HAD dataset, highlighting their effectiveness in low-data regimes.
  • Channel Anomaly Mitigation: The Channel Masking strategy demonstrated an ability to mitigate the impact of sensor channel anomalies, outperforming supervised learning in several scenarios.

Limitations and Future Work

  • Disparity with Ample Labeled Data: The authors acknowledge that when a substantial amount of labeled data is available, the performance gap between their self-supervised approach and traditional supervised learning can still exist. This is a common challenge for self-supervised models.
  • Future Work: The authors plan to bridge this gap by improving the reconstruction effect and exploring the integration of other supervised signals. They also suggest that the findings on optimal masking ratios and channel masking cardinality can serve as practical guidelines for applying these methods to new sensor datasets.

Summary updated

Abstract

Masked reconstruction serves as a crucial pretext task for self-supervised learning, enabling the model to improve its feature extraction capabilities by reconstructing the masked segments from abundant unlabeled data. In the field of human activity recognition, this pretext task has traditionally employed a masking strategy that focuses on the time dimension. However, this strategy fails to fully leverage the inherent characteristics of wearable sensor data and overlooks the inter-channel information coupling, thereby limiting its potential as an effective pretext task. To overcome these limitations, we propose a novel masking strategy called Channel Masking. This strategy involves masking the sensor data along the channel dimension, thereby encouraging the encoder to extract channel-specific features while performing the masked reconstruction task. Additionally, Channel Masking can be seamlessly integrated with masking strategies along the time dimension, motivating the self-supervised model to undertake the masked reconstruction task in both the time and channel dimensions. The integrated masking strategies are named Time-Channel Masking and Span-Channel Masking. Furthermore, we optimize the reconstruction loss function to incorporate the reconstruction loss in both the time and channel dimensions. We evaluate the proposed masking strategies on three public datasets, and the experimental results demonstrate that these strategies outperform prior approaches in both self-supervised and semi-supervised scenarios.
BibTeX
@article{wang2024improved,
  author = {Jinqiang Wang and Wenxuan Cui and Tao Zhu and Huansheng Ning and Zhenyu Liu},
  title = {{An Improved Masking Strategy for Self- Supervised Masked Reconstruction in Human Activity Recognition}},
  journal = {IEEE Sensors Journal},
  year = {2024},
  doi = {10.1109/jsen.2024.3390755},
}
Figure