Abstract
Precisely modeling complex systems like cyber-physical systems is challenging, which often renders model-based system verification techniques like model checking infeasible. To overcome this challenge, we propose a method called LAR to automatically 'verify' such complex systems through a combination of learning, abstraction and refinement from a set of system log traces. Given a safety property and concrete system log traces, LAR automatically learns and refines system models, producing either a counterexample with a bounded probability of being spurious or a probabilistic model upon which the property is verified.
Introduction: The Challenge of Complex System Verification
Traditional formal verification, such as model checking, provides rigorous guarantees for system safety. However, it typically requires a precise mathematical model of the system—a "model-first" requirement that is often impossible to meet for modern Cyber-Physical Systems (CPS). Systems like smart grids or water treatment plants involve complex continuous dynamics and unpredictable environmental interactions that defy manual modeling.
While Statistical Model Checking (SMC) offers a model-free alternative by analyzing system behavior through sampling, it struggles with unbounded properties (e.g., "will the system ever fail?") and fails to produce a reusable model for subsequent analysis. Existing machine learning approaches to learn these models often face a "Goldilocks" problem: the resulting abstractions are either too simplistic to be useful or too complex to be computationally tractable.
The LAR Framework: Learning, Abstraction, and Refinement
To bridge this gap, the authors introduce LAR, a framework that combines probabilistic model learning with an automated refinement loop. LAR operates on an iterative "Counterexample-Guided Abstraction Refinement" (CEGAR) cycle, as illustrated in the following architecture:
The process consists of three main stages:
- Learning with Abstraction: LAR begins with a coarse "predicate abstraction" based on variables relevant to the safety property. It employs the AALERGIA algorithm to transform system logs into a Discrete-Time Markov Chain (DTMC), which serves as a probabilistic model of system transitions.
- Probabilistic Model Checking (PMC): The learned DTMC is checked against the safety property (e.g., "the probability of a critical failure is below 0.001"). If the property holds, the system is considered "verified" relative to the model.
- Refinement via SVM: If the model fails, LAR generates a "counterexample." Since the model is an abstraction, this counterexample might be "spurious" (a false alarm). LAR uses the Sequential Probability Ratio Test (SPRT) to statistically validate the counterexample against the actual system. If spurious, a Support Vector Machine (SVM) analyzes the failure point to discover new logical predicates, refining the abstraction for the next iteration.
Experimental Evaluation
The LAR framework was evaluated against standard PRISM benchmarks (e.g., crowds, egl, nand) and a high-fidelity simulator of a real-world Secure Water Treatment (SWaT) plant. The SWaT system represents a significant challenge, featuring 51 variables and complex physical processes.
Key Results
- Effectiveness: LAR successfully verified all test cases, whereas competing methods like standard AALERGIA or Genetic Algorithm-based learning failed on approximately 50% of the benchmarks due to timeouts or inaccuracies.
- Model Efficiency: By focusing only on property-relevant behavior, LAR produced models that were orders of magnitude smaller. For instance, in the
eglprotocol, LAR generated a 4-state model, while other methods struggled with models exceeding 10,000 states. - Performance: LAR typically reached conclusions in seconds or minutes, significantly outperforming general-purpose learning algorithms.
Insights and Future Directions
A key innovation of LAR is its ability to perform CEGAR without a ground-truth model, substituting the concrete model with statistical sampling of the real system. Furthermore, using SVMs as logic discoverers allows the framework to automatically generate the predicates needed for refinement, a task traditionally requiring human expertise.
However, limitations remain. The current refinement process relies on linear SVMs; highly non-linear system logic may require more sophisticated classifiers. Additionally, the method's success depends on the "adequacy" of system logs to capture core behaviors. Future work aims to extend LAR to handle more complex temporal logics and non-deterministic systems like Markov Decision Processes.
Summary updated