arXiv:2610.05571cs.LOOct 2026

Manuscript Offprint

arXiv:2610.05571

Scenario-Based Compositional Statistical Model Checking for Safety Specifications

Abhinav Pomalapally, Arya Raeesi, Kevin Kai-Chun Chang, Beyazit Yalcinkaya, Sanjit A. Seshia

Abhinav Pomalapally, Arya Raeesi,

Kevin Kai-Chun Chang, Beyazit Yalcinkaya, and Sanjit A. Seshia

University of California, Berkeley, USA

{abhinav_pomalapally,aryaraeesi}@berkeley.edu

{kaichunchang,beyazit,sseshia}@berkeley.edu

Abstract. In safety-critical domains such as autonomous driving, systems must be evaluated across a large number of environment conditions, often represented as composite scenarios built from primitive scenarios. Existing statistical model checking (SMC) approaches analyze each composite scenario independently, requiring many expensive simulations and resulting in substantial redundant computation when scenarios share common structure. This work introduces a scenario-based compositional SMC framework for safety and co-safety specifications, enabling efficient analysis of composite scenarios. Our approach decomposes scenarios into primitives and specifications into sub-specifications, verifies each primitive independently, and composes the resulting statistical estimates using importance sampling and kernel density estimation. Our empirical evaluation shows that the proposed framework can accurately answer verification queries for previously unseen composite scenarios while reducing simulation cost through parallelization and trace reuse.

Keywords: Statistical Model Checking · Compositional Verification · Scenario-Based Testing · Safety Specifications · Runtime Verification

1 Introduction

Artificial intelligence (AI) systems are increasingly deployed in safety-critical domains, including autonomous driving, robotics, healthcare, and cyber-physical systems in general. As these systems become more pervasive, ensuring their safety and reliability remains a fundamental challenge. However, the complexity of modern AI-based systems renders traditional verification techniques largely inapplicable. Classical formal verification methods typically require an explicit and tractable model of the system under analysis, an assumption that is often violated in contemporary AI systems due to their inherent opacity.

A practical alternative is to treat the system under analysis as a black box and reason about its behavior through simulation-based analysis [20]. This approach is particularly prevalent in autonomous driving, where validating a system through exhaustive real-world testing is infeasible. Instead, developers evaluate autonomous driving systems using a corpus of scenarios, either manually

A. Pomalapally and A. Raeesi et al.

designed by domain experts or extracted from real-world driving data, and assess the system’s performance across these scenarios through repeated simulations.

Statistical model checking (SMC) provides a principled framework for such simulation-based verification [16]. SMC is a formal verification technique that determines whether a stochastic system satisfies a given property within a particular scenario by analyzing a finite set of execution traces using statistical methods such as hypothesis testing or confidence interval estimation. By mitigating the state-space explosion associated with exhaustive model checking, SMC enables verification of systems whose complexity would otherwise make formal analysis intractable. Nevertheless, SMC continues to face significant scalability challenges. Obtaining meaningful and high-confidence verification results often requires executing a large number of computationally expensive, long-running simulations. Moreover, SMC must typically be repeated whenever the scenario defining the environment conditions changes, leading to redundant computation.

In this paper, we introduce a scenario-based compositional SMC framework for safety and co-safety specifications, i.e., specifications whose violation or satisfaction can be determined from finite executions. Our approach leverages both scenario and specification decomposition. Given a composite scenario, we first decompose it into a collection of primitive scenarios. Simultaneously, we decompose the target safety specification into a set of sub-specifications. The black-box system is then evaluated independently on each primitive scenario with respect to all relevant sub-specifications. These verification tasks can be executed in parallel and require shorter simulation runs than the original monolithic verification problem. Finally, we compose the resulting statistical estimates to obtain a verification result for the original composite scenario and specification. Furthermore, our compositional framework enables the reuse of traces generated for primitive scenarios across multiple composite scenarios, thereby avoiding redundant simulation effort and significantly reducing overall verification cost.

We summarize our contributions as follows: (i) we introduce a novel compositional statistical model checking framework for safety and co-safety specifications; (ii) we implement the proposed framework and integrate it into VerifAI [9], a toolkit for the formal design and analysis of AI-based systems; and (iii) we conduct an empirical evaluation of the proposed approach and demonstrate its effectiveness in improving verification efficiency while maintaining accuracy.

Related Work. To address the verification of AI-based systems, simulation-based formal analysis has been widely adopted [20,9,1]. Specifically, statistical model checking (SMC) [18,19,25,26,16,5,27,2] mitigates the state-space explosion of exact formal methods by evaluating a finite set of execution traces, providing probabilistic guarantees bounded by statistical confidence intervals. Seshia et al. [20] advocate for a compositional approach to scale up verification of AI systems. Classic compositional verification (e.g., [6,7,4,14,22]) is not directly applicable to simulation-based verification of AI systems. Existing compositional approaches for AI systems vary in their axes of decomposition; while some frameworks decompose internal system architectures or neural network layers [21,10], our work focuses on the spatial and temporal decomposition of environmental scenarios and specifications.

Dreossi et al. [8] has proposed a framework combining compositional analysis with simulation-based verification, but it focuses strictly on component-level decomposition and targets active falsification rather than SMC. The closest prior work to the proposed framework introduces a compositional approach to SMC [24]. However, it is strictly restricted to Markovian, i.e., memoryless, specifications. Our new framework extends compositional SMC to non-Markovian safety and co-safety specifications, overcoming a fundamental limitation.

Another related line of work explores scenario decomposition, where environments and specifications are divided into primitive segments either spatially [23,13] or temporally [3]. However, these differ significantly in their verification methods: they rely on explicit white-box access [13], offline probabilistic abstractions [23], or remain confined to falsification [3]. In contrast, our framework achieves black-box compositional SMC for safety and co-safety properties.

References (26)