A Time Series Data Classification Method for Gesture Recognition Based on LSTM and Attention Mechanism
Abstract
This paper addresses the issues of weak model transferability and poor environmental adaptability in cross-domain gesture recognition within wireless sensing technology. A time-series data classification model integrating Long Short-Term Memory (LSTM) and attention mechanism (W-LSTM+A) is proposed. By introducing a feature selection weight matrix to reconstruct the LSTM gating mechanism and combining a dynamic attention allocation strategy, the model’s ability to capture key spatiotemporal features in channel state information is significantly enhanced. Experiments based on a WiFi signal dataset collected in a real office environment compared the performance of CNN, LSTM, and LSTM+A models. The results show that the LSTM+A model achieved a test accuracy of 87.3% after 200 training epochs, significantly outperforming CNN’s 81.9%. Although the LSTM model had a higher final accuracy, its convergence speed was significantly slower than that of the LSTM+A model. Further analysis indicates that the attention mechanism, by strengthening key time-step features, enables the model to quickly capture effective patterns in the early stages of training. However, due to limited sample size, its potential has not been fully realized. This study provides new solutions for the cross-scene adaptability of wireless sensing technology and has application value in smart homes, health monitoring, and other fields.
References
- Yu T C, Lin C C. An intelligent wireless sensing and control system to improve indoor air quality: Monitoring, prediction, and preaction[J]. International Journal of Distributed Sensor Networks, 2015, 11(8): 140978.
- Li J, He S, Ming Z, et al. An intelligent wireless sensor networks system with multiple servers communication[J]. International Journal of Distributed Sensor Networks, 2015, 11(8): 960173.
- Yang Z, Zhou Z, Liu Y. From RSSI to CSI: Indoor localization via channel response[J]. ACM Computing Surveys (CSUR), 2013, 46(2): 1-32.
- Lin Y, Chen J, Cao Y, et al. Cross-domain recognition by identifying joint subspaces of source domain and target domain[J]. IEEE transactions on cybernetics, 2016, 47(4): 1090-1101.
- Yu Y, Si X, Hu C, et al. A review of recurrent neural networks: LSTM cells and network architectures[J]. Neural computation, 2019, 31(7): 1235-1270.
- Singh U, Determe J F, Horlin F, et al. Crowd forecasting based on wifi sensors and lstm neural networks[J]. IEEE transactions on instrumentation and measurement, 2020, 69(9): 6121-6131.
- Wang F, Liu J, Gong W. WiCAR: WiFi-based in-car activity recognition with multi-adversarial domain adaptation[C]//Proceedings of the International Symposium on Quality of Service. 2019: 1-10.
- Zhang J, Chen Z, Luo C, et al. MetaGanFi: Cross-domain unseen individual identification using WiFi signals[J]. Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies, 2022, 6(3): 1-21.
- Li F, Liang Y, Liu G, et al. Wi-TCG: a WiFi gesture recognition method based on transfer learning and conditional generative adversarial networks[J]. Engineering Research Express, 2024, 6(4): 045253.
- Sherstinsky A. Fundamentals of recurrent neural network (RNN) and long short-term memory (LSTM) network[J]. Physica D: Nonlinear Phenomena, 2020, 404: 132306.
- Al-Selwi S M, Hassan M F, Abdulkadir S J, et al. RNN-LSTM: From applications to modeling techniques and beyond—Systematic review[J]. Journal of King Saud University-Computer and Information Sciences, 2024: 102068.
- Vaswani A, Shazeer N, Parmar N, et al. Attention is all you need[J]. Advances in neural information processing systems, 2017, 30.
- Bahdanau D, Cho K, Bengio Y. Neural machine translation by jointly learning to align and translate[J]. arXiv preprint arXiv:1409.0473, 2014.
- Vijay G, Bdira E B A, Ibnkahla M. Cognition in wireless sensor networks: A perspective[J]. IEEE sensors journal, 2010, 11(3): 582-592.
- Niu Z, Zhong G, Yu H. A review on the attention mechanism of deep learning[J]. Neurocomputing, 2021, 452: 48-62.