NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Adversarially Robust Imitation Learning

Jianren Wang, Ziwen Zhuang, Yuyang Wang, Hang ZhaoCoRL 2021

Abstract

Modern imitation learning (IL) utilizes deep neural networks (DNNs) as function approximators to mimic the policy of the expert demonstrations. However, DNNs can be easily fooled by subtle noise added to the input, which is even non-detectable by humans. This makes the learned agent vulnerable to attacks, especially in IL where agents can struggle to recover from the errors. In such light, we propose a sound Adversarially Robust Imitation Learning (ARIL) method. In our setting, an agent and an adversary are trained alternatively. The former with adversarially attacked input at each timestep mimics the behavior of an online expert and the latter learns to add perturbations on the states by forcing the learned agent to fail on choosing the right decisions. We theoretically prove that ARIL can achieve adversarial robustness and evaluate ARIL on multiple benchmarks from DM Control Suite. The result reveals that our method (ARIL) achieves better robustness compare with other imitation learning methods under both sensory attack and physical attack.

1. Introduction

Deep Neural Networks (DNNs) are the backbone of modern imitation learning, but they are notoriously "brittle." Tiny, human-imperceptible perturbations to an input can lead a DNN to make wildly incorrect predictions. In sequential decision-making—like autonomous driving or robotics—a single adversarial "nudge" can lead to a cascading failure where the agent cannot recover.

While Reinforcement Learning (RL) has established methods for robustness (often by maximizing a "worst-case" reward), Imitation Learning faces a unique hurdle: there is no reward signal. The agent only has expert demonstrations to follow. Existing solutions like "domain randomization" require tedious manual tuning of environment parameters. ARIL seeks to automate this by learning a strategic adversary that finds the agent's specific weaknesses.

2. The ARIL Framework

The authors propose a min-max optimization framework where an agent ($\pi$) and an adversary ($f$) are trained alternatively. The adversary learns to perturb the environment's state to maximize the "cost"—defined as the distance between the agent's chosen action and the expert's recommended action. It uses policy gradient techniques (like TRPO) to become a "strategic" attacker. Simultaneously, the agent aims to mimic the expert as closely as possible, even when its inputs are being corrupted.

The algorithm follows a DAgger-style (Data Aggregation) approach: in each iteration, the agent interacts with the environment under attack, queries an online expert for the "correct" actions at those perturbed states, and adds this data to its training set.

Algorithm 1: Adversarially Robust Imitation Learning (ARIL)

3. Experimental Setup

The researchers evaluated ARIL using the DeepMind (DM) Control Suite, specifically focusing on three continuous control benchmarks: Ant-v2, HalfCheetah-v2, and Swimmer-v2. Two attack settings were explored:

  • Sensory Attack: The adversary modifies the agent's perception (input pixels or state vector), but the underlying physics remain unchanged.
  • Physical Attack: The adversary modifies the actual physical state (e.g., applying an external force), changing the transition dynamics.

4. Key Results and Insights

ARIL consistently outperformed baselines like DAgger, GAIL, and DART across all tasks. A key insight is the difference between "strategic" and "myopic" attacks. Standard adversarial attacks like FGSM (Fast Gradient Sign Method) are myopic—they only try to fool the agent for one step. ARIL’s adversary is trained via RL, allowing it to plan sequences of perturbations that lead to long-term failure.

Table 1: Performance comparison under sensory attacks across DM Control Suite benchmarks.

As shown in Table 1, ARIL demonstrates superior robustness. In the HalfCheetah sensory attack benchmark, ARIL saw only a 9.2% performance drop, whereas the next best robust method (DART) dropped by 44.1%. Overall, across all sensory tests, ARIL's performance drop was only -14.3%, compared to -40.3% for DART. Similar trends were observed in physical attacks, where ARIL maintained significantly higher rewards (e.g., 903 vs 581 for DART in the Ant environment).

5. Conclusion and Future Work

ARIL provides a sound framework for making IL agents resilient to malicious perturbations by framing the problem as a zero-sum game. While effective, the method currently relies on an interactive "online" expert and incurs higher computational overhead due to the dual optimization process. Future research could explore extending ARIL to Offline Imitation Learning or high-dimensional visual inputs.

Summary updated

BibTeX
@inproceedings{wang2021adversarially,
  author = {Jianren Wang and Ziwen Zhuang and Yuyang Wang and Hang Zhao},
  title = {{Adversarially Robust Imitation Learning}},
  booktitle = {CoRL},
  year = {2021},
  url = {https://openreview.net/forum?id=9aVCUv3nKBg},
}
Figure