[Paper Review] Proving Expected Sensitivity of Probabilistic Programs
This paper introduces expected f-sensitivity as a generalization of program sensitivity for probabilistic programs, using expectation couplings to formally verify average-case behavior. It presents the relational program logic eRHL, which supports compositional reasoning for properties like algorithmic stability and rapid mixing in Markov chains.
Program sensitivity, also known as Lipschitz continuity, describes how small changes in a program's input lead to bounded changes in the output. We propose an average notion of program sensitivity for probabilistic programs---expected sensitivity---that averages a distance function over a probabilistic coupling of two output distributions from two similar inputs. By varying the distance, expected sensitivity recovers useful notions of probabilistic function sensitivity, including stability of machine learning algorithms and convergence of Markov chains. Furthermore, expected sensitivity satisfies clean compositional properties and is amenable to formal verification. We develop a relational program logic called $\mathbb{E}$pRHL for proving expected sensitivity properties. Our logic features two key ideas. First, relational pre-conditions and post-conditions are expressed using distances, a real-valued generalization of typical boolean-valued (relational) assertions. Second, judgments are interpreted in terms of expectation coupling, a novel, quantitative generalization of probabilistic couplings which supports compositional reasoning. We demonstrate our logic on examples beyond the reach of prior relational logics. Our main example formalizes uniform stability of the stochastic gradient method. Furthermore, we prove rapid mixing for a probabilistic model of population dynamics. We also extend our logic with a transitivity principle for expectation couplings to capture the path coupling proof technique by Bubley and Dyer, and formalize rapid mixing of the Glauber dynamics from statistical physics.
Motivation & Objective
- To formalize a notion of average-case sensitivity for probabilistic programs, generalizing classical sensitivity to handle probabilistic outputs.
- To address the limitations of prior relational logics in reasoning about expected values and compositional verification of probabilistic properties.
- To develop a program logic that supports verification of convergence, stability, and mixing in probabilistic systems using quantitative relational reasoning.
- To enable compositional verification of complex properties such as uniform stability of stochastic gradient methods and rapid mixing in population dynamics.
- To internalize advanced proof techniques like path coupling within a formal logic framework for probabilistic verification.
Proposed method
- Proposes expected f-sensitivity, where the expected distance between outputs from similar inputs is bounded by a function f of the input distance.
- Introduces expectation couplings as a quantitative generalization of probabilistic couplings, enabling reasoning about expected values of distances.
- Designs the relational program logic eRHL, where pre- and post-conditions are expressed using real-valued distances instead of boolean assertions.
- Employs a novel judgment semantics based on expectation couplings to support compositional verification of relational expectations.
- Introduces a transitivity principle for expectation couplings to formalize the path coupling technique from statistical physics.
- Applies the logic to verify non-trivial properties such as uniform stability of stochastic gradient descent and rapid mixing of Glauber dynamics.
Experimental results
Research questions
- RQ1How can classical program sensitivity be generalized to probabilistic programs to reason about average-case output behavior?
- RQ2What logical framework supports compositional verification of expected-value-based relational properties in probabilistic programs?
- RQ3Can advanced proof techniques like path coupling be internalized within a formal program logic for probabilistic verification?
- RQ4How can expectation couplings be used to verify convergence and stability in probabilistic systems such as Markov chains and machine learning algorithms?
- RQ5What are the foundational and practical benefits of using real-valued distances in relational program logics compared to boolean assertions?
Key findings
- Expected f-sensitivity captures algorithmic stability in machine learning, showing that the expected difference in model outputs is bounded by a function of input distance.
- The logic eRHL successfully verifies uniform stability of the stochastic gradient method, a result beyond the reach of prior relational logics.
- The path coupling technique is formalized as a rule in eRHL, enabling direct verification of rapid mixing for the Glauber dynamics in statistical physics.
- Expectation couplings support clean compositional reasoning, allowing modular verification of complex probabilistic properties.
- The framework generalizes and improves upon prior approaches like apRHL and product program analysis by internalizing relational expectations and advanced proof principles.
- The approach enables formal verification of convergence and sensitivity in probabilistic models of population dynamics and Markov chains.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.