Abstract
Modern cyber-physical systems, ranging from IoT protocols to autonomous robots, often operate as "black boxes" with inherent stochasticity. Verifying these systems against formal specifications is a significant challenge, as traditional Black-Box Checking (BBC) methods are typically designed for deterministic environments. This paper introduces ProbBBC, a framework that combines active Markov Decision Process (MDP) learning with probabilistic model checking. By iteratively refining a candidate model through strategy-guided exploration and statistical hypothesis testing, ProbBBC identifies worst-case scenarios and optimal control strategies more efficiently than existing passive learning approaches.
Introduction
As systems become increasingly complex and proprietary, manual modeling becomes infeasible. These systems are often "black boxes" where internal logic is hidden, and "stochastic" because their behavior is influenced by network noise, sensor uncertainty, or randomized algorithms.
Traditional Black-Box Checking (BBC) addresses deterministic systems by learning a state machine and verifying it against specifications. However, extending this to probabilistic systems has proven difficult. Current stochastic verification methods often rely on passive learning—observing the system or using random exploration (e.g., $\epsilon$-greedy sampling). These methods frequently fail to find the actual maximum probability of failure or success, often getting trapped in local optima. ProbBBC addresses this gap by employing an active learning strategy to systematically interrogate the system.
The ProbBBC Framework
ProbBBC operates through a three-phase iterative loop designed to converge on an accurate representation of the System Under Test (SUT) relative to a specific property.
1. Active Learning Phase
Unlike passive methods that wait for transitions to occur, ProbBBC uses the $L^*_{MDP}$ algorithm to actively probe the SUT. By feeding specific input sequences to the system, the learner constructs a candidate MDP model. This systematic approach ensures that the transition functions for explored states are identified with high statistical confidence, preventing the learner from missing rare but critical transitions.
2. Synthesis Phase
Once a candidate MDP model is established, the framework employs Probabilistic Model Checking (PMC) using the PRISM tool. The goal is to synthesize an optimal strategy—a sequence of inputs—that maximizes the probability of satisfying a given Linear Temporal Logic (LTL) formula. This strategy represents the "best-case" or "worst-case" behavior the current model predicts.
3. Validation Phase
The synthesized strategy is then executed on the actual black-box system. ProbBBC uses Student’s t-testing to compare the observed performance of the real system against the model’s predictions. If a statistically significant discrepancy is found, the execution trace serves as a "witness" or counterexample. This witness is fed back into the learning phase to refine the MDP model, initiating a new cycle of improvement.
Experimental Evaluation
The researchers evaluated ProbBBC across eight benchmarks, including communication protocols (MQTT, TCP), randomized consensus protocols (SharedCoin), and robotic navigation tasks (GridWorld). To test scalability, the authors introduced RandomGridWorld, a benchmark designed to evaluate how the tool handles increasing state-space complexity.
Key Results
- Accuracy: ProbBBC consistently produced satisfaction probability estimates that closely matched the "ground truth" (derived from white-box access to the models).
- Efficiency in Sparse Environments: In the
GridWorldLargebenchmark, ProbBBC successfully identified high-probability strategies where the leading baseline,ProbBlackReach, failed entirely. Passive methods often returned a probability of zero because they could not find the goal state through random exploration. - Scalability: The framework successfully handled systems with up to 196 states. While the execution time increases polynomially with system size—consistent with the theoretical complexity of the $L^*$ algorithm—the tool reached near-optimal strategies for the largest models in approximately 3.5 hours.
Insights and Discussion
Active vs. Passive Exploration
The core advantage of ProbBBC lies in its active exploration. By systematically identifying the transition function of each state, $L^*_{MDP}$ avoids the pitfalls of $\epsilon$-greedy sampling, which often misses rare states that are critical for verifying safety or reachability properties.
Strategy-Guided Validation
By focusing validation efforts on the "optimal strategy" found during synthesis, ProbBBC avoids the need to verify the entire model at once. This targeted approach ensures that the most relevant parts of the state space—those that impact the specific LTL property being checked—are refined first.
The Observability Paradox
An interesting finding from the study is that limited observability can occasionally accelerate the learning process. When certain internal states are hidden, the "virtual" state space becomes smaller. This allows the learner to converge on a functional, near-optimal strategy more quickly, even if the resulting model is not a perfect structural replica of the underlying hardware.
Limitations and Future Work
Currently, ProbBBC is optimized for Safety LTL properties—specifications that can be invalidated by a finite sequence of events. It does not yet support "liveness" properties, which describe behaviors that must eventually persist. Additionally, the framework assumes the SUT is a "deterministic MDP," where the resulting state of a probabilistic transition is uniquely identifiable by its output. Future research will focus on extending the framework to handle non-deterministic MDPs (hidden states with identical outputs) and more complex logics such as PCTL*.
Summary updated