Leveraging Classification Metrics for Quantitative System-Level Analysis with Temporal Logic Specifications

Apurva Badithela, Tichakorn Wongpiromsarn, Richard M. MurrayarXiv 2021

This paper from researchers at Caltech and Iowa State University tackles a critical "missing link" in autonomous systems: how do we know if a machine learning model's classification errors will actually cause a system-level failure? By bridging the gap between statistical ML metrics (like confusion matrices) and formal verification (Linear Temporal Logic), the authors provide a framework to calculate the exact probability that a robot will stay safe despite its imperfect "eyes."

TL;DR

The authors present a framework that maps a perception model's confusion matrix to a Markov Chain, allowing them to calculate the probability that an autonomous system will satisfy its formal safety specifications. They demonstrate that the "best" perception model isn't just the one with the highest accuracy, but the one whose specific error patterns (precision vs. recall) are most recoverable by the system's controller.

What Problem Does This Paper Address?

Autonomous systems are typically split into two worlds: perception (using ML to see the world) and control (using math to decide what to do).

The problem is that these worlds speak different languages. Perception researchers evaluate models using metrics like accuracy, precision, and recall. Control researchers use formal methods like Linear Temporal Logic (LTL) to prove a system is safe, but they often start with the dangerous assumption that perception is perfect.

In reality, a misclassification (e.g., seeing a pedestrian as a "pole") can lead to a crash. However, not all errors are equal. A car moving at 5 mph has more time to "recover" from a momentary sensor glitch than a car moving at 65 mph. Currently, there is no systematic way to determine how a specific perception error rate translates into a system-level safety risk.

Methods

The authors propose a three-step pipeline to quantify this risk:

  1. Model the System Architecture: They define a standard loop where the perception module reports a "perceived environment" to a controller, which then updates the agent's physical state (see Figure 1). Architecture of an autonomous system
  2. Construct a Markov Chain: The core contribution is an algorithm that builds a discrete-time Markov Chain (MC). The transitions in this MC are governed by the confusion matrix of the perception model. If the true state is "Pedestrian" but the confusion matrix says there's a 10% chance of seeing "Empty," the MC reflects that probabilistic jump.
  3. Probabilistic Model Checking: Once the MC is built, they use off-the-shelf tools (like Storm or PRISM) to calculate the probability that the system satisfies an LTL formula (e.g., "Always avoid collisions AND eventually reach the goal").
Fig. 1: Architecture of an autonomous system

Datasets

The paper uses a synthetic but illustrative "car and pedestrian" scenario for evaluation. Illustration of the car and pedestrian example * Environment: A road with a sidewalk that might contain a pedestrian, an object, or be empty. * Perception: A 3x3 confusion matrix representing the probabilities of correctly or incorrectly identifying these three classes. * Dynamics: A discrete-state model of a car with varying speeds and positions.

Fig. 2: Illustration of the car and pedestrian example

Key Insights and Ideas

  • Recoverability is Key: Safety isn't just about sensor accuracy; it's about the system's ability to recover. At low speeds, the car makes more observations before reaching a critical point, giving it multiple "chances" to get the classification right and stop in time.
  • The Precision-Recall Tradeoff: There is a fundamental tradeoff in ML between precision (avoiding false alarms) and recall (not missing the target). The authors show that for safety-critical tasks, simply maximizing recall isn't always the answer—it depends on whether the "false alarms" caused by low precision might trigger other dangerous behaviors (like sudden, unnecessary braking).
  • System-Level "Operating Points": This framework allows engineers to pick the "right" operating point on a Precision-Recall curve based on the actual probability of satisfying safety specs, rather than using ad-hoc heuristics.

Key Results

The researchers tested their framework across different car speeds ($V_{max}$) and initial conditions.

  • Speed vs. Safety: As maximum speed increases, the probability of satisfying safety requirements drops significantly. For example, in Figure 3a, a car starting at a high initial speed has a much lower chance of stopping for a pedestrian because it has fewer time steps to "correct" a misclassification. Satisfaction probability for pedestrian scenario
  • Quantifying the Tradeoff: Figure 4 illustrates how different precision/recall pairs affect safety. They found that for a car to stop reliably for a pedestrian, high recall is essential, but as the car's speed increases, even high-recall models struggle if the initial speed is too high to allow for recovery from initial errors. Satisfaction probability under various precision/recall pairs
Satisfaction probability for pedestrian scenario
Fig. 4: (a) Satisfaction probability that the car stops at Ck−1 for xe = ped and Vmax = 5 under various initial speeds and precision/recall pairs. (b) Satisfaction probability that the car does not stop at Ck−1 for xe = obj and Vmax = 5 under various initial speeds and precision/recall pairs. (c) Satisfaction probability that the car does not stop at Ck−1 for xe = empty and Vmax = 5 under various initial speeds and precision/recall pairs.

Limitations and Future Work

  • Static Environments: The current model assumes the environment (like the pedestrian) doesn't move. Real-world safety requires modeling dynamic, reactive agents.
  • Fixed Confusion Matrices: The paper assumes the confusion matrix is constant. In reality, perception performance changes based on lighting, distance, and weather.
  • Scalability: While Markov Chains are powerful, they can suffer from the "state-space explosion" problem in more complex, high-dimensional scenarios.

The authors suggest that future work could involve using these system-level requirements to actually train better perception models, optimizing them directly for safety rather than just raw accuracy.

Summary updated

BibTeX
@misc{badithela2021leveraging,
  author = {Apurva Badithela and Tichakorn Wongpiromsarn and Richard M. Murray},
  title = {{Leveraging Classification Metrics for Quantitative System-Level Analysis with Temporal Logic Specifications}},
  year = {2021},
  eprint = {2105.07343},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.07343},
}
Figure