[Paper Review] Proving uniformity and independence by self-composition and coupling
This paper introduces a novel method for formally verifying uniformity and probabilistic independence in probabilistic programs using probabilistic couplings and self-composition within the pRHL program logic. By reducing non-relational properties to relational judgments, the approach enables compositional, event-free reasoning that avoids explicit probability computation, and is formally verified using the EasyCrypt proof assistant with practical case studies including random walks and conditional independence.
Proof by coupling is a classical proof technique for establishing probabilistic properties of two probabilistic processes, like stochastic dominance and rapid mixing of Markov chains. More recently, couplings have been investigated as a useful abstraction for formal reasoning about relational properties of probabilistic programs, in particular for modeling reduction-based cryptographic proofs and for verifying differential privacy. In this paper, we demonstrate that probabilistic couplings can be used for verifying non-relational probabilistic properties. Specifically, we show that the program logic pRHL---whose proofs are formal versions of proofs by coupling---can be used for formalizing uniformity and probabilistic independence. We formally verify our main examples using the EasyCrypt proof assistant.
Motivation & Objective
- To address the challenge of formally verifying uniformity and probabilistic independence in probabilistic programs, which are commonly used but difficult to verify with existing techniques.
- To demonstrate that non-relational probabilistic properties—uniformity and independence—can be expressed and verified as relational properties using probabilistic couplings.
- To provide a compositional, event-free verification method that avoids direct computation of individual event probabilities.
- To formalize and verify the approach using the EasyCrypt proof assistant on realistic examples, including random walks and conditional independence.
- To show that self-composition and coupling enable scalable and modular reasoning for complex probabilistic properties.
Proposed method
- The method reduces uniformity to a relational property by comparing two independent runs of the same program, requiring that the probability of any output value is equal across runs.
- For independence, the method uses self-composition to compare two runs and establishes that joint distributions factorize into marginal distributions via a coupling construction.
- The approach leverages the pRHL logic, where relational judgments express that outputs in two program runs are coupled in a way that preserves desired probabilistic invariants.
- Key technical components include the use of identity couplings for independent samplings and custom bijections to align random variables across runs, enabling correct coupling of distributions.
- The method is implemented and verified using the EasyCrypt proof assistant, with manual construction of self-composed programs and careful invariant discovery.
- The approach supports modular reasoning by allowing the use of structural rules and compositional proof techniques within pRHL.
Experimental results
Research questions
- RQ1Can uniformity of a program variable over a finite set be verified without computing the probability of each individual output?
- RQ2Can probabilistic independence between two variables be established without explicitly computing joint and marginal probabilities?
- RQ3Can non-relational probabilistic properties be expressed and verified using relational proof techniques based on probabilistic couplings?
- RQ4How can self-composition and coupling be systematically applied to formalize uniformity and independence in pRHL?
- RQ5What are the practical challenges and solutions in verifying such properties using interactive proof assistants like EasyCrypt?
Key findings
- The paper successfully formalizes uniformity as a relational property via self-composition, reducing the need to compute individual probabilities for each output value.
- The method enables verification of independence by showing that the joint distribution factors into marginals through a carefully constructed coupling, avoiding direct probability computation.
- The approach was successfully applied to formalize and verify a random walk over a cycle, with a 500-line EasyCrypt proof script, demonstrating scalability.
- Conditional independence in Bayesian network-style programs was formally verified by coupling samplings and reordering instructions to align dependencies across runs.
- The formalization required approximately 1,000 lines of EasyCrypt code, with 90% dedicated to proof infrastructure and invariants, highlighting the complexity of invariant discovery.
- The results show that coupling-based reasoning in pRHL provides a modular and compositional alternative to traditional probability-based verification for uniformity and independence.
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.