Skip to main content

A Shallow Convolution Network Based Contextual Attention for Human Activity Recognition

  • Conference paper
  • First Online:
Mobile and Ubiquitous Systems: Computing, Networking and Services (MobiQuitous 2022)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 89.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 119.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. 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)

    Article  Google Scholar 

  2. 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

    Chapter  Google Scholar 

  3. 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)

    Article  Google Scholar 

  4. 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)

    Google Scholar 

  5. Li, Y., Yao, T., Pan, Y., Mei, T.: Contextual transformer networks for visual recognition. In: IEEE Transactions on Pattern Analysis and Machine Intelligence (2022

    Google Scholar 

  6. 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)

    Article  Google Scholar 

  7. 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)

    Article  Google Scholar 

  8. Akhavian, R., Behzadan, A.H.: Smartphone-based construction workers’ activity recognition and classification. Autom. Constr. 71, 198–209 (2016)

    Article  Google Scholar 

  9. 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)

    Article  Google Scholar 

  10. Cui, Z., Chen, W., Chen, Y.: Multi-scale convolutional neural networks for time series classification. arXiv preprint arXiv:1603.06995 (2016)

  11. Ignatov, A.: Real-time human activity recognition from accelerometer data using convolutional neural networks. Appl. Soft Comput. 62, 915–922 (2018)

    Article  Google Scholar 

  12. 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)

    Google Scholar 

  13. 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)

    Google Scholar 

  14. 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)

    Google Scholar 

  15. 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)

    Google Scholar 

  16. 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)

    Google Scholar 

  17. 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)

    Article  Google Scholar 

  18. 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)

    Google Scholar 

  19. 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)

    Chapter  Google Scholar 

  20. 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)

    Google Scholar 

  21. 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)

    Article  Google Scholar 

  22. 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)

    Article  MATH  Google Scholar 

  23. 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

    Chapter  Google Scholar 

  24. 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)

    Google Scholar 

  25. 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)

    Google Scholar 

  26. 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)

    Article  Google Scholar 

  27. 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)

    Article  Google Scholar 

  28. 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)

    Google Scholar 

  29. 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)

    Google Scholar 

  30. 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)

    Google Scholar 

  31. 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)

    Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Jianfei Shen .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics