Training Adversarial Agents to Exploit Weaknesses in Deep Control Policies

Sampo Kuutti, Saber Fallah, Richard Bowden

Abstract

Deep learning has become an increasingly common technique for various control problems, such as robotic arm manipulation, robot navigation, and autonomous vehicles. However, the downside of using deep neural networks to learn control policies is their opaque nature and the difficulties of validating their safety. As the networks used to obtain state-of-the-art results become increasingly deep and complex, the rules they have learned and how they operate become more challenging to understand. This presents an issue, since in safety-critical applications the safety of the control policy must be ensured to a high confidence level. In this paper, we propose an automated black box testing framework based on adversarial reinforcement learning. The technique uses an adversarial agent, whose goal is to degrade the performance of the target model under test. We test the approach on an autonomous vehicle problem, by training an adversarial reinforcement learning agent, which aims to cause a deep neural network-driven autonomous vehicle to collide. Two neural networks trained for autonomous driving are compared, and the results from the testing are used to compare the robustness of their learned control policies. We show that the proposed framework is able to find weaknesses in both control policies that were not evident during online testing and therefore, demonstrate a significant benefit over manual testing methods.

Introduction

Deep Neural Networks (DNNs) are excellent at handling complex control tasks like autonomous driving, but they are notoriously "opaque." We don't fully understand the rules they've learned, making it incredibly difficult to guarantee their safety in the real world. The industry standard for testing—naturalistic driving—is inefficient for safety validation. Because accidents are rare, a car might need to drive millions of miles before encountering a specific "edge case" that triggers a failure. Manual test generation is also limited by human imagination. This research addresses the need for an automated way to proactively discover these rare, catastrophic failure modes before a system is deployed.

Methodology

The proposed framework utilizes Adversarial Reinforcement Learning (ARL). Instead of testing the driving policy in a friendly environment, it is placed in a simulation with an "adversarial agent." The setup involves a vehicle-following scenario where the "Target" (the DNN under test) follows a "Lead Vehicle" (the Adversary).

The adversary is trained using the Advantage Actor-Critic (A2C) algorithm. In this architecture, the "Actor" proposes actions while the "Critic" evaluates them based on the reward signal.

The Advantage Actor-Critic (A2C) architecture used for the adversarial agent.

The adversary is rewarded for minimizing the "time headway" (the temporal gap between the two vehicles). Essentially, it earns "points" for forcing the follower into a near-miss or a collision. To ensure the discovered failures are plausible, the framework constrains the adversary’s acceleration and velocity, preventing physically impossible maneuvers.

The study utilizes the IPG CarMaker simulator to attack two pre-trained control policies: a Reinforcement Learning (RL) model trained to maintain distance via rewards, and an Imitation Learning (IL) model trained by mimicking human driving data.

Results and Analysis

The researchers conducted a massive scale test consisting of 100,000 episodes (roughly 8,000 simulated hours). The framework successfully uncovered 11,243 collisions, a stark contrast to a 10-hour baseline test using manually defined trajectories which found zero collisions.

Robustness Gap

A major finding was the significant difference in robustness between training methods. The Imitation Learning (IL) model was responsible for 11,227 collisions, while the Reinforcement Learning (RL) model failed only 16 times. This suggests that "learning by example" (IL) may leave more safety "blind spots" than "learning by doing" (RL).

Minimum episode time headway for IL (red) and RL (blue) models across various lead vehicle velocity ranges.

As shown in the figure above, the minimum time headway for the IL model frequently drops toward zero, indicating collisions or extreme near-misses. In contrast, the RL model maintains a much more stable and safer headway across different scenarios.

The "Oscillation" Trap

The adversarial agent learned a sophisticated strategy to exploit weaknesses: it would continuously accelerate and decelerate to "lure" the follower vehicle into a high-speed approach, then slam on the brakes at the exact moment the follower was most vulnerable. This specific failure mode was not evident during standard online testing.

Conclusion

This ARL framework demonstrates a significant benefit over manual testing by discovering "unknown unknowns" that human testers might overlook. While currently focused on longitudinal control, future work aims to expand the framework to multi-agent environments and complex maneuvers like intersections. The ultimate goal is to use these discovered failure cases to retrain and harden target models, creating a cycle of automated safety improvement.

Summary updated

BibTeX
@inproceedings{kuutti2020training,
  author = {Sampo Kuutti and Saber Fallah and Richard Bowden},
  title = {{Training Adversarial Agents to Exploit Weaknesses in Deep Control Policies}},
  booktitle = {IEEE International Conference on Robotics and Automation},
  year = {2020},
  url = {https://openreview.net/forum?id=IRhiqsJcN0},
}
Figure