A hierarchical reinforcement learning system for efficient and scalable network penetration testing
- 18 August 2026
- journal article
- Published by Oxford University Press (OUP) in The Computer Journal
Abstract
Penetration testing (PT) is a critical method for assessing network security by simulating cyberattacks to identify vulnerabilities. While reinforcement learning has been applied to automate PT, modeling it as a Markov decision process often leads to state-space complexity and dimensional explosion. To address these problems, we propose the Hierarchical Advantage Memory-enhanced Deep Q-Network (HAML-DQN) algorithm, an intelligent PT framework that integrates hierarchical reinforcement learning (HRL) with memory enhancement and action masking (AM) mechanisms. The HRL architecture decomposes PT tasks into high-level host selection and low-level attack execution, effectively mitigating the curse of dimensionality in state and action spaces. The memory-enhanced module stores high-reward action sequences to guide exploration, while the AM mechanism filters out redundant or illogical actions, thus imitating expert decision making. Our contributions include: (i) designing an HRL framework for PT, (ii) improved memory-enhanced exploration strategy, and (iii) proposed an action masking (AM) mechanism for efficient path planning. The results highlight the potential of HAML-DQN to advance automated PT and enhance cybersecurity defenses. Experiments conducted on the Network Attack Simulator platform demonstrate that the HAML-DQN method significantly enhances PT efficiency and exhibits strong scalability in large-scale networks, increasing the applicable network scale by nearly 20 times compared with the baseline DQN algorithm.Keywords
Funding Information
- Natural Science Foundation of Hainan Province (242300421415)
This publication has 30 references indexed in Scilit:
- Proactive and privacy-Preserving defense for DNS over HTTPS via federated AI attestation (PAFA-DoH)Neural Networks, 2025
- Next-generation AI for advanced threat detection and security enhancement in DNS over HTTPSJournal of Network and Computer Applications, 2025
- HER-PT: An intelligent penetration testing framework with Hindsight Experience ReplayComputers & Security, 2025
- Behaviour-diverse automatic penetration testing: a coverage-based deep reinforcement learning approachFrontiers of Computer Science, 2024
- GAIL-PT: An intelligent penetration testing framework with generative adversarial imitation learningComputers & Security, 2022
- Memory-enhanced deep reinforcement learning for UAV navigation in 3D environmentNeural Computing and Applications, 2022
- Automatic analysis of attack graphs for risk mitigation and prioritization on large-scale and complex networks in Industry 4.0International Journal of Information Security, 2021
- Cyber-attack path discovery in a dynamic supply chain maritime risk management systemComputer Standards & Interfaces, 2018
- Decision making and reward in frontal cortex: Complementary evidence from neurophysiological and neuropsychological studies.Behavioral Neuroscience, 2011
- Partial-order planningArtificial Intelligence, 1994