Defense Against Reward Poisoning Attacks in Reinforcement Learning

Kiarash Banihashem, Adish Singla, Goran Radanovic

Introduction

Reinforcement Learning (RL) agents are inherently vulnerable to reward poisoning, where an adversary manipulates the reward signal during training to force the agent into a specific target policy ($\pi_\dagger$). Because the agent only observes the poisoned rewards ($\hat{R}$) and lacks access to the true rewards ($\bar{R}$), standard RL algorithms often blindly follow the attacker's intent, leading to poor performance or unsafe behavior in the original environment.

This paper introduces a novel defense framework that exploits the likely behavior of a "cost-effective" attacker. By assuming the adversary seeks to minimize their manipulation effort, the agent can reverse-engineer a set of plausible true rewards and optimize for robustness.

Methodology: Robust Optimization via Plausible Sets

The core of the proposed defense is a robust optimization framework. Instead of naively maximizing the observed poisoned rewards, the agent identifies a "plausible set" of reward functions. This set contains all reward functions $R$ that could have resulted in the observed $\hat{R}$ if an attacker were minimizing a specific cost function (e.g., the Euclidean distance or $\ell_2$ norm) to make $\pi_\dagger$ optimal.

Figure 4: Illustrative MDP showing the true rewards (a) and the resulting defense policy (c) which becomes stochastic to mitigate risk.

The defense policy ($\pi_D$) is then derived using a max-min optimization strategy: it maximizes the expected return under the worst-case reward function within the plausible set. The authors demonstrate that for $\ell_1$ and $\ell_2$ norms, this problem can be solved efficiently using Linear Programming, making the defense computationally tractable for tabular environments.

The Attacker's Signature

A key insight of this work is that a cost-effective attacker leaves a distinct "fingerprint." To make a target policy optimal with minimal change, the attacker typically depresses the rewards of the truly optimal actions just enough to make them less attractive than the target action.

By analyzing the "optimality gap" in the poisoned MDP, the agent can infer which actions were likely suppressed. Consequently, the defense policy often results in a stochastic mixture of the target action and these inferred "second-best" actions, effectively hedging against the attacker's manipulation.

Experimental Results

The framework was evaluated in simulation-based environments, including a 9-state Navigation task and an 18-state Grid World. In the Navigation task, the target policy ($\pi_\dagger$) resulted in a true score of -0.26, while the optimal policy ($\pi^*$) achieved 0.45. The defense policy ($\pi_D$) successfully recovered significant performance, reaching a score of 0.30.

Figure 3: Comparison of the poisoned MDP (b) and a performance table (d) showing how the defense policy maintains consistent performance across different reward assumptions.

As shown in the illustrative results in Figure 3, while the optimal policy $\pi^*$ performs poorly under poisoned rewards and the target policy $\pi_\dagger$ performs poorly under true rewards, the defense policy $\pi_D$ provides a stable, safe middle ground. The authors also provide mathematical "performance certificates," proving that the expected return of $\pi_D$ under the true rewards is lower-bounded by its return under the poisoned rewards.

Conclusion and Future Work

This framework provides a rigorous foundation for defending RL agents against reward poisoning by leveraging the attacker's own efficiency constraints. While currently demonstrated in tabular environments, future work aims to scale these methods to high-dimensional spaces using deep learning function approximators and to address scenarios where environment transition dynamics are also unknown or subject to manipulation.

Summary updated

BibTeX
@article{banihashem2023defense,
  author = {Kiarash Banihashem and Adish Singla and Goran Radanovic},
  title = {{Defense Against Reward Poisoning Attacks in Reinforcement Learning}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2023},
  url = {https://openreview.net/forum?id=VBjjU6yAVK},
}
Figure