Table of Contents
Fetching ...

Optimal Attack and Defense for Reinforcement Learning

Jeremy McMahan, Young Wu, Xiaojin Zhu, Qiaomin Xie

TL;DR

This work tackles robustness of reinforcement learning to adversarial online manipulation across state, observation, action, and reward surfaces by formulating attacker optimization as a meta-MDP $\overline{M}$ and defender optimization as a stochastic Stackelberg game realized as a meta-POTBSG. It proves that optimal attacks can be computed efficiently (polynomial-time planning or learning) in many settings, even for linear environments, while robust defense reduces to finding a weak Stackelberg equilibrium, with efficient solutions in zero-sum or fully observable scenarios and backward-induction methods for finite-horizon cases. The paper provides concrete constructions, complexity results, and a grid-world experiments demonstrating both attack efficacy and defense robustness, highlighting the practical need for provable robustness guarantees in adversarial RL. Overall, it establishes a principled, provable framework for designing attack-aware defenses and certifying robustness in RL systems under diverse online manipulation threats.

Abstract

To ensure the usefulness of Reinforcement Learning (RL) in real systems, it is crucial to ensure they are robust to noise and adversarial attacks. In adversarial RL, an external attacker has the power to manipulate the victim agent's interaction with the environment. We study the full class of online manipulation attacks, which include (i) state attacks, (ii) observation attacks (which are a generalization of perceived-state attacks), (iii) action attacks, and (iv) reward attacks. We show the attacker's problem of designing a stealthy attack that maximizes its own expected reward, which often corresponds to minimizing the victim's value, is captured by a Markov Decision Process (MDP) that we call a meta-MDP since it is not the true environment but a higher level environment induced by the attacked interaction. We show that the attacker can derive optimal attacks by planning in polynomial time or learning with polynomial sample complexity using standard RL techniques. We argue that the optimal defense policy for the victim can be computed as the solution to a stochastic Stackelberg game, which can be further simplified into a partially-observable turn-based stochastic game (POTBSG). Neither the attacker nor the victim would benefit from deviating from their respective optimal policies, thus such solutions are truly robust. Although the defense problem is NP-hard, we show that optimal Markovian defenses can be computed (learned) in polynomial time (sample complexity) in many scenarios.

Optimal Attack and Defense for Reinforcement Learning

TL;DR

This work tackles robustness of reinforcement learning to adversarial online manipulation across state, observation, action, and reward surfaces by formulating attacker optimization as a meta-MDP and defender optimization as a stochastic Stackelberg game realized as a meta-POTBSG. It proves that optimal attacks can be computed efficiently (polynomial-time planning or learning) in many settings, even for linear environments, while robust defense reduces to finding a weak Stackelberg equilibrium, with efficient solutions in zero-sum or fully observable scenarios and backward-induction methods for finite-horizon cases. The paper provides concrete constructions, complexity results, and a grid-world experiments demonstrating both attack efficacy and defense robustness, highlighting the practical need for provable robustness guarantees in adversarial RL. Overall, it establishes a principled, provable framework for designing attack-aware defenses and certifying robustness in RL systems under diverse online manipulation threats.

Abstract

To ensure the usefulness of Reinforcement Learning (RL) in real systems, it is crucial to ensure they are robust to noise and adversarial attacks. In adversarial RL, an external attacker has the power to manipulate the victim agent's interaction with the environment. We study the full class of online manipulation attacks, which include (i) state attacks, (ii) observation attacks (which are a generalization of perceived-state attacks), (iii) action attacks, and (iv) reward attacks. We show the attacker's problem of designing a stealthy attack that maximizes its own expected reward, which often corresponds to minimizing the victim's value, is captured by a Markov Decision Process (MDP) that we call a meta-MDP since it is not the true environment but a higher level environment induced by the attacked interaction. We show that the attacker can derive optimal attacks by planning in polynomial time or learning with polynomial sample complexity using standard RL techniques. We argue that the optimal defense policy for the victim can be computed as the solution to a stochastic Stackelberg game, which can be further simplified into a partially-observable turn-based stochastic game (POTBSG). Neither the attacker nor the victim would benefit from deviating from their respective optimal policies, thus such solutions are truly robust. Although the defense problem is NP-hard, we show that optimal Markovian defenses can be computed (learned) in polynomial time (sample complexity) in many scenarios.
Paper Structure (27 sections, 8 theorems, 13 equations, 4 figures, 1 algorithm)

This paper contains 27 sections, 8 theorems, 13 equations, 4 figures, 1 algorithm.

Key Result

Proposition 1

The maximum expected reward the attacker can achieve from any attack on $\pi$ is $V^*_{\overline{M}}$, the maximum expected total discounted reward for the meta-MDP $\overline{M}$. Furthermore, any optimal deterministic, stationary policy $\nu^*$ for $\overline{M}$ is an optimal attack policy.

Figures (4)

  • Figure 1: Optimal Policy Path.
  • Figure 2: Attacked Paths.
  • Figure 3: Defense Policy Path
  • Figure : Attacker Interaction Protocol

Theorems & Definitions (17)

  • Definition 1: Attack Problem
  • Definition 2: Meta-MDP
  • Proposition 1
  • Proposition 2
  • Remark 1: Restricted Surfaces
  • Theorem 1
  • Remark 2: Beyond Markovian Policies
  • Definition 3: Defense Problem
  • Definition 4
  • Proposition 3
  • ...and 7 more