On Minimizing Adversarial Counterfactual Error in Adversarial RL

Roman Belaire, Arunesh Sinha, Pradeep Varakantham · DOI

Abstract

Deep Reinforcement Learning (DRL) policies are highly susceptible to adversarial noise in observations, which poses significant risks in safety-critical scenarios. The challenge inherent to adversarial perturbations is that by altering the information observed by the agent, the state becomes only partially observable. Existing approaches address this by either enforcing consistent actions across nearby states or maximizing the worst-case value within adversarially perturbed observations. However, the former suffers from performance degradation when attacks succeed, while the latter tends to be overly conservative, leading to suboptimal performance in benign settings. We hypothesize that these limitations stem from their failing to account for partial observability directly. To this end, we introduce a novel objective called Adversarial Counterfactual Error (ACoE), defined on the beliefs about the true state and balancing value optimization with robustness. To make ACoE scalable in model-free settings, we propose the theoretically-grounded surrogate objective Cumulative-ACoE (C-ACoE). Our empirical evaluations on standard benchmarks (MuJoCo, Atari, and Highway) demonstrate that our method significantly outperforms current state-of-the-art approaches for addressing adversarial RL challenges, offering a promising direction for improving robustness in DRL under adversarial conditions.

Introduction

Deep Reinforcement Learning (DRL) is notoriously fragile; minor, calculated perturbations to an agent's observations can lead to catastrophic failures in safety-critical tasks like autonomous driving or robotics. Current defense mechanisms typically rely on regularization (enforcing action consistency) or maximin optimization (maximizing worst-case rewards). However, regularization often fails against strong attacks, and maximin approaches frequently result in overly conservative behavior that degrades performance in benign, unperturbed environments.

This paper proposes a paradigm shift: adversarial reinforcement learning should be treated as a problem of partial observability. When an adversary corrupts an observation, the agent no longer sees the true state $s$, but a perturbed version $\hat{s}$. This effectively transforms a standard Markov Decision Process (MDP) into a Partially Observable MDP (POMDP). By recognizing this information gap, we can leverage POMDP frameworks to build more resilient agents.

Methodology

The core contribution is the Adversarial Counterfactual Error (ACoE) objective. ACoE quantifies the discrepancy in expected value between an unperturbed environment and one where an adversary actively manipulates observations. To facilitate practical training, we introduce Cumulative-ACoE (C-ACoE), a theoretically grounded surrogate objective compatible with standard model-free RL algorithms like PPO or DQN.

Belief Estimation

Because the true state is hidden, the agent must maintain a "belief"—a probability distribution over potential true states. We propose two belief construction methods:

  1. A2B (Adversary-Aware): Weights potential true states based on the KL divergence of their action distributions.
  2. A3B (Adversary-Attack-Aware): A more sophisticated approach that assumes a competent adversary. It assigns higher probability to states from which the observed perturbation would constitute an effective attack. If a specific observation would not be a "good" attack from a candidate state, that state is deemed less likely to be the true one.
The A3B belief construction logic: it discounts the possibility of states that would have yielded more disruptive attacks than the one observed.

These methods are implemented as $\delta$-PPO and $\delta$-DQN, where the agent's loss function is augmented to minimize C-ACoE while maximizing standard rewards.

Experimental Evaluation

We evaluated our methods across three benchmark suites: MuJoCo (continuous control), Atari (discrete actions), and Highway-env (autonomous driving).

Key Results

Our proposed methods, particularly A3B, consistently outperformed state-of-the-art defenses such as RADIAL, WocaR, and RAD.

  • Highway Benchmarks: In the highway-fast-v0 environment, A3B achieved a score of 23.21 under a MAD attack, nearly doubling the performance of standard PPO (13.63) and significantly exceeding WocaR (6.15).
  • MuJoCo Robustness: On Walker2d, A3B maintained a score of 5025 under MAD attacks, outperforming the next best non-adaptive baseline, RAD (3922).
  • Strategic Attacks: ACoE demonstrated robustness not only against myopic single-step attacks but also against long-horizon strategic adversaries like PA-AD.
Experimental results showing A2B and A3B outperforming baselines across Highway simulator tasks.

Notably, A3B achieves these results without requiring test-time adaptation, making it suitable for real-time applications where latency is critical.

Discussion and Conclusion

By reframing adversarial RL as a POMDP and introducing the ACoE objective, we provide a robust framework that balances performance and safety. While current results are promising, future work could address the dependency on KL divergence as a proxy for attack strength and extend belief estimation over multiple time steps to better handle temporal dependencies. Furthermore, reducing the reliance on environment transition dynamics for belief updates would further enhance the flexibility of the ACoE framework.

Summary updated

BibTeX
@inproceedings{belaire2025minimizing,
  author = {Roman Belaire and Arunesh Sinha and Pradeep Varakantham},
  title = {{On Minimizing Adversarial Counterfactual Error in Adversarial RL}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=eUEMjwh5wK},
}
Figure