Manuscript Offprint
arXiv:2610.25636Formalization of Rényi Differential Privacy in Isabelle/HOL (Draft version)
Abstract
Differential privacy (DP) is a gold-standard definition of privacy designed to evaluate the privacy guarantee of databases. Rényi differential privacy (RDP) is an important variant of DP that gives tight evaluations of machine learning algorithms. These formulations are easy to understand, but evaluating privacy for actual databases is complicated. Even a small change in the database can break its privacy, and evaluations of DP and RDP themselves are complicated. In particular, RDP evaluations in recent studies have become much harder. Therefore, formal verification of them has been studied for over a decade.
In this paper, we propose an Isabelle/HOL library for formalizing Rényi differential privacy in a general setting. We first formalize RDP for continuous distributions. As a technical basis, we formalize several properties of convex functions and f-divergences for nonnegative convex functions. We formalize basic properties of RDP, conversion laws from RDP to DP, the moment accountants in DP, and the Gaussian mechanism and its RDP. Finally, we discuss the stochastic gradient descent mechanism with Gaussian noise and formalize a rough evaluation of its RDP and DP.
Keywords: Differential Privacy, f-divergence, Rényi divergence, Isabelle/HOL, program verification
1 Introduction
Differential privacy(DP) is a de facto standard definition of privacy for databases with large amounts of individuals' private data [26, 28]. It is already applied in the real world, such as iOS, Google Maps, and the United States census [5, 37, 38]. As notable strengths of DP, it guarantees robustness against any kind of statistical attack, and its composition theorems allow decomposing the evaluation of the privacy guarantee of complex databases into their components' ones.
In the study of machine learning algorithms, privacy-preserving learning algorithms with noise sampled from Gaussian distributions have attracted both industry and academia. To evaluate DP of such Gaussian mechanisms rigorously, variants of differential privacy based on Rényi divergence have become increasingly important. Abadi et al. introduced gradient descent algorithms with Gaussian noise and discussed their moment accountants, which can be captured with Rényi divergences [1]; Bun et al. introduced zero-concentrated differential privacy [20]; Mironov introduced Rényi differential privacy(RDP) [52]. There are many studies on DP and RDP mechanisms.
In general, evaluating DP and RDP for databases is cumbersome. A few, even one-line, changes to database programs can break their differential privacy [49, Sec. 3]. In addition, RDP is much more complicated than DP, and evaluating it is not obvious, even understanding the proofs (For example, the original proof of Lemma 3.12 is complicated). Formal verification of RDP is more important and more complex than that of DP. For these reasons, formal verification of DP and RDP has been studied for over a decade. The first approach is based on Benton's relational Hoare logic [17]. Starting from Barthe et al.'s relational program logic for reasoning about DP [14], many variants are studied [11–13], and extended to support RDP and more general divergences [15, 54, 55].
The second is reformulating DP as the sensitivity of functions between metric spaces. Based on this approach, Gaboardi et al. introduced a linear dependent type system for reasoning about differential privacy [23, 35]. It was applied for automated reasoning [60] and verification of integrity [53].
The third approach is formalizing DP and RDP directly in proof assistants. Tristan et al. proposed the library SampCert for verified implementations of DP and RDP using Lean [24, 61]. It contains the formalization of DP and RDP in the discrete setting and the discrete-Laplace and discrete-Gaussian mechanisms (see also [21]). Feng formalized functions of the OpenDP library [33] in Lean.
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from permissions@acm.org. Conference acronym 'XX, Woodstock, NY
Motivation. To our knowledge, RDP based on the continuous model of probabilistic programs has not been formalized yet. In this paper, we propose an Isabelle/HOL library for semantic-level formal verification of RDPs supporting
© 2018 Copyright held by the owner/author(s). Publication rights licensed to ACM.
ACM ISBN 978-1-4503-XXXX-X/2018/06
https://doi.org/XXXXXXX.XXXXXXX
T. Sato
continuous probability distributions, including Gaussian distributions.
First, the continuous setting is more general than the discrete one. Moreover, Isabelle/HOL’s discrete probability distributions are implemented as measures on discrete spaces.
Second, even in the study of differential privacy in the discrete setting, we might need continuous models. For example, Mironov uses the continuous “ideal mechanism” to verify a secure floating-point implementation of the Laplace mechanism [51]. In addition, many pencil-and-paper proofs on RDP are written in the continuous setting. It is natural and convenient for us to implement them directly.
Finally, the author thought that it must not be so hard to formalize it in the continuous setting. We later formalize that f-divergences (hence RDP) in the continuous setting can be approximated with ones in the discrete setting.
Contribution. In this paper, we give an Isabelle/HOL library for Rényi differential privacy in the continuous setting, and give a formalization of the stochastic gradient descent (SGD) mechanism with Gaussian noise and Poisson subsampling.
For a technical basis, we formalize f-divergence, which is a class of statistical divergences generated by convex functions. We first give formal proofs of several basic properties of convex real functions, such as left and right derivatives and piecewise monotonicity. Then we formalize f-divergence for nonnegative generator functions, and its basic properties such as postprocessing inequality and joint convexity. Furthermore, we formalize an approximation property of f-divergences called approximability, which is a technical basis of the composition theorem of Rényi differential privacy in the general setting.
We then formalize basic properties of RDP, conversion laws from RDP to DP, the moment accountants in DP, and the Gaussian mechanism and its RDP. Finally, we formalize a rough evaluation of RDP and DP of Gaussian SGD.
2.1 Measure theory
A measurable space is a set with a -algebra over which is a nonempty family of subsets of closed under countable unions and complements. For a measurable space , we write and for the underlying set and -algebra, respectively. For simplicity, we often write just for the underlying set . For example, means . As an abuse of notation, we write for the measurable spaces with the Borel algebra, the least -algebra containing all open intervals. A measurable function is a function satisfying for each . A measure on a measurable space is a function having the countable additivity. A measure on is called a probability measure if respectively. We define the sum of two measures on by , and the scaling of measure on with by .
Giry monad. For a measurable space X, we define the measurable space as follows: is the set of probability measures on X, and is the coarsest -algebra making each evaluation mapping ( ) a measurable function of type . The constructor forms a monad called the Giry monad[36]. The unit return is defined by return( where is the Dirac measure on X centered at . For any and , is defined by . We can interpret a probabilistic program as a measurable function . The sequential composition of and can be interpreted by .
Do notation. For better readability, we introduce the syntactic sugars called do notation:
We notice that the Giry monad is commutative. Using do notation, the commutativity is written as follows: for , , and measurable ,
2.2 Measure theory in Isabelle/HOL
The Isabelle/HOL’s standard library contains the formalizations of measure theory and the Giry monad.
The type 'a measure is the type of measure space, that is, the triple consisting of a measurable space and a measure on it. The standard library provides the projections of these components:
Here, ennreal is the type for , and 'a set is the type of all subsets with elements of type 'a.
The type 'a measure is used for both measurable spaces and measures. We sometimes need to distinguish them. For example, borel::real measure is used for the Borel space , and lborel::real measure is for the Lebesgue measure on .
It is different from discrete-Laplace mechanism given in [21]
It is defined by if and otherwise
Precisely, the Lebesgue measure is completion lborel.
The set of measurable functions from X to Y is given by , hence measurability of f is denoted by .
For a measure measure and (borel::real measure) , the integration of f with measure (over a set ) is denoted by (resp. ).
Isabelle/HOL’s standard library contains the formalization of the Giry monad and its commutativity. The components in are provided as the following constants.
prob_algebra :: 'a measure 'a measure measure
return :: 'a measure 'a 'a measure
3 Differential Privacy
Differential privacy(DP) is a statistical definition of privacy introduced by Dwork et al.[26, 28]. Later, Mironov introduced Rényi differential privacy(RDP) [52] in the line of studies about moment accountants in DP to make tight privacy guarantees for Gaussian mechanisms [1, 20]. In this work, we use both kinds of differential privacy. In this section, we give a crash course on differential privacy and the prior study for the formalization of DP in Isabelle/HOL [56, 57].
A basic approach to differential privacy is to prevent distinguishing between a dataset and the dataset plus an individual's data entry x. Thus, differential privacy is based on the adjacency of datasets. For a basic example, and are adjacent if is made by insertion of an entry x to (i.e. ). For another example, two datasets and are adjacent if they are different only in one record, namely, their Hamming distance is 1 (i.e. ). Moreover, for datasets of user-related events, we can discuss two kinds of differential privacy: user-level and event-level (see [29, Sec. 1]). Generally speaking, adjacency can be captured by an adjacency relation between datasets.
Differential privacy assumes queries with noise-adding anonymization and is designed to measure the indistinguishability of noisy outputs from two adjacent datasets. Hence, we formulate a noisy database mechanism as a measurable function where X and Y are the domains of inputs and outputs, respectively. We now give the standard definition of differential privacy (cf. [27]).
Definition 3.1 (Differential Privacy(DP) [30, Def. 2.4]). Let be an adjacency relation, and let and . A database mechanism is -differentially private(DP) if for two adjacent datasets ,
Intuitively, is an upper bound of probability ratio between and , and is an error. When and are small, and are hard to distinguish .
A key feature of DP is the composition theorems, which are a compatibility condition for compositions. For example, we have the following proposition theorem.
Proposition 3.2 (Adaptive composition [30, Thm. B.1]). If is -DP and satisfies that for any , is -DP. then is -DP.
Divergence for DP. The indistinguishability in DP can be reformulated equivalently by a statistical divergence, which is a “distance” between probability distributions. We recall showed in [15, 54, 55]:
We then have that is -DP if and only if holds for all . The above composition theorem and the stability for post-processes are derived from the below composability:
Proposition 3.3 (Composability). Let and . If and for any then .
3.1 Rényi differential privacy
Noise-adding mechanisms with Gaussian distributions (called Gaussian mechanism) are an essential component of privacy-preserving data analysis. However, we cannot avoid errors in its DP evaluations. The Gaussian distribution with average and variance is given by the following probability density function
The noise adding mechanism with can be written by . By the shift property of Gaussian distributions, it is . For , we evaluate the indistinguishability of and for -DP. If then must be , where the ratio between and is unbounded.
Rényi differential privacy(RDP) is a variant of differential privacy introduced by Mironov [52]. Replacing the divergence for DP with the Rényi divergence (of order ) defined as follows, we obtain RDP.
(1 < ).
Here, and are density functions of and with respect to a base measure .
Definition 3.4 (Rényi Differential privacy(RDP) [52, Def. 4]). Let be an adjacency relation, and let and . A database mechanism is -Rényi differentially private(RDP) if holds for any adjacent datasets .
Here, M is also used for the underlying measurable space on M.
In particular, if then .
T. Sato
Rényi divergence satisfies for all , and has the composability.
Lemma 3.5 (Composability [54, Thm. 7]). Let and . If and for any , then .
Postprocessing inequality is just an application of this lemma for and .
The Rényi divergence of Gaussian distributions is simple.
Lemma 3.6 ([52, Prop. 7], modified). For and ,
Basic properties of RDP. From these facts, we obtain basic properties for RDP. We have the composition theorem and the stability for postprocessing.
Proposition 3.7 (Composition theorem [52, Prop. 1]). If is -RDP and satisfies that for any , is -RDP. then is -RDP.
Proposition 3.8 (Postprocessing). If is -RDP then for any , the composition is -RDP.
We also state the RDP of Gaussian mechanism.
Lemma 3.9. Let and , and . The Gaussian mechanism is -RDP, where .
This can be extended easily to multi-dimensional Gaussian mechanism . It is applications of 1-dimensional Gaussian mechanism .
Conversions from RDP to DP. We can convert RDP to DP, comparing the divergences and . We give formal proofs of the following conversion laws.
Lemma 3.10 ([52, Prop. 3]). Assume that is -RDP. For , is -DP.
Lemma 3.11 ([10, Thm. 20], fixed in [6]). If is -RDP then it is -DP for .
Here, is the nonnegative part . The term can be negative, but in that case, we can set . This conversion is known as a standard one.
Lemma 3.12 ([6, Lemma 1]). Assume that is -RDP. For , is -DP where is defined by
\varepsilon=\begin{cases}(\rho+\log(1-\delta))_{+}&1<\alpha\delta\\\min\left(\begin{pmatrix}(\rho-\frac{\log\delta+\log\alpha}{\alpha-1}+\log\left(\frac{\alpha-1}{\alpha}\right)\right)_{+},&\\\frac{1}{\alpha-1}\log\left(\frac{\exp(\rho(\alpha-1))-1}{\alpha\delta}+1\right)&\alpha\delta\leq1\end{pmatrix}\end{cases}This conversion law is the best one we know, but the proof is much harder than the previous two lemmas. We formalize all these conversion laws by using the privacy regions for DP and RDP [10, 44] and reducing the conversion of divergences to the inclusion of privacy regions. We see the details later.
Moment accountants in DP. Rényi divergence of order gives -moment of random variable ( ), which is privacy loss random variable when . Roughly speaking, Rényi divergence can access higher-order moments of privacy loss random variables. Using this, we obtain a tighter DP bound than just applying conversion laws (for fixed ) or advanced composition theorems in DP.
Lemma 3.13 ([2, Sec 3.2], [6, Sec. IV]). Assume , , and . If is -RDP for any then is -DP.
We formalize this lemma using Lemma 3.10. A better (and more challenging to mechanize) bound is given in [6, Sec. IV] using Lemma 3.12. Tracking the proof of Lemma 3.13. It is enough to see -RDP for
Lemma 3.14 (Explicit ver.). Assume that , , K satisfy the condition in Lemma 3.13. If is -RDP then is -DP.
4 DP in Isabelle/HOL
This work rely highly on the formalization of DP in the continuous setting [56, 57]. The library Differential_Privacy contains not only the formalization of DP, but also important constructions for the formalization of statistical divergences. In this work, we use the following three constructions:
Density functions of two measures. In general, in theories on DP and RDP, we often need density functions. For example, as we have seen, Rényi divergence requires a base measure and density functions of with respect to . They can be formulated as Radon-Nikodym derivatives and where is a sigma-finite measure dominating both the and . We remark that the sum is always such a base measure.
The library Differential_Privacy contains the locales for density functions of two measures, and several properties of them. It supports density functions between two probability measures and finite measures, but not subprobability measures. To formalize Rényi divergence instead of DP, we need to overhaul this part (thus we enclose the modified copy of Differential_Privacy in the supplementary material).
Let and be (sigma-)finite measures on X. We say that dominates , or is absolutely continuous with respect to (written ) if .
Measurable spaces of lists. The theory List_Space of Differential_Privacy contains the construction of measurable spaces of finite lists and measurability proofs of list operations. This library contains the constructor
making a measurable space M to the one listM M of lists over M. For example, the space of lists of real numbers is denoted by listM borel. This library contains measurability of list operations. For example, measurability foldl is,
lemma measurable-foldl [measurable]:
assumes [measurable]:
shows
Furthermore, measurability of Cons, map, (@), foldr, foldl, fold, take, drop and nth are provided in similar ways.
Formalization of DP. The library, of course, contains formalizations of DP in the continuous setting. Moreover, it first gives the formalization of divergence and its basic properties, and then formalizes DP.
definition DP-divergence where
DP-divergence
definition DP-inequality where
DP-inequality
definition differential-privacy where
differential-privacy
Here, differential-privacy means that a mechanism is -DP with respect to the adjacency relation adj.
In the library, formalizations of the Laplace mechanism and Report-Noisy-Max mechanism are given. However, the Gaussian mechanism and RDP in the continuous setting are not formalized yet. In this paper, we propose a library for the Gaussian mechanism and RDP, and give a formalization of the gradient descent mechanism with subsampling.
5 f-divergence in Isabelle/HOL
We formalize a class of divergences called -divergences [22, 46] as a technical basis of Rényi divergence. For a given convex function , called a generator function, we define the as follows: for any measurable space and probability measures ,
Here, and are density functions of and with respect to a base measure .
The divergence may not be integrable (it can be ). Technically speaking, the generator function inside the integral is extended by and where is the convex conjugate of .
Here, Rényi divergence can be reformulated by
where the generator function is given by .
In this paper, we formalize -divergences for nonnegative generator functions . It is enough to formalize Rényi divergences since is nonnegative. It is easier to mechanize; we can skip partitioning the positive and negative parts in the integral in . For probability measures, without loss of generality, we then assume that the generator function is nonnegative. For two convex functions , if then . For a general convex , we can choose such that is nonnegative. Therefore, if needed, we can extend basic results of -divergences for nonnegative generator functions to general ones.
In this section, we formalize f-divergences for nonnegative generator functions as follows: we first formalize basic results for generator functions. Then, we formalize f-divergences for nonnegative generator functions and give formal proofs of their basic properties and special properties of f-divergences, which we call continuity and approximability, used in the composability of Rényi divergence.
5.1 Convex real functions
We formalize generator functions and their basic results. For example, such is piecewisely monotone:
-
f is monotone increasing on ,
-
f is monotone decreasing on , or
-
There is such that is monotone decreasing on and is monotone increasing on .
We need it to formalize the well-definedness of the extension . If were two-sided differentiable everywhere on , the proof of piecewise monotonicity would be easy, but it is not in general. Thus, to prove it, we use left and right derivatives instead of two-sided derivatives.
We formalize the existence of left and right derivatives of a convex function ( is a convex open subset of ), their monotonicity, and inequalities about them. For example, ( ):
abbreviation slope-off
lemma convex-right-deriv-slope-upper:
fixes
and
shows
We then formalize the piecewise motonicity.
theorem convex-piecewise-monotone:
fixes
shows (\exists v \in I. \text{antimono-on } (I \cap \{..v\}) f \land \text{mono-on } (I \cap \{v..})
T. Sato
From these lemmas and the Froda theorem (formalized as mono_on_ctble_discont_open in the standard library), every convex real function is differentiable almost everywhere.
lemma convex-differentialble-AE:
fixes assumes cvxf:convex-on If and open I
shows in lborel. f differentiable (at x)
Countable version of Jensen inequality. We also prove a countable version of Jensen inequality: The finite version (C: finite) is already formalized in isabelle/HOL's standard library. We want to support countable infinite C.
lemma convex-on-infsum-real:
fixes and and
assumes convex-on If and open I and (a has-sum 1) C
and ( ) summable-on C (
and ( ) summable-on C
and and
shows
Here, we choose for countable sums instead of , because supports any type of sum though it needs the convergence (written summable), while supports only sums indexed by natural numbers.
5.2 Basics of generator function and extension
We formalize a generator function for f-divergences:
definition generator-F :: (real ⇒ real) ⇒ bool where
generator-Ff ↔ (convex-on {0<..} f)
Thanks to the piecewise monotonicity, the extension of the generator function by is well-defined.
lemma gf-converge-to-0:
assumes generator-Ff
shows ereal. ((ereal o f) f0) (at-right 0)
We now define the extension of by for and , and formalize it as follows:
definition extend-F :: (real ⇒ real) ⇒ (real ⇒ ereal) where
extend-Ff x = (if x < 0 then 0 else if x = 0 then SOME f0. ((ereal o
f) f0) (at-right 0) else ereal (f x))
The definition of extend_F requires the existence of a limit, which we have already proved. For inputs of negative values (outside of ), we set a dummy value of 0.
Next we formalize the extension ( ). We give the convex conjugate .
definition conj-F :: (real ⇒ real) ⇒ (real ⇒ real) where
conj-Ff = (λt. t * f (1 / t))
We then introduce a new function with two arguments for and to formalize the term including the case of . Isabelle HOL's standard library defines to totalize the division operator (/). It is normal in many proof assistants, but not suitable for formalizing . In the definition of -divergence, we use the extension instead of the original .
We define ( ) and , and formalize it is as follows:
definition extend-frac-F :: (real ⇒ real) ⇒ (real ⇒ real ⇒ ereal)
where extend-frac-F f a b = (if a < 0 then undefined
else if b < 0 then undefined
else if a = 0 then b * (extend-F f 0)
else if b = 0 then a * (extend-F (conj-F f) 0) else b * f (a/b))
For a, b ∉ [0, ∞) extend-frac-F a b returns undefined.
Extension of countable Jensen inequality. We formalize a variant of Jensen inequality
using the extension extend-frac-F.
lemma extend-frac-F-convex-on-frac-infsum:
fixes and
assumes gf: generator-Ff
and suma: a summable-on C and sumy: y summable-on C
and and
shows extend-frac-F f (infsum y C) (infsum a C)
extend-frac-F f (y i) (a i))
We use this lemma to formalize approximations of f-divergences, which are important for formalizing Rényi divergence.
The formal proof is done by partitioning into and , and extending the convexity of to ones of and .
5.3 Basics of f-divergence
We now formalize the -divergence for a nonnegative generator function . We use the extension instead of .
definition f-div-pos where
f-div-pos fL MN = . e2ennreal ((extend-frac-Ff) (real-RN-deriv L M x) (real-RN-deriv L N x))
Here, L, M, N are , and respectively. We use extend-frac-F to formalize . real-RN-deriv is construction of density functions (real-valued Radon-Nikodym derivatives) of M and N.
We also formalize the -divergences over a subset .
definition f-div-pos-sub where
f-div-pos-sub fL M N A = ( . e2ennreal ((extend-frac-F f) (real-RN-deriv L M x) (real-RN-deriv L N x)) )
lemma f-div-pos-sub-sp:
shows f-div-pos fL MN = f-div-pos-sub fL MN (space L)
In the formalization of basic properties of , we often formalize ones of .
The nonnegativity is obvious: we consider nonnegative , and density functions are nonnegative. We also formalizet the reversal law .
Well-definedness. We formalize the well-definedness with respect to base measures. The formal proof is based on the following facts. If then . Hence . This implies that -divergence with base measure is equal to the one with base measure .
lemma (in densities-two-measures-finite) -div-pos-well-defined':
assumes gf: generator-Ff and posf: .
shows -div-pos (sum-measure ) -div-pos
Here, the locale densities-two-measures-finite is to give a situation to construct density functions of and with respect to . sum-measure is the sum of and .
-divergence between the same distributions. We have for any . We formalize for finite measure on and , where apply the fact .
Then we formalize by applying .
lemma f-div-pos-sub-refl:
fixes a::real assumes f10: f1 = a and [measurable]:
and sigma-finite-measure L absolutely-continuous L M finite-measure
M sets
shows f-div-pos-sub f L M M A = a * emeasure M A
Joint convexity. We formalize the joint convexity of .
abbreviation conv-measure a M N ≡ sum-measure (scale-measure (ennreal a) M) (scale-measure (ennreal (1 - a)) N)
lemma f-div-pos-joint-convex:
fixes a::real
assumes gf: generator-Ff and posf: .
and cont1: densities-two-measures-finite L M1 N1
and cont2: densities-two-measures-finite L M2 N2
and a:
shows f-div-pos fL (conv-measure a M1 M2) (conv-measure a N1 N2) -div-pos fL M1 N1 + (1-a) * f-div-pos fL M2 N2
5.4 Approximation by measurable partitions
We show two kinds of approximations of -divergences. First, -divergences (over ) can be approximated using finite measurable partitions. In [54], this is called continuity.
We write for the right-hand side, and similarly we can define . We formalize the above equality.
definition f-div-pos-sub-partition where
f-div-pos-sub-partition fL MNA
= Sup
lemma (in densities-two-measures-finite)
f-div-pos-sub-eq-f-div-pos-sub-partition:
fixes
and gf: generator-Ff and posf: .
shows f-div-pos-sub-partition fL MNA = f-div-pos-sub fL MNA
A sketch of formal proof. The formal proof is almost an interpretation of the proof of [54, Thm. 4]. It is combining the piecewise monotonicity of f and the following facts.
Lemma 5.1. holds for countable disjoint family of measurable sets .
Lemma 5.2. if or .
Lemma 5.3. If and satisfies , and is either monotone increasing or decreasing on then .
The overall formal proof spans about 3,300 lines, including formalization of measurable partitions, and exchange between integral and countable sums written in infsum.
We also formalize the following trivial equality
where is ( ). Due to the type system of Isabelle/HOL, we restrict to subset of .
5.5 Approximation on two probability kernels
To prove the composition theorem of RDP, density functions of and for and might be problematic. For example if and , there is no -finite measure dominating all .
To avoid this problem, we approximate . From , can be reduced to finite setting. To reduce the domain , the study [54] shows the following property on -divergence, called approximability.
Lemma 5.4. Let where is finite. There is a family of finite sets and measurable functions and () such that
Again, due to the type system of Isabelle/HOL, we adjust each to subset of when we formalize this lemma.
lemma f-div-pos-sub-approximable:
fixes nat measure and measure and set
assumes finI: finite I and A:
and gf: generator-Ff and posf: .
and meas[measurable]: subprob-algebra (count-space ) subprob-algebra (count-space ) and subprob: space (subprob-algebra ) space (subprob-algebra )
shows set.
T. Sato
A sketch of formal proof. We adjust the proof in [54] to the type system of Isabelle/HOL. First, for measurable functions with , and given , we define and measurable and by , and . By the definition of , and hold.
Second, we extend this result to a family ( ) for finite . Intuitively we take a product where each is given by the first step for .
Third, measurable functions can be converted to a family (). By applying the second construction with for each , we obtain such that and converge uniformly to and respectively. We then convert each to and modify and as expected.
Fourth, we show that for each , (A) and (A) converge to (A) and (A) respectively. We then conclude the main statement easily, because if these limits are 0 then the limiting sequences is 0, 0, ... by construction of .
The overall formal proof spans about 1,500 lines.
Postprocessing inequality. Postprocessing inequality is formalized from the ones of approximability, continuity, and (finite) Jensen inequality for extension .
lemma f-div-pos-postprocessing:
assumes gf: generator-Ff
and posf:
and
and cont1: densities-two-measures-subprobabilistic L MN
and cont2: densities-two-measures K (M h) (N h)
shows f-div-pos fK (M h) (N h) f-div-pos fL MN
We remark here that K does not need to dominate each . It suffices to dominate only two measures and . This implies that the formalization supports general settings: we may replace base measures by sums of appropriate measures.
6 RDP in Isabelle/HOL
6.1 Rényi divergence
We formalize Rényi divergence, based on the reformulation
We recall that the generator function is .
definition Renyi-divergence where
Renyi-divergence L MN
= Renyi-log-part (f-div-pos ( . t powr ) L MN)
abbreviation Renyi-log-part
else if then ereal( ) else
Here, Renyi-log-part is the mapping . In Isabelle's standard formalization, log is defined only for real numbers and set by at 0. To formalize Rényi divergence, we need to introduce the extension . We also introduce to capture Rényi divergence between subprobability measures, and it is convenient that the mapping is then monotone and bijective. The inverse is,
abbreviation inv-Renyi-log-part
else if then ennreal(exp((real-of-ereal z) * ( )) else )
From the well-definedness of , the base measure is dropped from the formalization:
abbreviation Renyi-div ≡ (λα MN. Renyi-divergence α (sum-measure MN) MN)
6.2 RDP in Isabelle/HOL
We now formalize the predicates for RDP in the same way as the formalization of DP [56, 57].
definition Renyi-differential-privacy :: ('a ⇒ 'b measure) ⇒ ('a rel) ⇒ real ⇒ real ⇒ bool where
Renyi-differential-privacy M adj . Renyi-div
Basic properties. We formalize basic properties: zero property, postprocessing inequality (Lemma 3.8), and composition theorem (Lemma 3.7). For example we formalize the composition theorem as follows:
proposition Renyi-differential-privacy-composition-adaptive:
assumes and measM: (subprob-algebra Y)
and RDPM: Renyi-differential-privacy M adj r
and measN: (subprob-algebra Z)
and RDPN: . Renyi-differential-privacy ( . ) adj
and adj (space X) (space X)
shows Renyi-differential-privacy ( . do ) adj
They are proved formalization of the postprocessing inequality and the composability (Lemma 3.5). The formal proof of the composability is based on the proof given in [54]. From the continuity and approximability of -divergences, it suffices to formalize the composability of in the finite discrete setting.
6.3 Gaussian mechanism
We formalize 1-dimensional Gaussian mechanism.
definition Gaussian-dist :: real real real measure where
Gaussian-dist
Here, density lborel (normal-density ) is a formalization of . To show the measurability of it, we apply the continuity of cumulative distribution functions formalized in the AFP entry Error_Function [31]. Formalization of its RDP is rather straightforward.
lemma Renyi-divergence-Gaussian-dist:
fixes assumes and shows Renyi-divergence lborel (Gaussian-dist ) (Gaussian-dist ) =
Multi-dimensional mechanism. We formalize the multi-dimensional Gaussian mechanism : by the following induction.
primrec Gaussian-vec :: nat ⇒ (nat ⇒ real) ⇒ (nat ⇒ real) measure where
Gaussian-vec 0 f = return (count-space {λ-. undefined}) (λ-. undefined)
| Gaussian-vec (Suc k) f = do{ g ← Gaussian-vec k f; v ← Gaussian-dist σ (fk); return (Π_M x∈{0..k}. borel) (g(k := v))}
Formalization of its RDP is just iterating ones of 1-dimensional Gaussian mechanism. We omit it in this paper.
6.4 Conversion to DP
We formalize the three conversion laws from RDP to DP, given by Mironov [52](Lemma 3.10), Balle et al. [10](Lemma 3.11) and Asoodeh et al. [6](Lemma 3.12).
lemma Renyi-differential-privacy-to-DP:
assumes and RDPM: Renyi-differential-privacy adj r
and measM[measurable]: (prob-algebra Y)
and adj: adj (space X) (space X) and
shows differential-privacy adj (if then max ( ) else min (max ( )) ( ))
and differential-privacy adj (max ( ))
and differential-privacy adj ( )
First two conversions are formalized based on the proofs given in [7, 10]. We first formalize the following privacy regions (cf. [44]) for divergences and .
Since in Isabelle/HOL's standard library (we must have ), we need case analyses with to formalize .
definition Region-Renyi :: real ⇒ real ⇒ (real × real) set where
Region-Renyi
We have a core of conversions ([10, Sec. 5.1]):
In the formal proofs of conversion laws, we use this fact inside the proofs. In fact the converse ( ) also holds, but due to the type system of Isabelle/HOL, it is hard to formalize, because of the universal quantifier running over all measurable spaces.
Proof of Lemmas 3.10 and 3.11 are done by taking lines near the boundary of to show the inclusions ( is determined by conversions). They are rather straightforward interpretations of existing proofs.
The proof of Lemma 3.12 given in the original paper [7] is rather complex, but we found that we can rewrite it to proofs using privacy regions, while the authors mentioned that their approach is completely different from Balle et al.'s [10]. Their approach can be understood as follows: instead of showing directly, they prove the inclusion:
They start the proof from the boundary of (just lines) and enable finer evaluations. Our formal proof is based on this fact, which we borrow evaluations in the original proof.
6.4.1 Moment Accountants. We here formalize Lemma 3.13 where we also formalize Lemma 3.14 (explicit version).
lemma Renyi-differential-privacy-moments:
assumes
and
and and
and adj: adj (space X) (space X)
and RDPM: . Renyi-differential-privacy adj ( )
and measM[measurable]: (prob-algebra Y)
shows differential-privacy adj
7 Rough Evaluation of Gaussian SGD
In this section, we formalize the following algorithm, known as the stochastic gradient descent (SGD) mechanism with Gaussian noise. Here is a typical formulation of such Gaussian SGD with subsampling (cf. [1, Alg. 1] and [7, Alg. 1]):
Algorithm 1 Gaussian SGD ( )
1: for do 2: 3: for do 4: 5: 6: 7: 8: end for 9: end for 10: return
Here, is gradient of loss function ; is an initial parameter; is learning rate; is variance of Gaussian noise; is length-limit of gradient; is a dataset; is the size of data; is expected batch size for subsampling; is a number of loops. The subroutine PoissonSampling( ) samples each entry in the dataset independently with probability . We remark that is a random sampling.
T. Sato
7.1 An issue on formalizing tight bounds
This paper gives only a rough evaluation of this mechanism. Our privacy evaluation is probably not tight. We have not formalized a well-known tight evaluation. We try to explain an obstacle to the formalization of a tight privacy guarantee.
The tight evaluations of Gaussian SGD in many prior studies are based on the following lemma.
Lemma 7.1 ([1, Sec. B, Lem. 3]). Let with , and be a sample from where each is chosen independently with probability . Suppose , , and that is integer. Then the mechanism
is -RDP.
We could not formalize this lemma in this form yet. Moreover, for small datasets, we can give a counterexample in a corner case.
Suppose and , and adjacency is determined by Hamming distance. Then adjacent datasets and will be singleton lists and with . Then the results of this mechanism for the datasets () are the following convex sum of probability measures.
Here, is Dirac distribution centered at 0 on . We also assume . Then we evaluate the Rényi divergence between them:
Here ( ) is the density of . The equations are obtained as follows: We take the density functions of ( ) with respect to the sum of and the Borel measure, and unfold the definition of . By splitting the integral in the definition of with and , we conclude the first equation. The second equation is obtained in the same way as in Lemma 3.6.
Then, the inequality is obtained by a simple calculation. Since is quite smaller than 1, the resulting value is greater than . We have this issue regardless of assumptions , .
For another example, Suppose and , and that the adjacency is determined by insertion . Then, we consider and . In similar way as above, we can calculate the resulting Rényi divergences:
Therefore, for both definitions of adjacency, -RDP fails when the datasets are too small, and the initial value is fixed.
The original proof of Lemma 7.1 is based on showing the following inequality:
We must assume a mixture distribution of two Gaussian distributions with the same variance , to cancel the terms of order in the evaluation of the divergence. However, showing the above inequality does not connect well to the evaluation of the entire mechanism, even if we assume that the initial value is also sampled from a Gaussian distribution.
Intuitively, for the insertion adjacency , the distribution in the above inequality indicates the branch that the differing element was not sampled in , and indicates the one that was sampled. In the second branch, from the element , a new random sampling must be added to the total, other than . Hence, the variance of the second branch must be greater than the first one by . Hence, what we need to evaluate is
where and are different (moreover ). We postpone the evaluation of the Rényi divergence between such mixture distributions to future work.
7.2 A rule for subsampled RDP
Privacy amplification by subsampling [1, 9, 63] is an important technique for privacy-preserving mechanisms of large populations. In prior studies, these evaluations are rather complicated, hence formalizing them requires much more work. In this paper, we formalize a simpler (but rough) rule for RDP based on the joint-convexity of Rényi divergence instead. From the joint-convexity of f-divergences,
Lemma 7.2. For , and ,
It gives an evaluation of the amplification of RDP by subsampling as follows: Intuitively, subsampling deletes differing entries in adjacent datasets and with probability . Then the result can be formulated as where and are the results where is deleted and remains, respectively .
We can determine the variance of Gaussian noise making the Gaussian SGD with Poisson subsampling -DP, by combining Lemmas 7.2 and 3.14 and the following lemma.
Lemma 7.3. For ,
This lemma can be proved from the convexity of .
These rules can be mechanized in Isabelle/HOL. For example, we formalize Lemma 7.2 as follows:
lemma (in comparable-finite-measures) Renyi-div-convex-sum2:
assumes a: 1 < (α::real) and b': 0 ≤ (b::real) b ≤ 1
and M2: and (Renyi-div MN)
shows (Renyi-div (conv-measure b M M2) (conv-measure b N M2)) Renyi-log-part (ennreal b * inv-Renyi-log-part R + en-
nreal (1 - b))
7.3 A sketch of formalization
Let’s move on to our formalization. In our formalization, the ratio in Algorithm 1 is abstracted as , and is simplified as . For simplicity we fix , since its distribution is not given in prior studies. We fix for formalization of .
7.3.1 Implementation of programs. We consider datasets consisting of m-dimensional tuples. We formalize the space of m-dimensional tuples as the following Sp.
abbreviation
abbreviation
We then implement Algorithm 1.
We first implement Lines 4–7 of Algorithm 1 (a loop step).
definition SGD-step where
SGD-step
let
let
let
return Sp
}
Next, we implement Lines 3–8 of Algorithm 1(batch loop).
primrec SGD-batch where
SGD-batch [] = (return Sp )
| SGD-batch (x # xs) = (SGD-step x) ( . SGD-batch xs)
Next, we implement the subroutine PoissonSampling(D, b) (Line 2 of Algorithm 1). We assume 0 < b and b < 1.
primrec Poisson-Sample where
Poisson-Sample [] = return (listM M) []
| Poisson-Sample (x#xs) = do{xs2 ← Poisson-Sample xs; c ← bern-dist ; return (listM M) (if c then x # xs2 else xs2)}
abbreviation bern-dist ≡ measure-pmf (bernoulli-pmf b)
Here, M is a measurable space for the domain of data points. A dataset is formalized as space (listM M). The parameter b is the probability of sampling of each data point, and bern-dist is just the coin flip with probability b. We here remind another formulation of convex combinations by coin flips.
lemma bern-dist-conv-measure:
assumes (prob-algebra L)
and (prob-algebra L)
shows do{ c ← bern-dist ; if c then M else N}
= conv-measure b M N
We then implement Lines 3–8 of Algorithm 1.
definition SGD-Poisson where
SGD-Poisson
Finally, we implement the entire mechanism by
primrec SGD-Poisson-iter where
SGD-Poisson-iter
| SGD-Poisson-iter (Suc k)
= do{ ; (SGD-Poisson-iter k)}
7.3.2 Evaluations for DP and RDP. We consider the adjacency with Hamming distance. We formalize a rough evaluation for RDP of SGD-Poisson-iter. Below, HLists is the set of Sp-lists of length N and Hdist is the Hamming distance.
lemma RDP-SGD-Poisson-iter:
assumes a: and
defines
shows Renyi-differential-privacy ( )
Combining this result and formalization of Lemmas 3.14 and 7.3, we can formalize a condition of , C and T to guarantee -DP.
lemma DP-SGD-Poisson-iter:
assumes and and
and cond2:
and cond1:
defines
shows differential-privacy ( )
7.3.3 Sketch of formal proof. We first evaluate RDP of a step of loop (SGD-step). It is a typical Gaussian mechanism, where calculation and clipping of gradient has sensitivity 2C. We just evaluate the Rényi divergence.
lemma Renyi-div-SGD-step:
assumes a: and
shows Renyi-div (SGD-step ) (SGD-step )
T. Sato
We next evaluate the batch loop (SGD-batch) and Poisson subsampling (Poisson-Sample). Both of them have similar structures. For , each of them can be reformulated as bind-iterations of some measurable function and distribution :
From the associativity of the Giry monad bind, we can formalize that each of them preserves appends, hence so does their sequential composition SGD-Poisson:
lemma SGD-Poisson-append:
assumes
shows SGD-Poisson
SGD-Poisson
We now consider the adjacency based on Hamming distance. Then adjacent datasets and are decomposed by and where .
By combining the formalization of RDP of a step of loop, the above append law, and Lemmas 7.2 we obtain.
lemma Renyi-div-SGD-Poisson-conv:
assumes adjacent:
and and
shows Renyi-div (SGD-Poisson xs) (SGD-Poisson ys) Renyi-log-part (ennreal -Renyi-log-part (ereal ) + ennreal )
Finally by applying the composition theorem of RDP T times, we have RDP of the entire Algorithm 1 (RDP-SGD-Poisson-iter).
The formalization of Poisson subsampling costs about 400 lines, and the one of the Algorithm 1 costs about 700 lines.
8 Related Work
Dong et al. propose the concept of f-differential privacy (f-DP), which are modeled with trade-off curves between Type I and Type II errors of hypothesis testing for two adjacent datasets [25]. Recently, Fernandes et al. reformulated it as a Galois connection between trade-off curves and two-row information channels, and gave a simpler proof of the composition theorem of f-DP [34]. There are several related studies for formal verification of probabilistic programs in proof assistants. In Isabelle/HOL, Eberl et al. constructed an executable first-order functional probabilistic programming language [32]. Lochbihler formalized protocols with probabilistic oracles [47]. Basin et al. implemented a framework CryptHOL in for rigorous game-based proofs in cryptography [16]. Hirata et al. developed an extensive Isabelle/HOL library of quasi-Borel spaces [40–42], which is a model for denotational semantics of higher-order probabilistic programming languages with continuous distributions [39, 58]). In Rocq, Bagnall and Stewart embedded MLCERT for formal verification of machine learning algorithms [8]. Affeldt et al. formalized probabilistic programs with continuous random samplings and conditional distributions [3] by formalizing the semantic model based on s-finite kernels [59].
In recent years, Rocq has made significant progress on measure theory: Lebesgue integrations, Fubini-Tonelli theorem, Radon-Nikodym theorem, and the fundamental theorem of calculus for Lebesgue integration [4, 18, 19, 43]. In Lean, Tristan et al. developed an automated measurability prover for probabilistic programs in the continuous setting via reparametrization of the uniform distribution [62]. Also, the Lean Mathlib library is actively updated, and it contains the formalization of basic measure theory (see [50]). Recently Luccioli formalized f-divergence in Lean 4 [48]. The Lean formalization is more elegant than ours, and it covers general generator functions for and the postprocessing inequality of Rényi divergence. However, the composability of Rényi divergence and the approximability of f-divergences are not included in the Lean formalization. Thus, we argue the novelty of our formalization for these results.
We expect that this work will also be useful for users of these proof assistants who want to formalize DP and RDP in the continuous setting. For example, formalizations of the composability of RDP and conversion laws are useful. Also, the users might be able to learn from our formalization what fundamental libraries will be required.
9 Conclusion and Future Work
In this paper, we give an Isabelle/HOL library for Rényi differential privacy in the continuous setting, and give a formalization of the stochastic gradient descent (SGD) mechanism with Gaussian noise and Poisson subsampling. We have formalized conversion laws from RDP to DP, including Asoodeh et al.'s complicated one.
For a technical basis, we formalize f-divergences, which are a class of statistical divergences generated by nonnegative convex functions, and their basic properties. Our formalization is limited to nonnegative generator functions, but it is enough to formalize Rényi divergences.
We formalize the RDP and RDP of Gaussian SGD Poisson subsampling, though the result is limited. During the trial of formalizations, we found a technical gap in a well-known central lemma for the Gaussian mechanism with subsampling. We thus took another approach and give a novel (not good but simple) evaluation of subsampling amplification of Rényi differential privacy.
Overview. We show overview of our formalization in Table 1. We use 18,043 lines in total, including comments.
Future work. A topic of future work is to finish the formalization of f-divergences for general generator functions. The formalization of f-divergence is not novel because of the existing Lean formalization [48], but it might be meaningful to enrich Isabelle/HOL's library.
For another topic, we plan to improve the formalization of the privacy of Gaussian SGD. Our current formalization
Table 1. Overview of formalization (Lines of Code).
| Category | Lines |
|---|---|
| Modification of Differential_Privacy | about 400 |
| Miscellaneous lemmas | 862 |
| Convex functions | 2,361 |
| f-divergences for nonnegative generators | 8,178 |
| Rényi divergence and its composability | 3,203 |
| Gaussian Mechanism, Gaussian SGD | 2,739 |
| Total | 18,043 |
gives a very rough evaluation and is too simple. We recognize that there is a large room for improvement. For example, Asoodeh et al. also give a refinement of the law for moment accountants in DP [2], which is based on Lemma 3.12 [6]. For amplification of RDP by subsampling, Lemma 7.2 might give a better evaluation than [63, Thm. 9] for a large subsampling rate and a small RDP bound of original mechanism, although such a case is not meaningful. Formalization of [63, Thm. 9] and comparison of them is also possible future work.
We also aim to formalize a variant of Gaussian SGD by Lee and Kifer [45], it changes the amount of noise according to gradients and privacy budgets already paid. It might be a good example of the high expressiveness of Isabelle/HOL.
Acknowledgments
Tetsuya Sato was supported by JSPS KAKENHI Grant Number JP24K14893.
References
[1] Martin Abadi, Andy Chu, Ian Goodfellow, H. Brendan McMahan, Ilya Mironov, Kunal Talwar, and Li Zhang. 2016. Deep Learning with Differential Privacy. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security (Vienna, Austria) (CCS '16). Association for Computing Machinery, New York, NY, USA, 308–318. doi:10.1145/2976749.2978318
[2] Martin Abadi, Andy Chu, Ian J. Goodfellow, H. Brendan McMahan, Ilya Mironov, Kunal Talwar, and Li Zhang. 2016. Deep Learning with Differential Privacy. In ACM SIGSAC Conference on Computer and Communications Security, Vienna, Austria, October 24-28, 2016. 308–318. doi:10.1145/2976749.2978318
[3] Reynald Affeldt, Cyril Cohen, and Ayumu Saito. 2023. Semantics of Probabilistic Programs Using S-Finite Kernels in Coq. In Proceedings of the 12th ACM SIGPLAN International Conference on Certified Programs and Proofs (Boston, MA, USA) (CPP 2023). Association for Computing Machinery, New York, NY, USA, 3–16. doi:10.1145/3573105.3575691
[4] Reynald Affeldt and Zachary Stone. 2024. Towards the Fundamental Theorem of Calculus for the Lebesgue Integral in Coq. In 35es Journées Francophones des Langages Applicatifs (JFLA 2024). Saint-Jacut-de-la-Mer, France. https://inria.hal.science/hal-04406350
[5] Apple Inc. 2017. Differential Privacy Overview. https://www.apple.com/privacy/docs/Differential_Privacy_Overview.pdf Accessed: September 12, 2024.
[6] Shahab Asoodeh, Jiachun Liao, Flávio P. Calmon, Oliver Kosut, and Lalitha Sankar. 2020. Three Variants of Differential Privacy: Lossless Conversion and Applications. CoRR abs/2008.06529 (2020). arXiv:2008.06529 https://arxiv.org/abs/2008.06529
[7] Shahab Asoodeh, Jiachun Liao, Flavio P. Calmon, Oliver Kosut, and Lalitha Sankar. 2021. Three Variants of Differential Privacy: Lossless
Conversion and Applications. IEEE Journal on Selected Areas in Information Theory 2, 1 (2021), 208–222. doi:10.1109/JSAIT.2021.3054692
[8] Alexander Bagnall and Gordon Stewart. 2019. Certifying the True Error: Machine Learning in Coq with Verified Generalization Guarantees. Proceedings of the AAAI Conference on Artificial Intelligence 33 (2019), 2662–2669. doi:10.1609/aaai.v33i01.33012662
[9] Borja Balle, Gilles Barthe, and Marco Gaboardi. 2018. Privacy amplification by subsampling: tight analyses via couplings and divergences. In Proceedings of the 32nd International Conference on Neural Information Processing Systems (Montréal, Canada) (NIPS'18). Curran Associates Inc., Red Hook, NY, USA, 6280–6290.
[10] Borja Balle, Gilles Barthe, Marco Gaboardi, Justin Hsu, and Tetsuya Sato. 2020. Hypothesis Testing Interpretations and Renyi Differential Privacy. In Proceedings of the Twenty Third International Conference on Artificial Intelligence and Statistics (AISTATS 2020) (Proceedings of Machine Learning Research, Vol. 108), Silvia Chiappa and Roberto Calandra (Eds.). PMLR, Online, 2496–2506. http://proceedings.mlr.press/v108/balle20a.html
[11] Gilles Barthe, Noémie Fong, Marco Gaboardi, Benjamin Grégoire, Justin Hsu, and Pierre-Yves Strub. 2016. Advanced Probabilistic Couplings for Differential Privacy. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security (Vienna, Austria) (CCS '16). ACM, New York, NY, USA, 55–67. doi:10.1145/2976749.2978391
[12] Gilles Barthe, Marco Gaboardi, Emilio Jesús Gallego Arias, Justin Hsu, Aaron Roth, and Pierre-Yves Strub. 2015. Higher-Order Approximate Relational Refinement Types for Mechanism Design and Differential Privacy. In ACM Symposium on Principles of Programming Languages (Mumbai, India) (POPL '15). ACM, New York, NY, USA, 55–68. doi:10.1145/2676726.2677000
[13] Gilles Barthe, Marco Gaboardi, Benjamin Grégoire, Justin Hsu, and Pierre-Yves Strub. 2016. Proving Differential Privacy via Probabilistic Couplings. In ACM/IEEE Symposium on Logic in Computer Science (New York, NY, USA) (LICS '16). ACM, New York, NY, USA, 749–758. doi:10.1145/2933575.2934554
[14] Gilles Barthe, Boris Köpf, Federico Olmedo, and Santiago Zanella-Béguelin. 2012. Probabilistic Relational Reasoning for Differential Privacy. In ACM Symposium on Principles of Programming Languages (Philadelphia, PA, USA) (POPL '12). ACM, New York, NY, USA, 97–110. doi:10.1145/2103656.2103670
[15] Gilles Barthe and Federico Olmedo. 2013. Beyond Differential Privacy: Composition Theorems and Relational Logic for -divergences between Probabilistic Programs. In Automata, Languages, and Programming: 40th International Colloquium, ICALP 2013, Proceedings, Part II. Springer Berlin Heidelberg, Berlin, Heidelberg, 49–60. doi:10.1007/978-3-642-39212-2_8
[16] David A. Basin, Andreas Lochbihler, and S. Reza Sefidgar, Sefidgar. 2020. CryptHOL: Game-Based Proofs in Higher-Order Logic. Journal of Cryptology 33 (2020), 494–566.
[17] Nick Benton. 2004. Simple Relational Correctness Proofs for Static Analyses and Program Transformations. In Proceedings of the 31st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL '04) (proceedings of the 31st acm sigplan-sigact symposium on principles of programming languages (popl '04) ed.). ACM, 43. https://www.microsoft.com/en-us/research/publication/simple-relational-correctness-proofs-for-static-analyses-and-program-transformations/
[18] Sylvie Boldo, François Clément, Florian Faissole, Vincent Martin, and Micaela Mayero. 2022. A Coq Formalization of Lebesgue Integration of Nonnegative Functions. J. Autom. Reason. 66, 2 (2022), 175–213. doi:10.1007/S10817-021-09612-0
[19] Sylvie Boldo, François Clément, Vincent Martin, Micaela Mayero, and Houda Mouhcine. 2023. A Coq Formalization of Lebesgue Induction Principle and Tonelli's Theorem. In Formal Methods - 25th International
T. Sato
Symposium, FM 2023, Lübeck, Germany, March 6-10, 2023, Proceedings (Lecture Notes in Computer Science, Vol. 14000), Marsha Chechik, Joost-Pieter Katoen, and Martin Leucker (Eds.). Springer, 39–55. doi:10.1007/978-3-031-27481-7_4
[20] Mark Bun and Thomas Steinke. 2016. Concentrated Differential Privacy: Simplifications, Extensions, and Lower Bounds. In Theory of Cryptography - 14th International Conference, TCC 2016-B. 635–658. doi:10.1007/978-3-662-53641-4_24
[21] Clément L. Canonne, Gautam Kamath, and Thomas Steinke. 2021. The Discrete Gaussian for Differential Privacy. arXiv:2004.00010 [cs.DS] https://arxiv.org/abs/2004.00010
[22] I. Csiszár. 1967. Information-type measures of difference of probability distributions and indirect observations. Studia Sci. Math. Hungar. 2 (1967), 299–318.
[23] Arthur Azevedo de Amorim, Marco Gaboardi, Emilio Jesús Gallego Arias, and Justin Hsu. 2014. Really Natural Linear Indexed Type Checking. In Proceedings of the 26nd 2014 International Symposium on Implementation and Application of Functional Languages (Boston, MA, USA) (IFL '14). Association for Computing Machinery, New York, NY, USA, Article 5, 12 pages. doi:10.1145/2746325.2746335
[24] Markus de Medeiros, Muhammad Naveed, Tancrède Lepoint, Temesghen Kahsai, Tristan Ravitch, Stefan Zetzsche, Anjali Joshi, Joseph Tassarotti, Aws Albarghouthi, and Jean-Baptiste Tristan. 2025. Verified Foundations for Differential Privacy. 9, PLDI, Article 191 (June 2025), 25 pages. doi:10.1145/3729294
[25] Jinshuo Dong, Aaron Roth, and Weijie J. Su. 2022. Gaussian Differential Privacy. Journal of the Royal Statistical Society Series B: Statistical Methodology 84, 1 (02 2022), 3–37. doi:10.1111/rssb.12454
[26] Cynthia Dwork. 2006. Differential Privacy. In Automata, Languages and Programming, Michele Bugliesi, Bart Preneel, Vladimiro Sassone, and Ingo Wegener (Eds.). Lecture Notes in Computer Science, Vol. 4052. Springer Berlin Heidelberg, 1–12. doi:10.1007/11787006_1
[27] Cynthia Dwork, Krishnaram Kenthapadi, Frank McSherry, Ilya Mironov, and Moni Naor. 2006. Our data, ourselves: privacy via distributed noise generation. In Proceedings of the 24th Annual International Conference on The Theory and Applications of Cryptographic Techniques (St. Petersburg, Russia) (EUROCRYPT'06). Springer-Verlag, Berlin, Heidelberg, 486–503. doi:10.1007/11761679_29
[28] Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith. 2006. Calibrating Noise to Sensitivity in Private Data Analysis. In Theory of Cryptography, Shai Halevi and Tal Rabin (Eds.). LNCS, Vol. 3876. Springer Berlin Heidelberg, 265–284. doi:10.1007/11681878_14
[29] Cynthia Dwork, Moni Naor, Toniann Pitassi, and Guy N. Rothblum. 2010. Differential privacy under continual observation. In Proceedings of the Forty-Second ACM Symposium on Theory of Computing (Cambridge, Massachusetts, USA) (STOC '10). Association for Computing Machinery, New York, NY, USA, 715–724. doi:10.1145/1806689.1806787
[30] Cynthia Dwork and Aaron Roth. 2013. The Algorithmic Foundations of Differential Privacy. Foundations and Trends® in Theoretical Computer Science 9, 3-4 (2013), 211–407. doi:10.1561/0400000042
[31] Manuel Eberl. 2018. The Error Function. Archive of Formal Proofs (February 2018). https://isa-afp.org/entries/Error_Function.html, Formal proof development.
[32] Manuel Eberl, Johannes Hölzl, and Tobias Nipkow. 2015. A Verified Compiler for Probability Density Functions. In European Symposium on Programming (ESOP 2015) (LNCS, Vol. 9032). Springer, 80–104. doi:10.1007/978-3-662-46669-8_4
[33] Amy Feng. 2026. Verification of OpenDP Transformations. https://dash.harvard.edu/handle/1/42743980
[34] Natasha Fernandes, Annabelle McIver, and Parastoo Sadeghi. 2026. Composition Theorems for f-Differential Privacy. In Foundations of Software Science and Computation Structures, Nathalie Bertrand and Stefan Milius (Eds.). Springer Nature Switzerland, Cham, 462–483. doi:10.1007/978-3-032-22730-0_22
[35] Marco Gaboardi, Andreas Haeberlen, Justin Hsu, Arjun Narayan, and Benjamin C. Pierce. 2013. Linear dependent types for differential privacy. In ACM Symposium on Principles of Programming Languages (POPL'13). 357–370. http://dl.acm.org/citation.cfm?id=2429113
[36] Michèle Giry. 1982. A categorical approach to probability theory. In Categorical Aspects of Topology and Analysis, B. Banaschewski (Ed.). Lecture Notes in Mathematics, Vol. 915. Springer Berlin Heidelberg, 68–85. doi:10.1007/BFb0092872
[37] Ruobin Gong, Erica L. Groshen, and Salil Vadhan. 2022. Harnessing the Known Unknowns: Differential Privacy and the 2020 Census. Harvard Data Science Review Special Issue 2 (jun 24 2022). https://hdsr.mitpress.mit.edu/pub/fgyf5cne.
[38] Miguel Guevara. 2019. Enabling developers and organizations to use differential privacy. (5 September 2019). https://developers.googleblog.com/en/enabling-developers-and-organizations-to-use-differential-privacy/ Accessed: September 12, 2024.
[39] C. Heunen, O. Kammar, S. Staton, and H. Yang. 2017. A convenient category for higher-order probability theory. In 2017 32nd Annual ACM/IEEE Symposium on Logic in Computer Science (LICS). 1–12. doi:10.1109/LICS.2017.8005137
[40] Michikazu Hirata, Yasuhiko Minamide, and Tetsuya Sato. 2022. Program Logic for Higher-Order Probabilistic Programs in Isabelle/HOL. In Functional and Logic Programming, Michael Hanus and Atsushi Igarashi (Eds.). Springer International Publishing, Cham, 57–74.
[41] Michikazu Hirata, Yasuhiko Minamide, and Tetsuya Sato. 2022. Quasi-Borel Spaces. Archive of Formal Proofs (February 2022). https://isa-afp.org/entries/Quasi_Borel_Spaces.html, Formal proof development.
[42] Michikazu Hirata, Yasuhiko Minamide, and Tetsuya Sato. 2023. Semantic Foundations of Higher-Order Probabilistic Programs in Isabelle/HOL. In 14th International Conference on Interactive Theorem Proving (ITP 2023) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 268), Adam Naumowicz and René Thiemann (Eds.). Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl, Germany, 18:1–18:18. doi:10.4230/LIPIcs.ITP.2023.18
[43] Yoshihiro Ishiguro and Reynald Affeldt. 2023. A Progress Report on Formalization of Measure Theory with MathComp-Analysis. In 25th Workshop on Programming and Programming Languages (PPL2023), Nagoya University, March 6–8, 2023. https://staff.aist.go.jp/reynald.affeldt/documents/measure-ppl2023.pdf Conference website: https://jssst-ppl.org/workshop/2023/.
[44] Peter Kairouz, Sewoong Oh, and Pramod Viswanath. 2015. The Composition Theorem for Differential Privacy. In Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, Lille, France, 6-11 July 2015. 1376–1385. http://jmlr.org/proceedings/papers/v37/kairouz15.html
[45] Jaewoo Lee and Daniel Kifer. 2018. Concentrated Differentially Private Gradient Descent with Adaptive per-Iteration Privacy Budget. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining (London, United Kingdom) (KDD '18). Association for Computing Machinery, New York, NY, USA, 1656–1665. doi:10.1145/3219819.3220076
[46] Friedrich Liese and Igor Vajda. 2006. On Divergences and Informations in Statistics and Information Theory. IEEE Transactions on Information Theory 52, 10 (Oct 2006), 4394–4412. doi:10.1109/TIT.2006.881731
[47] Andreas Lochbihler. 2016. Probabilistic Functions and Cryptographic Oracles in Higher Order Logic. In Programming Languages and Systems. Springer Berlin Heidelberg, Berlin, Heidelberg, 503–531. doi:10.1007/978-3-662-49498-1_20
[48] Lorenzo Luccioli. 2024. Formalizing information theory in Lean 4: divergences, hypothesis testing and the data processing inequality. https://amslaurea.unibo.it/id/eprint/32676/
[49] Min Lyu, Dong Su, and Ninghui Li. 2017. Understanding the sparse vector technique for differential privacy. Proc. VLDB Endow. 10, 6 (feb
2017), 637–648. doi:10.14778/3055330.3055331
[50] The mathlib Community. 2024. API Documentation of Lean 4. https://leanprover-community.github.io/mathlib4_docs/ Accessed: September 12, 2024.
[51] Ilya Mironov. 2012. On significance of the least significant bits for differential privacy. In Proceedings of the 2012 ACM Conference on Computer and Communications Security (Raleigh, North Carolina, USA) (CCS '12). Association for Computing Machinery, New York, NY, USA, 650–661. doi:10.1145/2382196.2382264
[52] Ilya Mironov. 2017. Rényi Differential Privacy. In 2017 IEEE 30th Computer Security Foundations Symposium (CSF). 263–275. doi:10.1109/CSF.2017.11
[53] Arjun Narayan, Ariel Feldman, Antonis Papadimitriou, and Andreas Haeberlen. 2015. Verifiable differential privacy. In Proceedings of the Tenth European Conference on Computer Systems (Bordeaux, France) (EuroSys '15). Association for Computing Machinery, New York, NY, USA, Article 28, 14 pages. doi:10.1145/2741948.2741978
[54] Tetsuya Sato, Gilles Barthe, Marco Gaboardi, Justin Hsu, and Shinya Katsumata. 2019. Approximate Span Liftings: Compositional Semantics for Relaxations of Differential Privacy. In 34th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2019. IEEE, 1–14. doi:10.1109/LICS.2019.8785668
[55] Tetsuya Sato and Shin-ya Katsumata. 2023. Divergences on monads for relational program logics. Mathematical Structures in Computer Science 33, 4–5 (2023), 427–485. doi:10.1017/S0960129523000245
[56] Tetsuya Sato and Yasuhiko Minamide. 2025. Differential Privacy. Archive of Formal Proofs (January 2025). https://isa-afp.org/entries/Differential_Privacy.html, Formal proof development.
[57] Tetsuya Sato and Yasuhiko Minamide. 2025. Formalization of Differential Privacy in Isabelle/HOL. In Proceedings of the 14th ACM SIGPLAN
International Conference on Certified Programs and Proofs (Denver, CO, USA) (CPP '25). Association for Computing Machinery, New York, NY, USA, 67–82. doi:10.1145/3703595.3705875
[58] Adam Scibior, Ohad Kammar, Matthijs Vákár, Sam Staton, Hongseok Yang, Yufei Cai, Klaus Ostermann, Sean K. Moss, Chris Heunen, and Zoubin Ghahramani. 2017. Denotational Validation of Higher-order Bayesian Inference. Proc. ACM Program. Lang. 2, POPL, Article 60 (Dec. 2017), 29 pages. doi:10.1145/3158148
[59] Sam Staton. 2017. Commutative Semantics for Probabilistic Programming. In Programming Languages and Systems, Hongseok Yang (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 855–879.
[60] Matías Toro, David Darais, Chike Abuah, Joseph P. Near, Damián Arquez, Federico Olmedo, and Éric Tanter. 2023. Contextual Linear Types for Differential Privacy. ACM Trans. Program. Lang. Syst. 45, 2, Article 8 (may 2023), 69 pages. doi:10.1145/3589207
[61] Jean-Baptiste Tristan. 2024. SampCert : Verified Differential Privacy. doi:10.5281/zenodo.11204806 Accessed: August 22, 2024.
[62] Jean-Baptiste Tristan, Joseph Tassarotti, Koundinya Vajjha, Michael L. Wick, and Anindya Banerjee. 2020. Verification of ML Systems via Reparameterization. arXiv:2007.06776 [cs.LG]
[63] Yu-Xiang Wang, Borja Balle, and Shiva Prasad Kasiviswanathan. 2019. Subsampled Renyi Differential Privacy and Analytical Moments Accountant. In Proceedings of the Twenty-Second International Conference on Artificial Intelligence and Statistics (Proceedings of Machine Learning Research, Vol. 89), Kamalika Chaudhuri and Masashi Sugiyama (Eds.). PMLR, 1226–1235. https://proceedings.mlr.press/v89/wang19b.html
Received 20 February 2007; revised 12 March 2009; accepted 5 June 2009