AI-Driven Anomaly Detection for Securing IoT Devices in 5G-Enabled Smart Cities
Manuel J. C. S. Reis
Abstract
This paper proposes a novel AI-driven anomaly detection framework designed to enhance cybersecurity in IoT-enabled smart cities operating over 5G networks. While prior research has explored deep learning for anomaly detection, most existing systems rely on single-model architectures, employ centralized training, or lack support for real-time, privacy-preserving deployment—limiting their scalability and robustness. To address these gaps, our system integrates a hybrid deep learning model combining autoencoders, long short-term memory (LSTM) networks, and convolutional neural networks (CNNs) to detect spatial, temporal, and reconstruction-based anomalies. Additionally, we implement federated learning and edge AI to enable decentralized, privacy-preserving threat detection across distributed IoT nodes. The system is trained and evaluated using a combination of real-world (CICIDS2017, TON_IoT, UNSW-NB15) and synthetically generated attack data, including adversarial perturbations. Experimental results show our hybrid model achieves a precision of 97.5%, a recall of 96.2%, and an F1 score of 96.8%, significantly outperforming traditional IDS and standalone deep learning methods. These findings validate the framework’s effectiveness and scalability, making it suitable for real-time intrusion detection and autonomous threat mitigation in smart city environments.