Abstract
We consider the problem of defense against reward-poisoning attacks in reinforcement learning and formulate it as a game in $T$ rounds between a defender and an adaptive attacker in an adversarial environment. To address this problem, we design two novel defense algorithms. First, we propose Exp3-DARP, a defense algorithm that uses Exp3 as a hyperparameter learning subroutine, and show that it achieves order-optimal $\tilde{\Theta}(T^{1/2})$ bounds on our notion of regret with respect to a defense that always picks the optimal parameter in hindsight. We show that the order of $T$ in the bounds cannot be improved when the reward arrival process is adversarial, even if the feedback model of the defense is stronger. However, assuming that the environment is stochastic, we propose OMDUCB-DARP that uses estimates of costs as proxies to update the randomized strategy of the learner and are able to substantially improve the bounds proportional to how smoothly the attacker’s strategy changes. Furthermore, we show that weaker types of defense, that do not take into account the attack structure and the poisoned rewards, suffer linear regret with respect to a defender that always selects the optimal parameter in hindsight when faced with an adaptive attacker that uses a no-regret algorithm to learn the behavior of the defense. Finally, we support our theoretical results with experimental evaluations on three different environments, showcasing the efficiency of our methods.
Introduction
Reinforcement Learning (RL) agents learn optimal behaviors by maximizing reward signals received from their environment. However, these signals are highly vulnerable to "reward poisoning" attacks, where an adversary manipulates training rewards to induce suboptimal or malicious behaviors. While various defense mechanisms exist, they typically require manual tuning of defense parameters. In real-world scenarios, attackers are adaptive; they observe the defense and adjust their poisoning strategy accordingly. This paper frames the defense problem as a dynamic game between an adaptive attacker and a defender, proposing two novel online learning algorithms to dynamically adjust defense parameters on the fly.
Problem Formulation
The interaction is modeled as a sequential game over $T$ rounds. In each round, an attacker chooses an attack parameter to poison the reward signal, and a defender chooses a defense parameter to mitigate the attack and compute a robust policy. This process is illustrated in the following diagram:
Defense Algorithms
The authors propose two primary algorithms tailored to different environmental assumptions:
- Exp3-DARP: Suitable for adversarial environments where rewards can change arbitrarily. It uses the Exp3 bandit algorithm to learn the optimal defense parameter from bandit feedback, achieving order-optimal $\tilde{\Theta}(T^{1/2})$ regret.
- OMDUCB-DARP: Designed for stochastic environments. It exploits the fact that adaptive attackers using no-regret learning algorithms change their strategies smoothly over time. By using Optimistic Mirror Descent with Upper Confidence Bounds, it achieves significantly improved regret bounds, such as $\tilde{O}(T^{1/3})$.
Results and Discussion
Theoretical analysis reveals that "weak" defenses—those that do not account for the mathematical structure of the attack—suffer linear regret against adaptive attackers, meaning their performance gap grows indefinitely. Conversely, the proposed DARP algorithms maintain sublinear regret, indicating they successfully learn to counter the adversary over time.
Empirical evaluations across Bandit, Navigation, and Grid World environments demonstrate that both Exp3-DARP and OMDUCB-DARP outperform static or naive baselines. As shown in the figures above, while "No Defense" and "Fixed Defense" strategies are quickly exploited by the attacker (resulting in linear regret), the proposed methods converge to near-optimal defense policies. Specifically, OMDUCB-DARP shows a characteristic plateau in regret in stochastic settings as it successfully predicts and counters the attacker's moves.
Conclusion
This research provides a game-theoretic foundation for defending RL agents against adaptive reward poisoning. By treating the defense parameter as a learnable variable in an online game, the proposed algorithms offer robust protection even when the attacker is simultaneously learning. Future research will focus on scaling these methods to high-dimensional deep RL environments and exploring more complex game formulations such as Stackelberg games.
Summary updated