TinyML-Optimised Multimodal Lstm for Unsupervised Anomaly Detection in Smart Home IoT Systems
DOI:
https://doi.org/10.33003/fjs-2026-1020-5988Keywords:
Anomaly Detection, Smart Home IoT, LSTM Model, TinyML, Edge Computing, Multimodal fusionAbstract
The rapid rise in IoT smart home devices generates extensive time-series datasets, while anomaly detection solutions remain largely dependent on cloud-based processing, resulting in latency, privacy concerns, and connectivity requirements. Existing approaches often rely on a single modality and insufficiently address concept drift and edge-device constraints. This study proposes a TinyML-optimised multimodal LSTM model for unsupervised anomaly detection in smart home applications deployed on a Raspberry Pi edge device. Temperature, humidity, and power consumption modalities were combined to capture cross-modal relationships. A simulated dataset represented normal diurnal and seasonal behaviour and incorporated three anomaly types: heat spikes, power outages, and midnight appliance usage. Model training used only normal-value sequences within a 250-timestep sliding window. TinyML optimisation reduced the stored LSTM model size to 196 KB, which represents the model storage size and should not be interpreted as total runtime memory or direct evidence of real-time or low-power operation. An online learning strategy was employed to address concept drift through periodic retraining. On the simulated test set, the model achieved 98.97% recall, 8.79% precision, 8.86% F1-score, 0.294 Matthews correlation coefficient (MCC), and an AUC-ROC of 0.9984. The confusion matrix comprised 83,416 true negatives, 3,994 false positives, 4 false negatives, and 385 true positives. Although the model detected nearly all injected anomalies, its low precision indicates a substantial false-alarm burden and limits claims regarding deployment readiness.
References
Abadade, Y., Temouden, A., Bamoumen, H., Benamar, N., Chtouki, Y., & Hafid, A. S. (2023). A Comprehensive Survey on TinyML. IEEE Access, 11. https://doi.org/10.1109/ACCESS.2023.3294111
Antonini, M., Pincheira, M., Vecchio, M., & Antonelli, F. (2023a). An Adaptable and Unsupervised TinyML Anomaly Detection System for Extreme Industrial Environments †. Sensors, 23(4). https://doi.org/10.3390/s23042344
Antonini, M., Pincheira, M., Vecchio, M., & Antonelli, F. (2023b). An Adaptable and Unsupervised TinyML Anomaly Detection System for Extreme Industrial Environments †. Sensors, 23(4). https://doi.org/10.3390/s23042344
Arciniegas, S., Rivero, D., Piñan, J., Diaz, E., & Rivas, F. (2025). IoT device for detecting abnormal vibrations in motors using TinyML. Discover Internet of Things, 5(1). https://doi.org/10.1007/s43926-025-00142-4
Arora, S., Rani, R., & Saxena, N. (2024a). A systematic review on detection and adaptation of concept drift in streaming data using machine learning techniques. In Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery (Vol. 14, Number 4). John Wiley and Sons Inc. https://doi.org/10.1002/widm.1536
Arora, S., Rani, R., & Saxena, N. (2024b). A systematic review on detection and adaptation of concept drift in streaming data using machine learning techniques. In Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery (Vol. 14, Number 4). John Wiley and Sons Inc. https://doi.org/10.1002/widm.1536
Atassi, R. (2023). Anomaly Detection in IoT Networks: Machine Learning Approaches for Intrusion Detection. Fusion: Practice and Applications, 13(1). https://doi.org/10.54216/FPA.130110
Bouazza, A., Kodad, M., Azizi, M., Oulahyane, A., & Chafik, H. (2026). Federated Learning in Smart Cities: A Comprehensive Review of Privacy, Security, and Scalable AI Integration. Lecture Notes in Networks and Systems, 1641 LNNS. https://doi.org/10.1007/978-3-032-06061-7_13
da Costa Filho, P. E., Marques, L. A. de A., Lima, I. da S. F. de, Sousa, E. L. de, Kreutz, M. E., Neto, A. V., Cunha, E. N., & Vieira, D. (2025). Machine-Learning-Based Classification of Electronic Devices Using an IoT Smart Meter. Informatics, 12(2). https://doi.org/10.3390/informatics12020048
Disabato, S., & Roveri, M. (2024). Tiny Machine Learning for Concept Drift. IEEE Transactions on Neural Networks and Learning Systems, 35(6). https://doi.org/10.1109/TNNLS.2022.3229897
Dutta, D. L., & Bharali, S. (2021). TinyML Meets IoT: A Comprehensive Survey. In Internet of Things (Netherlands) (Vol. 16). https://doi.org/10.1016/j.iot.2021.100461
Ezugwu, A. E., Taiwo, O., Egwuche, O. S., Abualigah, L., Van Der Merwe, A., Pal, J., Saha, A. K., Alzahrani, A. I., Alblehai, F., Greeff, J., & Olusanya, M. O. (2025). Smart Homes of the Future. Wiley Online LibraryAE Ezugwu, O Taiwo, OS Egwuche, L Abualigah, A Van Der Merwe, J Pal, AK SahaTransactions on Emerging Telecommunications Technologies, 2025•Wiley Online Library, 36(1). https://doi.org/10.1002/ETT.70041
Fahad, L. G., & Tahir, S. F. (2021). Activity recognition and anomaly detection in smart homes. Neurocomputing, 423, 362–372. https://doi.org/10.1016/j.neucom.2020.10.102
Ferrag, M. A., Friha, O., Hamouda, D., Maglaras, L., & Janicke, H. (2022). Edge-IIoTset: A New Comprehensive Realistic Cyber Security Dataset of IoT and IIoT Applications for Centralized and Federated Learning. IEEE Access, 10. https://doi.org/10.1109/ACCESS.2022.3165809
Fu, R., Shi, S., Guo, H., Wang, T., Qiang, C., Wen, Z., Tao, J., Qi, X., Lu, Y., Wang, X., Wang, Z., Liu, Y., Liu, X., Zhang, S., & Li, G. (2024). MINT: a Multi-modal Image and Narrative Text Dubbing Dataset for Foley Audio Content Planning and Generation. http://arxiv.org/abs/2406.10591
Gøthesen, S., Haddara, M., & Kumar, K. N. (2023). Empowering homes with intelligence: An investigation of smart home technology adoption and usage. Internet of Things (Netherlands), 24. https://doi.org/10.1016/j.iot.2023.100944
Hammad, S. S., Iskandaryan, D., & Trilles, S. (2023). An unsupervised TinyML approach applied to the detection of urban noise anomalies under the smart cities environment. Internet of Things (Netherlands), 23. https://doi.org/10.1016/j.iot.2023.100848
Hong, Y. K., Wang, Z. Y., & Cho, J. Y. (2022). Global Research Trends on Smart Homes for Older Adults: Bibliometric and Scientometric Analyses. International Journal of Environmental Research and Public Health, 19(22). https://doi.org/10.3390/ijerph192214821
Hu, L., Lu, Y., & Feng, Y. (2025). Concept Drift Detection Based on Deep Neural Networks and Autoencoders. Applied Sciences (Switzerland), 15(6). https://doi.org/10.3390/app15063056
Jiang, J. C., Kantarci, B., Oktug, S., & Soyata, T. (2020). Federated learning in smart city sensing: Challenges and opportunities. In Sensors (Switzerland) (Vol. 20, Number 21). https://doi.org/10.3390/s20216230
Kanimozhi, R. (2026). Real-Time Cyber Security Risk Assessment in Smart Home IoT Networks Using a Hybrid Fuzzy–Neural Soft Computing Framework. Transactions on Emerging Telecommunications Technologies, 37(7). https://doi.org/10.1002/ett.70467
Katib, I., Albassam, E., Sharaf, S. A., & Ragab, M. (2025). Safeguarding IoT consumer devices: Deep learning with TinyML driven real-time anomaly detection for predictive maintenance. Ain Shams Engineering Journal, 16(2). https://doi.org/10.1016/j.asej.2025.103281
Kumar, S. V., Aloy Anuja Mary, G., Chohan, J. S., & Kalita, K. (2024). Efficient sensor anomaly detection using Markov-LSTM architecture for methane sensing. Journal of Autonomous Intelligence, 7(3). https://doi.org/10.32629/jai.v7i3.1285
Kumari, S., Prabha, C., Karim, A., Hassan, M. M., & Azam, S. (2024). A Comprehensive Investigation of Anomaly Detection Methods in Deep Learning and Machine Learning: 2019–2023. In IET Information Security (Vol. 2024, Number 1). https://doi.org/10.1049/2024/8821891
Litayem, N. (2024a). Scalable Smart Home Management with ESP32-S3: A Low-Cost Solution for Accessible Home Automation. 2024 International Conference on Computer and Applications, ICCA 2024. https://doi.org/10.1109/ICCA62237.2024.10927887
Litayem, N. (2024b). Scalable Smart Home Management with ESP32-S3: A Low-Cost Solution for Accessible Home Automation. 2024 International Conference on Computer and Applications, ICCA 2024. https://doi.org/10.1109/ICCA62237.2024.10927887
Maniriho, P., Niyigaba, E., Bizimana, Z., Twiringiyimana, V., Mahoro, L. J., & Ahmad, T. (2020). Anomaly-based Intrusion Detection Approach for IoT Networks Using Machine Learning. CENIM 2020 - Proceeding: International Conference on Computer Engineering, Network, and Intelligent Multimedia 2020. https://doi.org/10.1109/CENIM51130.2020.9297958
Morshedi, R., & Matinkhah, S. M. (2025). A Comprehensive Review of Deep Learning Techniques for Anomaly Detection in IoT Networks: Methods, Challenges, and Datasets. In Engineering Reports (Vol. 7, Number 9). John Wiley and Sons Inc. https://doi.org/10.1002/eng2.70415
Muthunambu, N. K., Prabakaran, S., Kavin, B. P., Siruvangur, K. S., Chinnadurai, K., & Ali, J. (2024). A Novel Eccentric Intrusion Detection Model Based on Recurrent Neural Networks with Leveraging LSTM. Computers, Materials and Continua, 78(3). https://doi.org/10.32604/cmc.2023.043172
Naik, R., Devaraddi, R., Kutte, V., Patil, P., & Dalavi, V. (2026). Real-Time Vibration Detection and Signal Analysis of Machines. Proceedings of 3rd International Conference on Electronics, Computing, Communication and Control Technology: AI-Driven Smart Electronics and Next-Generation Communication Technologies, ICECCC 2026. https://doi.org/10.1109/ICECCC70334.2026.11633152
Nimmy, K., Dilraj, M., Sankaran, S., & Achuthan, K. (2023). Leveraging power consumption for anomaly detection on IoT devices in smart homes. Journal of Ambient Intelligence and Humanized Computing, 14(10). https://doi.org/10.1007/s12652-022-04110-6
Pradhan, S. K., & Gangashetty, S. V. (2026). An Intelligent Voice-Based Authentication and Anomaly Detection Framework for Secure Smart-Home Environments. Sci, 8(7). https://doi.org/10.3390/sci8070162
Rahim, A., Zhong, Y., Ahmad, T., Ahmad, S., Pławiak, P., & Hammad, M. (2023). Enhancing Smart Home Security: Anomaly Detection and Face Recognition in Smart Home IoT Devices Using Logit-Boosted CNN Models. Sensors, 23(15). https://doi.org/10.3390/s23156979
Rajaan, R., Kumar, L., Choudhary, N., Sharma, A., & Butwall, M. (2025a). Anomaly Detection in Smart Home IoT Systems Using Machine Learning Approaches. International Journal of Engineering, Business and Management, 9(2), 43–47. https://doi.org/10.22161/ijebm.9.2.5
Rajaan, R., Kumar, L., Choudhary, N., Sharma, A., & Butwall, M. (2025b). Anomaly Detection in Smart Home IoT Systems Using Machine Learning Approaches. International Journal of Engineering, Business and Management, 9(2), 43–47. https://doi.org/10.22161/ijebm.9.2.5
Reis, M. J. C. S., & Serôdio, C. (2025). Edge AI for Real-Time Anomaly Detection in Smart Homes. Future Internet, 17(4). https://doi.org/10.3390/fi17040179
Shaheen, M., Farooq, M. S., Umer, T., & Kim, B. S. (2022). Applications of Federated Learning; Taxonomy, Challenges, and Research Trends. Electronics (Switzerland), 11(4). https://doi.org/10.3390/electronics11040670
Shang, D., Zhang, G., & Lu, J. (2025). Concept drift detection based on radial distance. Neurocomputing, 653. https://doi.org/10.1016/j.neucom.2025.131190
Shanmuganathan, V., & Suresh, A. (2023). LSTM-Markov based efficient anomaly detection algorithm for IoT environment. Applied Soft Computing, 136. https://doi.org/10.1016/j.asoc.2023.110054
Shubbham Gupta, & Shiv Naresh Shivhare. (2025). Embedded TinyML for Predictive Maintenance: Vibration Analysis on ESP32 with Real-Time Fault Detection in Industrial Equipment. International Journal on Computational Modelling Applications, 2(2), 1–17. https://doi.org/10.63503/j.ijcma.2025.114
Srilakshmi, V., Babu Veesam, S., Shiva Rama Krishna, M., Kumar Munaganuri, R., & Devee Sivaprasad, D. (2025). Design of an Improved Model for Anomaly Detection in CCTV Systems Using Multimodal Fusion and Attention-Based Networks. IEEE Access, 13, 27287–27309. https://doi.org/10.1109/ACCESS.2025.3536501
Sun, W., Cao, L., Guo, Y., & Du, K. (2024). Multimodal and multiscale feature fusion for weakly supervised video anomaly detection. Scientific Reports, 14(1). https://doi.org/10.1038/s41598-024-73462-0
Xiao, J., Xu, Z., Zou, Q., Li, Q., Zhao, D., Fang, D., Li, R., Tang, W., Li, K., Zuo, X., Hu, P., Jiang, Y., Weng, Z., & Lyu, M. R. (2024). Make your home safe: Time-aware unsupervised user behavior anomaly detection in smart homes via loss-guided mask. Dl.Acm.OrgJ Xiao, Z Xu, Q Zou, Q Li, D Zhao, D Fang, R Li, W Tang, K Li, X Zuo, P Hu, Y Jiang, Z WengProceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and, 2024•dl.Acm.Org, 3551–3562. https://doi.org/10.1145/3637528.3671708
Yamauchi, M., Ohsita, Y., Murata, M., Ueda, K., & Kato, Y. (2020). Anomaly Detection in Smart Home Operation from User Behaviors and Home Conditions. IEEE Transactions on Consumer Electronics, 66(2), 183–192. https://doi.org/10.1109/TCE.2020.2981636
Yang, L., & Shami, A. (2021). A Lightweight Concept Drift Detection and Adaptation Framework for IoT Data Streams. IEEE Internet of Things Magazine, 4(2), 96–101. https://doi.org/10.1109/IOTM.0001.2100012
Yin, C., Zhang, S., Wang, J., & Xiong, N. N. (2022). Anomaly Detection Based on Convolutional Recurrent Autoencoder for IoT Time Series. IEEE Transactions on Systems, Man, and Cybernetics: Systems, 52(1). https://doi.org/10.1109/TSMC.2020.2968516
Zakariah, M., & Almazyad, A. S. (2023). Anomaly Detection for IOT Systems Using Active Learning. Applied Sciences (Switzerland), 13(21). https://doi.org/10.3390/app132112029
Zeng, F., Chen, M., Qian, C., Wang, Y., Zhou, Y., & Tang, W. (2023). Multivariate time series anomaly detection with adversarial transformer architecture in the Internet of Things. Future Generation Computer Systems, 144, 244–255. https://doi.org/10.1016/j.future.2023.02.015
Zhao, Z., Guo, H., & Wang, Y. (2024). A multi-information fusion anomaly detection model based on convolutional neural networks and AutoEncoder. Scientific Reports, 14(1). https://doi.org/10.1038/s41598-024-66760-0
Downloads
Published
Issue
Section
Categories
License
Copyright (c) 2026 Osaretin Edith Okoro, Ibrahim Nurudeen Mahmud, Prema Kirubakaran, Suleiman Aliyu Muhammad

This work is licensed under a Creative Commons Attribution 4.0 International License.