
A Time Series Data Classification Method for Gesture Recognition Based on LSTM and Attention Mechanism
- 1 Institute of Computer Science and Engineering, University of Electronic Science and Technology of China, Xiyuan Ave, Chengdu, People’s Republic of China
* Author to whom correspondence should be addressed.
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.
Keywords
Wireless Sensing, LSTM, Attention Mechanism, Time-Series Data Analysis
[1]. 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.
[2]. 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.
[3]. 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.
[4]. 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.
[5]. 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.
[6]. 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.
[7]. 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.
[8]. 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.
[9]. 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.
[10]. Sherstinsky A. Fundamentals of recurrent neural network (RNN) and long short-term memory (LSTM) network[J]. Physica D: Nonlinear Phenomena, 2020, 404: 132306.
[11]. 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.
[12]. Vaswani A, Shazeer N, Parmar N, et al. Attention is all you need[J]. Advances in neural information processing systems, 2017, 30.
[13]. Bahdanau D, Cho K, Bengio Y. Neural machine translation by jointly learning to align and translate[J]. arXiv preprint arXiv:1409.0473, 2014.
[14]. Vijay G, Bdira E B A, Ibnkahla M. Cognition in wireless sensor networks: A perspective[J]. IEEE sensors journal, 2010, 11(3): 582-592.
[15]. Niu Z, Zhong G, Yu H. A review on the attention mechanism of deep learning[J]. Neurocomputing, 2021, 452: 48-62.
Cite this article
Mao,X. (2025). A Time Series Data Classification Method for Gesture Recognition Based on LSTM and Attention Mechanism. Applied and Computational Engineering,146,51-59.
Data availability
The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.
Disclaimer/Publisher's Note
The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of EWA Publishing and/or the editor(s). EWA Publishing and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
About volume
Volume title: Proceedings of SEML 2025 Symposium: Machine Learning Theory and Applications
© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and
conditions of the Creative Commons Attribution (CC BY) license. Authors who
publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons
Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this
series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published
version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial
publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and
during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See
Open access policy for details).