The Best of Times, the Worst of Times: Moment-Based Analysis of Probabilistic Cost Structures
This paper presents a compositional cost analysis for probabilistic programs with hierarchical cost structures, allowing computation of mean and higher moments of non-additive costs.
The paper introduces a compositional cost analysis for probabilistic programs with hierarchical cost structures, which goes beyond existing moment-based analyses for additive costs.
Before reading this…
Applications
- →Contention-resolution protocols
- →Quantum repeaters
- →Fork-join computations
To understand this paper, make sure you know these concepts first:
- Probabilistic programmingfind papers →
- Cost analysisfind papers →
Abstract
More Like ThisThis paper studies how to compute the moments -- mean, variance, and beyond -- of the cost (e.g., running time) of certain probabilistic programs, in which local costs combine not only additively but also via the extremal operations $\max$ and $\min$. Such costs arise naturally -- for instance, the number of rounds of a contention-resolution protocol, the waiting time of a quantum repeater, and the completion time of a fork-join computation -- but fall outside the scope of moment-based analyses developed for additive costs. The difficulty is that $\max$ and $\min$ are nonlinear: the moments of $\max(X, Y)$ are not determined by those of $X$ and $Y$, so propagating moments alone fails. In contrast, propagating full distributions would suffice, but is computationally intractable. We present a compositional cost analysis for a family of probabilistic programs whose cost structure can be represented as a hierarchical cost expression. The analysis proceeds bottom-up through the hierarchical structure, solving local recurrence equations at each node and summarizing each subproblem with a surrogate distribution. Each surrogate consists of an exact short-time prefix and a compact parametric tail. Our approach computes the mean of the cost distribution with a sound error bound, and systematically lifts to second and higher moments. In addition, precision can be increased by refining the surrogate representation, trading additional computation for tighter bounds. We implemented our method in a tool, called DICKENS, and evaluated its capabilities on three problems: quantum repeater waiting times, RFID collision resolution, and completion times of fork-join computations.