← Lab /AI/ML

GPU-accelerated NASimJax speeds RL penetration-testing training up to 100×

NASimJax provides up to 100× higher environment throughput and improves policy generalization for penetration testing

AI/ML arXiv 20 Mar 2026 Method Prototype evidence

Published as “NASimJax: GPU-Accelerated Policy Learning Framework for Penetration Testing”

Why it matters

The speed and scalability gains make RL-based penetration-testing research feasible at realistic network sizes, enabling faster exploration of policy generalization and action-space handling techniques.

Summary

NASimJax runs penetration-testing simulations up to 100× faster than the original CPU-based NASim, reaching 1.6 M steps / s, and its two-stage action selection (2SAS) dramatically improves solve rates on larger networks (42% vs 14% on 40-host networks). Training on low-density topologies yields better zero-shot generalization, and Prioritized Level Replay (PLR) handles dense training distributions better than Domain Randomization. The evidence comes from experiments on networks up to 40 hosts, multiple seeds, and direct comparisons to flat action masking and the original simulator.

What they found 3

  1. NASimJax achieves a 100× speed-up over the original simulator.

    “At its peak NASimJax trained over 100 million steps achieves a performance of 1.6M steps per second, which amounts to a speed-up of 100 times over the original.”

  2. Two-stage action selection (2SAS) outperforms flat masking on larger networks.

    “For 26-host networks, however, the advantage of 2SAS’s factored action space is clearly pronounced, achieving an 82% solve rate versus flat masking’s 66%.”

  3. Training on low-density networks improves zero-shot generalization.

    “training on low-density networks consistently yields better generalization than training on the target distribution directly”

Caveats 2

  • 2SAS offers no benefit at small scales but substantially outperforms flat masking as networks grow
  • PLR-2SAS collapses entirely at this density-a failure we analyse in Section 7, where we show it stems from the interaction between PLR’s episode-reset behaviour, 2SAS’s credit assignment structure, and the resulting failure to populate the replay buffer.

What’s new here 4

  • A JAX-based reimplementation of NASim that eliminates the CPU-GPU bottleneck and attains up to 100× speed-up.
  • Formulation of penetration testing as a Contextual POMDP with a network generator that guarantees solvable, diverse scenarios.
  • Two-stage action decomposition (2SAS) that scales to linearly growing action spaces.
  • Systematic evaluation of Domain Randomization and Prioritized Level Replay for zero-shot policy transfer, revealing an implicit curriculum effect of sparse topologies.