NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Bounded Model Checking for Probabilistic Programs

Nils Jansen, Christian Dehnert, Benjamin Lucien Kaminski, Joost-Pieter Katoen, Lukas Westhofen

Abstract

Verifying probabilistic programs is a significant challenge because they often generate infinite-state models, such as parametric Markov Decision Processes (pMDPs). This paper introduces an "on-the-fly" bounded model checking (BMC) approach that successively unrolls programs into finite sub-models. By leveraging the fact that reachability probabilities and expected values grow monotonically during this process, the method provides rigorous lower bounds for complex properties. We evaluate this approach on a variety of benchmarks, demonstrating its scalability and effectiveness in handling conditioning and parameter synthesis.

Introduction

Probabilistic programming has emerged as a powerful paradigm for applications in machine learning, security, and quantum computing. These programs allow developers to draw values from distributions and "condition" outcomes using observations. However, formal verification of such programs is notoriously difficult. A simple loop can lead to an infinite number of states, rendering standard finite-state model checkers like PRISM inadequate. The core challenge lies in automatically proving properties—such as "the program terminates with at least 90% probability"—when the underlying state space is potentially unbounded.

Methodology

Conceptual Framework

The proposed approach addresses the infinite-state problem by constructing finite approximations of the program's behavior. Instead of building the entire model upfront, the system uses an "on-the-fly" strategy to explore the state space incrementally.

Conceptual model of program unrolling into a finite sub-MDP.

Successive Unrolling

The program is executed step-by-step to create a finite sub-Markov Decision Process (sub-MDP). This unrolling process transforms the program's logic into a structured state transition tree, as illustrated below.

Example of successive unrolling of a probabilistic program into a state transition tree.

Core Theoretical Contributions

  1. Monotonicity Theorem: The authors prove that for conditional reachability and expected values, the results obtained from partial models increase monotonically as the unrolling depth increases. This ensures that any lower-bound violation found in a sub-model is a valid violation for the full infinite model.
  2. cpGCL Language: The method targets the conditional probabilistic Guarded Command Language (cpGCL), which supports probabilistic choices, nondeterminism, and observe statements.
  3. Handling Conditioning: The observe statement, which rescales probabilities based on observations, is handled within the BMC framework while maintaining monotonicity.
  4. Parameter Synthesis: The approach extends to parametric programs where probabilities are variables. Using the tool PROPhESY, the method can identify regions in the parameter space where properties are guaranteed to be violated.

Evaluation and Results

Benchmarks

The prototype, built using the Storm model checker, was evaluated on several benchmarks:

  • Crowds Protocol: Anonymity in message routing.
  • Herman Protocol: Self-stabilization in token-passing rings.
  • Robot Navigation: A robot avoiding a moving janitor on a grid.
  • Predator-Prey: Population evolution models.
  • Coupon Collector: A classic randomized algorithm problem.

Key Findings

  • Scalability: The tool successfully analyzed models with over 3 million states and 3.7 million transitions (e.g., in the Crowds protocol).
  • Precision: Often, unrolling just a few steps was sufficient to capture 90% of the actual probability mass.
  • Efficiency: Most benchmarks were verified in under 15 minutes.
  • Parameter Mapping: The tool effectively identified "unsafe" parameter regions for the Crowds protocol, showing how specific forwarding probabilities impact anonymity.

Conclusion and Future Work

This BMC approach provides a robust "semi-algorithm" for verifying probabilistic programs. While it excels at establishing lower bounds, it does not currently provide a definitive "yes" if a property is true but the bound is not reached within the time limit. Future work includes integrating loop invariants to handle infinite unrollings more gracefully and exploring automated program repair to satisfy desired properties.

Summary updated

BibTeX
@inproceedings{jansen2016bounded,
  author = {Nils Jansen and Christian Dehnert and Benjamin Lucien Kaminski and Joost-Pieter Katoen and Lukas Westhofen},
  title = {{Bounded Model Checking for Probabilistic Programs}},
  booktitle = {ATVA},
  year = {2016},
  url = {https://openreview.net/forum?id=Qt86KyiCY4},
}
Figure