[Paper Review] Deep hierarchical reinforcement agents for automated penetration testing
This paper proposes HA-DRL, a deep hierarchical reinforcement learning architecture that decomposes large discrete action spaces in automated penetration testing using sub-agent training. By structuring agents hierarchically and applying algebraic action decomposition, HA-DRL achieves faster and more stable convergence than conventional DQN agents, successfully learning optimal attack policies even in complex networks with up to 100 hosts and 4,646 actions—where standard DQN fails entirely.
Penetration testing the organised attack of a computer system in order to test existing defences has been used extensively to evaluate network security. This is a time consuming process and requires in-depth knowledge for the establishment of a strategy that resembles a real cyber-attack. This paper presents a novel deep reinforcement learning architecture with hierarchically structured agents called HA-DRL, which employs an algebraic action decomposition strategy to address the large discrete action space of an autonomous penetration testing simulator where the number of actions is exponentially increased with the complexity of the designed cybersecurity network. The proposed architecture is shown to find the optimal attacking policy faster and more stably than a conventional deep Q-learning agent which is commonly used as a method to apply artificial intelligence in automatic penetration testing.
Motivation & Objective
- Address the challenge of exponentially growing action spaces in automated penetration testing, which hinders conventional deep reinforcement learning (DRL) methods.
- Develop a scalable and stable DRL architecture that can learn optimal attack strategies without requiring extensive prior knowledge of the network.
- Overcome the instability and poor convergence of standard DQN agents in large-scale cybersecurity environments with sparse rewards.
- Enable efficient exploration and policy learning in complex, realistic penetration testing scenarios using hierarchical agent decomposition.
- Demonstrate the feasibility of applying deep reinforcement learning to large-scale, real-world-like network attack simulations with minimal domain-specific engineering.
Proposed method
- Propose a hierarchical agent architecture (HA-DRL) that splits the global action space into smaller, manageable subsets using algebraic action decomposition.
- Train individual DQN agents on each action subset independently, allowing parallel and scalable learning with sub-linear computational growth.
- Use a sequential decision-making process where higher-level agents select sub-agents, and lower-level agents execute actions within their designated action sets.
- Apply deep Q-networks (DQN) with double Q-learning (DDQN) for value function approximation in each sub-agent, improving stability and reducing overestimation.
- Leverage the CybORG simulator to validate the architecture across diverse network configurations with varying host counts and action space sizes.
- Visualize learned state representations using t-SNE to analyze whether agents discover meaningful structural patterns (e.g., subnets) without explicit supervision.
Experimental results
Research questions
- RQ1Can a hierarchical DRL architecture effectively manage the exponential growth of action spaces in automated penetration testing?
- RQ2How does HA-DRL compare to standard DQN agents in terms of learning speed, stability, and convergence on large-scale network scenarios?
- RQ3Does the hierarchical decomposition of actions lead to better policy learning in sparse-reward environments typical of penetration testing?
- RQ4Can the agents learn meaningful structural representations of the network (e.g., subnets) without explicit knowledge of the topology?
- RQ5To what extent is HA-DRL scalable to larger networks with significantly increased action spaces?
Key findings
- HA-DRL achieved faster and more stable convergence than DDQN across all tested scenarios, including those with up to 100 hosts and 4,646 actions.
- In the 100-host scenario, where DDQN failed to learn any meaningful policy due to inability to explore the action space, HA-DRL successfully converged to the optimal policy in approximately 4,000 episodes.
- For scenarios with 60 and 70 hosts, DDQN only succeeded in 1 out of 4 training runs, while HA-DRL consistently achieved optimal performance.
- The t-SNE visualization revealed that trained agents learned state representations that naturally clustered into 9 distinct groups corresponding to the 9 private subnets in the 50-host configuration, despite no explicit information about subnets being provided.
- Each sub-agent learned to use only 2–3 actions from its local action set to achieve optimal attack paths, indicating effective action pruning and policy specialization.
- HA-DRL demonstrated scalability with only a 2–4 agent increase when the action space grew from 49 to 4,646 actions, showing sub-linear computational complexity growth.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.