Anomaly Detection in Smart City Sensor Data Using Isolation Forest and Autoencoder Models
DOI:
https://doi.org/10.61453/jods.v20260320Keywords:
Anomaly detection, Smart city, Isolation Forest, Autoencoder, Sensor analytics, Sustainable cities and communitiesAbstract
Smart city operations depend on continuous sensing across transport, energy, and environmental systems. Although these data streams enable data-driven urban management, they also expose city operators to abnormal patterns caused by sensor malfunction, communication dropout, sudden load changes, and cybersecurity-relevant manipulation of telemetry values. This study develops and evaluates a hybrid anomaly detection framework that combines Isolation Forest and Autoencoder models for multivariate smart city sensor data. Isolation Forest is used to perform scalable initial screening of sparse and high-deviation observations, while an Autoencoder learns nonlinear normal operating patterns and refines alerts through reconstruction error. The framework was assessed on CitySense-AD, a controlled multivariate smart city benchmark containing traffic, energy, environmental, and device-health measurements across multiple urban zones. Model performance was evaluated using precision, recall, F1-score, receiver operating characteristic area under the curve, precision-recall area under the curve, false-positive rate, detection latency, noise robustness, and explanation stability. The hybrid model achieved an F1-score of 0.837 and ROC-AUC of 0.944, outperforming standalone Isolation Forest, standalone Autoencoder, one-class support vector machine, and local outlier factor baselines. Robustness analysis showed that the hybrid model retained a higher F1-score under injected sensor noise and partial missingness, while feature-level reconstruction and isolation contributions provided operationally meaningful explanations for alert triage. The findings indicate that combining tree-based isolation with neural reconstruction can improve anomaly detection reliability in heterogeneous smart city sensor environments without requiring extensive labeled attack data.
References
AlSalehy, A. S.,&Bailey, M. (2025). Environmental data analytics for smart cities: A machine learning and statistical approach. Smart Cities, (3), Article 90. https://doi.org/10.3390/smartcities8030090
Ansari, S., Vaidya, K., Kadu, A., Dewi, D.A., Sayyad, F., Sayyad, S., Varadarajan, V., 2025. Enhanced urban infrastructure management: IoT-based smart manhole monitoring system. Journal of Advances in Information Technology 16(11), 1501–1510. https://doi.org/10.12720/jait.16.11.1501-1510
Birkstedt, T., Minkkinen, M., Tandon, A.,&Mäntymäki, M. (2023). AI governance: Themes, knowledge gaps and future agendas. Internet Research, 33(7), 133–167. https://doi.org/10.1108/INTR-01-2022-0042
Gracias, J. S., Parnell, G. S., Specking, E., Pohl, E. A.,&Buchanan, R. (2023). Smart cities—A structured literature review. Smart Cities, 6(4), 1719–1743. https://doi.org/10.3390/smartcities6040080
Khan, F. M., Zeb, A., Rahman, T., Al-Khasawneh, M. A., Daradkeh, Y. I., Siddiqui, I. F., Bashir, A. K.,&Ullah, I. (2026). XAI-driven data mining for self-defending IoT systems: Enhancing cybersecurity transparency in the age of smart cities. Cognitive Computation, 18, Article 16. https://doi.org/10.1007/s12559-026-10559-w
Kumar, A., Kumar, A., Raja, R., Dewangan, A. K., Kumar, M., Soni, A., Agarwal, D.,&Saudagar, A. K. J. (2025). Revolutionising anomaly detection: A hybrid framework for anomaly detection integrating isolation forest, autoencoder, and Conv. LSTM. Knowledge and Information Systems, 67(12), 11903–11953. https://doi.org/10.1007/s10115-025-02580-6
Liu, Q., Trevisan, A. H., Yang, M.,&Mascarenhas, J. (2022). A framework of digital technologies for the circular economy: Digital functions and mechanisms. Business Strategy and the Environment, 31(5), 2171–2192. https://doi.org/10.1002/bse.3015
Liu, Y.-L., Chiang, J.-T.,&Ko, P.-F. (2023). The benefits of tourism for rural community development. Humanities and Social Sciences Communications, 10, Article 137. https://doi.org/10.1057/s41599-023-01610-4
Moos, J., Hansel, K., Abdulsamad, H., Stark, S., Clever, D.,&Peters, J. (2022). Robust reinforcement learning: A review of foundations and recent advances. Machine Learning and Knowledge Extraction, 4(1), 276–315. https://doi.org/10.3390/make4010013
Naeem, S., Ali, A., Anam, S.,&Ahmed, M. M. (2023). An unsupervised machine learning algorithms: Comprehensive review. International Journal of Computing and Digital Systems, 13(1), 911–921. https://doi.org/10.12785/ijcds/130172
Ojadi, J. O., Onukwulu, E. C., Odionu, C. S.,&Owulade, O. A. (2023). Leveraging IoT and deep learning for real-time carbon footprint monitoring and optimization in smart cities and industrial zones. Iconic Research and Engineering Journals, 6(11), 946–966. https://www.irejournals.com/paper-details/1704555
Reis, M. J. C. S. (2025). AI-driven anomaly detection for securing IoT devices in 5G-enabled smart cities. Electronics, 14(12), Article 2492. https://doi.org/10.3390/electronics14122492
Salman, A. M., Al-Nuaimi, B. T., Ali Subhi, A., Alkattan, H.,&Alfilh, R. H. C. (2025). Enhancing cybersecurity with machine learning: A hybrid approach for anomaly detection and threat prediction. Mesopotamian Journal of CyberSecurity, 5(1), 202–215. https://doi.org/10.58496/MJCS/2025/014
Zafar, N., Haq, I. U., Sohail, H., Chughtai, J. U. R.,&Muneeb, M. (2022). Traffic prediction in smart cities based on hybrid feature space. IEEE Access, 10, 134333–134348. https://doi.org/10.1109/ACCESS.2022.3231448
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Journal of Data Science

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