arXiv:2608.12190cs.CRAug 2026

Manuscript Offprint

arXiv:2608.12190

Machine Learning-Based Cyber Defense for Cloud Infrastructure: An Adaptive Deep Q-Network Architecture for Intelligent Intrusion Detection and Automated Threat Mitigation

Md Yassir Mottalib, Md Yousuf, Eklachur Rahman Bhuiyan, S M Ahsan Habib, Sonjoy Kumar Dey, Md. Salahuddin Gazi, Molay Kumar Roy, Asaduzzaman Anik

Md Yassir Mottalib 1^{1}, Md Yousuf 2^{2}, Eklachur Rahman Bhuiyan 3^{3}, S M Ahsan Habib 4^{4}, Sonjoy Kumar Dey 5^{5}, Md. Salahuddin Gazi 6^{6}, Molay Kumar Roy 7^{7}, Asaduzzaman Anik 8^{8}

1^{1}Master of Science in Information System Technology, Wilmington University, USA

2^{2}Master's of Science in Data Analytics, College of Sciences and Technology, University of Houston-Downtown, USA

3^{3}Master of Science in Information Technology, Washington University of Science and Technology, USA

4^{4}Department of Electrical Engineering and Computer Science, South Dakota School of Mines & Technology, USA

5^{5}McComish, Department of Electrical Engineering and Computer Science, South Dakota State University, USA

6^{6} Master of Science in Information Technology, Washington University of Science and Technology, USA

7^{7}Ms in Digital Marketing & Information Technology Management, St. Francis College, USA

8^{8}Master of Business Administration (MBA) in Management, Stanton University, Los Angeles, California

Abstract—With the increasing complexity of cyber assaults in cloud environments, adaptable security solutions are needed that can support real-time detection and autonomous response. In this paper, we propose a reinforcement learning-based dynamic cyber defense framework. We deploy a Deep Q-Network (DQN) to train effective defensive strategies to counteract the evolving cyberattacks. We leverage the CICIDS2017 dataset for model creation and the UNSW-NB15 dataset for external validation, involving preprocessing of data, feature engineering, and adaptive policy learning. We compare the proposed DQN with decision tree, support vector machine, random forest, XGBoost, and multilayer perceptron models. The proposed DQN achieves an accuracy of 99.72%, a precision of 99.68%, a recall of 99.65%, an F1-score of 99.66%, and an ROC-AUC of 0.999, while the false positive rate is 0.31%, the false negative rate is 0.35%, and the detection latency is 15 ms. The framework achieved 99.54% attack mitigation rate, demonstrating strong adaptive and real-time defensive capabilities. These results demonstrate the potential of reinforcement learning as a powerful and scalable approach for autonomous cybersecurity in modern cloud environments.

Keywords: Reinforcement Learning, Deep Q-Network, Dynamic Cyber Defense, Cloud Security, Intrusion Detection, Machine Learning, Adaptive Cybersecurity, CICIDS2017, and UNSW-NB15.

Introduction

Artificial Intelligence (AI) has revolutionized the cybersecurity space by enabling smart systems to detect advanced attack patterns and respond to emerging threats with less human involvement. As more firms move their apps, databases, and core business functions to cloud computing, the pool of possible targets has widened significantly, making cloud platforms a prime target for hackers. While cloud services provide benefits such as scalability, flexibility, cost savings, and consistent availability, they also introduce new security issues, including distributed denial-of-service (DDoS) attacks, ransomware, privilege escalation, insider threats, malware, advanced persistent threats (APTs), and zero-day exploits.

Conventional security solutions such as signature-based intrusion detection, rule-based firewalls, and static access control are unable to identify sophisticated attacks, as they are based on predefined signatures and rules that require manual updates (Sarker et al., 2020; Alzahrani et al., 2022). Researchers are turning to smarter solutions with machine learning (ML) and deep learning (DL) due to the rapid growth of new internet dangers. Supervised learning models such as decision trees, random forests, support vector machines (SVM), artificial neural networks (ANN), and extreme gradient boosting (XGBoost) have been shown to perform very well in detecting intrusions by analyzing historical network data (Shone et al., 2018; Vinayakumar et al., 2019). However, these techniques are fundamentally limited because they need to be retrained when new attack techniques are discovered. Cyberattacks are always developing; thus, models trained on outdated data may become ineffective against new threats.

Reinforcement learning (RL) has recently shown promising results as a solution for autonomous cybersecurity. RL allows smart agents to learn efficient defense methods not only by learning from past examples but also by learning from the consequences through continual interaction with their environment. RL differs from supervised learning since it considers cybersecurity as a sequential decision-making problem, where the system observes the state of the network, decides on an action, receives a reward or a penalty as feedback, and improves its strategy over time (Sutton & Barto, 2018). Such adaptive learning is especially beneficial in cloud situations where attack patterns might alter on the go. Deep Reinforcement Learning (DRL) techniques such as Deep Q-Networks (DQN), Double Deep Q-Networks (DDQN), Deep Deterministic Policy Gradient (DDPG), and Proximal Policy Optimization (PPO) have demonstrated their capability to solve highly complex problems with a large amount of data (Mnih et al., 2015; Arulkumaran et al., 2017). These methods have been utilized in intrusion detection, firewall management, blocking of malware, adaptive access control, software-defined networking (SDN), security of the Internet of Things (IoT), and protection of cloud resources. “They’re a good fit for automated cyber defense because they can continuously refine security policies and keep false alarms low.”

Cloud computing introduces other security issues such as virtualization, multi-tenancy, rapid resource shifting, container orchestration, and services distributed over several sites. These aspects make the cloud systems more complex and provide the attackers with additional opportunity to uncover the holes at multiple tiers (Singh & Chatterjee, 2017). This creates a significant need for sophisticated cybersecurity frameworks that can monitor cloud traffic continuously, detect suspicious activity in real-time, and respond quickly without disruption to lawful processes. To address these issues, we propose a dynamic cyber protection architecture for cloud infrastructures.

based on reinforcement learning. Our technique relies on a Deep Q-Network (DQN) agent that learns optimal protection strategies through interaction with the cloud network. Our methodology aims to improve detection accuracy, reduce false positives, accelerate response times, and build more resilient cloud systems by leveraging deep feature engineering, real-world cybersecurity datasets, and adaptive reinforcement learning. Its effectiveness has been tested on typical intrusion detection datasets and compared with popular supervised machine learning algorithms to show its benefits for smart cloud security.