{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,13]],"date-time":"2026-10-13T15:55:52Z","timestamp":1791906952945,"version":"4.3.4"},"reference-count":43,"publisher":"PeerJ","license":[{"start":{"date-parts":[[2025,3,28]],"date-time":"2025-03-28T00:00:00Z","timestamp":1743120000000},"content-version":"unspecified","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"German University of Technology (GUtech) Muscat"},{"name":"Sultanate of Oman under the Seed","award":["SG\/23\/NR\/CS\/RA"],"award-info":[{"award-number":["SG\/23\/NR\/CS\/RA"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":[],"abstract":"<jats:p>Intrusion detection in Internet of Things (IoT)-based wireless sensor networks (WSNs) is essential due to their widespread use and inherent vulnerability to security breaches. Traditional centralized intrusion detection systems (IDS) face significant challenges in data privacy, computational efficiency, and scalability, particularly in resource-constrained IoT environments. This study aims to create and assess a federated learning (FL) framework that integrates with long short-term memory (LSTM) networks for efficient intrusion detection in IoT-based WSNs. We design the framework to enhance detection accuracy, minimize false positive rates (FPR), and ensure data privacy, while maintaining system scalability. Using an FL approach, multiple IoT nodes collaboratively train a global LSTM model without exchanging raw data, thereby addressing privacy concerns and improving detection capabilities. The proposed model was tested on three widely used datasets: WSN-DS, CIC-IDS-2017, and UNSW-NB15. The evaluation metrics for its performance included accuracy, F1 score, FPR, and root mean square error (RMSE). We evaluated the performance of the FL-based LSTM model against traditional centralized models, finding significant improvements in intrusion detection. The FL-based LSTM model achieved higher accuracy and a lower FPR across all datasets than centralized models. It effectively managed sequential data in WSNs, ensuring data privacy while maintaining competitive performance, particularly in complex attack scenarios. FL and LSTM networks work well together to make a strong way to find intrusions in IoT-based WSNs, which improves both privacy and detection. This study underscores the potential of FL-based systems to address key challenges in IoT security, including data privacy, scalability, and performance, making the proposed framework suitable for real-world IoT applications.<\/jats:p>","DOI":"10.7717\/peerj-cs.2751","type":"journal-article","created":{"date-parts":[[2025,3,28]],"date-time":"2025-03-28T04:19:22Z","timestamp":1743135562000},"page":"e2751","source":"Crossref","is-referenced-by-count":64,"title":["Federated learning with LSTM for intrusion detection in IoT-based wireless sensor networks: a multi-dataset analysis"],"prefix":"10.7717","volume":"11","author":[{"given":"Raja Waseem","family":"Anwar","sequence":"first","affiliation":[{"name":"Department of Computer Science, German University of Technology in Oman, Muscat, Oman"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-2585-0573","authenticated-orcid":true,"given":"Mohammad","family":"Abrar","sequence":"additional","affiliation":[{"name":"Faculty of Computer Studies, Arab Open University, Muscat, Oman"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-8580-0223","authenticated-orcid":true,"given":"Abdu","family":"Salam","sequence":"additional","affiliation":[{"name":"Department of Computer Science, Abdul Wali Khan University, Mardan, KPK, Pakistan"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-6009-6153","authenticated-orcid":true,"given":"Faizan","family":"Ullah","sequence":"additional","affiliation":[{"name":"Department of Computer Science, Bacha Khan University, Charsadda, KPK, Pakistan"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"4443","published-online":{"date-parts":[[2025,3,28]]},"reference":[{"issue":"8","key":"10.7717\/peerj-cs.2751\/ref-1","doi-asserted-by":"publisher","DOI":"10.1109\/ACCESS.2024.3413071","article-title":"A survey on verification of security and safety in IoT systems","volume":"12","author":"Abuserrieh","year":"2024","journal-title":"IEEE Access"},{"key":"10.7717\/peerj-cs.2751\/ref-2","doi-asserted-by":"publisher","first-page":"6","DOI":"10.1016\/S1389-1286(01)00302-4","article-title":"Wireless sensor networks: a survey","volume":"2","author":"Akyildiz","year":"2002","journal-title":"Computer Networks (Elsevier)"},{"issue":"1","key":"10.7717\/peerj-cs.2751\/ref-3","doi-asserted-by":"publisher","first-page":"4731953","DOI":"10.1155\/2016\/4731953","article-title":"WSN-DS: a dataset for intrusion detection systems in wireless sensor networks","volume":"2016","author":"Almomani","year":"2016","journal-title":"Journal of Sensors"},{"issue":"12","key":"10.7717\/peerj-cs.2751\/ref-4","doi-asserted-by":"publisher","first-page":"131","DOI":"10.14569\/issn.2156-5570","article-title":"Intrusion detection system in wireless sensor networks: a review","volume":"6","author":"Ananthakumar","year":"2015","journal-title":"International Journal of Advanced Computer Science and Applications"},{"key":"10.7717\/peerj-cs.2751\/ref-5","first-page":"415","article-title":"DBTS: distributed blockchain-based trust scheme for data privacy and security in smart cities","author":"Anwar","year":"2023"},{"key":"10.7717\/peerj-cs.2751\/ref-6","doi-asserted-by":"publisher","DOI":"10.5281\/zenodo.14619198","article-title":"Federated learning with LSTM for intrusion detection in IoT","author":"Anwar","year":"2025"},{"key":"10.7717\/peerj-cs.2751\/ref-7","first-page":"41","article-title":"Attack detection mechanisms for internet of everything (IoE) networks","volume-title":"Cybersecurity Vigilance and Security Engineering of Internet of Everything","author":"Anwar","year":"2023"},{"key":"10.7717\/peerj-cs.2751\/ref-8","doi-asserted-by":"publisher","first-page":"605","DOI":"10.1016\/j.future.2019.02.004","article-title":"BTEM: belief based trust evaluation mechanism for wireless sensor networks","volume":"96","author":"Anwar","year":"2019","journal-title":"Future Generation Computer Systems"},{"key":"10.7717\/peerj-cs.2751\/ref-9","doi-asserted-by":"publisher","first-page":"3428","DOI":"10.1038\/s41598-024-53938-9","article-title":"Detection and isolation of wormhole nodes in wireless ad hoc networks based on post-wormhole actions","volume":"14","author":"Bhatti","year":"2024","journal-title":"Scientific Reports"},{"key":"10.7717\/peerj-cs.2751\/ref-10","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.1902.01046","article-title":"Towards federated learning at scale: system design","author":"Bonawitz","year":"1902"},{"issue":"6","key":"10.7717\/peerj-cs.2751\/ref-11","doi-asserted-by":"publisher","first-page":"1923","DOI":"10.1109\/TPDS.2023.3267897","article-title":"Dap-FL: federated learning flourishes by adaptive tuning and secure aggregation","volume":"34","author":"Chen","year":"2023","journal-title":"IEEE Transactions on Parallel and Distributed Systems"},{"key":"10.7717\/peerj-cs.2751\/ref-12","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.1412.3555","article-title":"Empirical evaluation of gated recurrent neural networks on sequence modeling","author":"Chung","year":"2014"},{"key":"10.7717\/peerj-cs.2751\/ref-13","article-title":"Intrusion detection evaluation dataset","author":"CIF Cybersecurity","year":"2017"},{"issue":"4","key":"10.7717\/peerj-cs.2751\/ref-14","doi-asserted-by":"publisher","first-page":"103541","DOI":"10.1016\/j.adhoc.2024.103541","article-title":"Hierarchical multistep approach for intrusion detection and identification in IoT and Fog computing-based environments","volume":"161","author":"de Souza","year":"2024","journal-title":"Ad Hoc Networks"},{"issue":"1\u20132","key":"10.7717\/peerj-cs.2751\/ref-15","doi-asserted-by":"publisher","first-page":"18","DOI":"10.1016\/j.cose.2008.08.003","article-title":"Anomaly-based network intrusion detection: techniques, systems and challenges","volume":"28","author":"Garcia-Teodoro","year":"2009","journal-title":"Computers & Security"},{"key":"10.7717\/peerj-cs.2751\/ref-16","doi-asserted-by":"publisher","first-page":"2246703","DOI":"10.1080\/09540091.2023.2246703","article-title":"Design of advanced intrusion detection systems based on hybrid machine learning techniques in hierarchically wireless sensor networks","volume":"35","author":"Gebremariam","year":"2023","journal-title":"Connection Science"},{"key":"10.7717\/peerj-cs.2751\/ref-17","doi-asserted-by":"crossref","first-page":"1953","DOI":"10.1007\/978-3-031-12382-5_107","article-title":"Internet of things connected wireless sensor networks for smart cities","volume-title":"The Effect of Information Technology on Business and Marketing Intelligence Systems","author":"Ghazal","year":"2023"},{"issue":"5","key":"10.7717\/peerj-cs.2751\/ref-18","doi-asserted-by":"publisher","first-page":"165","DOI":"10.1016\/j.comnet.2019.05.014","article-title":"Intrusion detection systems in the internet of things: a comprehensive investigation","volume":"160","author":"Hajiheidari","year":"2019","journal-title":"Computer Networks"},{"key":"10.7717\/peerj-cs.2751\/ref-19","first-page":"795","article-title":"Malicious URL and intrusion detection using machine learning","author":"Hamza","year":"2024"},{"key":"10.7717\/peerj-cs.2751\/ref-20","doi-asserted-by":"crossref","DOI":"10.1162\/neco.1997.9.8.1735","article-title":"Long short-term memory","volume-title":"Neural Computation","author":"Hochreiter","year":"1997"},{"issue":"18","key":"10.7717\/peerj-cs.2751\/ref-21","doi-asserted-by":"publisher","first-page":"3927","DOI":"10.3390\/electronics12183927","article-title":"Machine-learning-based vulnerability detection and classification in internet of things device security","volume":"12","author":"Hulayyil","year":"2023","journal-title":"Electronics"},{"issue":"7","key":"10.7717\/peerj-cs.2751\/ref-22","doi-asserted-by":"publisher","first-page":"26","DOI":"10.5120\/3399-4730","article-title":"A review of anomaly based intrusion detection systems","volume":"28","author":"Jyothsna","year":"2011","journal-title":"International Journal of Computer Applications"},{"issue":"1\u20132","key":"10.7717\/peerj-cs.2751\/ref-23","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1561\/2200000083","article-title":"Advances and open problems in federated learning","volume":"14","author":"Kairouz","year":"2021","journal-title":"Foundations and Trends\u00ae in Machine Learning"},{"key":"10.7717\/peerj-cs.2751\/ref-24","first-page":"1","article-title":"Long short term memory recurrent neural network classifier for intrusion detection","author":"Kim","year":"2016"},{"key":"10.7717\/peerj-cs.2751\/ref-25","doi-asserted-by":"publisher","first-page":"395","DOI":"10.1007\/s11277-023-10773-x","article-title":"A systematic review on intrusion detection system in wireless networks: variants, attacks, and applications","volume":"133","author":"Kumar","year":"2023","journal-title":"Wireless Personal Communications"},{"issue":"7553","key":"10.7717\/peerj-cs.2751\/ref-26","doi-asserted-by":"publisher","first-page":"436","DOI":"10.1038\/nature14539","article-title":"Deep learning","volume":"521","author":"LeCun","year":"2015","journal-title":"Nature"},{"issue":"3","key":"10.7717\/peerj-cs.2751\/ref-27","doi-asserted-by":"publisher","first-page":"50","DOI":"10.1109\/MSP.2020.2975749","article-title":"Federated learning: challenges, methods, and future directions","volume":"37","author":"Li","year":"2020","journal-title":"IEEE Signal Processing Magazine"},{"key":"10.7717\/peerj-cs.2751\/ref-28","doi-asserted-by":"publisher","first-page":"4745","DOI":"10.1109\/ACCESS.2023.3349287","article-title":"A survey of deep learning technologies for intrusion detection in internet of things","volume":"12","author":"Liao","year":"2024","journal-title":"IEEE Access"},{"key":"10.7717\/peerj-cs.2751\/ref-29","doi-asserted-by":"publisher","first-page":"41928","DOI":"10.1109\/ACCESS.2023.3269980","article-title":"A survey on securing federated learning: analysis of applications, attacks, challenges, and trends","volume":"11","author":"Neto","year":"2023","journal-title":"IEEE Access"},{"issue":"4","key":"10.7717\/peerj-cs.2751\/ref-30","doi-asserted-by":"publisher","first-page":"231","DOI":"10.1007\/s11036-007-0024-2","article-title":"A survey of cryptographic primitives and implementations for hardware-constrained sensor network nodes","volume":"12","author":"Roman","year":"2007","journal-title":"Mobile Networks and Applications"},{"issue":"9","key":"10.7717\/peerj-cs.2751\/ref-31","doi-asserted-by":"publisher","first-page":"51","DOI":"10.1109\/MC.2011.291","article-title":"Securing the internet of things","volume":"44","author":"Roman","year":"2011","journal-title":"Computer"},{"key":"10.7717\/peerj-cs.2751\/ref-32","doi-asserted-by":"publisher","first-page":"36346","DOI":"10.1109\/ACCESS.2024.3373697","article-title":"Securing smart manufacturing by integrating anomaly detection with zero-knowledge proofs","volume":"12","author":"Salam","year":"2024","journal-title":"IEEE Access"},{"issue":"1","key":"10.7717\/peerj-cs.2751\/ref-33","doi-asserted-by":"publisher","first-page":"17","DOI":"10.1186\/s40537-023-00692-w","article-title":"Performance evaluation of deep learning techniques for DoS attacks detection in wireless sensor network","volume":"10","author":"Salmi","year":"2023","journal-title":"Journal of Big Data"},{"key":"10.7717\/peerj-cs.2751\/ref-34","first-page":"1","article-title":"A lightweight anomaly detection technique for low-resource IoT devices: a game-theoretic methodology","author":"Sedjelmaci","year":"2016"},{"issue":"3","key":"10.7717\/peerj-cs.2751\/ref-35","doi-asserted-by":"publisher","first-page":"275","DOI":"10.59628\/jast.v2i3.925","article-title":"Survey: state-of-the-art energy-consumption optimization solutions for mobile ad-hoc networks","volume":"2","author":"Tonin","year":"2024","journal-title":"Sana\u2019a University Journal of Applied Sciences and Technology"},{"key":"10.7717\/peerj-cs.2751\/ref-36","first-page":"1387","article-title":"Federated learning over wireless networks: optimization model design and analysis","author":"Tran","year":"2019"},{"key":"10.7717\/peerj-cs.2751\/ref-37","doi-asserted-by":"publisher","first-page":"8","DOI":"10.1007\/s10922-021-09621-9","article-title":"Deep learning in IoT intrusion detection","volume":"30","author":"Tsimenidis","year":"2022","journal-title":"Journal of Network and Systems Management"},{"key":"10.7717\/peerj-cs.2751\/ref-38","doi-asserted-by":"publisher","first-page":"8845833","DOI":"10.1155\/2020\/8845833","article-title":"Modified decision tree technique for ransomware detection at runtime through API calls","volume":"2020","author":"Ullah","year":"2020","journal-title":"Scientific Programming"},{"issue":"16","key":"10.7717\/peerj-cs.2751\/ref-39","doi-asserted-by":"publisher","first-page":"7737","DOI":"10.1007\/s00500-022-06755-z","article-title":"Machine health surveillance system by using deep learning sparse autoencoder","volume":"26","author":"Ullah","year":"2022","journal-title":"Soft Computing"},{"key":"10.7717\/peerj-cs.2751\/ref-40","article-title":"The UNSW-NB15 dataset","author":"UNSW","year":"2015"},{"key":"10.7717\/peerj-cs.2751\/ref-41","article-title":"WSN-DS: a dataset for intrusion detection systems in wireless sensor networks","author":"WSN-DS","year":"2016"},{"key":"10.7717\/peerj-cs.2751\/ref-42","doi-asserted-by":"publisher","first-page":"91357","DOI":"10.1109\/ACCESS.2024.3418995","article-title":"Internet of things (IoT): origin, embedded technologies, smart applications and its growth in the last decade","volume":"12","author":"Yalli","year":"2024","journal-title":"IEEE Access"},{"issue":"1","key":"10.7717\/peerj-cs.2751\/ref-43","doi-asserted-by":"publisher","first-page":"2119","DOI":"10.32604\/cmc.2023.035077","article-title":"Internet of things intrusion detection system based on convolutional neural network","volume":"75","author":"Yin","year":"2023","journal-title":"Computers, Materials & Continua"}],"container-title":["PeerJ Computer Science"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/peerj.com\/articles\/cs-2751.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/peerj.com\/articles\/cs-2751.xml","content-type":"application\/xml","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/peerj.com\/articles\/cs-2751.html","content-type":"text\/html","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/peerj.com\/articles\/cs-2751.pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,3,28]],"date-time":"2025-03-28T04:19:39Z","timestamp":1743135579000},"score":1,"resource":{"primary":{"URL":"https:\/\/peerj.com\/articles\/cs-2751"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,3,28]]},"references-count":43,"alternative-id":["10.7717\/peerj-cs.2751"],"URL":"https:\/\/doi.org\/10.7717\/peerj-cs.2751","archive":["CLOCKSS","LOCKSS","Portico"],"relation":{},"ISSN":["2376-5992"],"issn-type":[{"value":"2376-5992","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,3,28]]},"article-number":"e2751"}}