Abstract
Human activity recognition (HAR) is increasingly important in ubiquitous computing applications. Recently, attention mechanism are extensively used in sensor-based HAR tasks, which is capable of focusing the neural network on different parts of the time series data. Among attention-based methods, the self-attention mechanism performs well in the HAR field, which establish the correlation of key-query to fuse the local information with global information. But self-attention fails to model the local contextual information between the keys. In this paper, we propose a contextual attention (COA) based HAR method, which utilize the local contextual information between keys to guide learning the global weight matrix. In COA mechanism, we use \(k \times k\) kernel to encode input signal to local contextual keys to extract more contextual information between keys. By fusing local key and query to generate global weight matrix, we can establish the correlation between local features and global features. The values are multiplied by the weight matrix to get a global contextual key, which include global contextual information. We combine the local key and global key to enhance feature’s expression ability. Extensive experiments on five public HAR datasets, namely UCI-HAR, PAMAP2, UNIMIB-SHAR, DSADS, and MHEALTH show that the COA-based model is superior to the state-of-the-art methods.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Wang, Z., Jiang, M., Yaohua, H., Li, H.: An incremental learning method based on probabilistic neural networks and adjustable fuzzy clustering for human activity recognition by using wearable sensors. IEEE Trans. Inf Technol. Biomed. 16(4), 691–699 (2012)
Woodford, B.J., Ghandour, A.: An information retrieval-based approach to activity recognition in smart homes. In: Hakim, H., et al. (eds.) ICSOC 2020. Lecture Notes in Computer Science, vol. 12632, pp. 583–595. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-76352-7_51
Donghui, W., Wang, Z., Chen, Y., Zhao, H.: Mixed-kernel based weighted extreme learning machine for inertial sensor based human activity recognition with imbalanced dataset. Neurocomputing 190, 35–49 (2016)
Betancourt, C., Chen, W.H., Kuan, C.W.: Self-attention networks for human activity recognition using wearable devices. In: 2020 IEEE International Conference on Systems, Man, and Cybernetics (SMC), pp. 1194–1199. IEEE (2020)
Li, Y., Yao, T., Pan, Y., Mei, T.: Contextual transformer networks for visual recognition. In: IEEE Transactions on Pattern Analysis and Machine Intelligence (2022
Awais, M., Chiari, L., Ihlen, E.A.F., Helbostad, J.L., Palmerini, L.: Physical activity classification for elderly people in free-living conditions. IEEE J. Biomed. Health Inf. 23(1), 197–207 (2018)
Ignatov, A.D., Strijov, V.V.: Human activity recognition using quasiperiodic time series collected from a single tri-axial accelerometer. Multimedia Tools Appl. 75(12), 7257–7270 (2016)
Akhavian, R., Behzadan, A.H.: Smartphone-based construction workers’ activity recognition and classification. Autom. Constr. 71, 198–209 (2016)
Huang, W., Zhang, L., Teng, Q., Song, C., He, J.: The convolutional neural networks training with channel-selectivity for human activity recognition based on sensors. IEEE J. Biomed. Health Inf. 25(10), 3834–3843 (2021)
Cui, Z., Chen, W., Chen, Y.: Multi-scale convolutional neural networks for time series classification. arXiv preprint arXiv:1603.06995 (2016)
Ignatov, A.: Real-time human activity recognition from accelerometer data using convolutional neural networks. Appl. Soft Comput. 62, 915–922 (2018)
Chen, Y., Zhong, K., Zhang, J., Sun, Q., Zhao, X.: LSTM networks for mobile human activity recognition. In: 2016 International Conference on Artificial Intelligence: Technologies and Applications, pp. 50–53. Atlantis Press (2016)
Ullah, M., Ullah, H., Khan, S.D., Cheikh, F.A.: Stacked lstm network for human activity recognition using smartphone data. In: 2019 8th European Workshop on Visual Information Processing (EUVIP), pp. 175–180. IEEE (2019)
Yu, S., Qin, L.: Human activity recognition with smartphone inertial sensors using bidir-lstm networks. In: 2018 3rd International Conference on Mechanical, Control and Computer Engineering (ICMCCE), pp. 219–224. IEEE (2018)
Zeng, M., et al.: Understanding and improving recurrent networks for human activity recognition by continuous attention. In: Proceedings of the 2018 ACM International Symposium on Wearable Computers, pp. 56–63 (2018)
Ma, H., Li, W., Zhang, X., Gao, S., Lu, S.: Attnsense: Multi-level attention mechanism for multimodal human activity recognition. In: IJCAI, pp. 3109–3115 (2019)
Ramanujam, E., Perumal, T., Padmavathi, S.: Human activity recognition with smartphone and wearable sensors using deep learning techniques: A review. IEEE Sens. J. 21(12), 13029–13040 (2021)
Zhao, H., Jia, J., Koltun, V.: Exploring self-attention for image recognition. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 10076–10085 (2020)
Anguita, D., Ghio, A., Oneto, L., Parra, X., Reyes-Ortiz, J.L.: Human activity recognition on smartphones using a multiclass hardware-friendly support vector machine. In: Bravo, J., Hervas, R., Rodriguez, M. (eds.) IWAAL 2012. Lecture Notes in Computer Science, vol. 7657, pp. 216–223. Springer, Cham (2012)
Reiss, A., Stricker, D.: Introducing a new benchmarked dataset for activity monitoring. In: 2012 16th International Symposium on Wearable Computers, pp. 108–109. IEEE (2012)
Micucci, D., Mobilio, M., Napoletano, P.: Unimib shar: A dataset for human activity recognition using acceleration data from smartphones. Appl. Sci. 7(10), 1101 (2017)
Altun, K., Barshan, B., Tunçel, O.: Comparative study on classifying human activities with miniature inertial and magnetic sensors. Pattern Recognit. 43(10), 3605–3620 (2010)
Banos, O., et al.: mHealthDroid: a novel framework for agile development of mobile health applications. In: Pecchia, L., Chen, L.L., Nugent, C., Bravo, J. (eds.) IWAAL 2014. LNCS, vol. 8868, pp. 91–98. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-13105-4_14
Huang, W., Zhang, L., Gao, W., Min, F., He, J.: Shallow convolutional neural networks for human activity recognition using wearable sensors. IEEE Trans. Instrum. Meas. 70, 1–11 (2021)
Qian, H., Pan, S.J., Da, B., Miao, C.: A novel distribution-embedded neural network for sensor-based activity recognition. In: IJCAI, vol. 2019, pp. 5614–5620 (2019)
Teng, Q., Wang, K., Zhang, L., He, J.: The layer-wise training convolutional neural networks using local loss for sensor-based human activity recognition. IEEE Sens. J. 20(13), 7265–7274 (2020)
Gao, W., Zhang, L., Teng, Q., He, J., Hao, W.: Danhar: dual attention network for multimodal human activity recognition using wearable sensors. Appl. Soft Comput. 111, 107728 (2021)
Woo, S., Park, J., Lee, J.Y., Kweon, I.S.: Cbam: convolutional block attention module. In: Proceedings of the European Conference on Computer Vision (ECCV), pp. 3–19 (2018)
Shige, X., Zhang, L., Huang, W., Hao, W., Song, A.: Deformable convolutional networks for multimodal human activity recognition using wearable sensors. IEEE Trans. Instrum. Meas. 71, 1–14 (2022)
Huang, W., Zhang, L., Wu, H., Min, F., Song, A.: Channel-equalization-HAR: a light-weight convolutional neural network for wearable sensor based human activity recognition. In: IEEE Transactions on Mobile Computing (2022)
Tang, Y., Zhang, L., Teng, Q., Min, F., Song, A.: Triple cross-domain attention on human activity recognition using wearable sensors. In: IEEE Transactions on Emerging Topics in Computational Intelligence (2022)
Acknowledgments
This study is supported by the National Key Research & Development Program of China No. 2020YFC2007104, Natural Science Foundation of China (No.61902377), Youth Innovation Promotion Association CAS, Jinan S &T Bureau No. 2020GXRC030, the Funding for Introduced Innovative R &D Team Program of Jiangmen (Grant No.2018630100090019844), the Wuyi University Startup S &T research funding for senior talents 2019 (No. 504/5041700171).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Xu, C., Mao, Z., Fan, F., Qiu, T., Shen, J., Gu, Y. (2023). A Shallow Convolution Network Based Contextual Attention for Human Activity Recognition. In: Longfei, S., Bodhi, P. (eds) Mobile and Ubiquitous Systems: Computing, Networking and Services. MobiQuitous 2022. Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering, vol 492. Springer, Cham. https://doi.org/10.1007/978-3-031-34776-4_9
Download citation
DOI: https://doi.org/10.1007/978-3-031-34776-4_9
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-34775-7
Online ISBN: 978-3-031-34776-4
eBook Packages: Computer ScienceComputer Science (R0)