Certifying Safety in Reinforcement Learning under Adversarial Perturbation Attacks

Junlin Wu, Hussein Sibai, Yevgeniy Vorobeychik

Abstract

Deep Reinforcement Learning (RL) has demonstrated remarkable capabilities in complex tasks, yet its susceptibility to adversarial perturbations remains a critical barrier to deployment in safety-critical systems. This paper introduces a framework designed to provide formal safety guarantees even when an agent's sensory inputs are subject to subtle, malicious perturbations. By disentangling the agent into a perception module and a semantic control policy—a paradigm termed Partially-Supervised RL (PSRL)—the authors enable the use of formal verification tools to bound state estimation errors. We further present Tree-based Adversarial Safety Certification (TASC), an algorithm that calculates the maximum allowable perturbation budget to ensure safety over a defined horizon. Evaluations in autonomous driving scenarios show that our PSRL-Hybrid training significantly improves certified safety and state prediction accuracy over state-of-the-art robust RL methods.

Introduction

While Deep RL has achieved success in domains ranging from robotics to strategic games, these models are notoriously fragile. A minor, often imperceptible, adversarial perturbation to an input image can lead a self-driving car to misinterpret its environment, potentially causing catastrophic failures. Traditional research in this area has focused primarily on "robustness"—the ability to maintain high cumulative rewards under noise. However, in high-stakes environments, "safety" (the avoidance of specific hazardous states) is paramount.

Current end-to-end RL models are difficult to verify because safety is often defined in terms of physical states (e.g., distance to an obstacle), while the model operates on raw pixels. This paper bridges the gap between end-to-end RL and formal control theory by utilizing ground-truth state information available during training to build a verifiable perception-control pipeline.

Methodology

The proposed framework consists of three core components:

1. Partially-Supervised RL (PSRL)

Instead of a monolithic "pixels-to-actions" architecture, PSRL decomposes the agent into two distinct modules:

  • Perception Module ($g$): A neural network that maps high-dimensional observations (e.g., images) to a low-dimensional semantic state (e.g., coordinates and velocities).
  • Semantic Policy ($\pi_s$): A policy that determines the optimal action based on the predicted state.

By supervising the perception module with ground-truth state data from simulators during training, the framework creates an interpretable interface where safety constraints can be explicitly defined.

2. Tree-based Adversarial Safety Certification (TASC)

TASC is an algorithm designed to determine the safety budget ($\epsilon$), defined as the maximum perturbation size that is guaranteed not to result in a safety violation over a specific time horizon. TASC utilizes neural network verification tools, such as $\alpha, \beta$-CROWN, to compute bounds on the perception module's output. It then explores a search tree of possible future actions to ensure that no sequence of actions within the bounded state estimates leads to a collision or safety breach.

3. PSRL-Hybrid Training

To enhance resilience, the authors introduce a hybrid training regime. This approach combines adversarial training for the perception module—making it more difficult to deceive the agent's "vision"—with adversarial training for the control policy, ensuring the "decision-making" remains robust even when state estimates are noisy or slightly inaccurate.

Experimental Evaluation

The framework was evaluated using a customized Highway autonomous driving environment featuring three distinct scenarios:

  • Highway: Navigating a three-lane road with traffic moving at constant speeds.
  • Twoway: Managing a two-lane road with oncoming traffic.
  • Exit: Executing maneuvers to reach a specific exit lane.

These environments were modified to provide high-dimensional visual observations while enforcing explicit safety constraints, such as maintaining a minimum safety distance from other vehicles.

Key Results and Insights

The research yielded several significant findings:

  • Superior Certified Safety: The PSRL-Hybrid approach consistently outperformed standard adversarial training (AT) and end-to-end robust methods like RADIAL. It not only maintained high nominal rewards but also provided significantly higher certified safety—the mathematical proof that the agent remains safe under a given attack budget.
  • Enhanced State Prediction: PSRL-based models demonstrated superior accuracy in predicting the environment's true state under attack. In contrast, end-to-end models often suffered from "blackouts" or hallucinations when inputs were perturbed.
  • Computational Scalability: Despite the theoretical complexity of tree-based certification, TASC proved remarkably efficient. For a 15-step verification horizon, the algorithm explored less than 0.00001% of the total possible nodes in the search tree, indicating its potential for real-world application.

Discussion and Limitations

The success of this framework stems from the disentanglement of perception and control. By forcing the agent to "understand" the state before acting, the system gains an interpretable interface for safety verification. Furthermore, the use of ground-truth data during training—a resource often discarded in standard RL—is shown to be a powerful tool for building reliable pipelines.

However, several challenges remain:

  • Stochasticity: The current model assumes a deterministic environment. Extending TASC to stochastic Partially Observable Markov Decision Processes (POMDPs) would significantly increase the complexity of the tree search.
  • Ground-Truth Access: The reliance on "true state" data during training is feasible in simulation but may require expensive sensor suites (e.g., high-precision LiDAR and GPS) for real-world data collection.
  • Multi-Agent Scaling: Future work is needed to scale these certification methods to dense, multi-agent urban environments where the state space and interaction dynamics are significantly more complex.

Conclusion

This work provides a foundational step toward formally verifiable safety in Reinforcement Learning. By combining structured architecture (PSRL) with rigorous verification (TASC), the authors demonstrate that it is possible to train agents that are not only high-performing but also provably safe against adversarial sensory attacks.

Summary updated

BibTeX
@inproceedings{wu2022certifying,
  author = {Junlin Wu and Hussein Sibai and Yevgeniy Vorobeychik},
  title = {{Certifying Safety in Reinforcement Learning under Adversarial Perturbation Attacks}},
  booktitle = {SP (Workshops)},
  year = {2022},
}
Figure