arXiv:2603.19864cs.LGcs.CR2026-03

用加速仿真框架训练更高效的渗透测试强化学习策略。

NASimJax: A GPU-Accelerated Policy Learning Framework for Penetration Testing

  • 基于JAX重写仿真器,提速百倍,支持大规模网络训练。
  • 发现稀疏拓扑训练能提升对复杂网络的泛化能力。
  • 提出分阶段动作分解,有效应对线性增长的动作空间。

渗透测试是模拟网络攻击以发现漏洞的复杂序列决策任务,具有部分可观测性和大动作空间的特点。现有仿真器速度过慢,限制了在真实网络场景下的强化学习训练,导致策略难以泛化。本文提出NASimJax,基于JAX重构网络攻击仿真器(NASim),实现比原版高达100倍的环境吞吐量。通过在硬件加速器上运行完整训练流程,该框架可在固定算力预算下探索更大规模网络。我们将自动化渗透测试建模为上下文感知的局部可观测马尔可夫决策过程(Contextual POMDP),并设计了生成结构多样且保证可解场景的网络生成管道。实验表明,在最多40台主机的网络中,优先级层级重播(Prioritized Level Replay)相比领域随机化更适应密集训练分布;在稀疏拓扑上训练能隐式形成课程,显著提升对分布外拓扑的泛化能力,即使目标拓扑更密集也有效。针对线性增长的动作空间,提出两阶段动作分解(2SAS),性能优于扁平动作掩码。同时发现,优先级层级重播的回合重置行为与2SAS的信用分配结构存在冲突,引发失败模式。NASimJax为推进基于强化学习的渗透测试提供了快速、灵活且真实的平台。

原文摘要 · Abstract (English)

Penetration testing, the practice of simulating cyberattacks to identify vulnerabilities, is a complex sequential decision-making task that is inherently partially observable and features large action spaces. Training reinforcement learning (RL) policies for this domain faces a fundamental bottleneck: existing simulators are too slow to train on realistic network scenarios at scale, resulting in policies that fail to generalize. We present NASimJax, a complete JAX-based reimplementation of the Network Attack Simulator (NASim), achieving up to 100x higher environment throughput than the original simulator. By running the entire training pipeline on hardware accelerators, NASimJax enables experimentation on larger networks under fixed compute budgets that were previously infeasible. We formulate automated penetration testing as a Contextual POMDP and introduce a network generation pipeline that produces structurally diverse and guaranteed-solvable scenarios. Together, these provide a principled basis for studying zero-shot policy generalization. We use the framework to investigate action-space scaling and generalization across networks of up to 40 hosts. We find that Prioritized Level Replay better handles dense training distributions than Domain Randomization, particularly at larger scales, and that training on sparser topologies yields an implicit curriculum that improves out-of-distribution generalization, even on topologies denser than those seen during training. To handle linearly growing action spaces, we propose a two-stage action decomposition (2SAS) that substantially outperforms flat action masking at scale. Finally, we identify a failure mode arising from the interaction between Prioritized Level Replay's episode-reset behaviour and 2SAS's credit assignment structure. NASimJax thus provides a fast, flexible, and realistic platform for advancing RL-based penetration testing.

强化学习渗透测试仿真加速网络安全

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。