Enhancing Human Activity Recognition in Smart Homes with Self-Supervised Learning and Self-Attention †
<p>The architecture of the AttCLHAR framework for HAR.</p> "> Figure 2
<p>Layout of door and motion sensors in Aruba and Milan testbeds.</p> "> Figure 3
<p>Comparative visualization of Aruba-1 and Milan feature representations using t-SNE.</p> "> Figure 4
<p>The comparison of performance improvement from the linear scenario to the fine-tuning scenario with F1 score and accuracy for Aruba-1 and Milan using the AttCLCHAR model.</p> ">
Abstract
:1. Introduction
- A novel adapted contrastive AttCLHAR framework is proposed, which incorporates two layers of one-dimensional CNN, one layer of LSTM, and a self-attention layer as the encoder. This encoder is designed to learn robust representations from time-series data. The proposed framework is evaluated on real-world smart home datasets, demonstrating its effectiveness in capturing and recognizing human activities in this context.
- Extensive experiments were conducted on real-world smart home datasets to evaluate the proposed model’s performance in HAR and compare it with three other models: SimCLR [24], SimCLR with SAM, and SimCLR with the self-attention layer (AttSimCLR). The results demonstrate that all the models’ representations are highly effective for downstream tasks, and AttCLHAR performs better, especially in semi-supervised learning.
2. Related Work
2.1. Human Activity Recognition from Ambient Sensors
2.2. Self-Supervised Learning
2.3. SimCLR for Human Activity Recognition
2.4. Self-Attention Mechanism
3. Methodology
3.1. Pre-Training
3.2. Fine-Tuning
4. Experimental Setup
4.1. Datasets
4.2. Implementation Details
4.2.1. Data Preprocessing
4.2.2. Augmentation Selection
4.2.3. Other Components
5. Results and Discussion
5.1. Contrastive Learning Scenario
5.2. Semi-Supervised Learning Scenario
5.3. Transfer Learning Scenario
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- United Nations. World Social Report 2023: Leaving No One Behind an an Ageing World. Available online: https://desapublications.un.org/publications/world-social-report-2023-leaving-no-one-behind-ageing-world (accessed on 2 November 2023).
- Centers for Disease Control and Prevention. Healthy Places Terminology. Available online: https://www.cdc.gov/healthyplaces/terminology.htm (accessed on 2 November 2023).
- National Insitute on Aging (NIA). Aging in Place: Growing Older at Home. Available online: https://www.nia.nih.gov/health/aging-place/aging-place-growing-older-home (accessed on 2 November 2023).
- Government of Canada. Thinking about Your Future? Plan Now to Age in Place—A Checklist. Available online: https://www.canada.ca/en/employment-social-development/corporate/seniors/forum/aging-checklist.html (accessed on 2 November 2023).
- Lafontaine, V.; Bouchard, K.; Maítre, J.; Gaboury, S. Denoising UWB Radar Data for Human Activity Recognition Using Convolutional Autoencoders. IEEE Access 2023, 11, 81298–81309. [Google Scholar] [CrossRef]
- Tekemetieu, A.A.; Haidon, C.; Bergeron, F.; Ngankam, H.K.; Pigot, H.; Gouin-Vallerand, C.; Giroux, S. Context Modelling in Ambient Assisted Living: Trends and Lessons. Int. Ser. Oper. Res. Manag. Sci. 2021, 305, 189–225. [Google Scholar]
- Wilson, M.; Fritz, R.; Finlay, M.; Cook, D.J. Piloting Smart Home Sensors to Detect Overnight Respiratory and Withdrawal Symptoms in Adults Prescribed Opioids. Pain Manag. Nurs. 2023, 24, 4–11. [Google Scholar] [CrossRef] [PubMed]
- Demongivert, C.; Bouchard, K.; Gaboury, S.; Lussier, M.; Kenfack-Ngankam, H.; Couture, M.; Bier, N.; Giroux, S. Handling of Labeling Uncertainty in Smart Homes Using Generalizable Fuzzy Features. In Proceedings of the GoodIT ’21: Conference on Information Technology for Social Good, Roma, Italy, 9–11 September 2021; pp. 248–253. [Google Scholar]
- Maitre, J.; Bouchard, K.; Gaboury, S. Fall Detection With UWB Radars and CNN-LSTM Architecture. IEEE J. Biomed. Health Inform. 2021, 25, 1273–1283. [Google Scholar] [CrossRef]
- Wang, J.; Chen, Y.; Hao, S.; Peng, X.; Hu, L. Deep learning for sensor-based activity recognition: A survey. Pattern Recognit. Lett. 2019, 119, 3–11. [Google Scholar] [CrossRef]
- Liciotti, D.; Bernardini, M.; Romeo, L.; Frontoni, E. A sequential deep learning application for recognising human activities in smart homes. Neurocomputing 2020, 396, 501–513. [Google Scholar] [CrossRef]
- Bouchabou, D.; Nguyen, S.M.; Lohr, C.; LeDuc, B.; Kanellos, I. Using Language Model to Bootstrap Human Activity Recognition Ambient Sensors Based in Smart Homes. Electronics 2021, 10, 2498. [Google Scholar] [CrossRef]
- Chen, K.; Zhang, D.; Yao, L.; Guo, B.; Yu, Z.; Liu, Y. Deep Learning for Sensor-Based Human Activity Recognition: Overview, Challenges, and Opportunities. ACM Comput. Surv. 2021, 54, 77. [Google Scholar] [CrossRef]
- Pigot, H.; Giroux, S. Living labs for designing assistive technologies. In Proceedings of the 2015 17th International Conference on E-health Networking, Application & Services (HealthCom), Boston, MA, USA, 14–17 October 2015; pp. 170–176. [Google Scholar]
- Ngankam, H.; Lussier, M.; Aboujaoudé, A.; Demongivert, C.; Pigot, H.; Gaboury, S.; Bouchard, K.; Couture, M.; Bier, N.; Giroux, S. SAPA Technology: An AAL Architecture for Telemonitoring. In Proceedings of the 15th International Joint Conference on Biomedical Engineering Systems and Technologies—Smart CommuniCare, Online, 9–11 February 2022; SciTePress: Setúbal, Portugal, 2022; pp. 892–898, ISBN 978-989-758-552-4. [Google Scholar]
- Liu, X.; Zhang, F.; Hou, Z.; Mian, L.; Wang, Z.; Zhang, J.; Tang, J. Self-Supervised Learning: Generative or Contrastive. IEEE Trans. Knowl. Data Eng. 2023, 35, 857–876. [Google Scholar] [CrossRef]
- Jaiswal, A.; Babu, A.R.; Zadeh, M.Z.; Banerjee, D.; Makedon, F. A Survey on Contrastive Self-Supervised Learning. Technologies 2021, 9, 2. [Google Scholar] [CrossRef]
- Chen, T.; Kornblith, S.; Norouzi, M.; Hinton, G. A Simple Framework for Contrastive Learning of Visual Representations. arXiv 2020, arXiv:2002.05709. [Google Scholar]
- Khaertdinov, B.; Ghaleb, E.; Asteriadis, S. Contrastive Self-supervised Learning for Sensor-based Human Activity Recognition. In Proceedings of the 2021 IEEE International Joint Conference on Biometrics (IJCB), Shenzhen, China, 4–7 August 2021; pp. 1–8. [Google Scholar]
- Wang, J.; Zhu, T.; Gan, J.; Chen, L.L.; Ning, H.; Wan, Y. Sensor Data Augmentation by Resampling in Contrastive Learning for Human Activity Recognition. IEEE Sens. J. 2022, 22, 22994–23008. [Google Scholar] [CrossRef]
- Wang, J.; Zhu, T.; Chen, L.; Ning, H.; Wan, Y. Negative Selection by Clustering for Contrastive Learning in Human Activity Recognition. IEEE Internet Things J. 2023, 10, 10833–10844. [Google Scholar] [CrossRef]
- Singh, S.P.; Sharma, M.K.; Lay-Ekuakille, A.; Gangwar, D.; Gupta, S. Deep ConvLSTM With Self-Attention for Human Activity Decoding Using Wearable Sensors. IEEE Sens. J. 2021, 21, 8575–8582. [Google Scholar] [CrossRef]
- Chen, K.; Yao, L.; Zhang, D.; Wang, X.; Chang, X.; Nie, F. A Semisupervised Recurrent Convolutional Attention Model for Human Activity Recognition. IEEE Trans. Neural Netw. Learn. Syst. 2020, 31, 1747–1756. [Google Scholar] [CrossRef] [PubMed]
- Chen, H.; Gouin-Vallerand, C.; Bouchard, K.; Gaboury, S.; Couture, M.; Bier, N.; Giroux, S. Leveraging Self-Supervised Learning for Human Activity Recognition with Ambient Sensors. In Proceedings of the 2023 ACM Conference on Information Technology for Social Good, Lisbon, Portugal, 6–8 September 2023; GoodIT ’23. pp. 324–332. [Google Scholar]
- Liu, H.; HaoChen, J.Z.; Gaidon, A.; Ma, T. Self-supervised Learning is More Robust to Dataset Imbalance. In Proceedings of the International Conference on Learning Representations, Virtual, 25–29 April 2022. [Google Scholar]
- Cook, D.J.; Crandall, A.S.; Thomas, B.L.; Krishnan, N.C. CASAS: A Smart Home in a Box. Computer 2013, 46, 62–69. [Google Scholar] [CrossRef]
- Gochoo, M.; Tan, T.H.; Liu, S.H.; Jean, F.R.; Alnajjar, F.S.; Huang, S.C. Unobtrusive Activity Recognition of Elderly People Living Alone Using Anonymous Binary Sensors and DCNN. IEEE J. Biomed. Health Inform. 2019, 23, 693–702. [Google Scholar] [CrossRef] [PubMed]
- Ghods, A.; Cook, D.J. Activity2Vec: Learning ADL Embeddings from Sensor Data with a Sequence-to-Sequence Model. arXiv 2019, arXiv:abs/1907.05597. [Google Scholar]
- Hwang, Y.M.; Park, S.; Lee, H.O.; Ko, S.K.; Lee, B.T. Deep Learning for Human Activity Recognition Based on Causality Feature Extraction. IEEE Access 2021, 9, 112257–112275. [Google Scholar] [CrossRef]
- Fahad, L.G.; Tahir, S.F. Activity recognition and anomaly detection in smart homes. Neurocomputing 2021, 423, 362–372. [Google Scholar] [CrossRef]
- Gupta, P.; McClatchey, R.; Caleb-Solly, P. Tracking changes in user activity from unlabelled smart home sensor data using unsupervised learning methods. Neural Comput. Appl. 2020, 32, 12351–12362. [Google Scholar] [CrossRef]
- Garrido, Q.; Chen, Y.; Bardes, A.; Najman, L.; LeCun, Y. On the duality between contrastive and non-contrastive self-supervised learning. In Proceedings of the Eleventh International Conference on Learning Representations, Kigali, Rwanda, 1–5 May 2023. [Google Scholar]
- Balestriero, R.; LeCun, Y. Contrastive and Non-Contrastive Self-Supervised Learning Recover Global and Local Spectral Embedding Methods. In Proceedings of the 36th Conference on Neural Information Processing Systems, New Orleans, LA, USA, 28 November–9 December 2022. [Google Scholar]
- Oord, A.v.d.; Li, Y.; Vinyals, O. Representation Learning with Contrastive Predictive Coding. arXiv 2019, arXiv:cs.LG/1807.03748. [Google Scholar]
- He, K.; Fan, H.; Wu, Y.; Xie, S.; Girshick, R. Momentum Contrast for Unsupervised Visual Representation Learning. In Proceedings of the 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 13–19 June 2020; pp. 9726–9735. [Google Scholar]
- Grill, J.B.; Strub, F.; Altché, F.; Tallec, C.; Richemond, P.H.; Buchatskaya, E.; Doersch, C.; Pires, B.A.; Guo, Z.D.; Azar, M.G.; et al. Bootstrap Your Own Latent a New Approach to Self-Supervised Learning. In Proceedings of the 34th International Conference on Neural Information Processing Systems, NIPS’20, Red Hook, NY, USA, 12–14 December 2020. [Google Scholar]
- Chen, X.; He, K. Exploring Simple Siamese Representation Learning. In Proceedings of the 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, TN, USA, 20–25 June 2021; pp. 15745–15753. [Google Scholar]
- Zbontar, J.; Jing, L.; Misra, I.; LeCun, Y.; Deny, S. Barlow Twins: Self-Supervised Learning via Redundancy Reduction. In Proceedings of the 38th International Conference on Machine Learning, Virtual, 18–24 July 2021. [Google Scholar]
- Bardes, A.; Ponce, J.; LeCun, Y. VICReg: Variance-Invariance-Covariance Regularization For Self-Supervised Learning. In Proceedings of the 10th International Conference on Learning Representations, Virtual, 25–29 April 2022. [Google Scholar]
- Tang, C.I.; Perez-Pozuelo, I.; Spathis, D.; Mascolo, C. Exploring Contrastive Learning in Human Activity Recognition for Healthcare. arXiv 2021, arXiv:cs.LG/2011.11542. [Google Scholar]
- Bahdanau, D.; Cho, K.; Bengio, Y. Neural Machine Translation by Jointly Learning to Align and Translate. arXiv 2016, arXiv:cs.CL/1409.0473. [Google Scholar]
- Zeng, M.; Gao, H.; Yu, T.; Mengshoel, O.J.; Langseth, H.; Lane, I.; Liu, X. Understanding and Improving Recurrent Networks for Human Activity Recognition by Continuous Attention. In Proceedings of the ISWC ’18: 2018 ACM International Symposium on Wearable Computers, Singapore, 8–12 October 2018; pp. 56–63. [Google Scholar]
- Raffel, C.; Ellis, D.P.W. Feed-Forward Networks with Attention Can Solve Some Long-Term Memory Problems. arXiv 2016, arXiv:cs.LG/1512.08756. [Google Scholar]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.u.; Polosukhin, I. Attention is All You Need. In Advances in Neural Information Processing Systems; NIPS: San Diego, CA, USA, 2017; Volume 30. [Google Scholar]
- Mahmud, S.; Tonmoy, M.T.H.; Bhaumik, K.K.; Rahman, A.M.; Amin, M.A.; Shoyaib, M.; Khan, M.A.H.; Ali, A. Human Activity Recognition from Wearable Sensor Data Using Self-Attention. In Proceedings of the ECAI 2020—24th European Conference on Artificial Intelligence, Santiago de Compostela, Spain, 29 August–8 September 2020. [Google Scholar]
- Khaertdinov, B.; Ghaleb, E.; Asteriadis, S. Deep Triplet Networks with Attention for Sensor-based Human Activity Recognition. In Proceedings of the 2021 IEEE International Conference on Pervasive Computing and Communications (PerCom), Kassel, Germany, 22–26 March 2021; pp. 1–10. [Google Scholar]
- Wang, Y.; Xu, H.; Liu, Y.; Wang, M.; Wang, Y.; Yang, Y.; Zhou, S.; Zeng, J.; Xu, J.; Li, S.; et al. A Novel Deep Multifeature Extraction Framework Based on Attention Mechanism Using Wearable Sensor Data for Human Activity Recognition. IEEE Sens. J. 2023, 23, 7188–7198. [Google Scholar] [CrossRef]
- K, M.; Ramesh, A.; G, R.; Prem, S.; A A, R.; Gopinath, D.M. 1D Convolution approach to human activity recognition using sensor data and comparison with machine learning algorithms. Int. J. Cogn. Comput. Eng. 2021, 2, 130–143. [Google Scholar] [CrossRef]
- Zheng, G.; Mukherjee, S.; Dong, X.L.; Li, F. OpenTag: Open Attribute Value Extraction from Product Profiles. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, KDD’18, New York, NY, USA, 19–23 August 2018; pp. 1049–1058. [Google Scholar]
- Luong, T.; Pham, H.; Manning, C.D. Effective Approaches to Attention-based Neural Machine Translation. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, Lisbon, Portugal, 17–21 September 2015; Màrquez, L., Callison-Burch, C., Su, J., Eds.; Association for Computational Linguistics: Lisbon, Portugal, 2015; pp. 1412–1421. [Google Scholar]
- CyberZHG. Keras-Self-Attention. Available online: https://pypi.org/project/keras-self-attention/ (accessed on 2 August 2023).
- Foret, P.; Kleiner, A.; Mobahi, H.; Neyshabur, B. Sharpness-aware Minimization for Efficiently Improving Generalization. In Proceedings of the International Conference on Learning Representations, Virtual, 3–7 May 2021. [Google Scholar]
- Diane, J. Cook. AL Activity Learning—Smart Home. Available online: https://github.com/WSU-CASAS/AL-Smarthome (accessed on 1 January 2023).
- Saeed, A.; Ozcelebi, T.; Lukkien, J. Multi-Task Self-Supervised Learning for Human Activity Detection. Proc. ACM Interact. Mob. Wearable Ubiquitous Technol. 2019, 3, 61. [Google Scholar] [CrossRef]
- Loshchilov, I.; Hutter, F. SGDR: Stochastic Gradient Descent with Restarts. arXiv 2016, arXiv:abs/1608.03983. [Google Scholar]
- Maaten, L.v.d.; Hinton, G. Visualizing Data using t-SNE. J. Mach. Learn. Res. 2008, 9, 2579–2605. [Google Scholar]
- Huang, X.; Zhang, S. Human Activity Recognition Based on Transformer in Smart Home. In Proceedings of the CACML ’23, Shanghai, China, 17–19 March 2023. [Google Scholar]
- Alaghbari, K.A.; Md. Saad, M.H.; Hussain, A.; Alam, M.R. Activities Recognition, Anomaly Detection and Next Activity Prediction Based on Neural Networks in Smart Homes. IEEE Access 2022, 10, 28219–28232. [Google Scholar] [CrossRef]
- Tan, T.H.; Badarch, L.; Zeng, W.X.; Gochoo, M.; Alnajjar, F.S.; Hsieh, J.W. Binary Sensors-Based Privacy-Preserved Activity Recognition of Elderly Living Alone Using an RNN. Sensors 2021, 21, 5371. [Google Scholar] [CrossRef] [PubMed]
- Li, Y.; Yang, G.; Su, Z.; Li, S.; Wang, Y. Human activity recognition based on multienvironment sensor data. Inf. Fusion 2023, 91, 47–63. [Google Scholar] [CrossRef]
Date | Time | Sensor ID | Sensor State | Activity | Activity Status |
---|---|---|---|---|---|
2010-11-04 | 08:33:52.929406 | M018 | ON | Meal_Preparation | begin |
2010-11-04 | 08:33:53.911115 | M019 | OFF | ||
2010-11-04 | 08:33:54.892943 | M017 | ON | ||
2010-11-04 | 08:33:57.253739 | M018 | OFF | ||
2010-11-04 | 08:35:43.498813 | M019 | OFF | ||
2010-11-04 | 08:35:44.246428 | M019 | ON | ||
2010-11-04 | 08:35:45.822482 | M018 | OFF | Meal_Preparation | end |
Original Activity | Read Watch TV | Morning Meds * Eve Meds * | Master Bathrm Guest Bathrm | Desk Activity Chores | Meditate Master Bedroom | Dining Rm * Activity | Kitchen Activity |
New Activity | Relax | Medication | Bathing | Work | Other | Eating | Meal Preparation |
Aruba-1 and Aruba-2 | Milan | ||
---|---|---|---|
Location | Core Sensors | Location | Core Sensors |
Kitchen | M015, M016, M017, | Kitchen | M012, M014, M015, M016, |
M018, M019 | M022, M023, D003 | ||
Living room | M009, M010, M012, M013, M020 | Living room | M006, M008, M026, |
Bedroom 1 | M001, M002, M003, M005, M006, M007 | Bedroom 1 | M019, M020, M021, M028 |
Bedroom 2 | M023, M024 | Bedroom 2 | M024 |
Bathroom 1 | D003, M029, M031 | Bathroom 1 | M013, M025 |
Bathroom 2 | M004 | Bathroom 2 | M017, M018 |
Dining | M014 | Dining | M003, M027 |
Office | M025, M026, M027, M028 | Office | M007 |
Hall 1 | M008 | Hall 1 | M010, M011 |
Hall 2 | M021, M022 | Hall 2 | M009 |
Front door | M011, D001 | Front door | M001, M002, D001, D002 |
Back door | D002 | Reading room | M004, M005 |
Garage door | M030, D004 | - | - |
Feature Number | Feature |
---|---|
1 | The time of the last sensor event in a window (hour) |
2 | The time of the last sensor event in a window (seconds) |
3 | The day of the week for the last sensor event in a window |
4 | The window size in time duration |
5 | The time since the last sensor event |
6 | The dominant sensor in the previous window |
7 | The dominant sensor is two windows back |
8 | The last sensor event in a window |
9 | The last sensor location in a window |
10 | The last motion sensor location in a window |
11 | The window complexity (entropy calculated from sensor counts) |
12 | The change in activity level between two halves of a window |
13 | The number of transitions between areas in a window |
14 | The number of distinct sensors in a window |
15 ∽ num_sensors+14 | The counts for each sensor |
num_sensors+15 ∽ 2×num_sensors+14 | The time since the sensor last fired |
Augmentation Method | SimCLR [24] Linear Evaluation | SimCLR [24] Fine-Tuning | AttCLCHAR Linear Evaluation | AttCLCHAR Fine-Tuning | ||||
---|---|---|---|---|---|---|---|---|
F1 Score (%) |
Accuracy (%) |
F1 Score (%) |
Accuracy (%) |
F1 Score (%) |
Accuracy (%) |
F1 Score (%) |
Accuracy (%) | |
Inverting | 80.45 | 80.86 | 95.25 | 95.24 | 81.57 | 81.77 | 96.86 | 96.85 |
Reversing | 80.95 | 81.25 | 95.24 | 95.23 | 81.53 | 81.67 | 96.83 | 96.82 |
Time Warping | 72.92 | 74.21 | 95.08 | 95.07 | 81.03 | 81.14 | 97.00 | 96.99 |
Random Noise | 78.65 | 79.00 | 95.39 | 95.38 | 79.41 | 79.77 | 96.83 | 96.81 |
Scaling | 81.42 | 81.54 | 95.56 | 95.54 | 85.41 | 85.36 | 97.04 | 97.02 |
Parameters | Aruba-1 | Aruba-2 | Milan |
---|---|---|---|
Features | 84 | 84 | 80 |
Input data | (146,220, 10, 84) | (400,083, 10, 84) | (83,325, 10, 80) |
Layer 1 Conv 1D | Filters 32; kerne size 3; ReLU; L2 regularizer; dropout 0.1 | ||
Layer 2 Conv 1D | Filters 64; kernel size 3; ReLU; L2 regularizer; dropout 0.1 | ||
One layer LSTM | Unites 64 | ||
Attention layer | Multiplicative attention; regularizer 1e-4 | ||
Projection head | Dimension 256, 128, 64 | ||
NT-Xent loss | Temperature parameter 0.1 | ||
Pre-training | Epoch 100; batch size 512; SGD optimizer; cosine decay: decay steps 1000 | ||
Linear evaluation | Epoch 300; optimizer: Adam learning rate 0.001; batch size 128; | ||
Fine-tuning | Epoch 200; optimizer: Adam learning rate 0.001; batch size 128 |
Label Fraction | SimCLR [24] Linear Evaluation | SimCLR + SAM Linear Evaluation | AttSimCLR Linear Evaluation | AttCLCHAR Linear Evaluation | ||||
---|---|---|---|---|---|---|---|---|
F1 Score (%) | Accuracy (%) | F1 Score (%) | Accuracy (%) | F1 Score (%) | Accuracy (%) | F1 Score (%) | Accuracy (%) | |
1% | 83.40 | 83.92 | 80.67 | 80.87 | 82.60 | 82.89 | 82.99 | 83.13 |
5% | 84.88 | 84.98 | 82.53 | 82.63 | 84.21 | 84.36 | 84.63 | 84.59 |
10% | 85.05 | 85.08 | 82.67 | 82.66 | 84.71 | 84.73 | 85.09 | 85.05 |
20% | 85.11 | 85.11 | 83.06 | 83.05 | 85.08 | 85.13 | 85.41 | 85.36 |
30% | 85.17 | 85.18 | 83.08 | 83.16 | 85.16 | 85.11 | 85.68 | 85.63 |
Label Fraction | SimCLR [24] Linear Evaluation | SimCLR + SAM Linear Evaluation | AttSimCLR Linear Evaluation | AttCLCHAR Linear Evaluation | ||||
---|---|---|---|---|---|---|---|---|
F1 Score (%) | Accuracy (%) | F1 Score (%) | Accuracy (%) | F1 Score (%) | Accuracy (%) | F1 Score (%) | Accuracy (%) | |
10% | 59.74 | 63.42 | 61.52 | 63.93 | 61.10 | 63.43 | 61.28 | 63.40 |
20% | 60.90 | 63.67 | 61.63 | 63.96 | 61.01 | 63.36 | 61.46 | 63.52 |
30% | 61.53 | 64.01 | 61.89 | 64.01 | 61.32 | 63.60 | 61.63 | 63.94 |
40% | 61.74 | 64.25 | 62.06 | 63.96 | 61.42 | 63.54 | 61.94 | 64.08 |
50% | 62.09 | 64.39 | 62.36 | 64.25 | 61.33 | 63.53 | 62.05 | 64.17 |
Label Fraction | SimCLR [24] Fine-Tuning | SimCLR + SAM Fine-Tuning | AttSimCLR Fine-Tuning | AttCLCHAR Fine-Tuning | ||||
---|---|---|---|---|---|---|---|---|
F1 Score (%) | Accuracy (%) | F1 Score (%) | Accuracy (%) | F1 Score (%) | Accuracy (%) | F1 Score (%) | Accuracy (%) | |
1% | 89.16 | 89.12 | 88.20 | 88.08 | 88.56 | 88.52 | 88.72 | 88.60 |
5% | 93.70 | 93.67 | 93.59 | 93.57 | 93.65 | 93.63 | 93.85 | 93.82 |
10% | 95.37 | 95.36 | 95.44 | 95.42 | 95.28 | 95.27 | 95.60 | 95.59 |
20% | 96.81 | 96.80 | 96.79 | 96.77 | 97.00 | 96.99 | 97.04 | 97.02 |
30% | 97.51 | 97.50 | 97.27 | 97.25 | 97.57 | 97.56 | 97.64 | 97.64 |
Model | Type | Accuracy (%) | Precision (%) | Recall (%) | F1 Score (%) |
---|---|---|---|---|---|
PNN [30] | Sup. | 90 | 74 | 80 | 74 |
DNN [58] | Sup. | 93 | 91 | 90 | 90 |
Bi-LSTM [59] | Sup. | 98.15 | 91.7 | 91.7 | 91.7 |
Transformer [57] | SSL | - | 95.9 | 96.9 | 96.4 |
AttCLCHAR (10%) | SSL | 95.59 | 95.66 | 95.54 | 95.60 |
AttCLCHAR (20%) | SSL | 97.02 | 97.07 | 97.00 | 97.04 |
Label Fraction | SimCLR [24] Fine-Tuning | SimCLR + SAM Fine-Tuning | AttSimCLR Fine-Tuning | AttCLCHAR Fine-Tuning | ||||
---|---|---|---|---|---|---|---|---|
F1 Score (%) | Accuracy (%) | F1 Score (%) | Accuracy (%) | F1 Score (%) | Accuracy (%) | F1 Score (%) | Accuracy (%) | |
10% | 82.62 | 82.58 | 81.01 | 80.95 | 81.86 | 81.82 | 81.36 | 81.30 |
20% | 90.20 | 90.17 | 88.97 | 88.92 | 90.52 | 90.46 | 90.17 | 90.11 |
30% | 93.33 | 93.29 | 92.30 | 92.26 | 93.62 | 93.60 | 93.41 | 93.37 |
40% | 94.61 | 94.60 | 94.28 | 94.27 | 95.07 | 95.03 | 95.21 | 95.19 |
50% | 95.31 | 95.30 | 94.87 | 94.87 | 95.70 | 95.69 | 95.75 | 95.73 |
Model | Type | Accuracy (%) | Precision (%) | Recall (%) | F1 Score (%) |
---|---|---|---|---|---|
PNN [30] | Sup. | 80 | 66 | 64 | 64 |
HAR_WCNN [60] | Sup. | 95.35 | 85.90 | 87.22 | 86.43 |
LSTM [11] | Sup. | 93.42 | 93.67 | 93.67 | 93.33 |
Ens2-LSTM [11] | Sup. | 94.24 | 94.33 | 94.33 | 94.00 |
AttCLCHAR (30%) | SSL | 93.37 | 93.57 | 93.25 | 93.41 |
AttCLCHAR (40%) | SSL | 95.19 | 95.31 | 95.10 | 95.21 |
Proportion | SimCLR [24] Linear Evaluation | AttCLCHAR Linear Evaluation | SimCLR [24] Fine-Tuning | AttCLCHAR Fine-Tuning | ||||
---|---|---|---|---|---|---|---|---|
F1 Score (%) | Accuracy (%) | F1 Score (%) | Accuracy (%) | F1 Score (%) | Accuracy (%) | F1 Score (%) | Accuracy (%) | |
1% | 84.13 | 84.47 | 82.76 | 82.83 | 89.17 | 89.13 | 88.98 | 88.93 |
5% | 85.31 | 85.38 | 84.77 | 84.77 | 93.68 | 93.66 | 94.13 | 94.13 |
10% | 85.42 | 85.43 | 84.95 | 84.93 | 95.28 | 95.27 | 95.58 | 95.56 |
20% | 85.43 | 85.38 | 85.19 | 85.27 | 96.87 | 96.86 | 97.06 | 97.05 |
30% | 85.47 | 85.42 | 85.22 | 85.15 | 97.49 | 97.48 | 97.54 | 97.53 |
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 MDPI and/or the editor(s). MDPI 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. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Chen, H.; Gouin-Vallerand, C.; Bouchard, K.; Gaboury, S.; Couture, M.; Bier, N.; Giroux, S. Enhancing Human Activity Recognition in Smart Homes with Self-Supervised Learning and Self-Attention. Sensors 2024, 24, 884. https://doi.org/10.3390/s24030884
Chen H, Gouin-Vallerand C, Bouchard K, Gaboury S, Couture M, Bier N, Giroux S. Enhancing Human Activity Recognition in Smart Homes with Self-Supervised Learning and Self-Attention. Sensors. 2024; 24(3):884. https://doi.org/10.3390/s24030884
Chicago/Turabian StyleChen, Hui, Charles Gouin-Vallerand, Kévin Bouchard, Sébastien Gaboury, Mélanie Couture, Nathalie Bier, and Sylvain Giroux. 2024. "Enhancing Human Activity Recognition in Smart Homes with Self-Supervised Learning and Self-Attention" Sensors 24, no. 3: 884. https://doi.org/10.3390/s24030884