Self-Healing Cyber Defence Using Reinforcement Learning

20 Jul

Authors: Priyanshu, Sakchi, Rohit Chauhan, Shivam Chauhan, Rohan Kalsa, Dr. Pratap Singh

Abstract: The rapid evolution of cyber threats demands security systems capable of not only detecting intrusions but autonomously responding and recovering without human intervention. This paper presents a Self-Healing Cyber Defence System leveraging Deep Q-Network (DQN) Reinforcement Learning to enable adaptive, automated threat response in dynamic network environments. The proposed system employs a DQN agent trained within a custom OpenAI Gym simulation environment, enabling it to learn optimal defensive strategies against brute force, Distributed Denial of Service (DDoS), port scanning, and SQL injection attacks. Real-time network traffic analysis, state-action modelling, and reward-based learning produce an agent capable of selecting mitigation actions—including node isolation, traffic rate limiting, honeypot redirection, and system rollback—within milliseconds of detection. The system is built using Python, TensorFlow, FastAPI, SQLite, and a JavaScript-based real-time security dashboard. Testing across 10,000 simulated attack events demonstrates 94.2% detection accuracy, 89.7% successful mitigation rate, and 97.3% self-healing recovery rate, substantially outperforming static rule-based baselines. The system bridges the critical gap in existing cybersecurity infrastructure by providing an intelligent, adaptive, and autonomous defence mechanism that unifies detection, response, and recovery within a single interpretable framework.

DOI: https://doi.org/10.5281/zenodo.21455708