Cyber Threat Detection from QR Code Images via Topological Data Analysis and Machine Learning: A Novel Approach
Abstract
This study presents an innovative approach that combines topological data analysis (TDA) with machine learning algorithms to classify cyber threat data encoded as QR codes. This study used a tabular dataset containing metadata on network traffic. The tabular data were first converted into Quick Response (QR) code images, which were then resized to 32×32 and 64×64 pixel dimensions. cubical complex representations were generated from the resulting QR code images, and topological features corresponding to the H0 and H1 dimensions were extracted using the persistent homology method. These features were converted into fixed-dimensional vectors via the Persistence Image (PI) transformation and analyzed at different PI resolution levels (10×10, 20×20, 40×40, and 60×60). The feature vectors were evaluated using the eXtreme Gradient Boosting, Light Gradient Boosting Machine, CatBoost, AdaBoost, and Gradient Boosting (GB) algorithms, with 5-fold cross-validation. According to experimental results, the proposed TDA-AdaBoost model achieved an accuracy score of 99.16% with a 32×32 pixel QR dataset and a resolution of 20×20 PI. Furthermore, the TDA-GB model achieved an accuracy score of 95.10% with a 64×64 pixel QR dataset and a resolution of 10×10 PI. The findings demonstrate that topological features extracted from QR code representations offer strong representational capabilities for cyber threat classification and that the proposed approach constitutes a viable alternative in cybersecurity.
Keywords
References
- [1] Yu S., & Carroll F. (2022). Implications of AI in national security: understanding the security issues and ethical challenges. In: Artificial intelligence in cyber security: Impact and implications: Security challenges, technical and ethical issues, forensic investigative challenges. Montasari, R., & Jahankhani, H. (Eds), Springer, pp 157–175.
- [2] Li Y., & Liu Q. (2021). A comprehensive review study of cyber-attacks and cyber security; Emerging trends and recent developments. Energy Reports, 7: 8176–8186.
- [3] Okoli U. I., Obi O. C., Adewusi A. O., & Abrahams T. O. (2024). Machine learning in cybersecurity: A review of threat detection and defense mechanisms. World Journal of Advanced Research and Reviews, 21 (1): 2286–2295.
- [4] Farooq H. M., & Otaibi N. M. (2018). Optimal machine learning algorithms for cyber threat detection. 2018 UKSim-AMSS 20th International Conference on Computer Modelling and Simulation (UKSim), 32–37.
- [5] Boutaba R., Salahuddin M. A., Limam N., Ayoubi S., Shahriar N., Estrada-Solano F., & Caicedo O. M. (2018). A comprehensive survey on machine learning for networking: evolution, applications and research opportunities. Journal of Internet Services and Applications, 9 (1): 1–99.
- [6] Kaur R., Gabrijelčič D., & Klobučar T. (2023). Artificial intelligence for cybersecurity: Literature review and future research directions. Information Fusion, 97: 101804.
- [7] Toğaçar M. (2023). Kötü Amaçlı Yazılım Türlerinin Tespitinde Kullanılan 1B Verilerin 2B Barkod Türlerine Dönüştürülerek Derin Ağlarla Analizlerinin Gerçekleştirilmesi. Mühendislik Bilimleri ve Araştırmaları Dergisi, 5 (1): 169–177.
- [8] Alaca Y., & Çelik Y. (2023). Cyber attack detection with QR code images using lightweight deep learning models. Computers & Security, 126: 103065.
Details
Primary Language
English
Subjects
Computer Software, Software Engineering (Other)
Journal Section
Research Article
Authors
Hilal Nur Çetin
0009-0000-9736-5441
Türkiye
Publication Date
June 30, 2026
Submission Date
December 8, 2025
Acceptance Date
May 15, 2026
Published in Issue
Year 2026 Volume: 11 Number: 2