Online Poisoning Attack Against Reinforcement Learning under Black-box Environments
Jianhui Li, Bokang Zhang, Junfeng Wu
TL;DR
This work studies online data-poisoning attacks on reinforcement learning in black-box environments, where an attacker perturbs rewards and transitions to push the agent toward a target policy bar_pi. The proposed method combines a penalty-based reformulation with a bilevel optimization and a single-loop stochastic gradient descent algorithm that operates without knowledge of the environment dynamics. It explicitly handles the double-sampling issue and derives practical gradient estimates from online transition samples, validating the approach in a maze where the agent's Q-values converge toward attacker-induced bar_Q. The results reveal a realistic vulnerability in online RL training and provide a foundation for developing defenses against such data poisoning threats.
Abstract
This paper proposes an online environment poisoning algorithm tailored for reinforcement learning agents operating in a black-box setting, where an adversary deliberately manipulates training data to lead the agent toward a mischievous policy. In contrast to prior studies that primarily investigate white-box settings, we focus on a scenario characterized by \textit{unknown} environment dynamics to the attacker and a \textit{flexible} reinforcement learning algorithm employed by the targeted agent. We first propose an attack scheme that is capable of poisoning the reward functions and state transitions. The poisoning task is formalized as a constrained optimization problem, following the framework of \cite{ma2019policy}. Given the transition probabilities are unknown to the attacker in a black-box environment, we apply a stochastic gradient descent algorithm, where the exact gradients are approximated using sample-based estimates. A penalty-based method along with a bilevel reformulation is then employed to transform the problem into an unconstrained counterpart and to circumvent the double-sampling issue. The algorithm's effectiveness is validated through a maze environment.
