Design of intentional backdoors in sequential models

Zhaoyuan Yang, Naresh Iyer, Johan Reimann, Nurali ViraniarXiv 2019 · OpenReview

Abstract

Recent work has demonstrated robust mechanisms by which attacks can be orchestrated on machine learning models. In contrast to adversarial examples, backdoor or trojan attacks embed surgically modified samples with targeted labels in the model training process to cause the targeted model to learn to misclassify chosen samples in the presence of specific triggers, while keeping the model performance stable across other nominal samples. However, current published research on trojan attacks mainly focuses on classification problems, which ignores sequential dependency between inputs. In this paper, we propose methods to discreetly introduce and exploit novel backdoor attacks within a sequential decision-making agent, such as a reinforcement learning agent, by training multiple benign and malicious policies within a single long short-term memory (LSTM) network. We demonstrate the effectiveness as well as the damaging impact of such attacks through initial outcomes generated from our approach, employed on grid-world environments. We also provide evidence as well as intuition on how the trojan trigger and malicious policy is activated. Challenges with network size and unintentional triggers are identified and analogies with adversarial examples are also discussed. In the end, we propose potential approaches to defend against or serve as early detection for such attacks. Results of our work can also be extended to many applications of LSTM and recurrent networks.

Introduction

Traditional research on "Trojan" or "backdoor" attacks has largely focused on static image classification. In these scenarios, a model might misclassify a "Stop" sign as a "Speed Limit" sign only while a specific trigger, such as a sticker, is physically present. Once the trigger is removed, the model typically reverts to normal behavior. However, this paradigm fails to address the sequential dependency inherent in real-world applications like autonomous driving or robotics.

This paper explores a more insidious threat: hiding a malicious policy inside a Long Short-Term Memory (LSTM) network. The goal is to create a "one-and-done" trigger where a single, fleeting observation permanently shifts the agent’s internal memory (the LSTM cell state), causing it to follow a malicious path for the remainder of its mission, even after the trigger has vanished.

Methodology

The attack is formulated as a Partially-Observable Markov Decision Process (POMDP). Because LSTMs are designed to track hidden states over time, an adversary can exploit the network's excess capacity to "teach" it to use specific internal memory units to track whether a trigger has been encountered.

LSTM architecture used for the sequential backdoor attack.

The technical approach utilizes Proximal Policy Optimization (PPO) within a multi-task training framework. The agent is trained simultaneously on a "Normal" environment (maximizing user reward) and a "Trojan" environment (maximizing adversary reward when the trigger appears). A specialized backdoor generation algorithm balances these objectives to ensure the agent remains stealthy and performs perfectly on normal tasks during standard validation testing.

Experimental Setup

The study utilizes a Grid-World Environment where an agent must navigate a grid filled with randomly placed obstacles to reach a destination.

  • The Task: The "User" goal is located in the top-right, while the "Adversary" goal is in the top-left.
  • The Trigger: A small orange patch that appears in the agent's $3 \times 3$ observation window for exactly one time step.

The researchers tested this across various grid sizes (from $7 \times 7$ to $27 \times 27$) and obstacle densities to demonstrate the attack's scalability to complex navigation tasks.

Results and Discussion

The attack proved highly successful across multiple configurations. In a $17 \times 17$ grid with 30 obstacles, the backdoored agent reached the user's goal 94.8% of the time (nominal behavior) and reached the adversary's goal 93.4% of the time when triggered.

Demonstration of the "one-and-done" trigger in a grid-world environment.

Crucially, the trigger only needed to appear for one time step (e.g., at step 12) to permanently change the agent's destination at step 100+. Analysis of the internal LSTM units revealed that the models develop specific cells exhibiting a "Step Response." When the trigger appears, the value in these cells jumps and stays at a new level indefinitely, acting as a permanent internal "switch."

One surprising finding was the existence of "unintentional triggers." In complex environments, a sequence of "normal" observations can occasionally mimic the trigger closely enough to accidentally activate the backdoor, effectively creating a "natural" adversarial example.

Conclusion

This research highlights a significant vulnerability in sequential AI models. By exploiting the memory capacity of LSTMs, adversaries can embed persistent backdoors that are difficult to detect through standard testing. While monitoring internal states for anomalous ranges may serve as a defense, the researchers note that complex environments can produce false positives. Future work will extend these methods to other sequential domains such as video processing, audio, and natural language understanding.

Summary updated

Abstract

Recent work has demonstrated robust mechanisms by which attacks can be orchestrated on machine learning models. In contrast to adversarial examples, backdoor or trojan attacks embed surgically modified samples with targeted labels in the model training process to cause the targeted model to learn to misclassify chosen samples in the presence of specific triggers, while keeping the model performance stable across other nominal samples. However, current published research on trojan attacks mainly focuses on classification problems, which ignores sequential dependency between inputs. In this paper, we propose methods to discreetly introduce and exploit novel backdoor attacks within a sequential decision-making agent, such as a reinforcement learning agent, by training multiple benign and malicious policies within a single long short-term memory (LSTM) network. We demonstrate the effectiveness as well as the damaging impact of such attacks through initial outcomes generated from our approach, employed on grid-world environments. We also provide evidence as well as intuition on how the trojan trigger and malicious policy is activated. Challenges with network size and unintentional triggers are identified and analogies with adversarial examples are also discussed. In the end, we propose potential approaches to defend against or serve as early detection for such attacks. Results of our work can also be extended to many applications of LSTM and recurrent networks.
BibTeX
@misc{yang2019design,
  author = {Zhaoyuan Yang and Naresh Iyer and Johan Reimann and Nurali Virani},
  title = {{Design of intentional backdoors in sequential models}},
  year = {2019},
  eprint = {1902.09972},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1902.09972},
}
Figure