Deep Learning Model for Mitigating Keylogging Attack in HCI Using Stochastic Gradient Descent with Adam-based LSTM Optimization

PDF (1710KB), PP.60-89

Views: 0 Downloads: 0

Author(s)

Jide E. T. Akinsola 1,* John E. Efiong 2 Fathia O. Onipede 1 Ifeoluwa M. Olaniyi 1 Emmanuel A. Olajubu 2 Ganiyu A. Aderonmu 2

1. Department of Computer Sciences, Abiola Ajimobi Technical University, Ibadan 200255, Nigeria

2. Department of Computer Science and Engineering, Obafemi Awolowo University, Ile–Ife, 220282, Nigeria

* Corresponding author.

DOI: https://doi.org/10.5815/ijieeb.2026.05.05

Received: 14 Jan. 2026 / Revised: 8 Apr. 2026 / Accepted: 25 Jun. 2026 / Published: 8 Oct. 2026

Index Terms

Artificial intelligence, Deep learning, Human-computer interaction, Keylogging, LSTM, Stochastic gradient descent.

Abstract

Keylogging has become a crucial attacking strategy adopted by cyber criminals to fetch keystrokes of legitimate users during their interaction with computer systems. The data gathered serves as a powerful weapon for attackers to exploit. Existing techniques for detecting or preventing keylogging operations rely on mundane systems or traditional machine learning algorithms that lack deep intelligence to identify and mitigate activities of keyloggers accurately due to the volume of data that is generated from keystrokes with simple interactions from the users. This study developed a deep learning-based predictive model capable of preventing keylogging attacks in human-computer interaction using hyperband hyperparameter tuning and a hybrid genetic algorithm on stochastic gradient descent with Adam-based LSTM optimization on a UNSW-NB keylogging dataset with nine families of attacks to build the deep learning model called HH-GASA-OLSTM. From the experiments, the proposed predictive model on an 80:20 validation ratio gives the best result on six performance metrics, which are loss function of 0.0187, accuracy of 99.45%, precision of 0.9930, recall of 0.9945, F1-Score of 0.9938, MCC of 0.9889, RMSE of 0.0054, MAE of 0.0054 and MSE of 0.00003. These results are suitable for the accurate detection and prevention of keylogging attacks in HCI. The study therefore recommends further studies; the implementation of other hyperparameter tuning approaches with other parameter optimization techniques using other deep learning architectures, such as radial basis function network and deep belief network, for improved model optimization.

Cite This Paper

Jide E. T. Akinsola, John E. Efiong, Fathia O. Onipede, Ifeoluwa M. Olaniyi, Emmanuel A. Olajubu, Ganiyu A. Aderonmu, "Deep Learning Model for Mitigating Keylogging Attack in HCI Using Stochastic Gradient Descent with Adam-based LSTM Optimization", International Journal of Information Engineering and Electronic Business(IJIEEB), Vol.18, No.5, pp. 60-89, 2026. DOI:10.5815/ijieeb.2026.05.05

Reference

[1]A. D. Sharma, “ Keylogging Exploits : Offensive Security Approach ’ Abstract : Introduction :,” Int. J. Nov. Res. Dev., vol. 10, no. 3, pp. 674–682, 2025.
[2]T. Olzak, “Keystroke Logging ( Keylogging ),” Univ. Phoenix, pp. 1–14, 2008.
[3]C. Kavya and R. Suganya, “Survey on Keystroke Logging Attacks,” Int. J. Creat. Res. Thoughts, vol. 9, no. 4, pp. 503–508, 2021.
[4]D. B. V. Jagannadham and D. A. Varma, “Cybercrime Security Implementation using Hardware Based Anti – Keylogger,” Int. J. Adv. Res. Sci. Eng., vol. 06, no. 03, pp. 1–8, 2017.
[5]P. H. Santoki, “Design and Implementation of Detection of Key Logger,” Int. J. Eng. Dev. Res., vol. 2, no. 2, pp. 1999–2017, 2014.
[6]FutureLearn, “Keylogger Attacks,” FutureLearn.
[7]Z. Su et al., “Remote Keylogging Attacks in Multi-user VR Applications,” 2024.
[8]A. Singh, P. Choudhary, A. K. Singh, and D. K. Tyagi, “Keylogger Detection and Prevention,” J. Phys. Conf. Ser., vol. 2007, no. 1, pp. 1–8, 2021, doi: 10.1088/1742-6596/2007/1/012005.
[9]T. Blåfield, “DIFFERENT TYPES OF KEYLOGGERS Mitigation and risk relevancy in modern society,” Tampere University, 2020.
[10]N. Mehra, “Keylogger: A Virtual Eye On Keyboard,” Pianalytix.
[11]Wikipedia, “Hardware keylogger,” Wikipedia.
[12]M. K. Shah, D. Kataria, S. B. Raj, and G. Priya, “Real Time Working of Keylogger Malware Analysis,” Int. J. Eng. Res. Technol., vol. 9, no. 10, pp. 569–573, 2020.
[13]E. L. A. Naitlho, “KEYLOGGER DETECTION AND PREVENTION Capstone Design,” 2022.
[14]Relytec, “Keylogger - Screenshots Keylogger,” Relytec.
[15]D. Barhate, S. Pathak, and A. K. Dubey, “Hyperparameter-tuned batch-updated stochastic gradient descent: Plant species identification by using hybrid deep learning,” Ecol. Inform., vol. 75, 2023, doi: 10.1016/j.ecoinf.2023.102094.
[16]B. Pravallika, “Lecture Notes on Human Computer Interaction Prepared By Information Technology,” Hyderabad, 2020.
[17]R. Eberts, “Human computer interaction,” Adv. Psychol., vol. 47, pp. 249–304, 1987, doi: 10.1016/S0166-4115(08)62311-0.
[18]O. D. Alao, J. V Joshua, and J. E. T. Akinsola, “Human Computer Interaction (HCI) and Smart Home Applications,” IUP J. Inf. Technol., vol. 15, no. 3, pp. 7–21, 2019.
[19]J. Lazar and S. D. J. Barbosa, “Introduction to Human-Computer Interaction” in Proc. 2017 CHI Conference Extended Abstracts on Human Factors in Computing Systems (CHI EA ’17), 2017, doi: 10.1145/3027063.3027102.
[20]S. A. Ysterud, “Keylogging of user interaction in physical and virtual environments and its implications for honeypot analysis,” University of Oslo, 2014.
[21]V. Nagpal, V. Jain, R. Satia, and A. A. Jafari, “Keystroke Logging,” 2020.
[22]G. E. Hinton, S. . Osindero, and Y. Teh, “A Fast Learning Algorithm for Deep Belief Nets,” Neural Comput., vol. 18, no. 7, pp. 1527–1554, 2006.
[23]S. A. Ajagbe and M. O. Adigun, Deep learning techniques for detection and prediction of pandemic diseases: a systematic literature review, no. 0123456789. Springer US, 2023. doi: 10.1007/s11042-023-15805-z.
[24]I. H. Sarker, “Deep Learning: A Comprehensive Overview on Techniques, Taxonomy, Applications and Research Directions,” SN Comput. Sci., vol. 2, no. 6, pp. 1–20, 2021, doi: 10.1007/s42979-021-00815-1.
[25]I. M. Olaniyi, J. E. T. Akinsola, M. G. Azodo, F. O. Onipede, and E. A. Olajubu, “Development and Evaluation of Life-Threatening Statement Detection Models for Social Media Platforms Using Supervised Machine Learning Algorithms,” Int. J. Data Informatics Intell. Comput., vol. 5, no. 2, pp. 16–34, 2026, doi: 10.59461/ijdiic.v5i2.269.
[26]J. E. T. Akinsola, M. A. Adeagbo, K. A. Oladapo, S. A. Akinsehinde, and F. O. Onipede, “Artificial Intelligence Emergence in Disruptive Technology,” Comput. Intell. Data Sci., pp. 63–90, 2022, doi: 10.1201/9781003224068-4.
[27]J. E. T. Akinsola, O. Awodele, S. A. Idowu, and S. O. Kuyoro, “SQL Injection Attacks Predictive Analytics Using Supervised Machine Learning Techniques,” Int. J. Comput. Appl. Technol. Res., vol. 9, no. 4, pp. 139–149, 2020, doi: 10.7753/ijcatr0904.1004.
[28]A. Mosavi, S. Ardabili, and A. R. Varkonyi-Koczy, “List of Deep Learning Models,” in Engineering for Sustainable Future, vol. 2, Springer, 2020, pp. 202–214.
[29]C. Uyulan, “Development of LSTM&CNN based hybrid deep learning model to classify motor imagery tasks,” Commun. Math. Biol. Neurosci., vol. 2021, pp. 1–26, 2021, doi: 10.28919/cmbn/5265.
[30]M. H. Karacan and S. C. Yucebas, “A Deep Learning Model with Attention Mechanism for Dental Image Segmentation,” in HORA 2022 - 4th International Congress on Human-Computer Interaction, Optimization and Robotic Applications, Proceedings, Ankara, Turkey: IEEE, 2022. doi: 10.1109/HORA55278.2022.9800072.
[31]M. K. Gurucharan, “Basic CNN Architecture: Explaining 5 Layers of Convolutional Neural Network,” upGrad.
[32]P. Mane, P. Avhad, D. Khedkar, R. Jadhav, and A. Gogre, “A Novel Approaches for Keylogging-Resistant Visual Authentication Protocols,” Int. J. Adv. Res. Sci. Eng., vol. 07, no. 03, pp. 182–184, 2018, doi: 10.1109/ICICT43934.2018.9034460.
[33]C. Umarani and R. Sengupta, “Keyloggers A Malicious Attack,” Int. J. Trend Sci. Res. Dev., vol. 5, no. 1, pp. 34–38, 2020.
[34]H. Sharma, S. Singh, A. Sharma, and M. Singh, “Detecting And Defending Keystroke Logger Attacks,” 2023.
[35]S. Subramanian, A. Sheik Abdullah, S. Geetha, M. Abbas, and R. Banerjee, “Analyzing the Efficacy of Machine Learning Models to Detect Keyloggers in Safe and Secure Environments: A Comparative Study,” in 12th EAI International Conference on Advancements of Science and Technology, A. Birhane, F. Shewarega, G. Teshager Bitew, T. Anteneh Alemu, and M. A. Bitew, Eds., Cham: Springer Nature Switzerland, 2026, pp. 63–77.
[36]J. Hossain Faruk et al., “Malware Detection and Prevention using Artificial Intelligence Techniques,” in Proceedings - 2021 IEEE International Conference on Big Data, Big Data 2021, Orlando, USA: IEEE Xplore, 2021, pp. 5369–5377. doi: 10.1109/BigData52589.2021.9671434.
[37]A. Djenna, A. Bouridane, S. Rubab, and I. M. Marou, “Artificial Intelligence-Based Malware Detection, Analysis, and Mitigation,” Symmetry Artif. Intell. Math. Model. Cybersecurity, vol. 15, no. 03, pp. 1–24, 2023.
[38]P. Sowjanya, S. Y. Vakada, S. Bhavana, C. Venkatesh, and V. V Pavan, “Securing Keystroke Data : An ML-Based Approach to Keylogger Defense,” Int. J. Res. Appl. Sci. Eng. Technol., vol. 13, no. 3, 2025, doi: https://doi.org/10.22214/ijraset.2025.67635. 
[39]J. Kim and H. Lee, “Adaptive human-machine evaluation framework using stochastic gradient descent-based reinforcement learning for dynamic competing network,” Appl. Sci., vol. 10, no. 7, pp. 1–15, 2020, doi: 10.3390/app10072558.
[40]S. P. Chinchalkar and R. K. Somkunwar, “An Innovative Keylogger Detection System Using Machine Learning Algorithms and Dendritic Cell Algorithm,” vol. 38, no. 1, pp. 269–275, 2024.
[41]W. Jiang and S. Siddiqui, “Hyper-parameter optimization for support vector machines using stochastic gradient descent and dual coordinate descent,” EURO J. Comput. Optim., vol. 8, no. 1, pp. 85–101, 2020, doi: 10.1007/s13675-019-00115-7.
[42]T. R. Kumar, L. Naresh, P. B. Kumar, M. Bhargav, and P. S. Krishna, “MACHINE LEARNING-BASED BEHAVIORAL ANALYSIS FRAMEWORK FOR EFFICIENT KEYLOGGER DETECTION,” Int. J. Eng. Sci. Adv. Technol., vol. 26, no. 3, pp. 69–76, 2026, doi: https://doi.org/10.64771/IJESAT.2026.V26.I03.2089.
[43]S. Ranjeeth, T. P. Latchoumi, and P. V. Paul, “Optimal Stochastic Gradient Descent with Multilayer Perceptron Based Student’s Academic Performance Prediction Model,” Recent Adv. Comput. Sci. Commun., vol. 14, no. 6, pp. 1728–1741, 2021, doi: 10.2174/2666255813666191116150319.
[44]G. Sivanantham and S. Gopalakrishnan, “Stochastic Gradient Descent Optimization Model for Demand Response in a Connected Microgrid,” KSII Trans. Internet Inf. Syst., vol. 16, no. 1, pp. 97–115, 2022, doi: 10.3837/tiis.2022.01.006.
[45]R. K. Mishra, “Deep Learning Model for Multiclass Classification of Diabetic Retinal Fundus Images Using Gradient Descent Optimization,” 2022, Springer Nature. doi: 10.1007/978-981-19-5550-1_3.
[46]Y. Sun and A. Chen, “An Adaptive Gradient Descent Optimization Algorithm Based on Stratified Sampling,” in 2022 3rd International Conference on Computer Vision, Image and Deep Learning and International Conference on Computer Engineering and Applications, CVIDL and ICCEA 2022, Changchun, China: IEEE, 2022, pp. 1225–1231. doi: 10.1109/CVIDLICCEA56201.2022.9825268.
[47]Y. Ma, R. Han, and W. Wang, “Portfolio optimization with return prediction using deep learning and machine learning,” Expert Syst. Appl., vol. 165, p. 113973, 2021, doi: 10.1016/j.eswa.2020.113973.
[48]J. Yang, Y. Wang, Z. Wang, J. Xu, X. Zhang, and S. Tang, “Using stochastic gradient descent and deep learning to defect detection for medicinal hollow capsule,” in Proceeding - 2021 China Automation Congress, CAC 2021, Beijing, China: IEEE, 2021, pp. 4926–4933. doi: 10.1109/CAC53003.2021.9728658.
[49]A. Sezer and A. Altan, “Optimization of Deep Learning Model Parameters in Classification of Solder Paste Defects,” in HORA 2021 - 3rd International Congress on Human-Computer Interaction, Optimization and Robotic Applications, Proceedings, Ankara, Turkey: IEEE, 2021. doi: 10.1109/HORA52670.2021.9461342.
[50]S. Alagarsamy and V. James, “RNN LSTM-based Deep Hybrid Learning Model for Text Classification using Machine Learning Variant XGBoost,” Int. J. Performability Eng., vol. 18, no. 8, pp. 545–551, 2022, doi: 10.23940/ijpe.22.08.p2.545551.
[51]C. Zhang, M. Yao, W. Chen, S. Zhang, D. Chen, and Y. Wu, “Gradient Descent Optimization in Deep Learning Model Training Based on Multistage and Method Combination Strategy,” Secur. Commun. Networks, vol. 2021, pp. 1–15, 2021, doi: 10.1155/2021/9956773.
[52]K. Swathi and S. Kodukula, “XGBoost Classifier with Hyperband Optimization for Cancer Prediction Based on Geneselection by Using Machine Learning Techniques,” Rev. d’Intelligence Artif., vol. 36, no. 5, pp. 665–670, 2022, doi: 10.18280/ria.360502.
[53]Z. Yuan and J. Liu, “A Hybrid Deep Learning Model for Trash Classification Based on Deep Trasnsfer Learning,” J. Electr. Comput. Eng., vol. 2022, pp. 1–9, 2022, doi: 10.1155/2022/7608794.
[54]R. Murugesan, E. Mishra, and A. H. Krishnan, “Deep Learning Based Models: Basic LSTM, Bi LSTM, Stacked LSTM, CNN LSTM and Conv LSTM to Forecast Agricultural Commodities Prices,” Res. Sq., vol. 01, pp. 0–32, 2021.
[55]J. Aziimjonov and T. Kim, “Stochastic Gradient Descent Classifier-Based Lightweight Intrusion Detection Systems Using the Most Efficient Feature Subsets of Datasets,” Futur. Gener. Comput. Syst., pp. 1–15, 2023.
[56]P. S. Idowu and F. Y. Ayankoya, “ENHANCED KEYLOGGER CLASSIFICATION USING DEEP LEARNING: A SYSTEMATIC REVIEW,” Br. J. Comput. Netw. Inf. Technol., vol. 8, no. 2, pp. 71–98, 2025, doi: 10.52589/BJCNIT-JGXGNUTR.
[57]Y. A. Maz, M. Anbar, S. Manickam, M. M. Abualhaj, S. A. Almalki, and B. A. Alabsi, “Transfer Learning-Based Approach with an Ensemble Classifier for Detecting Keylogging Attack on the Internet of Things,” Comput. Mater. Contin., 2025, doi: https://doi.org/10.32604/cmc.2025.068257.
[58]M. J. Bahmani, “Hyperband and Bohb Understanding State of the Art Hyperparameter Optimization Algorithms,” Neptune.ai.
[59]A. Bissuel, “Hyper-parameter optimization algorithms: a short review,” Medium.
[60]L. Gharsalli, “Hybrid Genetic Algorithms,” IntechOpen.
[61]T. A. El-Mihoub, A. A. Hopgood, L. Nolle, and A. Battersby, “Hybrid Genetic Algorithms : A Review,” Eng. Lett., vol. 02, no. 02, pp. 124–137, 2006.
[62]W. Wan and J. B. Birch, “An improved hybrid genetic algorithm with a new local search procedure,” J. Appl. Math., vol. 2013, pp. 14–19, 2013, doi: 10.1155/2013/103591.
[63]R. Kwiatkowski, “Gradient Descent Algorithm — a deep dive,” Towards Data Science.
[64]Turing, “Gradient Descent: An Optimization Technique in Machine Learning,” Turing.
[65]A. Ashok and A. Garlapati, “Stochastic Gradient Descent for Deep Learning,” Carnegie Mellon Univ., pp. 1–10, 2017.
[66]S. Ruder, “An overview of gradient descent optimization,” arxiv, vol. 02, pp. 1–14, 2017.
[67]Y. L. Koay, H. S. Sim, Y. K. Goh, S. Y. Chua, and W. J. Leong, “Stochastic Gradient Descent Algorithm with Multiple Adaptive Learning Rate for Deep Learning,” 2023, Elsevier.
[68]D. P. Kingma and J. L. Ba, “Adam: A method for stochastic optimization,” in 3rd International Conference on Learning Representations, ICLR 2015 - Conference Track Proceedings, arXiv, 2017, pp. 1–15.
[69]M. Reyad, A. M. Sarhan, and M. Arafa, “A modified Adam algorithm for deep neural network optimization,” Neural Comput. Appl., pp. 17095–17112, 2023, doi: 10.1007/s00521-023-08568-z.
[70]G. Van Houdt, C. Mosquera, and G. Nápoles, “A review on the long short-term memory model,” Artif. Intell. Rev., vol. 53, no. 1, pp. 5929–5955, 2020, doi: 10.1007/s10462-020-09838-1.
[71]J. M. Navarro, R. Martínez-España, A. Bueno-Crespo, R. Martínez, and J. M. Cecilia, “Sound levels forecasting in an acoustic sensor network using a deep neural network,” Sensors (Switzerland), vol. 20, no. 3, pp. 1–16, 2020, doi: 10.3390/s20030903.
[72]P. Riley, “Descending into ML: Training and Loss,” Machine Learning.
[73]W. Luthuli, O. Oki, P. Tarwireyi, and M. Adigun, “Evaluating the effects of hardware configurations on Bro under DDoS attacks,” 2018 Int. Conf. Intell. Innov. Comput. Appl. ICONIC 2018, pp. 1–6, 2019, doi: 10.1109/ICONIC.2018.8601247.
[74]DeepAI, “Accuracy (error rate) Definition,” DeepAI.
[75]F. Y. Osisanwo, J. E. T. Akinsola, O. Awodele, J. O. Hinmikaiye, O. Olakanmi, and J. Akinjobi, “Supervised Machine Learning Algorithms: Classification and Comparison,” Int. J. Comput. Trends Technol., vol. 48, no. 3, pp. 128–138, 2017, doi: 10.14445/22312803/ijctt-v48p126.
[76]Wikipedia, “Precision and recall,” Wikipedia.
[77]J. E. T. Akinsola, M. A. Olatunbosun, I. M. Olaniyi, M. A. Adeagbo, E. A. Olajubu, and G. A. Aderounmu, “Application of Artificial Intelligence on MNIST Dataset for Handwritten Digit Classification for Evaluation of Deep Learning Models,” Acadlore Trans. AI Mach. Learn., vol. 4, no. 3, pp. 219–234, 2025, doi: https://doi.org/10.565 78/ataiml040305.
[78]J. E. T. Akinsola, O. Awodele, S. O. Kuyoro, and F. A. Kasali, “Performance Evaluation of Supervised Machine Learning Algorithms Using Multi-Criteria Decision Making Techniques,” in International Conference on Information Technology in Education and Development (ITED), Academia In Information Technology, 2019, pp. 17–34. [Online]. Available: https://www.academiainformationtechnology.org/ited2019/
[79]Stack Overflow, “statistics - What does recall mean in Machine Learning?,” Stack Overflow.
[80]A. Shafi, “What are the definitions of Precision and Recall?,” Towards Data Science.
[81]S. Gunjal, “What is Root Mean Square Error (RMSE) | Data Science and Machine Learning,” Kaggle.
[82]A. Akinbi, E. Deniz, A. M. Ismael, Z. N. Rashid, and A. Sengur, “Password-Sniffing Acoustic Keylogger Using Machine Learning,” SSRN, 2023, doi: https://ssrn.com/abstract=4431909.
[83]F. E. Ayo, J. B. Awotunde, O. A. Olalekan, A. L. Imoize, C. Li, and C. Lee, “CBFISKD : A Combinatorial-Based Fuzzy Inference System for Keylogger Detection,” Mathematics, vol. 11, no. 1899, pp. 2–24, 2023, doi: https://doi.org/ 10.3390/math11081899.
[84]K. Lee and K. Yim, “applied sciences Cybersecurity Threats Based on Machine Learning-Based Offensive Technique for Password Authentication,” Appl. Sci., vol. 10, no. 4, art. 1286, pp. 1–16, 2020, doi: 10.3390/app10041286.
[85]J. B. Awotunde, S. N. Sur, A. L. Imoize, D. Z. Rodríguez, and B. Akanji, “An Enhanced Keylogger Detection Systems Using Recurrent Neural Networks Enabled with Feature Selection Model,” in International Conference on Communication, Devices and Networking, S. Dhar, S. Mukhopadhyay, D.-T. Do, S. N. Sur, and A. L. Imoize, Eds., Singapore: Springer Nature Singapore, 2025, pp. 525–539.