Fox in the Henhouse: Supply-Chain Backdoor Attacks Against Reinforcement Learning

Shijie Liu, Andrew Craig Cullen, Paul Montague, Sarah Monazam Erfani, Benjamin I. P. Rubinstein

TL;DR

This paper introduces the Supply-Chain Backdoor (SCAB) attack, a novel method for compromising Reinforcement Learning (RL) agents by exploiting the common practice of using pre-trained third-party policies. Unlike previous attacks requiring extensive access, SCAB operates with minimal, black-box interaction, demonstrating high success rates and significant performance degradation in RL systems.

What Problem Does This Paper Address?

The widespread adoption of Reinforcement Learning (RL) in critical applications like autonomous driving and financial trading is often facilitated by the use of pre-trained models and policies. This "supply chain" for RL agents, while accelerating development, introduces a significant security vulnerability. Existing backdoor attacks on RL typically assume unrealistic levels of access to the victim agent's internal workings (parameters, rewards, observations). This paper addresses the gap by proposing a more realistic attack scenario: a supply-chain attack that leverages the common practice of using third-party policies without requiring deep access to the victim's training process or internal states. The challenge is to demonstrate that even with limited, black-box access, an attacker can effectively embed a backdoor that compromises the RL agent's behavior.

Methods

The core contribution is the Supply-Chain Backdoor (SCAB) attack. SCAB targets the RL supply chain by introducing a backdoor through a pre-trained, externally sourced agent that interacts with the victim agent. The key novelty lies in the attacker's limited access: it only has read-only access to observations and can only influence the victim through its actions, mimicking the behavior of a legitimate agent.

SCAB operates in several stages:

  • Attacker Training: The attacker agent is trained offline. This involves training three components:
  • A standard policy ($\pi_{att}^{std}$) to act as a normal opponent.
  • A rewarding policy ($\pi_{att}^{rwd}$) designed to implicitly reward the victim for executing backdoor actions, even if it means the attacker loses. This is achieved through a max-min objective that aims to maximize the attacker's reward against the worst-case opponent.
  • A detector ($\delta$) that infers the victim's actions from the attacker's observations. This is trained as a supervised learning task.
  • Victim Training (Attack Injection): During the victim's training, the attacker agent, using its learned policies and detector, strategically interacts with the victim. It employs a finite-state machine (Winning, Triggering, Observing, Rewarding) to:
  • Initiate trigger actions ($A_t$) at a controlled probability (Trigger Injection Probability - TIP).
  • Observe the victim's response and use the detector to identify if the victim executes the intended backdoor actions ($A_b$).
  • If the backdoor actions are detected, the attacker enters a rewarding state to reinforce this behavior.
  • Victim Testing (Exploitation): At test time, any opponent (even a benign one) can exploit the embedded backdoor by using a trigger network ($\pi_{trg}$). This network learns to identify opportune moments to initiate trigger actions, aiming to maximize its own reward while minimizing the trigger proportion to maintain stealth.

The attack is designed to be generalizable across different RL algorithms (PPO, DQN), architectures (CNN, LSTM), and environments (discrete/continuous action spaces, competitive/cooperative multi-agent settings).

Datasets

The paper does not explicitly mention specific datasets for training the victim agents. Instead, the experiments are conducted on various simulated environments from the Farama Gymnasium and PettingZoo libraries, including:

  • Pong v3
  • Surround v2
  • Boxing v2
  • Volleyball Pong (for multi-agent scenarios)
  • Simple Push (for continuous action spaces)

These environments serve as both training and evaluation benchmarks.

Key Insights and Ideas

  • Realistic Threat Model: The most significant insight is that effective backdoor attacks on RL do not require deep white-box access. The SCAB attack demonstrates that a supply-chain approach, mimicking legitimate agent behavior, is sufficient to compromise RL systems.
  • Exploiting the RL Supply Chain: The paper highlights that the common practice of using pre-trained third-party policies is a critical vulnerability. This "fox in the henhouse" scenario means that even trusted external components can be a vector for attack.
  • Implicit Rewarding for Backdoor Behavior: The attacker's ability to implicitly reward the victim for executing backdoor actions, even at the cost of its own immediate performance, is a key mechanism for embedding the backdoor. This leverages the RL agent's learning objective to its own detriment.
  • Stealthiness through Legitimate Actions: By using actions that are indistinguishable from normal gameplay, SCAB achieves a high degree of stealth, making detection difficult for defenders.
  • Generalizability: The attack's effectiveness across diverse RL algorithms, architectures, and environment types underscores the pervasive nature of this supply-chain vulnerability.

Key Results

  • High Attack Success Rate: SCAB achieves a peak attack success rate exceeding 90%.
  • Significant Performance Degradation: The attack reduces the victim's average cumulative reward by over 80%.
  • Low Data Corruption: The attack is effective even with a modest 3% data corruption during training.
  • Stealthiness: Training-time metrics (episodic return, policy loss) of the victim agent remain qualitatively and quantitatively consistent with a non-attacked agent, making detection challenging.
  • Effectiveness Across Environments: The attack demonstrated strong performance in competitive (Pong, Surround, Boxing) and multi-agent (Volleyball Pong) environments, as well as in continuous action spaces (Simple Push).
  • Comparison to Prior Work: SCAB achieves comparable performance to prior attacks (e.g., TrojDRL, BACKDOORL) that require significantly more permissive access models.

Limitations and Future Work

  • Attacker Packaging: The current attacker requires packaging that allows it to track cumulative rewards and switch between behaviors. Future work could explore concealing these features at the architecture level.
  • Trigger/Backdoor Pattern Optimization: While the paper explores different trigger and backdoor action patterns, further research could investigate more intricate or dynamic patterns for potentially improved performance.
  • Trigger Injection Timing: The paper suggests that training an RL agent to determine optimal trigger injection moments is a promising future direction, though current results show a drop in testing-time success rates.
  • Defensive Strategies: The paper acknowledges that conventional RL adversarial defenses may not be directly applicable. Future work should focus on developing new defensive and detection mechanisms specifically for supply-chain attacks.
  • Fine-tuning Defense Limitations: The paper shows that simple fine-tuning defense methods offer limited effectiveness against SCAB.

Summary updated

BibTeX
@inproceedings{liu2026fox,
  author = {Shijie Liu and Andrew Craig Cullen and Paul Montague and Sarah Monazam Erfani and Benjamin I. P. Rubinstein},
  title = {{Fox in the Henhouse: Supply-Chain Backdoor Attacks Against Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=1RvkM0i9SQ},
}
Figure