Introduction
Probabilistic programs—which extend standard code with the ability to sample random values—are ubiquitous in machine learning, robotics, and network analysis. A fundamental challenge in verifying these programs is calculating the probability that a specific assertion is violated, such as a randomized algorithm exceeding a time limit or a program on unreliable hardware failing.
Historically, researchers relied on concentration inequalities or automata-based approaches to find upper bounds for these probabilities. However, these methods often yield loose bounds and generally cannot compute lower bounds. This paper introduces a novel automated framework to synthesize remarkably tight upper and lower bounds for assertion violation probabilities, often outperforming previous methods by thousands of orders of magnitude.
Formalizing Violation Probabilities via Fixed-Points
The authors pivot away from traditional statistical methods, instead framing the problem using fixed-point theory. They define a "probability transformer function" and prove that the assertion violation probability is its least fixed-point. This unified theoretical view is highly flexible: pre fixed-points are used to establish upper bounds, while post fixed-points establish lower bounds.
As shown in Figure 2, programs are modeled as transition systems where locations (like $\ell_{init}$ and $\ell_{switch}$) represent program states, and edges represent stochastic updates. The goal is to bound the probability of reaching a failure state ($\ell_f$) versus a success state ($\ell_t$).
Automated Synthesis of Exponential Bounds
The authors developed three automated algorithms to synthesize exponential bounds, which are ideal for probabilities that decrease drastically as variables change:
- Sound Polynomial-Time Algorithm (Upper Bounds): This method synthesizes Repulsing Ranking Supermartingales (RepRSMs) and applies Hoeffding’s lemma to generate exponentially decreasing upper bounds.
- Complete Algorithm (Upper Bounds): For affine programs (linear updates and guards), the authors use Minkowski decomposition to translate the problem into a convex optimization task. This algorithm is complete, meaning it is guaranteed to find a near-optimal exponential template if one exists.
- Lower-Bound Algorithm: By assuming the program terminates with probability 1 (almost-sure termination), the authors reduce the lower-bound problem to finding a post fixed-point. They use Jensen’s inequality to relax exponential constraints into linear ones, solvable via Linear Programming.
Figure 4 illustrates a concentration-style benchmark where the analysis bounds the probability that the execution time $t$ exceeds a specific threshold (e.g., $t \le 500$).
Key Results and Impact
The evaluation across diverse benchmarks (Deviation, Concentration, Stochastic Invariants, and Hardware) yielded several major breakthroughs:
- Shattering Previous Bounds: The complete algorithm consistently outperformed previous methods. On the
3DWalkbenchmark, the improvement was an astonishing $1.3 \times 10^{2069}$ times tighter than prior results. - High Efficiency: Despite the theoretical complexity of Minkowski decomposition, the complete algorithm solved every benchmark in under 1.72 seconds.
- Pioneering Lower Bounds: This work provides the first automated algorithm for lower bounds. On hardware benchmarks like
Ref, these automated bounds beat previous manual derivations by factors of up to 4.66x.
Conclusion
By bridging abstract program verification with efficient convex optimization, this research provides a massive leap forward in the quantitative analysis of probabilistic programs. While currently focused on exponential templates for affine programs, the framework lays the groundwork for scaling these analyses to even more complex, non-linear probabilistic systems.
Summary updated