Abstract:
Convolutional neural networks (CNNs) have shown great promise in human activity recognition (HAR), but long-term dependencies in time series data can be difficult to capt...Show MoreMetadata
Abstract:
Convolutional neural networks (CNNs) have shown great promise in human activity recognition (HAR), but long-term dependencies in time series data can be difficult to capture using standard CNNs. This study introduces a new CNN architecture that incorporates a multihead attention mechanism (CNN-MHA) to address this challenge. This mechanism is composed of several attention heads, each independently calculating attention weights for distinct segments of the input. The attention head outputs are then concatenated and processed through a fully connected layer to produce the final attention representation. A multihead attention (MHA) mechanism allows the network to focus on relevant features and maintain long-term dependencies in the input data. The proposed model is evaluated on the physical activity monitoring for aging people data set (PAMAP2) from the UCI machine learning repository, which is preprocessed by cleaning, normalization, segmentation, and reshaping before splitting into training, validation, and testing sets. The experimental results demonstrate that the CNN-MHA model outperforms existing models, achieving F1-score of 95.7%. Particularly, the MHA mechanism significantly improves the model’s ability to recognize complex activity patterns. Furthermore, our model attained an average inference latency of 0.304 s, which can be crucial in real-time applications. The findings clearly demonstrate the substantial promise of the proposed CNN-MHA architecture for optimizing HAR tasks, offering a powerful tool for advancing the state-of-the-art in this domain.
Published in: IEEE Internet of Things Journal ( Volume: 11, Issue: 2, 15 January 2024)