NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Generalizable Graph-based Reinforcement Learning Agents for Automated Cyber Defense

Isaiah J. King, Benjamin Bowman, H. Howie Huang

TL;DR

Traditional reinforcement learning models for automated cyber defense are notoriously brittle, overfitting to specific network structures and collapsing when a network changes. This paper introduces a graph-based reinforcement learning framework that treats network topologies as attributed graphs and actions as graph edits. By leveraging relational inductive bias, their attention-based inductive agent achieves state-of-the-art performance and successfully defends completely unseen, variably sized networks against novel adversaries without any retraining.

What Problem Does This Paper Address?

Automated Cyber Defense (ACD) aims to deploy autonomous agents capable of monitoring networks and mitigating cyberattacks in real time (e.g., changing firewall rules or isolating compromised hosts). Reinforcement Learning (RL) is a natural fit for training these agents in simulated environments.

However, standard deep RL approaches compress the network state into a flat vector. This creates a severe vulnerability: environmental overfitting. Because the model maps actions to fixed vector indices, even minor changes—such as adding a single computer, altering the network topology, or simply shuffling the order in which nodes are indexed—cause the agent's performance to plummet. In the real world, corporate networks are dynamic and constantly evolving; an ACD agent that requires total retraining every time a new laptop connects is practically useless.

Methods

The authors tackle this challenge by framing ACD as a context-based partially observable Markov decision process (CMDP) and representing the network directly as an attributed graph (where nodes are hosts/entities and edges represent communication paths).

Instead of using a standard neural network that expects a fixed-size input, they employ a Graph Convolutional Network (GCN) to process the graph. This ensures permutation invariance—the model's understanding relies on structural relationships rather than arbitrary node ordering.

Crucially, they redefine the action space: instead of a fixed-length list of choices, actions are formulated as functions applied directly to individual nodes or edges (i.e., "graph edits"). If the network grows, the action space naturally expands with it, eliminating the need for retraining.

They evaluate three distinct architectures:

  1. Transductive Model: A baseline that concatenates node embeddings into a single fixed vector (similar to traditional RL).
  2. Naive Inductive Model: Processes each node embedding independently through a fully connected layer to output action probabilities, allowing it to handle any graph size.
  3. Attention Inductive Model: Enhances the naive model by using an attention-based pooling mechanism to compute a global graph state vector, which is then mixed back into individual node embeddings to provide global context.

Datasets

The agents were trained and evaluated across three simulated environments of increasing complexity:

  • Yawning Titan: A two-player network simulation where a heuristic red agent spreads through random Erdős-Rényi graphs of variable sizes (10 to 100 nodes).
  • CAGE Challenge 2 (CC2): A simulated enterprise network consisting of 13 hosts, featuring complex action spaces and two distinct adversarial profiles (B-Line and Meander).
  • CAGE Challenge 4 (CC4): A highly complex Multi-Agent RL (MARL) environment with randomly initialized topologies (32 to 128 nodes) defended by 5 cooperating blue agents against 1–5 red agents.

Key Insights and Ideas

  • Relational Inductive Bias is a Superpower for Generalization: By forcing the network to learn how entities interact rather than where they are located, the agent develops universal defensive strategies (like identifying and isolating critical choke points) that apply to any network topology.
  • The Global Context Tradeoff: The Attention Inductive model performs exceptionally well on topologies similar in size to its training set because it understands the "big picture." However, as networks scale up drastically, the Naive Inductive model proves more robust. This highlights a "No Free Lunch" tradeoff: global awareness can sometimes lead to overfitting on graph density, whereas purely local reasoning generalizes more consistently to massive scales.
  • Brittleness of Non-Graph Competitors: Traditional top-performing competition models are incredibly fragile. When faced with a "Sleepy" adversary (which randomly takes no-op actions, effectively slowing down the attack), standard models experience up to a 1,982% performance degradation because the altered timing breaks their rigid, memorized policies.

Key Results

  • Zero-Shot Topology Adaptation: In the Yawning Titan environment, the Attention Inductive model outperformed prior vector-based methods by more than 4x on unseen graphs, achieving a near-perfect normalized score of 0.9955 on 40-node networks.
Scores attained by the GNN models on graphs of different sizes
  • Adversarial Robustness: In CC2, while top domain-specific models collapsed against modified "Sleepy" attackers, the graph-based inductive models maintained or improved their scores by naturally adapting to the slower attack pace.
Evaluation against unseen red agents
  • Multi-Agent Success: In the CC4 competition, the proposed framework achieved the highest performance of any non-heuristic policy, finishing 5th overall. It succeeded primarily because competing MARL models could not handle the environment's randomized network initialization.

Limitations and Future Work

While highly promising, the authors note a few key limitations:

  • Scalability Bottlenecks: The framework was evaluated on relatively small graphs (up to 128 nodes). On massive enterprise networks, processing large graphs through GNNs in real-time could introduce computational bottlenecks.
  • The Sim-to-Real Gap: Translating abstract graph actions (like "Restore node") into concrete, real-world orchestration commands (like re-imaging a specific virtual machine or updating a physical firewall rule) remains an open engineering challenge.
  • Edge-Level Actions: The current work focuses primarily on node-level edits. Future work will explore more sophisticated representations for edge-level and global-level actions, as well as improving communication protocols between agents in multi-agent setups.

Summary updated

BibTeX
@inproceedings{king2026generalizable,
  author = {Isaiah J. King and Benjamin Bowman and H. Howie Huang},
  title = {{Generalizable Graph-based Reinforcement Learning Agents for Automated Cyber Defense}},
  booktitle = {DSN},
  year = {2026},
  doi = {10.1109/dsn69566.2026.00079},
}
Figure