Introduction
Deep Reinforcement Learning (DRL) models are notoriously fragile. A tiny, calculated "nudge" to an agent's observations—such as altered pixels in a video game or spoofed sensor readings in an autonomous vehicle—can lead to catastrophic failure.
Existing defenses generally fall into two categories:
- Regularization: Forcing the agent to take the same action for all similar-looking observations. This often fails if the adversary successfully pushes the observation into a completely different "action zone."
- Maximin Optimization: Training the agent to always assume the absolute worst-case scenario. While safe, this makes the agent overly conservative, leading to poor performance in benign, unperturbed settings.
This paper introduces a novel framework that treats adversarial attacks in RL as a problem of partial observability. When an observation is tampered with, the agent no longer knows the "ground truth" state; it only knows what it sees. By explicitly modeling the agent's belief about the true state of the environment, the proposed methods achieve state-of-the-art robustness against both simple and strategic attacks without sacrificing performance in normal conditions.
Methodology: Adversarial Counterfactual Error (ACoE)
The core contribution is the Adversarial Counterfactual Error (ACoE) objective. Intuitively, ACoE measures the difference between the expected value the agent would achieve in a clean environment versus what it achieves when an adversary manipulates its observations.
To make this practical for model-free RL, the authors propose Cumulative-ACoE (C-ACoE) and introduce two methods to estimate the agent's "belief" about the true state:
- Adversary-Aware Belief Estimation (A2B): A baseline approach that assigns beliefs to states in a neighborhood based on how much the policy's action distribution changes.
- Adversary-Attack-Aware Belief Estimation (A3B): A more sophisticated method that effectively "thinks like an attacker." It uses a surrogate attack (like Projected Gradient Descent, or PGD) to score nearby states. If a state $s$ would have been a much more effective target for an attack than the current observation $s_o$, A3B discounts the probability that $s$ is the true underlying state.
These objectives are integrated into standard algorithms, resulting in $\delta$-PPO and $\delta$-DQN, which minimize C-ACoE while maximizing standard rewards. Instead of just reacting to the current (possibly fake) observation, the agent engages in counterfactual reasoning: "If the true state were $s$, would an adversary have shown me $s_o$?"
Experimental Setup
The authors evaluated their approach across three diverse and standard RL benchmarks:
- MuJoCo: Continuous control tasks (Hopper, Walker2d, HalfCheetah, Ant) requiring agents to maintain balance and speed.
- Atari: Discrete-action games (Pong, Freeway, BankHeist, RoadRunner).
- Highway-env: Driving simulators (Fast, Merge, Roundabout, Intersection) representing safety-critical real-world scenarios.
Key Results
The A3B method consistently outperformed current state-of-the-art defenses (such as RADIAL, WocaR, and Protected) across almost all tested environments and attack types.
Unlike maximin methods that sacrifice utility for safety, ACoE allows for a tunable trade-off. The agent remains highly effective in normal conditions but utilizes a principled way to mitigate risk when it suspects it is under attack. As shown in the Highway environment results below, A3B maintains high "Unperturbed" scores (comparable to vanilla PPO) while demonstrating dramatically higher resilience to MAD (reward-based) and PGD (gradient-based) attacks.
In MuJoCo tasks, A3B was particularly effective against "Long-Horizon" strategic adversaries (like PA-AD), which plan multiple steps ahead to deceive the agent. Qualitatively, A3B-trained agents exhibited more stable, realistic movement patterns compared to the fragile, "exploitative" gaits often learned by standard PPO.
Limitations and Future Work
- Single-Step Beliefs: The primary evaluation focused on belief estimation from single-step observations. While an LSTM-based extension for history-based beliefs is provided, it is computationally more expensive.
- KL Divergence Reliance: The effectiveness of A3B relies on KL Divergence being an accurate proxy for "attack strength." Future work could explore other measures of distributional distance.
- Computational Overhead: Calculating beliefs over a neighborhood of states adds computational cost during training, though it remains manageable compared to existing test-time adaptation methods.
Summary updated