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

Constraints Satisfiability Driven Reinforcement Learning for Autonomous Cyber Defense

Ashutosh Dutta, Ehab Al-Shaer, Samrat ChatterjeearXiv 2021

Abstract

Autonomous cyber defense for critical infrastructure requires balancing adaptive learning with strict safety guarantees. This paper introduces CSRL (Constraints Satisfiability-driven Reinforcement Learning), a hybrid architecture that integrates Reinforcement Learning (RL) with Satisfiability Modulo Theory (SMT). By utilizing a constraint checker to filter actions pre-execution, CSRL ensures operational safety while maintaining high defensive performance. Experimental results in simulated cyber-physical systems (CPS) demonstrate a 99% success rate and significant efficiency gains over traditional RL approaches, proving that autonomous agents can learn to defend complex networks without violating essential business or safety rules.

Introduction

As cyber-attacks on critical infrastructure—such as smart grids and transport systems—become faster and more sophisticated, human-led defense is increasingly insufficient. While autonomous agents offer a solution, traditional Reinforcement Learning (RL) relies on a "trial-and-error" process that is often unacceptable in high-stakes environments. In a power grid, a single "error" during an agent's learning phase could result in a city-wide blackout.

Existing defensive models typically fall into two categories: static models that lack the flexibility to handle real-world dynamics, and pure RL models that act as "black boxes" with no formal guarantees against disastrous actions. CSRL addresses this gap by creating an agent that is both adaptive and provably safe.

The CSRL Architecture

The core innovation of CSRL is the decoupling of "learning" from "rule-following." This is achieved through a multi-component architecture that filters potential defense actions through a formal logic layer before they are applied to the environment.

Overview of the CSRL Agent Architecture, highlighting the interaction between the RL Policy Optimizer and the SMT-based Constraints Checker.

Key Components:

  1. Policy Optimizer (The Brain): Utilizes Proximal Policy Optimization (PPO) to suggest defense strategies based on the current network state.
  2. Constraints Checker (The Filter): Employs Satisfiability Modulo Theory (SMT) to verify if a suggested action violates predefined rules before execution (Pre-Execution Satisfiability). If an action is deemed unsafe—for instance, if it would shut down a critical service—it is blocked, and the RL agent receives a penalty.
  3. Post-Execution Check: After a safe action is taken, the system evaluates the results against dynamic requirements that can only be measured post-facto, such as actual versus predicted energy consumption.
  4. Constraints Learner: To avoid total reliance on hard-coded rules, the agent analyzes rewards and penalties to deduce new constraints over time, allowing it to adapt to evolving environment properties.

Experimental Evaluation

Due to the sensitivity of real-world cyber-physical system data, the authors evaluated CSRL using a custom simulation environment built on OpenAI Gym, modeled after a smart grid scenario.

Setup:

  • Topologies: Two network layouts were tested: Topo 1 (100 devices) and Topo 2 (200 devices).
  • Attacker Models: The agent faced three AI-driven strategies: Naive (random), Stealthy (minimizing risk scores to avoid detection), and Aggressive (high-volume stealthy attacks).

Key Results and Insights

CSRL demonstrated superior performance across all test scenarios, particularly in its ability to learn safely and efficiently.

  • 99% Success Rate: The trained agent successfully defeated diversified attack strategies in nearly all test cases.
  • Safe Exploration: Unlike traditional RL, which learns by "failing fast," CSRL learns by "failing safely." Because the Pre-Execution module blocks dangerous moves, the agent explores the environment without ever triggering a system-wide violation.
  • Efficiency and Convergence: The "unsatisfiability feedback" from the SMT checker helps the agent converge on an optimal strategy faster. Against stealthy attackers, the agent reached 87% of its maximum reward within 50 episodes. In the 200-node topology, the CSRL agent achieved 70% higher mean rewards than a standard RL agent without the constraint checker.
  • Scalability: Performance remained robust as the network size doubled, suggesting the framework can handle the complexity of larger infrastructure.

Conclusion and Future Work

CSRL proves that formal logic can be effectively integrated into reinforcement learning to provide safety-critical autonomous defense. While the results are promising, future research will focus on automated constraint mining—extracting rules directly from network logs rather than manual definition—and addressing the challenges of delayed feedback in real-world deployments where the impact of a defense action may not be immediately apparent.

Summary updated

BibTeX
@misc{dutta2021constraints,
  author = {Ashutosh Dutta and Ehab Al-Shaer and Samrat Chatterjee},
  title = {{Constraints Satisfiability Driven Reinforcement Learning for Autonomous Cyber Defense}},
  year = {2021},
  eprint = {2104.08994},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.08994},
}
Figure