An Optimized Lightweight CNN with Randomized Hyperparameter Search for Real-Time Image-Based Malware Detection
DOI:
https://doi.org/10.47709/cnahpc.v8i1.7765Keywords:
Convolutional Neural Network (CNN), Cybersecurity, Grayscale, Malware, Randomized SearchAbstract
While image-based malware detection using deep learning has shown promise, existing methodologies predominantly rely on computationally expensive pre-trained architectures (e.g., VGG, ResNet) that create significant bottlenecks for real-time deployment on resource-constrained gateways. This research addresses this critical gap by proposing a streamlined, lightweight custom Convolutional Neural Network (CNN) specifically optimized for real-time operation. The novelty of this work lies in the strategic integration of Randomized Search Cross-Validation (RS-CV) to automate the discovery of an optimal configuration of filters, dense units, and dropout rates, eliminating the inefficiencies and biases of manual hyperparameter tuning. The proposed method transforms binary files into 64x64 grayscale images—reducing computational input by over 90% compared to standard architectures—which are then processed by the optimized custom network. Experimental results demonstrate the scientific significance of this approach, as the model achieved a near-perfect Area Under the Curve (AUC) of 0.9996 and identified threats with an average inference time of only 12–15 milliseconds. Out of 1,068 test samples, only 10 misclassifications were recorded, proving that a mathematically optimized lightweight model can outperform heavy ensemble frameworks in both accuracy and speed. These findings provide a reproducible framework for high-speed, front-line cybersecurity systems capable of detecting obfuscated threats in live network environments.
Downloads
References
Awan, M. J., et al. (2021). Malware classification using deep learning based on image processing and randomized search. Scientific Reports, 11(1).
Bergstra, J., & Bengio, Y. (2012). Random search for hyper-parameter optimization. Journal of Machine Learning Research, 13(10), 281-305.
Chandra, S. D. (2024). Klasifikasi malware menggunakan metode Convolutional Neural Network (CNN) berbasis website (Undergraduate thesis). Universitas Muhammadiyah Jember.
Chollet, F. (2021). Deep learning with Python (2nd ed.). Shelter Island, NY: Manning Publications.
Cui, Z., Du, L., Wang, P., Cai, X., & Zhang, W. (2019). Malicious code detection based on CNN and multi-objective evolutionary algorithm. IEEE Access, 7, 157117-157127.
Firdaus, D., et al. (2025). Multiclass klasifikasi malware berbasis gambar menggunakan Vision Transformer architecture. CyberSecurity dan Forensik Digital, 8(1).
Gayathri, M. L., Kumari, M. S., Fathima, Md. A., Yamini, M. V., & Lakshmi, M. P. (2023). Deep learning-powered malware detection: A CNN-based approach. International Journal for Research Trends and Innovation.
Gibert, D., Mateu, C., & Planes, J. (2020). The rise of deep learning for detection and classification of malware: A survey. Journal of Network and Computer Applications, 153, 102526.
Ioffe, S., & Szegedy, C. (2015). Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of the 32nd International Conference on Machine Learning (ICML).
Ketebu, K. E., Onwodi, G. O., Ukhurebor, K. E., Eneche, B. M., & Yaah-Nyakko, N. K. (2024). A recent survey of image-based malware classification using convolution neural network. Journal of Autonomous Intelligence, 7(5).
Khalda, K., & Wibowo, D. K. (2025). Analisis perilaku malware menggunakan pendekatan analisis statis dan dinamis. Jurnal Sains, Nalar, dan Aplikasi Teknologi Informasi, 4(1).
Khan, S., Hayat, A., & Mendonça, F. (2023). A new deep boosted CNN and ensemble learning based IoT malware detection. Sensors, 23(8), 1-15.
Kumar, A., & Singh, K. (2023). Malware detection using CNN and deep learning: A survey. Procedia Computer Science, 218, 2465-2474.
Kumar, T. S., et al. (2024). Image-based malware detection using Convolutional Neural Networks and Randomized Optimization. IEEE Transactions on Cybernetics.
Lumbanraja, R., Putra, A. R., & Pratama, N. (2024). Pengaruh augmentasi data dan regularisasi pada performa CNN untuk deteksi malware. Jurnal Informatika, 15(2).
Nataraj, L., Karthikeyan, S., Jacob, G., & Manjunath, B. S. (2011). Malware images: Visualization and automatic classification. In Proceedings of the 8th International Symposium on Visualization for Cyber Security.
Sabah, et al. (2023). Deep learning dengan teknik early stopping untuk mendeteksi malware. Jurnal Teknologi Informasi dan Ilmu Komputer.
Sari, S., Ramadhan, M. F., & Hidayat, A. N. (2023). Transfer learning pada CNN untuk deteksi malware Android. Jurnal Teknologi Informasi dan Komputer, 9(3).
Smith, L. N. (2017). Cyclical learning rates for training neural networks. In IEEE Winter Conference on Applications of Computer Vision (WACV).
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Stefanus Eko Prasetyo, Kevin Chandra Wijaya, Haeruddin

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

