A Bayesian approach to breaking things: efficiently predicting and repairing failure modes via sampling

Charles Dawson, Chuchu Fan

Abstract

Before autonomous systems can be deployed in safety-critical applications, we must be able to understand and verify the safety of these systems. For cases where the risk or cost of real-world testing is prohibitive, we propose a simulation-based framework for a) predicting ways in which an autonomous system is likely to fail and b) automatically adjusting the system's design to preemptively mitigate those failures. We frame this problem through the lens of approximate Bayesian inference and use differentiable simulation for efficient failure case prediction and repair. We apply our approach on a range of robotics and control problems, including optimizing search patterns for robot swarms and reducing the severity of outages in power transmission networks. Compared to optimization-based falsification techniques, our method predicts a more diverse, representative set of failure modes, and we also find that our use of differentiable simulation yields solutions that have up to 10x lower cost and requires up to 2x fewer iterations to converge relative to gradient-free techniques.

Introduction

As autonomous systems—ranging from drone swarms to power grids—increase in complexity, manually predicting failure modes becomes nearly impossible. Existing automated "falsification" tools often rely on local optimization (like gradient descent) to find a single failure point. However, this approach frequently gets stuck in local minima, missing other critical failure modes. This leads to two major gaps in current safety verification: a lack of diversity in identified risks and significant computational inefficiency when dealing with high-dimensional robotics problems.

Adversarial Inference Methodology

The proposed framework, termed Adversarial Inference, shifts the focus from finding the single worst failure to sampling from a "pseudo-posterior" distribution of likely, high-severity failures. By treating failure discovery as a probabilistic sampling problem, the system can identify a diverse set of "long-tail" risks.

The four-step adversarial inference cycle: predicting failure modes through sampling and re-optimizing the design to mitigate them.

The core of the method is a prediction-repair loop:

  1. Predict: Sample a diverse set of environmental factors or disturbances that cause the current system to fail.
  2. Repair: Sample new design parameters or control policies that minimize risk across the entire set of predicted failures.

This loop is made efficient through Differentiable Simulation. By using simulators that provide gradients (e.g., JAX-based), the framework can employ the Metropolis-adjusted Langevin Algorithm (MALA). MALA uses these gradients to navigate the high-dimensional failure space much faster than traditional random-walk or gradient-free methods.

Experimental Evaluation

The framework was evaluated across several complex simulation environments, some of which were validated with physical hardware:

  • Multi-robot Search-Evasion: Seekers must find hiders without letting them escape.
  • Formation Control: A swarm of 10 drones maintaining connectivity under uncertain wind conditions.
  • Power Grid Dispatch: Scheduling generators in 14-bus and 57-bus networks to prevent outages.
  • F16 GCAS: Ground collision avoidance for jet aircraft with 1,800 control parameters.
  • Robot Manipulation: A Franka Research 3 arm pushing objects without toppling them.

Results and Insights

The use of differentiable simulation and gradient-based MCMC yielded significant performance gains. The method produced solutions with up to 10x lower cost and required 2x fewer iterations to converge compared to gradient-free techniques.

Comparison of cost distributions across various tasks, showing that the proposed sampling-based methods (RMH and MALA) effectively identify and mitigate high-cost failure modes compared to baselines.

Key insights include:

  • Diversity over Optimization: Sampling avoids the "local minima" trap of standard optimization, building a representative library of risks that leads to more robust designs.
  • Scalability: Gradient-based MCMC scales effectively to high-dimensional problems that are typically intractable for black-box methods.
  • Targeting the Tails: Unlike standard Domain Randomization, which optimizes for average performance, this method specifically targets the "tails" of the distribution where the most dangerous failures reside.

Discussion and Future Work

While powerful, the framework has limitations. It is currently optimized for continuous parameters; discrete variables (like sensor selection) require further development. Additionally, the method's effectiveness is bound by the fidelity of the simulator—it cannot predict failures caused by unmodeled physical effects. Future work will focus on bridging the sim-to-real gap and handling highly discontinuous cost landscapes more efficiently.

Summary updated

BibTeX
@inproceedings{dawson2023bayesian,
  author = {Charles Dawson and Chuchu Fan},
  title = {{A Bayesian approach to breaking things: efficiently predicting and repairing failure modes via sampling}},
  booktitle = {Conference on Robot Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=fNLBmtyBiC},
}
Figure