Hybrid Convolutional-Hopfield Neural Networks for Image-Based Malware Classification
Authors
Department of Mathematics and Computer Science, Alabama State University, Montgomery, AL (USA)
Department of Mathematics and Computer Science, Alabama State University, Montgomery, AL (USA)
Article Information
DOI: 10.51244/IJRSI.2026.1307000311
Subject Category: Cybersecurity
Volume/Issue: 13/7 | Page No: 4239-4249
Publication Timeline
Submitted: 2026-08-05
Accepted: 2026-08-11
Published: 2026-08-17
Abstract
Static malware analysis increasingly relies on visual binary representations to bypass signature evasion techniques, yet standard Convolutional Neural Network (CNN) classifiers depend on parameterized Fully Connected (FC) layers that introduce parameter bloat, high latency, and vulnerability to class imbalance. To address these structural limits, this paper proposes a novel hybrid CNN-Hopfield Neural Network (CNN-HNN) framework that replaces traditional dense classification heads with continuous Modern Hopfield associative memory layers. In this architecture, raw malware executables are transformed into 2D grayscale image matrices, from which a CNN backbone extracts abstract latent feature representations. The continuous Hopfield layer then acts as a pattern retrieval engine, evaluating the extracted query vector against stored class archetype prototypes using log-sum-exp energy minimization. Benchmark evaluations on the MalImg and Microsoft Malware Classification Challenge datasets demonstrate that the hybrid model achieves top-tier accuracy (99.58% and 99.62%, respectively) while reducing classification-head parameter counts by up to 78%, lowering floating-point operations (FLOPs) by over 65%, and accelerating inference latency to under 2 ms per sample. Furthermore, the associative energy landscape isolates minority threat categories within distinct basins of attraction, achieving an F1-score improvement of over 20% on severely imbalanced classes compared to standard CNNs.
Keywords
Continuous Modern Hopfield Networks (HNN), Associative Memory Layers
Downloads
References
1. You, I., & Yim, K. (2010). Malware obfuscation techniques: A brief survey. Broadband, Wireless Computing, Communication and Applications (BWCCA), 297–300. [Google Scholar] [Crossref]
2. Moser, A., Kruegel, C., & Kirda, E. (2007). Limits of static analysis for malware detection. Twenty-Third Annual Computer Security Applications Conference (ACSAC), 421–430. [Google Scholar] [Crossref]
3. Nataraj, L., Yegneswaran, S., Porras, P., & Zhang, R. (2011). Malware images: visualization and automatic classification. Proceedings of the 8th International Symposium on Visualization for Cyber Security (VizSec), 1–7. [Google Scholar] [Crossref]
4. Cui, Z., Xue, L., Ren, X., Zhang, T., & Yang, S. (2018). Detection of malware variants based on deep learning. IEEE Access, 6, 48596–48605. [Google Scholar] [Crossref]
5. LeCun, Y., Bengio, Y., & Hinton, G. (2015). Deep learning. Nature, 521(7553), 436–444. [Google Scholar] [Crossref]
6. Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep Learning. MIT Press. [Google Scholar] [Crossref]
7. Buda, M., Maki, A., & Mazurowski, M. A. (2018). A systematic study of the class imbalance problem in convolutional neural networks. Neural Networks, 106, 249–259. [Google Scholar] [Crossref]
8. Ronen, R., Radu, M., Feuerstein, C., Yom-Tov, E., & Ahmadi, M. (2018). Microsoft malware classification challenge. arXiv preprint arXiv:1802.10135. [Google Scholar] [Crossref]
9. Ahmadi, M., Ulyanov, D., Semenov, S., Trofimov, M., & Giacinto, G. (2016). Novel feature extraction, selection and fusion for effective malware family classification. Proceedings of the 6th ACM Conference on Data and Application Security and Privacy (CODASPY), 183–194. [Google Scholar] [Crossref]
10. Demircigil, M., Heusel, J., Löwe, M., Upgang, S., & Vermet, F. (2017). On a model of associative memory with huge storage capacity. Journal of Statistical Physics, 168(2), 288–299. [Google Scholar] [Crossref]
11. Ramsauer, H., Schäfl, B., Lehner, J., Seidl, P., Widrich, M., Adler, T., Gruber, L., Holzleitner, M., Pavlović, M., Sandve, G. K., Greiff, V., Kreil, D., Kopp, M., Klambauer, G., Brandstetter, J., & Hochreiter, S. (2020). Hopfield Networks is All You Need. International Conference on Learning Representations (ICLR). [Google Scholar] [Crossref]
12. Krotov, D., & Hopfield, J. J. (2016). Dense associative memories for pattern recognition. Advances in Neural Information Processing Systems (NeurIPS), 29, 1172–1180. [Google Scholar] [Crossref]
13. Hammad, Baraa & Jamil, Norziana & T. Ahmed, Ismail & Muhammad Zain, Zuhaira & Basheer, Shakila. (2022). Robust Malware Family Classification Using Effective Features and Classifiers. Applied Sciences. 12. 7877. 10.3390/app12157877. [Google Scholar] [Crossref]
14. Gibert Llauradó, Daniel. Going deep into the cat and the mouse gamedeep learning. PhD Thesis, University of Lleida. Dec 2020. [Google Scholar] [Crossref]
15. M.I.P. Salas, Paulo de Geus. Static Analysis for Malware Classification Using Machine and Deep Learning, University of Campinas, Campinas, SP, Brazil, Universidad Mayor de San Andr´es, La Paz, Bolivia, https://www.ic.unicamp.br/~paulo/papers/2023-CLEI-malware.classif.deep.learning-marcelo.palma-printed.pdf [Google Scholar] [Crossref]
16. Zhao, Yuntao & Xu, Chunyu & Bo, Bo & Feng, Yongxin. (2019). MalDeep: A Deep Learning Classification Framework against Malware Variants Based on Texture Visualization. Security and Communication Networks. 2019. 1-11. 10.1155/2019/4895984. [Google Scholar] [Crossref]
17. B. Yadav, S. Tokekar. A Deep Learning Model for Malware Multi-Class Classification based on Colored Malware Images. Journal of Telecommunication, Electronic and Computer Engineering ISSN: 2180 – 1843 e-ISSN: 2289-8131 Vol. 15 No. 3 [Google Scholar] [Crossref]
18. Malware Classification using Convolutional Neural Networks — Step by Step Tutorial, https://medium.com/data-science/malware-classification-using-convolutional-neural-networks-step-by-step-tutorial-a3e8d97122f [Google Scholar] [Crossref]
19. Alshomrani, M., Albeshri, A., Alsulami, A. A., & Alturki, B. (2025). An Explainable Hybrid CNN-Transformer Architecture for Visual Malware Classification. Sensors (Basel, Switzerland), 25(15), 4581. https://doi.org/10.3390/s25154581 [Google Scholar] [Crossref]
20. Karumudi, M. K. T., & Di Troia, F. (2026). Addressing Data Scarcity in Malware Classification via Pixel-Level Synthetic Image Generation. Electronics, 15(13), 2848. https://doi.org/10.3390/electronics15132848 [Google Scholar] [Crossref]
21. Daniel Gibert (2024). Assessing the Impact of Packing on Machine Learning-Based Malware Detection and Classification Systems, arXiv:2410.24017v1 [cs.CR] 31 Oct 2024 [Google Scholar] [Crossref]
22. Shaheer M, Zeng F, Yasmeen A, et al. MalDetect-IoT: Enhanced IoT Malware Variant Detection with a Deep Stacked Ensemble Approach. Computers, Materials & Continua, 2026, 88(1). https://doi.org/10.32604/cmc.2026.079701 [Google Scholar] [Crossref]
23. PAGADALA REDDY HARIKA (2023). Deep Learning: Concepts, CNN Architectures, Challenges, Applications, Future Directions. International Journal of Current Science. Volume 13, Issue 2 June 2023, ISSN: 2250-1770 [Google Scholar] [Crossref]
24. Craig Iaboni, Pramod Abichandani (2024). Event-based Spiking Neural Networks for Object Detection: A Review of Datasets, Architectures, Learning Rules, and Implementation. arXiv:2411.17006v1 [cs.CV] 26 Nov 2024 [Google Scholar] [Crossref]
25. Taehoon Kim (2025). Future-Proof Yourself: An AI Era Survival Guide. arXiv:2504.04378v1 [cs.LG] 06 Apr 2025 [Google Scholar] [Crossref]
26. Shahadat, N., & Maida, A. S. (2025). Analyzing Parameter-Efficient Convolutional Neural Network Architectures for Visual Classification. Sensors, 25(24), 7663. https://doi.org/10.3390/s25247663 [Google Scholar] [Crossref]
27. Ramsauer, H., “Hopfield Networks is All You Need”, arXiv e-prints, Art. no. arXiv:2008.02217, 2020. doi:10.48550/arXiv.2008.02217. [Google Scholar] [Crossref]
28. Zhang, X., Wu, K., Chen, Z., & Zhang, C. (2021). MalCaps: A Capsule Network Based Model for the Malware Classification. Processes, 9(6), 929. https://doi.org/10.3390/pr9060929 [Google Scholar] [Crossref]
29. Panda, P., C U, O. K., Marappan, S., Ma, S., S, M., & Veesani Nandi, D. (2023). Transfer Learning for Image-Based Malware Detection for IoT. Sensors (Basel, Switzerland), 23(6), 3253. https://doi.org/10.3390/s23063253 [Google Scholar] [Crossref]
30. Taher Alzahrani, Advanced Techniques for Dynamic Malware Detection and Classification in Digital Security Using Deep Learning, Computers, Materials and Continua, Volume 83, Issue 3, 2025, Pages 4575-4606, ISSN 1546-2218, https://doi.org/10.32604/cmc.2025.063448. [Google Scholar] [Crossref]
Metrics
Views & Downloads
Similar Articles
- “Next-Generation Cybersecurity Through Blockchain and AI Synergy: A Paradigm Shift in Intelligent Threat Mitigation and Decentralised Security”
- Forensic Payroll Analytics for IPPIS: A Hybrid Anomaly-Detection Framework to Expose Payroll Fraud, Improve Data Governance, and Protect Employee Rights
- Factors Influencing Data Protection on Global Trade
- Development Of Artificial Intelligence-Based Model for Forensic Analysis of Cross-Platform Deepfakes
- Cyber Threats and Nigeria’s National Security: Assessing the Role of Regional Cooperation in West Africa