Formalizing and Evaluating Requirements of Perception Systems for Automated Vehicles using Spatio-Temporal Perception Logic

Mohammad Hekmatnejad, Bardh Hoxha, Jyotirmoy V. Deshmukh, Yezhou Yang, Georgios Fainekos · OpenReview

Abstract

Automated vehicles (AV) heavily depend on robust perception systems. Current methods for evaluating vision systems focus mainly on frame-by-frame performance. Such evaluation methods appear to be inadequate in assessing the performance of a perception subsystem when used within an AV. In this paper, we present a logic -- referred to as Spatio-Temporal Perception Logic (STPL) -- which utilizes both spatial and temporal modalities. STPL enables reasoning over perception data using spatial and temporal relations. One major advantage of STPL is that it facilitates basic sanity checks on the real-time performance of the perception system, even without ground-truth data in some cases. We identify a fragment of STPL which is efficiently monitorable offline in polynomial time. Finally, we present a range of specifications for AV perception systems to highlight the types of requirements that can be expressed and analyzed through offline monitoring with STPL.

Introduction: Beyond Frame-by-Frame Perception

Most current methods for evaluating AV perception systems, such as SqueezeDet or YOLO, rely on static metrics like Mean Average Precision (mAP) or Intersection over Union (IoU). While these metrics provide a snapshot of performance, they are inherently limited because they analyze each image frame in isolation.

A perception system can achieve a high mAP score while still exhibiting dangerous temporal inconsistencies. A prime example is the 2018 Uber ATG accident in Tempe, where the system detected a pedestrian but repeatedly fluctuated its classification between "vehicle," "bicycle," and "other." This "class flickering" prevented the vehicle from predicting a stable path. Standard metrics fail to penalize such behavior. There is a critical need for a mathematical framework to define and monitor high-level requirements, such as ensuring an object's classification remains stable over short time intervals.

Conflicting classifications for a single object, where a cyclist is simultaneously identified as both a 'Cyclist' and a 'Pedestrian'.

Spatio-Temporal Perception Logic (STPL)

To address these gaps, we propose Spatio-Temporal Perception Logic (STPL). This logic integrates two established formal methods:

  1. Timed Quality Temporal Logic (TQTL): Used for reasoning over time intervals and object attributes, such as class probabilities.
  2. Spatial Logic ($S4_u$): Used for reasoning over spatial regions, overlaps, and topological relations between bounding boxes.

STPL provides a formal grammar for complex queries involving quantifiers (e.g., "for all detected cars...") and spatial operators (e.g., "the bounding box must overlap by at least 10%..."). This allows for the formalization of "common sense" safety rules that a perception system should follow.

Efficient Offline Monitoring

A key contribution of this work is the development of an offline monitoring algorithm based on dynamic programming. This tool checks whether a recorded data stream satisfies specific STPL requirements. To ensure practical usability, we identified a subset of the logic called Almost Arbitrarily Nested (AAN) formulas. These formulas can be monitored in polynomial time, making it feasible to audit large-scale datasets.

Experimental Evaluation and Insights

We evaluated STPL using three major industry datasets: KITTI, nuScenes (LidarSeg), and Berkeley DeepDrive (BDD).

Sanity Checks and Error Detection

STPL can perform "sanity checks" even in the absence of ground-truth data. For instance, it can flag "teleporting" objects that move at physically impossible speeds. Furthermore, STPL proved effective at "auditing the auditors." By applying requirements for label consistency, the tool identified errors in human-labeled datasets. In the KITTI tracking benchmark, it flagged instances where a car's occlusion status fluctuated wildly between frames despite no change in the actual scene.

Severe classification inconsistencies detected by STPL, including a pedestrian on the right being misidentified as a 'Car'.

Performance

Our results show that monitoring hundreds of frames with thousands of objects is computationally feasible. For example, checking a complex occlusion requirement on 25 frames with 40 objects took approximately 20 seconds on a standard laptop.

Conclusion and Future Work

STPL offers a rigorous framework for verifying the temporal and spatial consistency of AV perception systems. While the current approach depends on reliable object tracking, future work will focus on integrating probabilistic reasoning to better handle perception uncertainty. Additionally, we are exploring the use of Large Language Models (LLMs) to translate natural language safety rules into formal STPL specifications, making the system more accessible to safety engineers.

Summary updated

Abstract

Automated vehicles (AV) heavily depend on robust perception systems. Current methods for evaluating vision systems focus mainly on frame-by-frame performance. Such evaluation methods appear to be inadequate in assessing the performance of a perception subsystem when used within an AV. In this paper, we present a logic -- referred to as Spatio-Temporal Perception Logic (STPL) -- which utilizes both spatial and temporal modalities. STPL enables reasoning over perception data using spatial and temporal relations. One major advantage of STPL is that it facilitates basic sanity checks on the real-time performance of the perception system, even without ground-truth data in some cases. We identify a fragment of STPL which is efficiently monitorable offline in polynomial time. Finally, we present a range of specifications for AV perception systems to highlight the types of requirements that can be expressed and analyzed through offline monitoring with STPL.
BibTeX
@article{hekmatnejad2024formalizing,
  author = {Mohammad Hekmatnejad and Bardh Hoxha and Jyotirmoy V. Deshmukh and Yezhou Yang and Georgios Fainekos},
  title = {{Formalizing and Evaluating Requirements of Perception Systems for Automated Vehicles using Spatio-Temporal Perception Logic}},
  journal = {Int. J. Robotics Res.},
  year = {2024},
  doi = {10.1177/02783649231223546},
}
Figure