Learning Model Checking and the Kernel Trick for Signal Temporal Logic on Stochastic Processes

Luca Bortolussi, Giuseppe Maria Gallo, Jan Kretínský, Laura Nenzi

Introduction

Formal verification of stochastic systems often relies on model checking to ensure adherence to specific properties, typically expressed in Signal Temporal Logic (STL). Traditional probabilistic model checking, while rigorous, suffers from significant scalability issues. Statistical Model Checking (SMC) offers a simulation-based alternative but remains computationally expensive when evaluating a system against a large variety of properties. This paper proposes a "Learning Model Checking" paradigm, utilizing machine learning to predict the satisfaction of STL properties on stochastic processes efficiently.

Problem Formulation

The primary challenge in applying machine learning to formal methods is the symbolic and discrete nature of logic formulae. Standard ML algorithms require numeric vector inputs, whereas STL formulae are structured trees. The authors address the problem of predicting whether a stochastic system satisfies a previously unseen STL property $\phi$ based on experience with a limited set of training properties. This requires a method to embed symbolic logic into a continuous space suitable for regression or classification.

Methodology: The STL Kernel

The core contribution of this work is the development of a novel semantic kernel for STL. Unlike syntactic embeddings that focus on the structure of the formula string, this approach focuses on the behavior of the formula.

Formulae as Functions

An STL formula $\phi$ is treated as a function mapping a system trajectory $x$ to a "robustness" value $\rho(\phi, x) \in \mathbb{R}$. This real number indicates how strongly a property is satisfied (positive) or violated (negative).

The Kernel Trick and Feature Spaces

To compare two formulae $\phi_i$ and $\phi_j$, the authors define a similarity measure (a kernel) based on the inner product of these functions over a space of trajectories. By leveraging the "kernel trick," the model can operate in an implicit, high-dimensional feature space without requiring explicit feature engineering for the symbolic logic.

Illustration of the kernel trick: mapping non-linearly separable data in 2D to a higher-dimensional space where a linear hyperplane can separate the classes.

Implementation Details

  1. Base Measure ($\mu_0$): A system-independent distribution is used to sample trajectories for kernel computation. This allows the kernel to be pre-computed and generalized across different stochastic models without re-training.
  2. Normalized Robustness: To stabilize learning, robustness values are squashed into a $(-1, 1)$ range using a tanh sigmoid function ($\hat{\rho}$), which significantly improves the performance of the learners.
  3. Learning Algorithms: Kernel Ridge Regression (KRR) and Support Vector Regression (SVR) are employed to train predictors on small sets of (formula, satisfaction) pairs.

Experimental Evaluation

The approach was validated across several benchmarks, including synthetic formulae generated via recursive schemes and real-world biological stochastic models such as Immigration (1D), Polymerase (1D), Isomerization (2D), and Transcription (3D). The method was also tested on standardized specifications from the ARCH-COMP 2020 competition.

Key Results

  • Predictive Accuracy: The model achieves over 96% accuracy in predicting Boolean satisfaction across various system dimensions.
  • Computational Efficiency: The entire pipeline—from sampling to training—takes approximately 10 seconds on consumer-grade GPU hardware.
  • Data Parsimony: The system achieves precise predictions with only a few hundred training formulae, making it viable for scenarios where data collection is expensive.
  • Theoretical Soundness: The framework provides Probably Approximately Correct (PAC) guarantees, offering a mathematical bound on the number of samples required for reliable prediction.

Conclusion and Future Work

Learning Model Checking demonstrates that the semantic behavior of STL formulae can be effectively captured using kernel methods. This approach bypasses the limitations of syntactic embeddings and provides a scalable, accurate alternative to traditional verification methods. Future research directions include incorporating Active Learning to optimize training set selection and refining quantitative semantics to better handle logically equivalent formulae.

Summary updated

BibTeX
@inproceedings{bortolussi2022learning,
  author = {Luca Bortolussi and Giuseppe Maria Gallo and Jan Kretínský and Laura Nenzi},
  title = {{Learning Model Checking and the Kernel Trick for Signal Temporal Logic on Stochastic Processes}},
  booktitle = {TACAS},
  year = {2022},
  doi = {10.1007/978-3-030-99524-9\_15},
}
Figure