Nash Q-Network for Multi-Agent Cybersecurity Simulation

Qintong Xie, Edward Koh, Xavier Cadet, Peter ChinarXiv 2025 · DOI

Abstract

In the rapidly evolving landscape of cybersecurity, autonomous agents must defend networks against intelligent, adaptive adversaries. Traditional reinforcement learning (RL) approaches often struggle in these multi-agent environments due to non-stationarity—the "moving target" problem where an agent's optimal strategy changes as its opponent learns. This paper presents the Nash Q-Network (Nash Q-N), a deep reinforcement learning architecture that integrates game-theoretic Nash equilibrium concepts to stabilize training. By decoupling policy updates from value estimation and utilizing a centralized critic, the Nash Q-N achieves robust convergence in complex, partially observable cybersecurity simulations.

Introduction

Autonomous cyber-defense requires agents to make high-stakes decisions in environments characterized by uncertainty and adversarial intent. Unlike static environments, cybersecurity involves a "Red Agent" (attacker) and a "Blue Agent" (defender) in a constant state of strategic flux. When the Blue agent improves its defense, the Red agent adapts its attack vectors, creating a non-stationary learning environment that often leads to instability in standard RL algorithms.

To address this, researchers have developed the Nash Q-Network (Nash Q-N). This architecture bridges the gap between the theoretical stability of Nash equilibria and the scalability of Deep RL, providing a framework for training defenders that are resilient against evolving adversarial tactics.

The Challenge of Non-Stationarity and Partial Observability

Most RL algorithms assume a stationary environment where the transition dynamics and reward functions remain constant. In multi-agent cybersecurity, this assumption fails. Furthermore, these environments are typically partially observable; a defender cannot see every action an attacker takes or every foothold they establish. High-dimensional state spaces further complicate the issue, making exact game-theoretic calculations computationally prohibitive. The Nash Q-N is designed to handle these complexities by modeling the interaction as a stochastic game and seeking a strategy that is a "best response" to the opponent's optimal play.

Methodology: The Nash Q-Network (Nash Q-N)

The Nash Q-N architecture introduces several key innovations to stabilize multi-agent learning:

Centralized Critic (QMLP)

During the training phase, the system employs a centralized critic that observes the joint states and actions of both the Red and Blue agents. This "god-eye view" allows the critic to explicitly model the dependencies between adversarial moves. The critic outputs a Q-value matrix—essentially a payoff matrix—representing the expected returns for all possible action pairs in a given state.

Policy-Based TD Targets

To mitigate the volatility of bootstrapping directly from an equilibrium, the algorithm calculates Temporal Difference (TD) targets by taking expectations over the agents' current policy distributions. This approach smooths the learning signal, preventing the drastic policy swings that often occur when agents chase a rapidly shifting Nash equilibrium.

Decoupled Policy Updates

A critical feature of the Nash Q-N is the separation of the critic and the policy. Instead of updating the policy via direct gradients from the critic, the policy is trained to minimize the cross-entropy divergence from a calculated Nash equilibrium. By treating the Nash equilibrium as a target distribution rather than a direct gradient source, the architecture avoids the destabilizing feedback loops common in multi-agent RL.

Action Masking

Cybersecurity environments have strict logical constraints (e.g., a host cannot be restored if it hasn't been compromised). The Nash Q-N utilizes binary action masking to ensure the agent only samples and learns from valid moves, significantly improving sample efficiency.

Experimental Setup: CybORG and CC2

The Nash Q-N was evaluated using the Cyber Operations Research Gym (CybORG), specifically the Cage Challenge 2 (CC2) scenario. CybORG provides a high-fidelity simulation platform for autonomous cyber defense. In the CC2 scenario, a Blue Agent must defend a network against a "B-line" Red adversary—an aggressive specialist focused on exploitation and lateral movement. The Blue agent’s toolkit includes scanning, patching, isolating, and restoring hosts to maintain network integrity.

Results and Strategic Evolution

The experimental results demonstrate the efficacy of the Nash Q-N in achieving stable defensive policies:

  • Convergence and Efficacy: The Blue agent’s rewards showed a consistent upward trend, with a fitted slope of 3.80, stabilizing after approximately 200 epochs. The average reward plateaued at approximately -5662.69, representing a significant improvement over the initial untrained state.
  • Defensive Impact: The agent achieved a near-linear increase in successful defensive counter-moves over time, eventually reaching an average of 107.1 successful impacts per episode.
  • Strategic Shift: Analysis of the agent's behavior revealed a fascinating evolution. Early in training, the Blue agent relied heavily on "Decoy" actions to mislead the attacker. However, as the policy matured, the agent shifted toward "Restore" and "Analyze" actions. This suggests that the Nash Q-N learned that while deception is a useful tool, proactive recovery and rigorous information gathering are more effective for long-term network resilience.

Conclusion and Future Work

The Nash Q-Network provides a robust framework for training autonomous cyber-defenders in non-stationary environments. By anchoring deep learning in game-theoretic principles, the architecture achieves stable convergence and effective defensive strategies.

Future research will focus on scaling the Nash Q-N to environments with more than two agents, reflecting the reality of modern cyber conflicts involving multiple defensive teams and adversarial groups. Additionally, the authors aim to incorporate architectural elements from systems like AlphaStar to better handle irregular reward signals and even more complex network topologies.

Summary updated

BibTeX
@misc{xie2025nash,
  author = {Qintong Xie and Edward Koh and Xavier Cadet and Peter Chin},
  title = {{Nash Q-Network for Multi-Agent Cybersecurity Simulation}},
  year = {2025},
  eprint = {2509.00678},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.00678},
}
Figure