Reinforcement Learning for Automated Failure Discovery

39 concepts32 papers1 proposal

When evaluating safety-critical AI systems—such as autonomous vehicles, quadrupedal robots, or language model agents—traditional testing paradigms fall short. Standard evaluation metrics typically focus on average-case performance over fixed datasets or randomized simulations. However, as Chejian Xu et al. demonstrate in SafeBench: A Benchmarking Platform for Safety Evaluation of Autonomous Vehicles, systems that perform flawlessly in standard environments often collapse when confronted with rare, high-stakes "edge cases."

Finding these edge cases manually or through random sampling (like Monte Carlo testing) is highly inefficient because the failure states inhabit a massive, high-dimensional space and are exceptionally sparse. To solve this "long-tail" problem, a powerful research direction has emerged: inverting the objective function by training a reinforcement learning (RL) agent to actively discover system failures.

Instead of waiting for a system to fail by chance, researchers are treating the testing environment itself as an intelligent, goal-oriented adversary.


Inverting the Objective Function

To understand why this approach works, consider how standard reinforcement learning operates. Typically, an agent learns a policy $\pi$ to maximize a reward function $R$ that penalizes collisions, deviations, or errors.

In automated failure search, this relationship is flipped. The target system under test becomes part of the environment, and a separate adversarial agent is introduced. This adversary is framed as a Markov Decision Process (MDP) where its actions consist of manipulating environmental variables—such as perturbing sensor data, altering pedestrian trajectories, or introducing environmental disturbances. Crucially, the adversary's reward function is directly tied to the target system's failure or error rate.

+---------------------------------------------------------------+
|                      Adversarial MDP                          |
|                                                               |
|  +--------------------+  Actions (Perturbations)  +--------+  |
|  |                    |-------------------------->| Target |  |
|  | Adversarial Agent  |                           | System |  |
|  |                    |<--------------------------|  u.t.  |  |
|  +--------------------+   State (System Responses)|--------+  |
|           ^                                                   |
|           | Reward = Maximize Target Error / Violations       |
+-----------|---------------------------------------------------+
            |
    [Catastrophic Failure]

As Mark Koren et al. show in Adaptive Stress Testing for Autonomous Vehicles, framing the environment as an adversarial agent allows for the systematic discovery of rare edge cases orders of magnitude more efficiently than random sampling. By treating error discovery as a goal-oriented search, the adversary learns to navigate complex, non-linear dependencies between input factors, mapping out what Som Sagar et al. term the "failure landscape" in Failures Are Fated, But Can Be Faded: Characterizing and Mitigating Unwanted Behaviors in Large-Scale Vision and Language Models.


Uncovering Sequential and Compounding Vulnerabilities

A key reason this methodology works so well is its ability to uncover sequential vulnerabilities. In complex control systems, a failure is rarely triggered by a single, massive environmental shock. Instead, it is usually the result of a sequence of small, plausible perturbations that compound over time, slowly driving the system into an unrecoverable state.

Static optimization or random fuzzing struggles to find these paths because they do not account for the closed-loop feedback between the system and the environment. An RL adversary, however, interacts with the target dynamically.

For instance, Sampo Kuutti et al. demonstrate in Training Adversarial Agents to Exploit Weaknesses in Deep Control Policies that an adversarial lead vehicle can learn to execute subtle, realistic driving maneuvers that systematically exploit the blind spots of a downstream autonomous controller, triggering thousands of critical failures missed by manual stress testing.

Similarly, in the field of robotics, Fan Shi et al. apply this to physical hardware in Rethinking Robustness Assessment: Adversarial Attacks on Learning-based Quadrupedal Locomotion Controllers. Their adversarial framework uncovers sequential failure modes—such as minor, timed sensor drifts or malicious user commands—that completely destabilize quadrupedal robots.

By optimizing for the probability of failure rather than just forcing a brute-force crash, the adversary uncovers the most realistic and likely paths to catastrophic outcomes. As Harrison Delecki et al. note in How Do We Fail? Stress Testing Perception in Autonomous Vehicles, this optimization pressure ensures that the discovered failure paths use minimal, highly plausible perturbations rather than unrealistic environmental overrides.


Overcoming the Exploration Challenge

Because failure states are inherently rare, the adversarial agent itself faces a daunting sparse-reward challenge: if it randomly explores the environment, it may never trigger a failure and thus never receive the positive reward signal needed to learn.

To make adversarial failure search practical, researchers have integrated exploration techniques from standard RL literature into the adversary's training loop. In IMAP: Intrinsically Motivated Adversarial Policy, Xingjun Ma et al. introduce intrinsic motivation rewards to encourage the attacker to systematically explore unfamiliar states. This allows the adversary to discover hidden blind spots that standard heuristic searches miss entirely.

In a different domain, Allen Nie et al. leverage a similar insight in Play to Grade: Testing Coding Games as Classifying Markov Decision Process. By pairing an RL agent with a classifier, they incentivize the agent to explore states that behaviorally deviate from a reference solution, transforming the agent into an automated quality assurance tester capable of surfacing sparse, hard-to-reach software bugs.


Generalizing Beyond Physical Control

While autonomous driving and robotics are natural fits for this paradigm, the core mechanism—using an active agent to instantiate adversarial environments—is highly generalizable.

Ethical Boundaries

Instead of trying to hardcode rules for every possible scenario, Ann-Katrin Reuel et al. use adaptive stress testing in Using Adaptive Stress Testing to Identify Paths to Ethical Dilemmas in Autonomous Systems to discover paths that force an agent into no-win moral choices. By rewarding the adversary for finding states where all available actions violate ethical principles, they map out the operational boundaries of safe system behavior.

Language Model Agents

The paradigm has also shifted toward evaluating large language models interacting with tools. In Identifying the Risks of LM Agents with an LM-Emulated Sandbox, Yangjun Ruan et al. introduce adversarial environment instantiation. They prompt an LM-based simulator to generate world states specifically designed to expose vulnerabilities—such as introducing intentional ambiguity into user instructions. This forces the target agent to navigate high-risk scenarios, revealing a systemic tendency in advanced models to prioritize task completion over safety.


Closing the Loop: Robustness via Adversarial Training

Discovering vulnerabilities is only the first half of the equation; the ultimate utility of adversarial failure search lies in using these discovered weaknesses to patch the target system.

This creates a natural zero-sum game, often formalized as Robust Adversarial Reinforcement Learning (RARL). As originally articulated by Lerrel Pinto et al. in Robust Adversarial Reinforcement Learning, training a protagonist agent alongside a destabilizing adversary forces the protagonist to learn a policy that is resilient to active exploitation.

  +-------------------+                  +-------------------+
  |                   |  Finds Weakness  |                   |
  | Adversarial Agent |----------------->|  Target Policy    |
  |                   |                  |                   |
  +-------------------+                  +-------------------+
            ^                                      |
            |   Trains to Defend Against Exploits  |
            +--------------------------------------+

By continuously exposing the target model to the edge cases discovered by the active search agent, developers can fine-tune or restructure the target's operating space. This adversarial loop ensures that the final model is robust not just against average environmental noise, but against the worst-case, sequential trajectories it might encounter in the real world.

Key Foundational Work

Adaptive Stress Testing for Autonomous Vehicles (2019) — contributed 2 concept elements to this direction.
Robust Adversarial Reinforcement Learning (2017) — contributed 1 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_adversarial_failure_search_d1a64fdd,
  title = {adversarial failure search},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/adversarial-failure-search/rdr_d1a64fddba494e27adb353d4a4d03d04},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-24},
}

This exact version (version 1, frozen text):

@misc{lacuna_adversarial_failure_search_d1a64fdd_v1,
  title = {adversarial failure search},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/adversarial-failure-search/rdr_d1a64fddba494e27adb353d4a4d03d04/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-24},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake