Mitigating Deep Reinforcement Learning Backdoors in the Neural Activation Space

Sanyam Vyas, Chris Hicks, Vasilios Mavroudis · DOI

Introduction

Deep Reinforcement Learning (DRL) has become a cornerstone of modern autonomous systems, ranging from industrial robotics to complex decision-making in power grids. However, the high computational cost of training these models often leads practitioners to rely on pre-trained agents from third-party repositories. This supply chain dependency introduces a critical security vulnerability: backdoors. A backdoored agent performs its intended task correctly under normal conditions but executes a malicious sub-policy when it encounters a specific "trigger."

While previous research has focused on obvious, "out-of-distribution" triggers—such as random pixel noise—this paper addresses the more insidious threat of in-distribution triggers. These triggers are composed of valid environmental elements that are statistically rare but visually indistinguishable from normal game states, allowing them to bypass traditional input-sanitization defenses.

The Failure of Input Sanitization

Current state-of-the-art defenses often attempt to "clean" input data by projecting it into a "safe subspace" of expected observations. The authors demonstrate that these methods fail against in-distribution triggers. Because the trigger is built from the environment's own palette (e.g., a specific arrangement of tiles), it naturally resides within the safe subspace of the input filter. Consequently, the filter cannot distinguish between a legitimate goal and a malicious trigger, allowing the backdoor to remain active.

Proposed Method: Neural Activation Monitoring

To counter this, the researchers shifted the defensive focus from the input (what the agent sees) to the activation space (how the agent processes information). They hypothesized that even if a trigger looks like a normal object, the policy network must react with a unique intensity to execute the malicious behavior.

Statistical Fingerprinting

Using a modified "LavaWorld" environment, the authors performed a Mann-Whitney U-test on the activations of the agent's policy network. They discovered that triggers leave distinct "neural fingerprints." Even when an input is visually subtle, the reward-driven nature of the backdoor forces the neurons to fire in patterns that are statistically divergent from normal goal-seeking behavior.

In-distribution triggers in the LavaWorld environment. The left panel shows a normal path to the goal, while the right panel shows the agent diverted by a trigger pattern.

Lightweight Classification

Based on these findings, the authors developed a simple anomaly detector. By recording neuron activation levels during "clean" runs, they established baseline percentiles (e.g., 0.5/99.5%). At runtime, the system monitors the number of neurons firing outside these expected bounds. If the count exceeds a specific threshold, the episode is flagged as a backdoor attack.

Experimental Results

The activation-based detector was evaluated on Atari Breakout and Parameterised LavaWorld. The results indicate that internal monitoring is significantly more effective than input-level filtering.

  • Detection Accuracy: The detector achieved an F1 score of 0.94 and Area Under the Curve (AUC) values up to 0.98.
  • Reliability: The most effective configuration detected 92% of triggered episodes with a false positive rate of only 3%.
  • Efficiency: Because the method relies on simple quantile thresholding rather than complex secondary models, it introduces minimal computational overhead, making it suitable for real-time applications.
F1 scores across various threshold values for different percentile-based classifiers, demonstrating peak performance around a threshold of 50.

Conclusion and Future Work

This research highlights a critical blind spot in current DRL security: the vulnerability of input-space defenses to subtle, in-distribution triggers. By monitoring the neural activation space, the proposed method provides a robust and efficient way to identify malicious behavior that is otherwise invisible to external observers. Future work will explore temporal activation patterns—how neuron firing changes over several frames—to detect even more sophisticated, time-delayed backdoor attacks.

Summary updated

BibTeX
@inproceedings{vyas2024mitigating,
  author = {Sanyam Vyas and Chris Hicks and Vasilios Mavroudis},
  title = {{Mitigating Deep Reinforcement Learning Backdoors in the Neural Activation Space}},
  booktitle = {SP (Workshops)},
  year = {2024},
  doi = {10.1109/spw63631.2024.00013},
}
Figure