Stochastic Variational Smoothed Model Checking

Luca Bortolussi, Francesca Cairoli, Ginevra Carbone, Paolo Pulcini

Introduction

The verification of complex stochastic systems is a critical challenge in domains ranging from synthetic biology to network epidemiology. These systems are often modeled as parametric Continuous Time Markov Chains (pCTMCs), where the goal is to determine the "satisfaction probability"—the likelihood that a system will satisfy a specific property (e.g., a disease dying out within a set timeframe) given a set of parameters. However, as models grow in complexity and dimensionality, traditional verification methods face significant scalability hurdles. This paper introduces Stochastic Variational Smoothed Model Checking (SV-smMC), a framework designed to provide scalable, high-dimensional verification with rigorous statistical guarantees.

The Computational Bottleneck in Parametric Verification

Standard approaches to this problem typically rely on Statistical Model Checking (SMC), which uses Monte Carlo simulations to estimate satisfaction probabilities. While effective for single parameter points, SMC becomes computationally prohibitive when exploring a wide parameter space, as it requires thousands of simulations at every point of interest.

To mitigate this, Smoothed Model Checking (smMC) was developed to interpolate results across the parameter space using machine learning—specifically Gaussian Processes (GPs). By "smoothing" the results from a limited number of simulations, smMC can predict probabilities for unseen parameters. However, the standard inference method for these GPs, Expectation Propagation (EP), scales cubically ($O(N^3)$) with the number of data points. This "memory wall" effectively limits smMC to low-dimensional models and small datasets, rendering it unusable for the high-dimensional systems common in modern research.

SV-smMC: Scaling via Stochastic Variational Inference

SV-smMC addresses these limitations by replacing traditional inference with Stochastic Variational Inference (SVI). This shift transforms the inference problem into a stochastic optimization problem, which offers two transformative advantages:

  1. Linear Scalability: By utilizing mini-batches and GPU acceleration, SVI reduces the computational cost to $O(N)$, allowing the model to process significantly larger datasets than previously possible.
  2. Architectural Flexibility: The framework supports both Gaussian Processes (SVI-GP) and Bayesian Neural Networks (SVI-BNN), allowing researchers to choose the architecture best suited to their specific model complexity.

Ensuring Reliability with Conformal Prediction

A primary concern when using machine learning for formal verification is the reliability of the predictions. While Bayesian methods provide uncertainty estimates (credible intervals), these estimates can be overconfident, particularly when using sparse approximations for speed.

To provide the rigorous guarantees required for safety-critical verification, SV-smMC integrates Inductive Conformal Predictions (ICP). ICP calibrates the model’s uncertainty estimates to provide "Probabilistically Approximately Correct" (PAC) error bounds. This ensures that the true satisfaction probability lies within the predicted range with a user-specified level of confidence, correcting for any inherent overconfidence in the underlying ML model.

Experimental Evaluation

The framework was evaluated against several biology-inspired models and synthetic benchmarks:

  • Network Epidemics (SIR): A 2-parameter model of disease spread.
  • Prokaryotic Gene Expression (PGE): An 11-parameter model of protein synthesis in E. coli.
  • Three-layer Phosphorelay (PR): A 6-parameter model of protein signaling.
  • Random pCTMC: A synthetic benchmark used to test scalability in high-dimensional spaces (up to 20 parameters).

Key Findings

The results demonstrate that SV-smMC significantly outperforms the baseline EP-GP method in several key areas:

  • Scalability and Speed: While the baseline method became unfeasible beyond four dimensions due to memory constraints, SV-smMC scaled gracefully up to 20 dimensions. In high-dimensional scenarios, SV-smMC completed tasks in hours that would have taken days or resulted in system crashes using previous methods.
  • Predictive Accuracy: SV-smMC consistently achieved lower Root Mean Squared Error (RMSE) across the test cases. Notably, Bayesian Neural Networks (SVI-BNN) proved particularly effective in high-dimensional spaces, providing more reliable uncertainty estimates than GPs.
  • Reliability: The integration of Conformal Prediction successfully "corrected" the uncertainty estimates. For instance, while SVI-GP credible intervals sometimes only contained the true value 60% of the time, the SVI-BNN combined with ICP reached an average reliability of approximately 95%.

Conclusion and Future Directions

SV-smMC represents a significant step forward in making the verification of stochastic systems practical for real-world, high-dimensional applications. By combining the optimization power of SVI with the statistical rigor of Conformal Prediction, the framework breaks the $O(N^3)$ barrier without sacrificing trustworthiness.

Future work will explore extending SV-smMC into an active learning framework, where the model autonomously selects the most informative parameter points for simulation. Additionally, researchers aim to apply this methodology to more complex logical properties beyond Signal Temporal Logic (STL), further expanding the reach of automated stochastic verification.

Summary updated

BibTeX
@inproceedings{bortolussi2023stochastic,
  author = {Luca Bortolussi and Francesca Cairoli and Ginevra Carbone and Paolo Pulcini},
  title = {{Stochastic Variational Smoothed Model Checking}},
  booktitle = {RV},
  year = {2023},
  doi = {10.1007/978-3-031-44267-4\_3},
}
Figure