Can Stochastic Gradient Langevin Dynamics Provide Differential Privacy for Deep Learning?
Omitted for submission
Omitted for submission
Abstract —Bayesian learning via Stochastic Gradient Langevin Dynamics (SGLD) has been suggested for differentially private learning.
While previous research provides differential privacy bounds for SGLD at the initial steps of the algorithm or when close to convergence, the question of what differential privacy guarantees can be made in between remains unanswered.
This interim region is of great importance, especially for Bayesian neural networks, as it is hard to guarantee convergence to the posterior.
This paper shows that using SGLD might result in unbounded privacy loss for this interim region, even when sampling from the posterior is as differentially private as desired.
I. I NTRODUCTION
Machine learning models, specifically deep neural networks, achieve state-of-the-art results in various fields such as computer vision, natural language processing, and signal processing (e.g., [1]–[3]).
Training these models requires data, which in some domains, e.g., healthcare and finance, can include sensitive information that should not be made public.
Unfortunately, information from the training data can, in some cases, be extracted from the trained model [4], [5].
One common approach to handle this issue is Differential
Privacy (DP).
DP framework ensures that the distribution of the training output would remain approximately the same when we switch one of the training examples, thus ensuring we cannot extract information specific to a unique individual.
As privacy is usually obtained by adding random noise, it is natural to investigate whether Bayesian inference, which uses a distribution over models, can yield private predictions.
Previous works have shown that sampling from the posterior is differentially private under certain mild conditions [6]– [8].
The main disadvantage of this method is that sampling from the posterior can be challenging.
The posterior generally does not have a closed-form solution, so iterative methods such as Markov Chain Monte Carlo (MCMC), whose sample distribution converges to the posterior, are commonly used.
While theoretical bounds on the convergence of MCMC methods for non-convex problems exist [9], they usually require an infeasible number of steps to guarantee convergence in practice.
Stochastic Gradient Langevin Dynamics (SGLD)
[10] is a popular MCMC algorithm, as it avoids the accept-reject step.
There are good reasons to believe that this specific sampling algorithm can provide private predictions.
First, SGLD returns an approximate sample from the posterior, which can be private.
Second, the SGLD process of stochastic gradient descent with Gaussian noise mirrors the common Gaussian mechanism in DP.
Previous work [6] gives two separate privacy analyses related to SGLD:
The first is based on the Gaussian mechanism and the Advanced Composition theorem [11].
Therefore, it only applies to a limited number of steps and is not connected to Bayesian sampling.
The second is for approximate sampling from the Bayesian posterior, which is only relevant when SGLD nearly converges.
Neither of these results is suitable for deep learning and many other problems: one would limit the model’s accuracy, and the other is unattainable in a reasonable time.
Consequently, the privacy properties of SGLD in the interim region (between these two private sections) remain unknown even though they are of great interest.
Our Contributions:
• We provide a rigorous analysis of a counter-example based on a Bayesian linear regression problem, showing that approximate sampling using SGLD might result in unbounded loss of privacy in the interim region, even if sampling from the posterior is as private as desired.
• We further empirically show that SGLD can result in nonprivate models.
These results imply that special care should be given when using SGLD for private predictions, especially for problems for which it is infeasible to guarantee convergence.
II. R ELATED W ORK
Several previous works investigate the connection between
Bayesian inference and differential privacy [6]–[8], [12]–[15].
None of these papers guarantees SGLD differential privacy in the interim region.
However, the closest work to ours is [6], which specifically investigates stochastic MCMC algorithms such as SGLD.
As mentioned, its analysis only covers the initial phase and when approximate convergence is achieved.
A concurrent work [16] studies the DP guarantees of SGLD under assumptions of convex, Lipschitz, and smooth loss function on a convex set with a bounded diameter.
Under these assumptions, [16] shows a bound over the privacy, which plateaus after a certain number of iterations.
When training machine learning models in a differentially private way via Stochastic Gradient Descent, a common practice is to apply the Gaussian Mechanism by clipping the gradients of the loss with respect to the weights and adding a matching noise (see [17], for example).
SGLD learning
step resembles the resulting learning step but does not include gradients clipping.
Reference [15] suggests incorporating gradient clipping in the SGLD step.
However, clipping the gradients changes the algorithm properties, and it is not obvious if it converges to the posterior.
As such, we do not consider it
SGLD.
Reference [6] circumvents this issue by assuming the log-likelihood of the model is Lipschitz continuous.
Another related work on the privacy of SGLD is [18], although they investigate a weaker type of privacy called membership privacy.
As many of the Bayesian methods’ privacy bounds require sampling from the posterior, if SGLD is to be used, it requires non-asymptotic convergence bounds.
Reference [19] provides non-asymptotic bounds on the approximation error for a smooth and log-concave target distribution by Langevin Monte
Carlo.
Reference [20] studies the non-asymptotic bounds on the error of approximating a target density p ∗ where log p ∗ is smooth and strongly convex.
For the non-convex setting, [21] shows non-asymptotic bounds on the 2-Wasserstein distance between SGLD and the invariant distribution solving It ˆ o stochastic differential equation.
However, the 2-Wasserstein metric is ill-suited for differential privacy - it is easy to create two distributions with 2-Wasserstein distance as small as desired but with disjoint support.
Total Variation (for details about Total Variation, see [22]) is a more suitable distance for working with differential privacy.
Reference [9] examines a target distribution p ∗ , which is strongly log-concave outside of a region of radius R, and where − ln p ∗ is L -Lipschitz.
They provided a bound on the number of steps needed for the Total Variation distance between the distribution at the final step and p ∗ to be smaller than ϵ .
This bound is proportional to O ( e 32 LR 2 dϵ 2 ) , where d is the model dimension.
This result suggests that it is impractical to run SGLD until convergence is guaranteed in the nonconvex setting.
A conclusion from this work is that basing the differential privacy of SGLD on the proximity to the posterior is impractical for non-convex settings.
III. B ACKGROUND A. Differential Privacy
Differential Privacy [11], [23]–[25] is a definition and a framework that enables performing data analysis on a dataset while reducing one’s risk posed by disclosing its personal data to the dataset.
In a nutshell, an algorithm is differentially private if it does not change its output distribution by much due to a single record change in its dataset.
Approximate
Differential Privacy, Definition III.1, is an extension of pure
Differential Privacy, where pure differential privacy is Approximate Differential Privacy with δ = 0 .
Definition III.1.
Approximate Differential Privacy: A randomized algorithm f : D → Range ( f ) is ( ϵ, δ ) -differentially private if ∀ S ⊆
Range ( f ) and ∀ D, ˆ D ∈ D : d ( D, ˆ D ) ≤ 1 eq.
1 holds, where d is the distance between D and ˆ D .
D, ˆ D are called neighboring datasets, and while the metric can change per application, Hamming distance is typically used.
[Equation]
R´enyi Divergence [26], which generalizes the KullbackLeibler divergence, is defined as follows:
Definition III.2.
R´enyi Divergence:
For two probability distributions Z and Q , the R´eyni divergence of order ν > 1 is
[Equation]
Reference [27] suggested a relaxation of differential privacy based on the R´enyi divergence, termed R´enyi
Differential
Privacy:
Definition III.3.
( ν, ϵ )
-RDP: A randomized algorithm f :
D → Range ( f ) is said to have ϵ -R´enyi differential privacy of order ν , or ( ν, ϵ ) -RDP in short, if for any neighbouring datasets D, ˆ D ∈ D eq.
2 holds, where D ν is R´enyi divergence of order ν .
[Equation]
In this paper, we utilize the fact that RDP has a closed-form solution when both f ( D ) and f ( ˆ D ) are Normal distributions (see [28] and the proof of Lemma A.1 in the appendix for details).
ByProposition III.4, RDP guarantees can be translated into approximate differential privacy guarantees.
Proposition III.4.
From RDP to ( ϵ, δ ) -DP
If f is ( ν, ϵ ) -
RDP, it also satisfies ( ϵ + log 1 δ ν − 1 , δ ) -differential privacy for any 0 < δ < 1 .
B. Stochastic Gradient Langevin Dynamics
Stochastic Gradient Langevin Dynamics (SGLD) is an
MCMC method commonly used for Bayesian Inference [10].
Given a Bayesian model parameterized by θ , a dataset D = { x i , y i } ni =1 , a prior distribution p ( θ ) , the likelihood function p ( y i | θ, x i ) , and a batch size b , SGLD can be used for approximate sampling from the posterior p ( θ | D ) .
The update step of
SGLD is shown in eq.
where θ j is the parameter vector at step j , and η j is the step size at step j .
SGLD can be seen as a Stochastic Gradient Descent with Gaussian noise, where the variance of the noise is calibrated to the step size.
[Equation]
A common practice in deep learning is to use cyclic Stochastic
Gradient Descent.
This modification to SGD first randomly shuffles the dataset samples and then cyclically uses the samples in this order.
For optimization, there is empirical evidence that it works as well or better than SGD with reshuffling, and it was conjectured that it converges at a faster rate [29].
CyclicSGLD 1 is the analog of cyclic-SGD for SGLD, where the difference is the use of the SGLD step instead of the SGD step.
For simplicity, we will consider cyclic-SGLD in this work.
While this assumption simplifies the proof, we expect the general behavior to be equivalent.
IV. T HEORETICAL R ESULTS
Our goal is to prove that even when sampling from the posterior is as private as desired, approximate sampling using
SGLD can be as nonprivate as desired in the interim region.
This requires analysing the distribution of SGLD in the interim region, which is hard in the general case.
To circumvent this difficulty, we investigate the Bayesian linear regression problem, where the distributions are a mixture of Gaussians and thus have closed-form expressions.
Our result is summarized in Theorem IV.1.
Theorem IV.1.
∀ 0 < δ < 0 .
5 and ∀ ϵ, ϵ ′ > 0 , there exists a number T , a domain, and a Bayesian inference problem for which a single sample from the posterior distribution is ( ϵ, δ ) differentially private.
However, performing approximate sampling by running SGLD for T steps is not ( ϵ ′ , δ ) differentially private.
The Bayesian inference problem, mentioned in Theorem
IV.1, refers to sampling from the posterior for a dataset and a model defined by likelihood and prior distributions.
The specific model and dataset we will analyse in our work are defined in eq.
4 and eq. 5, respectively.
An example of the behavior described by the theorem is depicted in Fig.
In this case, given the model defined in eq.
4 and the domain defined in eq.
5, a single sample from the posterior is ( ϵ = 0 .
5 , δ = 0 .
001) DP; however, approximate sampling from the posterior by running SGLD for 48 epochs ( T = 48 · dataset size) is not ( ϵ ′ =
38 , δ = 0 .
001) DP (further details for the figure are provided below).
As Theorem IV.1 allows ϵ ′ to be as big as desired and ϵ to be as small as desired, a corollary of Theorem IV.1 is that we could always find a problem for which the posterior is ( ϵ, δ ) differentially private, but there will be a step in which SGLD will result in an unbounded loss of privacy.
Therefore, SGLD alone can not provide any privacy guarantees in the interim region, even if the posterior is private.
Theorem IV.1 is presented and proved for a fixed and equal δ for both the posterior and the SGLD privacy analysis.
This is done for simplicity; however, the proof could be augmented to prove a lower bound on SGLD privacy for all ϵ ′ > 0 and 0 < δ ′ < 0 .
25 (i.e., approximately sampling via SGLD is not ( ϵ ′ , δ ′ )
-DP for all ϵ ′ > 0 and 0 < δ ′ < 0 . 25 ).
To prove our theorem, we consider a Bayesian regression problem for a 1D linear model with Gaussian noise, as defined in eq. 4.
[Equation]
We assume our input domain is
[Equation]
, where x 2 h β > 3 and γ 1 < 12 .
The constants n, c, x l , x h , and γ 1 are parameters of the problem ( c, x l , x h , and γ 1 are used, together with the dataset size - n , to bound the dataset samples to a chosen region).
For every ϵ , ϵ ′ , and δ , we will show the existence of parameters n, c, x l , x h , γ 1 values that have the privacy properties required to prove Theorem
IV.1.
The restrictions on the dataset simplify the proof but are a bit unnatural as it assumes we approximately know c , the parameter we are trying to estimate.
Later we show in subsection IV-C that they can be replaced with a ProposeTest-Release phase.
For simplicity, we will address the problem of sampling (or approximately sampling via SGLD) from the posterior for the model described in eq.
4 and a dataset from domain
D ( n, γ 1 , x h , x l , c ) as a Bayesian linear regression problem on domain D ( n, γ 1 , x h , x l , c ) .
This problem has a closed-form solution for both the posterior distribution and the distribution at each SGLD step, thus enabling us to get tight bounds on the differential privacy in each case.
In essence, our proof shows that for a big enough n , sampling from the posterior is ( ϵ, δ ) differentially private, with ϵ ∼ O
( c 2 n 3 ) .
However, for the same problem instance, there exists an SGLD step in which releasing a sample will not be ( ϵ ′ , δ ) differentially private for ϵ ′ =
Ω( c 2 n 2 ) .
Therefore, for problem instances where c ∼ O ( n 32 √ ϵ ) and n is big enough, sampling from the posterior will be ( ϵ, δ ) differentially private, while there will be an SGLD step in which releasing a sample will not be ( ϵ ′ , δ ) differentially private for ϵ ′ =
Ω( nϵ ) .
We note that the bounds dependend on δ , but since we are using a fixed and equal δ for both the posterior and SGLD privacy analysis, we omit it from the bounds for simplicity.
Fig.
1 depicts a lower bound over the DP of SGLD for the Bayesian Linear Regression Problem on domain
D ( n, γ 1 , x h , x l , c ) .
The values of n, γ 1 , x h , x l , c ensure (0 . 5 , 0 . 001) -DP when sampling from the posterior.
However, we can see that sampling via SGLD in the interim region causes a significant privacy breach (sampling via SGLD at epoch 48 is not (38 , 0 .
001) -DP).
For the derivation of the lower bound in Fig.
1, see subsection A-E in the appendix.
A. Posterior Sampling Privacy
To prove Theorem IV.1, we need to show that sampling from the posterior is private, while there is an SGLD sample that is not private at some intermediate step.
In this section, we prove the first part - that a single sample from the posterior for the Bayesian linear regression problem on domain
D ( n, γ 1 , x h , x l , c ) is differentially private.
We begin by using a well-known result for the closedform solution of the posterior distribution for a Bayesian linear regression problem (see [31] for further details).
By incorporating the parameters of our problem in this result, we get Lemma IV.2.
Lemma IV.2.
The posterior distribution for the model defined in eq.
4 on dataset D
= { ( y i , x i ) } ni
=1 is
[Equation]
As the posterior distribution is a Normal distribution, the
R´enyi divergence between every two posterior distributions has a closed-form solution.
For two neighbouring datasets,
D, ˆ D ∈ D ( n, γ 1 , x h , x l , c ) , and matching posterior distributions p ( θ | D ) =
N ( θ ; µ, σ 2 ) , p ( θ | ˆ D ) =
N ( θ ; ˆ µ, ˆ σ 2 ) , the R´enyi divergence of order ν is
[Equation]
By bounding D ν ( p ( θ | D ) || p
( θ | ˆ D ))
for every two neighbouring datasets, one can prove RDP.
The first and second terms of
D ν
( p ( θ | D )
|| p
( θ | ˆ D )) can be bounded by O ( 1 n ) using Taylor
Theorem and the fact that the natural logarithm is monotonically increasing.
By using direct computation, the third term can be bounded by O (
[Equation]
This gives way to Lemma IV.3.
For the full proof, see subsection
A-B in the appendix.
Lemma IV.3.
For the Bayesian linear regression problem on domain D ( n, γ 1 , x h , x l , c ) , such that n > max { 1 + 10 x 2 h x 2 l νβ , 1 + ν x 2 h x 2 l } , one sample from the posterior is ( ν, ϵ 1 ) -
R´enyi differentially private, and ϵ 1 is
[Equation]
We can show that for c >> n 1+ γ 1 , each of the terms in the right hand side of eq.
7 is bounded by O ( c 2 n 3 ) .
The first term is trivially bounded by O ( 1 n ) .
For the second term, noticing that n 2 γ 1 − 1 = n 2(1+ γ 1) n< c 2 n 3 , we get that it is bounded by O ( c 2 n 3 ) .
As c >> n γ 1 , the third term is bounded by O ( cn γ 1 n 2 ) , and since cn γ 1 n 2 = cn 1+ γ 1 n< c 2 n 3 , the term is bounded by O ( c 2 n 3 ) .
Lastly, since c >> n γ 1 the last term is bounded by O ( c 2 n 3 ) .
Translating the R´enyi differential privacy guarantees of
Lemma IV.3 into approximate differential privacy terms can be done according to Lemma III.4, which gives Lemma IV.4.
Lemma IV.4.
With the conditions of Lemma IV.3, one sample from the posterior is ( ϵ 1 + ln( 1 δ ) ν − 1 , δ ) differentially private.
By choosing ν such that ln( 1 δ ) ν − 1 < ϵ 2 and then choosing n big enough such that ϵ 1 < ϵ 2 , we get that the posterior is ( ϵ, δ ) differentially private.
B. Stochastic Gradient Langevin Dynamics Privacy
To complete the proof of Theorem IV.1, we need to show that given a Bayesian linear regression problem on domain
D ( n, γ 1 , x h , x l , c ) , even if one sample from the posterior is ( ϵ, δ ) differentially private, it does not guarantee SGLD is private in the interim region.
In order to do so, this section will first consider the loss of privacy when using
SGLD for the Bayesian linear regression problem on domain
D ( n, γ 1 , x h , x l , c ) and then, together with the results of section
IV-A, will prove Theorem IV.1.
In order to show that SGLD is not differentially private after initial steps and before convergence, it is enough to find two neighbouring datasets for which the loss in privacy is as big as desired after a certain number of steps.
We define neighbouring datasets
[Equation]
x h , x l , c ) in eq.and consider the Bayesian linear regression problem on Dand D 2 with a learning rate: η
[Equation]
A closed-form solution for the distribution at each step enables us to get a tight lower bound over the differential privacy loss when approximately sampling via SGLD at each step.
For dataset D 1 , the solution is a Normal distribution.
For dataset
D 2 , different shuffling of samples produces different Gaussian distributions, therefore giving a mixture of Gaussians.
We look at cyclic-SGLD with a batch size of 1 and mark by θ j , ˆ θ j the samples on the j ’th SGLD step when using datasets D 1 and D 2 accordingly.
Since D 1 samples are all equal, the update step of the cyclic-SGLD is the same for every step (with different noise generated for each step).
This update-step contains only multiplication by a scalar, addition of a scalar, and addition of Gaussian noise, therefore, together with a conjugate prior results in Normal distribution for θ j :
N ( θ j ; µ j , σ 2 j ) , where µ j , σ j ∈ R .
For D 2 , there is only one sample different from the rest.
We mark by r the index in which this sample is used in the cyclic-SGLD and call this order r -order.
Note that there are only n ( n is the dataset size, defined in eq. 5) different values for r and, as such, effectively only n different samples orders.
Since every order of samples is chosen with the same probability, r is distributed uniformly in { 1 , .., n } .
We mark by ˆ θ rj the sample on the j ’th SGLD step when using rorder.
Since, for a given order, ˆ θ rj is formed by a series of multiplications by a scalar, addition of scalar, and addition of Gaussian noise, and since the prior is also Gaussian, then ˆ θ rj is distributed Normally, N (ˆ θ rj ; ˆ µ rj , (ˆ σ rj ) 2 ) , where ˆ µ rj , ˆ σ rj ∈ R .
As r is distributed uniformly, ˆ θ j distribution mass is distributed evenly between all ˆ θ rj , resulting in a mixture of Gaussians.
Intuitively what will happen is that each Gaussian component, ˆ θ j as well as θ j , will move towards a similar Gaussian posterior.
However, at each epoch, ˆ θ j will drag a bit behind because a single gradient in one of the batches will be smaller.
While this gap can be quite small, for large n , the Gaussians are very peaked with very small standard deviations; thus, they are separate enough that we can easily distinguish between the two distributions.
According to the approximate differential privacy definition (Definition III.1), it is enough to find one set, S , such that p ( θ j ∈ S ) >
e ϵ p (ˆ θ j ∈ S )+ δ , to prove that releasing θ j is not ( ϵ, δ ) private.
We choose S =
{ s | s > µ j } at some step j that we will define later on.
To show that p ( θ j ∈ S ) > e ϵ p
(ˆ θ j ∈ S )
+ δ , we first note that as the Gaussian θ j is symmetric, it is clear that p ( θ j > µ j ) = 1 / 2 .
Now we turn our focus to upper bounding p (ˆ θ j > µ j ) .
This can be done using Chernoff bound, as stated in Lemma
IV.5.
Lemma IV.5.
p
[Equation]
To bound p (ˆ θ j > µ j ) using Lemma IV.5, we first need to lower bound ( µ j − ˆ µ rj ) 2 (ˆ σ rj )for a certain step.
This is done in
Lemma IV.6. Lemma IV.6.
∃ k ∈ Z > {+
+}
such that ( µ ( k +1) n − ˆ µ r ( k +1) n ) 2 (ˆ σ r
k +1) n )
=
Ω( c 2 n 2 ) , for big enough n .
To prove Lemma IV.6, we first find closed-form solutions for ˆ θ r
( k +1) n , θ ( k +1) n distributions (Lemma A.2).
Using the closed-form solutions, we find a lower bound over ( µ ( k +1) n − ˆ µ r ( k +1) n ) 2 as a function of k , which applies for all k (Lemma
A.4).
To upper bound (ˆ σ r ( k +1) n ) 2 , we find an approximation to the epoch in which the data and prior effect on the variance is approximately equal, marked ˙ k .
We choose ( ⌈ ˙ k ⌉ + 1) n as the step in which we will consider the privacy loss and show that (ˆ σ r ( ⌈ ˙ k ⌉ +1) n ) 2 is upper bounded at this step (Lemma A.6).
Using the lower bound on the difference in means and the upper bound on the variance, Lemma IV.6 is proved.
By using the lower bound from Lemma IV.6 in Lemma IV.5, we get Lemma IV.7.
Lemma IV.7.
For the Bayesian linear regression problem over dataset D 1 and n big enough, ∃ T ∈ Z > 0 such that approximate sampling by running SGLD for T steps will not be ( ϵ, δ ) private for ϵ = Ω( c 2 n 2 ) , δ < 0 .
From Lemma IV.4, we see that sampling from the posterior is ( ϵ, δ ) differentially private for ϵ
=
O
( c 2 n 3 ) .
From Lemma
IV.7, we see that for SGLD, there exists a step in which releasing a sample will not be ( ϵ ′ , δ ) differentially private for ϵ ′ =
Ω( c 2 n 2 ) .
Therefore, for problem instances where c
= O ( n 32 √ ϵ ) , sampling from the posterior will be ( ϵ, δ ) differentially private.
However, there will be an SGLD step in which releasing a sample will not be ( ϵ ′ , δ ) differentially private for ϵ ′ =
Ω( nϵ ) .
Since we can choose n to be big as desired, we can make the lower bound over ϵ ′ as big as we desire it to be.
This completes the proof of Theorem IV.1.
C. Propose Test Sample
Our analysis of the posterior and SGLD is done on a restricted domain - D ( n, γ 1 , x h , x l , c ) .
These restrictions over the dataset simplify the proof but are a bit unnatural as they assume we approximately know c , the parameter we are trying to estimate.
This section shows that these restrictions could be replaced with a Propose-Test-Release phase [32] and common practices in data science.
When training a statistical model, it is common to first preprocess the data by restricting it to a bounded region and removing outliers.
After the data is cleaned, the training process is performed.
This is especially important in DP, as outliers can significantly increase the algorithm’s sensitivity to a single data point and thus hamper privacy.
Informally, Algorithm 1 starts by clipping the input to the accepted range.
It then estimates a weighted average of the ratio y
i
x
i (line 16) and throws away outliers that deviate too much from it.
The actual implementation of this notion is a bit more complicated because of the requirement to do so privately.
Once the dataset is cleaned, Algorithmprivately verifies that the number of samples is big enough, so the sensitivity of p ( θ | W ) (where W is the cleaned dataset) to a single change in the dataset will be small, therefore making sampling from p ( θ | W ) ( ϵ, δ ) differentially private.
This method is regarded as Propose-Test-Release, where we first propose a bound over the sensitivity, then test if the dataset holds this bound, and finally release the result if so.
1: Input: D = { x i , y i } n 1 i = 2: Parameters: ϵ, δ < 0 .
5 , x l > 0 , x h > x l , α > 0 , β ≥x 2 h , ρ 1 ∈ (1 , 32 ) , ρ 2 ∈ (0 , 12 ) , γ 1 ∈ ( ρ 2 , 12 ) , n 1 ∈ Z >3: for i = 1 , 2 , . . .
, N do 4: x i ← max { x i , x l } 5: x i ← min { x i , x h } 6: y
i ← max { y i , 0 } 7: end for 8: l 1 ← sample from Laplace (0 , 1 ϵ ) 9: ˘ n 1 ← n 1 − 1 ϵ log 12 δ + l10:
V = { x i , y i | y
i x i ≤ ˘ n ρ 1 1 } 11: l 2 ← sample from Laplace (0 , 1 ϵ ) 12: n 2 ← | V | − 1 ϵ log 12 δ + l
if n 2 ≤ 1 then 14: return null 15: end if 16: m ← (cid:80) ( xi,yi ) ∈
V x i y i
(cid:80) ( xi,yi )
∈
V x 2 i 17: l 3 ← sample from Laplace (0 , 1 ϵ ˘ n ρ 1 1 2( n 2 − 1) x
2 h x 2 l + x 4 h n 2 ( n 2 − 1) x 4 l ) 18: ˘ m ← m + l19: W ← { ( x i , y i ) : | y
i x i − ˘ m | ≤ n ρ 2 2 } 20: l 4 ← sample from Laplace (0 , 1 ϵ ) 21: n W ← | W | − 1 ϵ log( 12 δ ) + l22: if n W < n min then 23: return null 24: end if 25: return sample from p ( θ | W )
In eq.
33 in the appendix, we define n min as the minimum size of W for which the algorithm will sample from p ( θ | W ) with high probability.
We will show later on that this limit ensures that sampling from p ( θ | W ) is ( ϵ, δ ) differentially private.
We define p ( θ | W ) as the posterior of the 1D linear regression model defined in eq.
4 over dataset W .
From Lemma
IV.2, it follows that p ( θ | W ) has the form of p ( θ | W ) =
N ( θ ; µ, σ 2 );
[Equation]
Claim IV.8.
Algorithm 1 is (5 ϵ, 2 δ ) differentially private.
By Claim C.12, lines 8-18 are (3 ϵ, δ ) differentially private.
By Corollary C.17, lines 19-25 are (2 ϵ, δ ) differentially private given ˘ m and n 2 .
Therefore by the sequential composition theorem, the composition is (5 ϵ, 2 δ ) differentially private.
The claim is proved by noticing that if lines 8-25 are private with respect to the updated dataset (after line 7), then they are also private for the original dataset.
Claim IV.9.
When replacing line 25 with approximate sampling via SGLD with step size η = 1 ( α + n 1 x 2 h β ) 2 , there exists
T ( n 1 ) : Z >
→ Z > 0 such that the updated algorithm is not ( ϵ, δ ) differentially private ∀ ϵ ∈ R > 0 , δ < 16 if ran for T ( n 1 ) steps.
Proof sketch (See appendix for full proof).
We analyze a run of Algorithm 1 on the neighbouring datasets, D 3 and D 4 , defined in eq. 9.
First, note that when choosing 1 + ρ 2 > ρ 1 , the sensitivity of ˘ m grows slower than the bound over the distance | y
i
x
i − ˘ m | in n 1 for both of the datasets.
Therefore, with high probability, for n 1 big enough, W will contain all the samples that meet the condition
y i x i
= m .
Consequently, with high probability, the algorithm will reach line 25, which, from our previous analysis over SGLD (see subsection IV-B) will cause an unbounded loss of privacy.
[Equation]
V. E MPIRICAL E VIDENCE
We augment our theoretical analysis with an empirical study on privacy loss when training a deep neural network via
SGLD.
This study strengthens our claim that one should use
SGLD with great care for private learning.
To empirically estimate SGLD’s privacy, we attack it using a version of the adversary instantiation method described in [33], with some modifications to the method’s details.
In broad strokes, we train with SGLD a set of models on each of two neighbouring datasets, D and D ′ .
Then we try to predict for each model on which dataset it was trained.
If the algorithm is DP, it will be hard to distinguish which dataset was used to train the model, and the accuracy will be low.
Concretely, by analyzing the prediction’s false positive and false negative rates, we can deduce a lower bound over the training DP parameters - ( ϵ, δ ) .
To create the neighboring dataset D ′ , we replace one of the samples from D with a novel data point - ( x ∗ , y ∗ ) .
To show SGLD is not private, we need a sample, ( x ∗ , y ∗ ) , such that the models that were not trained on it will misclassify it, but models trained on it will classify it correctly after a small number of epochs.
To create x ∗ , we first train M models, { m } Mi =1 , on dataset
D .
Then, we search for a sample in D , marked ( x 0 , y 0 ) , such that { m } Mi =1 agree on it’s label: ∀ 1 ≤ i, j ≤ M : m i ( x 0 ) =
m j ( x 0 ) .
We then use DeepFool [34] to alter the sample xinto x ∗ such that all the models will misclassify it with regard to their original prediction: ∀ 1 ≤ i ≤ M : m i ( x 0 ) ̸
= m i ( x ∗ ) .
We set y ∗ =
y 0 and D ′ =
D \ { ( x 0 , y 0 ) } ∪ { ( x ∗ , y ∗ ) } .
Given D and D ′ , we generate a dataset, A 1 , of models trained on D and D ′ with equal probability.
We represent a model with parameters θ by four features, p ( y = y ∗ | x ∗ , θ ) , p ( y = y
| x ∗ , θ ) , p ( y = y ∗ | x 0 , θ ) , p ( y = y
| x 0 , θ ) , and train a simple linear classifier.
Finally, we create a second independent test set, A 2 , of models trained on D and D ′ with equal probability and estimate our classifier’s false negative
(FN) and false positive (FP) rates using the examples from
A 2 .
A. Deducing a lower bound over ϵ
To translate the attack results into DP parameters, we follow the analysis approach suggested by [35], [36] and extended by [33].
Without loss of generality, we define false positive as predicting dataset D ′ , when dataset D was used for training a model, and false negative as vice versa.
The probability for FP and FN are marked as P FP and P FN , respectively.
According to [37], if an algorithm is ( ϵ, δ ) -DP, then the following inequalities hold:
[Equation]
These inequalities can easily be translated into a lower bound over ϵ ,
[Equation]
Since we can only estimate P FP and P FN empirically, we use confidence intervals to upper-bound them.
The confidence intervals are calculated using the Clopper-Pearson method [38] on the attack’s false positive and false negative rates.
The resulting upper bounds, P highFP and P highFN , are then used to provide an empirical lower bound on ϵ with high probability:
[Equation]
It is important to note that this method can only prove that a model is not private.
A low value for ϵ emplb does not show the model is private, only that our attack failed to prove a lack of privacy.
B. Results
We performed our attack on the SGLD-based training process of a LeNet5 [39], trained on the MNIST dataset [39].
We tested a learning rate of 0 .
001 2 with a batch size of 4.
We trained a different classifier for each epoch to find a lower bound on the DP at each epoch.
When using Clopper-Pearson [38] confidence intervals, the resulting upper bounds ( P highFP and P highFN ) are limited by the number of experiments conducted, which limits the maximum ϵ emplb .
We used 500 models to train the classifier (i.e., | A 1 | = 500 ) and evaluated the attack on 500 models (i.e., | A 2 | = 500 ), which limits ϵ emplb to a maximum of 4 . 89 .
Fig.
2 depicts lower bounds over ϵ given δ = 10 − 5 , with a confidence value of 90% , i.e., P ( ϵ ≥ ϵ emplb ) ≥ 0 .
9 , as well as the accuracy of the network, as a function of the number of epochs.
It should be emphasized that we show a lower bound over ϵ .
As such, even a small value is sufficient to show that the classifier can reliably infer which of the datasets was used to train the model.
For example, a lower bound of ( δ = 10 − 5 , ϵ = 3) allows a classifier to identify on which dataset a model was trained with an accuracy of 95% ( P highFP = P highFN ≃ 0 . 05 ).
In appendix E, we show the results for SGLD with clipped gradients.
We see that clipping the gradients protects the algorithm from our attack.
As mentioned, an implementation that clips the gradients diverges from SGLD and, as such, has different sampling properties.
Indeed, the results show that this version’s accuracy degrades by 8% compared to SGLD.
B. Posterior Sampling Privacy
This subsection provides proofs for the lemmas provided in subsection IV-A
[Equation]
along with a supporting lemma.
Proof of Lemma IV.2.
Eq.
17 is a known result for the Bayesian inference problem for a linear 1D model with Gaussian noise with a known precision parameter ( β ) and a conjugate prior (see [31] - 3.49-4.51.
for details).
By choosing the basis function to be ϕ ( x ) = x , working in one dimension, and choosing m 0 = 0 , S
= α − 1 , we get the linear model defined in eq.
4 and the matching posterior described in Lemma IV.2.
[Equation]
Lemma A.1.
For a Bayesian linear regression problem on domain D ( n, γ 1 , x h , x l , c ) , such that n > max { 1+10 x 2 h x 2 l
[Equation]
, 1+ ν x 2 h x 2 l } , one sample from the posterior is ( ν, ϵ 1 ) -R´enyi differentially private, and ϵ 1 is
[Equation]
Proof of Lemma A.1.
By Definition III.3, for a single sample from the posterior to be ( ν, ϵ ′ )
RDP, the R´enyi divergence of order ν between any adjacent datasets needs to be bounded.
Therefore, we consider two adjacent datasets, D, ˆ D ∈ D ( n, γ 1 , x h , x l , c ) , and w.l.o.g, define that they differ in the last sample (where it is also allowed to be (0 , 0) for one of them, which saves us the need to consider also a neighbouring dataset with a size smaller by 1).
To ease the already complex and detailed calculations, we use definitions in eq. 18.
[Equation]
According to Lemma IV.2 and with the definitions of eq. 18, the posterior distributions are
[Equation]
Mark by D ν ( f 1 || f 2 ) the R ´ eyni divergence of order ν between f 1 and f 2 - uni-variate normal distributions with means µ 1 , µand variances σ 1 , σ 2 accordingly.
By [28], D ν ( f 1 || f 2 ) is
[Equation]
Therefore, for p ( θ | D ) and p ( θ | ˆ D ) , the R´enyi divergence of order ν is given in eq.
20, where we omit the subscript for ( σ 2 ) ∗ ν since it is clear from context to which distributions it applies.
[Equation]
According to Claim D.23, ( σ 2 ) ∗ ν > 0 ; therefore, the value D ν ( p ( θ | D ) , p ( θ | ˆ D )) exists.
In order to prove R´enyi differential privacy, each of the terms of D ν ( p ( θ | D ) , p ( θ | ˆ D )) is bounded separately, so their sum will be equal to ϵ 1 .
The bounds for each of the terms are proved at Claims D.24, D.25, and D.26.
Proof of Lemma IV.3.
The Lemma is a direct corollary of Lemma A.
Proof of Lemma IV.4.
By Lemma A.1, sampling from the posterior is ( ν, ϵ 1 ) -RDP; therefore, by Lemma III.4, sampling from the posterior is also ( ϵ 1 + ln( 1 δ ) ν − 1 , δ ) differentially private.
This subsection provides proofs for the lemmas presented in subsection
IV-B. The proofs in this section rely heavily on the analysis of the SGLD behaviour for the Bayesian Linear Regression Problem on datasets D 1 , D 2 .
This analysis is provided in subsection A-D.
Proof of Lemma IV.5.
[Equation]
where the inequality holds due to Chernoff bound (For further details about Chernoff bound, see [40]).
Proof of Lemma IV.6.
By Lemma A.7, for n > max { αx 2 h β , αx 2 h β ( e 2 x 2 β − 2) +
[Equation]
− 1 x 2 h β } and ˙ k ∈ R > 0 , eq. 21 holds.
We can see that the lower bound described in eq.
21 is dominated by c 2 n 2 , thus proving Lemma IV.6.
[Equation]
⌈ ˙
[Equation] [Equation]
Proof of Lemma IV.7.
Define ϵ ′ as ϵ ′
[Equation]
α
[Equation]
By Lemma A.9, for n > max { αx 2 h β , αx 2 h β ( e 2 x 2 hβ − 2) + 1 2 x 2 h β , 1 2 αx 2 h β − 1 x 2 h β } , there exists T ∈ Z > 0 (marked in Lemma A. as ( ⌈ ˙ k ⌉ + 1) n ) such that running SGLD for the Bayesian linear regression problem over D 1 for T steps will not be ( ϵ, δ ) differentially private for ϵ < ϵ ′ .
As ϵ ′ is dominated by c 2 n 2 , Lemma IV.7 is proved.
This subsection provides an analysis of SGLD behaviour for the Bayesian Linear Regression Problem on datasets D 1 , D 2 .
We advise the reader to read the lemmas by order and provide here a summary of the analysis: Lemma A.2 provides an expression for the sample at the ( k + 1) n SGLD step when using datasets D 1 , D 2 .
Lemmas A.4 and A.5 use this expression to get a lower bound on the difference in means and an upper bounds on the variance, respectively.
In turn, Lemma A.7 uses these lower and upper bounds to find a lower bound over (cid:16) µ ⌈ ˙ k ⌉ n + n − ˆ µ r ⌈ ˙ k ⌉ n + n (cid:17) 2 / (cid:16) ˆ σ r ⌈ ˙ k ⌉ n + n (cid:17) 2 .
This lower bound is used by Lemma A.8 to upper bound the probability mass of the SGLD process running on dataset D 2 in S
= { s | s > µ j } .
The difference in probability masses in S between the weights of an SGLD running on datasets D 1 and D 2 leads to a breach of privacy, as shown in Lemma A.9.
In order to ease the analysis of the SGLD process for the Bayesian linear regression problem on domain D ( n, γ 1 , x h , x l , c ) , we use the markings in eq. 22.
[Equation] [Equation]
Lemma A.2.
∀ k ∈ Z > 0 , ˆ θ r
( k +1)
n has the following forms:
[Equation]
[Table]
Proof of Lemma A.2.
We can apply the SGLD update rule, defined in eq. 3, to the Bayesian linear regression problem over datasets D 1 and D 2 as follows:
First, p ( θ j ) =
N ( θ j ; 0 , α − 1 ) , and therefore
[Equation]
In a similar manner,
[Equation]
Inserting these expressions to the SGLD update rule yields
[Equation]
By using standard tools for solving first-order non-homogeneous recurrence relations with variable coefficients
[Equation]
the value of ˆ θ 1 n can be found:
[Equation]
Thus
[Equation]
we can define a new series, ˆ θ 1( k +1) n = c 1 ˆ θ 1 kn + c 2 where c
= ˆ λλ n − 1 , c
2 = ˆ ρλ n − 1 + ρ (cid:80) n − 2 i =
λ i + √ ηξ (cid:80) n − 1 i =
λ i .
Using tools for solving first order non-homogeneous recurrence relations with constant coefficients, the value of ˆ θ 1 kn can be found:
[Equation]
n c
[Equation]
+ k
[Equation]
i =
[Equation]
c
[Equation]
c
[Equation]
(cid:33)
= θ
[Equation]
n c k −
[Equation]
+ k (cid:88)
i
[Equation]
c
[Equation]
c k − i= θ 1 n c k − 1+ c
[Equation]
k − 2 (cid:88) i
=
c i 1 = ( θ 0 c 1 + c 2 ) c
k − 1+ ck − 2 (cid:88)
i =
c
i 1 =
[Equation]
(cid:16) ˆ
[Equation]
n
[Equation]
(cid:17)
[Equation]
+ (cid:32)
[Equation]
n
[Equation]
(cid:88)
i
[Equation] [Equation]
(cid:88)
i
[Equation] [Equation]
i (cid:33)
[Equation]
(cid:88)
j = (cid:16) ˆ
[Equation]
n
[Equation]
1 (cid:17) j .
The proof for ˆ θ rkn is done in a similar manner:
[Equation]
Thus, we can define a new series, ˆ θ r> 1 ( k +1) n = c 3 ˆ θ r> 1 kn + c 4 , where c
=
ˆ λλ n − 1 , c 4 = (cid:80)
r − 1 i =1 (cid:0) ρ + √ ηξ (cid:1)
ˆ λλ n − i − 1 + λ n − r (cid:0) ˆ ρ + √ ηξ (cid:1) + (cid:80) nj = r +1 (cid:0)
ρ + √ ηξ (cid:1) λ n − j .
Similarly to ˆ θ 1 kn derivation, we can use first order non-homogeneous recurrence relations with constant coefficients to get:
[Equation]
Lemma A.3.
∀
[Equation]
k +1) n has the following form:
[Equation]
Proof of Lemma A.3.
First, notice that equation 23 applies for SGLD using dataset D 1 .
By using standard tools for solving first-order non-homogeneous recurrence relations, an expression for θ n can be found:
[Equation]
By defining a new series θ ( k +1) n = c 5 θ kn + c 6 and using tools for solving first-order non-homogeneous recurrence relations with constant coefficients, the value of θ kn can be found:
[Equation]
Lemma A.4.
∀ k ∈ Z > 0 , the value of µ kn + n − ˆ µ rkn + n can be lower bounded:
[Equation]
Proof of Lemma A.4.
The proof of this lemma is separated into two cases, for r = 1 and for r > 1 .
For r = 1 , using E [ θ 0 ] =and E [ ξ ] = 0 , it is easy to derive eq.
24 from Lemmas A.2 and A.3.
[Equation]
We use the sum of a geometric sequence to get
[Equation]
−
[Equation]
ˆ λλ n − 1 (cid:17) k
+ 1 − ˆ λλ n −and µ
[Equation]
Therefore the difference between the means can be lower bounded:
[Table]
[Equation]
where equality * holds from Claims D.1, D.2, and D.3, equality ** holds from Claim D.5, and the inequality holds because λ <
ˆ λ < 1 .
This proves Lemma A.4 for r = 1 .
For r > 1 , from Lemma A.2, it is easy to see that
[Equation]
Therefore
[Equation]
Consequently, the difference between the means, for r > 1 , can be lower bounded:
[Table]
+ nx 2 h β (( λ − ˆ λ )
+ λ n − 1 ( 34 η 2 α (1 − ˆ λ k λ k ( n − 1) ))
1 − ˆ λλ n −+ λ k ( n − 1) (ˆ λ k +1 − λ k +1 ))
+ λ n − r
ρ − ˆ ρ )
= ∗∗∗ λ n − r ncx
2 h β α + nx 2 h β λ k ( n − 1) ( λ k +1 − ˆ λ k +1 )(1 − λ r − 1 ) + λ n − r ncx 2 h β α + nxh β (( λ − ˆ λ )
+ λ n − 1 ( 34 η 2 α (1 − ˆ λ k λ k ( n − 1) ))
1 − ˆ λλ n −+ λ k ( n − 1) (ˆ λ k +1 − λ k +1 ))
+ λ n − r
ρ − ˆ ρ )
=
λ n − r ncx 2 h β α
+ nx
2 h
β λ k ( n − 1) ( λ k +1 − ˆ λ k +1 )(1 − λ r − 1 − 1)+ λ n − r ncx 2 h
β α
+ nx 2 h β ( λ − ˆ λ + λ n − 1 ( 34 η 2 α (1 − ˆ λ k λ k ( n − 1) ))
1 − ˆ λλ n −) + λ n − r ( ρ − ˆ ρ ) =
λ n − r ncx 2 h β α
+ nx
2 h
β λ k ( n − 1) (ˆ λ k
+1 − λ k +1 )
λ r − 1 + λ n − r ncx 2 h
β
α
+ nx 2 h β ( λ − ˆ λ + λ n − 1 ( 34 η 2 α (1 − ˆ λ k λ k ( n − 1) ))
1 − ˆ λλ n −) + λ n − r ( ρ − ˆ ρ ) =
λ n − 1 ncx 2 h
β
α
+ nx
2 h
β λ k ( n − 1) (ˆ λ k
+1 − λ k +1 )
+ λ n − r ncx
h β α
+ nx
[Equation]
where equality * holds from Claims D.6 and D.7, equality ** holds from Claim D.10, equality *** holds from Claim D.1, and equality **** holds from Claim D.11 and because ˆ λ > λ .
Lemma A.5.
For all k ∈ Z > 0 such that 0 < k ≤ 12 n log λ (
[Equation]
− 1 , and x 2 h β > 3 , n > max {
[Equation]
2) + 1 2 x 2 h β } , the values of (ˆ σ r ( k +1) n ) 2 can be upper bounded as following:
[Equation]
Proof of Lemma A.5.
The proof will be separated into two cases: r = 1 and r > 1 .
Starting from the case of r = 1 , since the noise and the prior have Normal distributions, (ˆ σ 1 kn + n ) 2 could be easily computed from Lemma A.2.
Eq.
26 yields a first general upper bound on (ˆ σ 1 kn + n ) 2 applicable for all k ∈ Z > 0 .
[Table]
[Equation]
where the inequality holds because λ < ˆ λ .
By Claim D.12, this upper bound can be further refined for 0 < k ≤ 12 n log λ
[Equation]
This proves the lemma for r = 1 .
For r > 1 , (ˆ σ r> 1 kn + n ) 2 can be bounded as follows:
[Equation]
[Table]
[Equation]
where inequality * is true because λ < 1 and r > 1 , inequality ** is true because r ≤ n , and inequality *** is true because of Claim D.15.
For 0 < k ≤ 12 n log λ (
[Equation]
) − 1 , this bound can be further refined:
[Equation]
29) where the inequality is true because of Claims D.12 and D.14, which provide the bound for r > 1 .
be upper bounded as following:
[Equation]
Proof of Lemma A.6.
We prove this lemma by augmenting the proof of Lemma A.5.
We begin with r > 1 .
Lemma A.5 first proved, in eq.
28, a bound over (ˆ σ r> 1 ( k +1) n ) 2 applicable for k > 0 .
As this bound is applicable for all k > 0 , it also applies for ⌈ ˙ k ⌉ .
Then, in eq. 29, Lemma A.5 refined the bound for 0 < k ≤ ˙ k using Claims D.14, D.12 and, D.15.
Therefore, if these claims also hold for k = ⌈ ˙ k ⌉ , then the result of Lemma A.5 also applies to k = ⌈ ˙ k ⌉ .
Claims D.14 and D.12 apply to all k ≤ 12 n log
[Equation]
[Equation]
Since ⌈ ˙ k ⌉ ≤ ˙
[Equation]
=
[Equation]
log
[Equation] [Equation]
− λ
[Equation]
) ) , the claims also apply to ⌈ ˙ k ⌉ .
Claim D.15 was proved for all k , thus also applies to ⌈ ˙ k ⌉ .
For r = 1 , the bound found at eq.
26 is applicable for all k , hence (ˆ σ 1( ⌈ ˙ k ⌉ +1) n ) 2 ≤ (cid:16)
[Equation]
where the last inequality is true because of Claim D.17.
All that is left is to prove that ˙
k
= 12 n log λ (
[Equation] [Equation]
[Equation] [Equation]
) − 1 > 0 , which is done in Claim D.21.
Lemma A.7.
For ˙ k defined in Lemma A.6, the conditions of Lemma A.5, and n > αx 2 h β :
[Equation]
Proof of Lemma A.7.
[Equation]
[Table]
1 ncx 2 h β
[Table]
+ nx 2 h β (cid:16) ˆ λ ⌈ ˙ k ⌉ +1 − λ ⌈ ˙ k ⌉ +
(cid:17)(cid:17)v 1 (cid:16) ˆ λλ n − r (cid:17) 2 1 α (cid:16) ˆ λλ n − 1 (cid:17) 2 ⌈ ˙ k ⌉ = (cid:16) λ n − 1 ncx 2 h β α + nx 2 h β (cid:16) ˆ λ ⌈ ˙ k ⌉ +1 − λ ⌈ ˙ k ⌉ +
(cid:17)(cid:17)v 1 (cid:16) ˆ λλ n − r (cid:17)
α ˆ λ 2 ⌈ ˙ k
⌉ =
[Table]
v
[Table]
(cid:18) ncx 2 h
β
α
+ nx 2 h β (cid:19) 2 (cid:16) ˆ λ ⌈ ˙
k ⌉ +1 − λ ⌈ ˙ k ⌉ +1 (cid:17)ˆ λ 2 ⌈ ˙ k ⌉
+ = αλ 2( r − 1) v(cid:18)
ncx 2 h
β α
+ nx 2 h β (cid:19) 2 (cid:32) 1 − λ ⌈ ˙ k ⌉ + ˆ λ ⌈
˙
k
+ (cid:33)≥
[Table]
v
[Table]
(cid:18) ncx 2 h
β
α
+ nx 2 h β (cid:19) 2 (cid:32) 1 − (cid:32) 1 − 34 nx 2 β
( α + nx 2 h β ) 2 − (cid:0) α + 14 nx 2 β (cid:1) (cid:33)(cid:33)=
[Table]
v(cid:18)
ncx 2 h
β
α
+ nx 2 h β (cid:19) 2 (cid:32)
nx 2 h β ( α + nx 2 h β ) 2 − (cid:0) α + 14 nx 2 β (cid:1) (cid:33)≥ αλ 2( r − 1) v(cid:18) ncx 2 h
β α
+ nx 2 h β (cid:19) 2 (cid:32)
nx 2 β ( α + nx 2 h β )(cid:33)≥ αλ 2( r − 1) v(cid:18) ncx 2 β 2 nx 2 h β (cid:19) 2 (cid:32)
nx 2 β (2 nx 2 β )(cid:33)= αλ 2( r − 1) v(cid:16) c (cid:17) 2 (cid:18)
nx 2 h β (cid:19)= αλ 2( r − 1) v(cid:18)
32 x 2 h β (cid:19) 2 (cid:16) c n (cid:17) 2 ≥ αλ 2( n − 1) v(cid:18)
32 x 2 h β (cid:19) 2 (cid:16) c n (cid:17) 2 ≥ e − 2 x 2 hβ α v(cid:18)
32 x 2 h β (cid:19) 2 (cid:16) c n (cid:17) where first inequality holds from Lemmas A.4 and A.6, and the definition of v 1 , the second inequality is true because of Claim
D.17 and Claim D.21, fourth inequality holds under the assumption of nx 2 h β > α , and the last inequality holds from Claim
D.18.
Claim A.8.
For ˙ k , defined in Lemma A.6, and the conditions of Lemma A.7:
[Equation]
Proof of Claim A.8.
[Equation]
where the first inequality holds due to Lemma IV.5 and second inequality holds due to Lemma A.7.
Lemma A.9.
For the Bayesian linear regression problem over D ( n, γ 1 , x h , x l , c ) , the conditions of Lemma A.7, and ˙ k defined in Lemma A.6, approximate sampling by running SGLD for ( ⌈ ˙ k ⌉ + 1) n steps will not be ( ϵ, δ ) differentially private for
[Equation]
Proof of Lemma A.9.
According to Definition III.1, if there exists a group, S , such that
[Equation]
then releasing θ ( ⌈ ˙ k ⌉ +1) n is not ( ϵ, δ ) differentially private.
We will show that eq. 30 is true for S
= { s | s > µ ( ⌈ ˙ k ⌉ +1) n } and the conditions of the lemma.
First, notice that eq.
30 can be rearranged as
[Equation]
By Claim A.8, and since θ ( ⌈ ˙ k ⌉ +1) n ∼ N ( θ ( ⌈ ˙ k ⌉ +1) n ; µ ( ⌈ ˙ k ⌉ +1) n , σ 2( ⌈ ˙ k ⌉ +1) n ) ,
[Equation]
[Table]
[Equation]
[Table]
[Equation]
Therefore
[Equation]
if
[Equation]
then eq. 30 is true and the lemma is proved.
As shown in eq.
[Equation]
this inequality holds under the conditions of Lemma A.9.
[Equation]
The lower bound depicted in figure 1 is derived by analysing the distributions of SGLD running on datasets D 1 and D(defined in 8).
Given these distributions, and using notations θ j , µ j , ˆ θ j , ˆ µ j , ˆ σ rj (defined in subsection IV-B), the lower bound over ϵ for a given δ can be deduced as follows:
By definition III.1, for SGLD running on datasets D 1 , D 2 to be ( ϵ, δ ) -DP, it must hold
[Equation]
This condition can be easily translated to a lower bound over ϵ :
[Equation]
By Lemma IV.5,
[Equation]
As ln is monotonically increasing, this induces a necessary condition for SGLD to be ( ϵ, δ ) -DP:
[Equation]
In figure 1 we plot the value max
[Equation]
n min , which is used in Algorithm 1, is defined as follows:
[Equation]
16 νβx
[Equation] [Equation]
[Equation]
γ
[Equation]
910 x 4 l (cid:33) 1 2 − 2 γ
[Equation]
16 ν
[Equation]
· x
[Equation] [Equation]
910 x 6 l
[Equation]
1 3 − 2 γ
[Equation]
33) where ϵ, δ, x l , x h , α, β, γ 1 , ρ 1 , ρ 2 , n 1 are parameters of Algorithm 1.
[Equation]
Appendix C provides auxiliary claims and proof for Claim IV.9, along with auxiliary claims which support the proof of Claim IV.8.
This subsection uses definitions and notations defined in subsection IV-C, specifically: D 3 , D(defined in eq. 9), ϵ, δ, x l , x h , α, β, γ 1 , ρ 1 , ρ 2 - parameters of algorithm 1, D input dataset to algorithm 1 of size n 1 ,
V, n 2 , m, ˘ m, n W , W, p ( θ | W ) , l 1 , l 2 , l 3 , l 4 (defined in algorithm 1), and n min (defined in eq. 33).
Proof of Claim IV.9.
We analyze Algorithm 1, running on datasets D 3 and D 4 defined in eq.
9, with parameters values:
[Equation]
Note that we only define a lower bound over n 1 , which will be updated later on.
Mark the return value of the algorithm as r , the event of the algorithm running on dataset D 3 and W = D 3 as A D 3 , the event of the algorithm running on dataset D 4 and W = D 4 as A D 4 , and S = { s | s > µ i } , where µ i is the mean of the sample distribution at the SGLD i ’th step given dataset D 3 (similarly to the definition of S in subsection IV-B).
We will show that ∀ ϵ ∈ R > 0 , δ < 16 there exists n 1 such that
[Equation] [Equation]
We first show that
[Equation]
Notice that r ∈ S only if the algorithm reached line 25.
Consider an event where the algorithm reached line 25 and A cD 3 .
Because
A cD 3 , ∃ ( x i , y i ) ∈ D 3 such that | y i x i − ˘ m | ≥ n ρ 2 2 .
However, since ∀ ( x i , y i ) ∈ D 3 : y i x i = n ρ 3 1 then ∀ ( x i , y i ) ∈ D 3 : | y i x i − ˘ m | > n ρ 2and therefore | W | = 0 .
Under the assumption that a sample from p ( θ |{} ) returns null , the algorithm, in this case, also returns null and therefore P ( r ∈ S
∧ A cD 3 | D 3 )
= 0 .
Same arguments hold for D 4 .
Because we showed eq.
36 is true, then to prove eq.
35, it is enough to show that eq.
37 is true.
[Equation]
From Claim C.1, ∃ n bound 1 such that ∀ n 1 > n bound 1 inequality * holds.
From Lemma IV.7, for n 1 big enough, ∃ T ∈ Z >such that eq.
38 hold (Where 6 δ < 0 .
5 according to the claim’s conditions).
Therefore, ∃ k, n bound 2 ∈ R > 0 such that ∀ n 1 > n bound 2 : ϵ ′ > kn 2(1 − ρ 3 )and eq.
38 hold.
As ρ 3 > 1 , by choosing n 1 > max { n bound 2 , ( ϵk ) 1 2( ρ 3 − 1) } we get that ϵ ′ >
ϵ .
Consequently, by choosing n 1 > max { n bound 1 , n bound 2 , ( ϵk ) 1 2( ρ 3 − 1) } , inequalities * and ** hold, and the claim is proved.
[Equation] [Equation]
Claim C.1.
Given a run of Algorithm 1 on dataset D 3 , mark by A the event of the algorithm reaching line 25 with W = D 3 ; the following holds:
[Equation]
Proof.
For abbreviation, mark the event of n W > n min ∧ ˘ m
[Equation]
˘ n 1 ≤ n 1 ∧ V = D as
B .
Since P ( A | D 3 , B ) = 1 , then P ( A | D 3 ) ≥ P ( A ∧ B | D 3 )
=
P ( A | B, D 3 ) P ( B | D 3 ) =
P ( B | D 3 ) .
Therefore, we can prove the claim by showing the existence of n lb such that ∀ n 1 > n lb : P ( B | D 3 ) ≥ 1 − 5 δ .
We do so in eq. 39:
[Equation]
B
[Equation]
D
[Equation]
where by Corollary C.3 and Claim C.4, for n 1 big enough, first inequality holds.
By Claim C.5, for n 1 big enough, second inequality holds.
Lastly, by Claim C.6, for n 1 big enough, third inequality holds.
Claim C.2.
For n 1 > max { 2 10 ρ 1 , 4 ϵ log 12 δ } :
[Equation]
Proof of Claim C.2.
[Equation]
As
[Equation]
we can further develop eq. 40:
[Equation]
Finally, because n 1 > 2 10 ρ 1 , then n − 0 .
1< ( 12 ) ρ 1 .
Therefore, ( n 1 − 2 1 ϵ log 12 δ ) ρ 1 > ( 12 n 1 ) ρ 1 > n ρ 1 −
[Equation]
1= n ρ 3 1 .
Which leads to
[Equation]
Noticing that the conditions of corollary C.3 includes the conditions of Claim C.2, and that given that the algorithm runs on dataset D 3 and ˘ n ρ 1 1 ≥ n ρ 3 1 then V = D 3 , we get that Corollary C.3 is a direct result of Claim C.2.
Corollary C.3.
∀ n 1 > max { 2 10 ρ 1 , 4 1 ϵ log 12 δ } , when running Algorithm 1 on dataset D 3 , the following inequality holds:
[Equation]
Claim C.4.
∀ n 1 > max { 12 − (9+10 ρ 2 ) , 4 1 ϵ log 12 δ } , when running Algorithm 1 on dataset D 3 the following inequality holds:
[Equation]
Proof of Claim C.4.
[Equation]
where the second inequality holds since p ( Lap ( 1 ϵ ) <
− 1 ϵ log 12 δ ) <
δ , and last equality holds since ( n 1 − 2 1 ϵ log 12 δ ) 0 .
9+ ρ 2 > ( 12 n 1 ) 0 .
9+ ρ 2 > n 1+ ρ 2 − 0 .
2= n ρ
Claim C.5.
∃ n lb 1 ∈ Z > 0 such that ∀ n 1 > n lb 1 , when running Algorithm 1 on dataset D 3 , the following inequality holds:
[Equation]
Proof of Claim C.5.
[Equation]
Because n 0 .
9+ ρ 2> ˘ n ρ 1 1 , then ˘ n ρ 1
=
o
( n 1+ ρ 2) , and therefore for n 1 big enough, the exponent is smaller than δ .
Claim C.6.
∃ n lb 2 ∈ Z > 0 such that ∀ n 1 > n lb 2 , when running Algorithm 1 on dataset D 3 , the following inequality holds:
[Equation]
Proof of Claim C.6.
For abbreviation, mark event B as when the following apply | V | =
D 3 ∧ n 0 .
9+ ρ
[Equation]
n ρ 1 1 ∧ ˘ m ∈ [ m − n ρ 2 2 , m + n ρ 2 2 ] .
[Equation]
1 ϵ log 1 2 δ + l 4 > n min ∧ l 4 < − 1 ϵ log 1 δ | B, D 3 ) > p ( n 1 − 2 ϵ log 1
δ − 1 ϵ log 1 δ > n min | B, D 3 )(1 − δ 2) >
p ( n 1 − 2 ϵ log 1 2 δ − 1 ϵ log 1 δ > n min | B, D 3 ) − δ 2 = p ( n 1 − 2 ϵ log 1
δ − 1 ϵ log 1 δ > n min | l 2 < 1 ϵ log 1 δ , B, D 3 ) p ( l 2 < 1 ϵ log 1 δ | B, D 3 )
+ p ( n 1 − 2 ϵ log 1 2 δ − 1 ϵ log 1 δ > n min ∧ l 2 ≥ 1 ϵ log 1 δ | B, D 3 ) − δ 2 ≥ p ( n 1 − 2 ϵ log 1 2 δ − 1 ϵ log 1 δ > n min | l 2 < 1 ϵ log 1 δ , B, D 3 ) p
( l 2 < 1 ϵ log 1 δ | B, D 3 ) − δ 2 ≥ p ( n 1 − 2 ϵ log 1
δ − 1 ϵ log 1 δ > n min | l 2 < 1 ϵ log 1 δ , B, D 3 ) − δ
From B , | m − ˘ m | < n ρ 2 2 , and therefore ˘ m < m + n ρ 2 2 , and for the case of l 2 < 1 ϵ log 1 δ it holds that n 2 < n 1 − 1 ϵ log 1 2 δ + 1 ϵ log 1 δ < n 1 + 1 ϵ log 1 δ .
Therefore ˘ m ≤ m + ( n 1 + 1 ϵ log 1 δ ) ρ 2 .
As n min =
O (max { ˘ m 23 , n ρ 2 γ 1 1 } ) then for the case of l 2 < 1 ϵ log 1 δ and B , it holds that n
[Equation]
= O
[Equation]
max {
[Equation]
m + n ρ 2 1 ) 23 , n ρ 2 γ 1 1 } )
=
O (max { n 2 ρ 33 1 , n ρ 2 γ 1 1 } ) <
o ( n 1 ) ; therefore ∃ n lb 2 such that
[Equation]
Consequently, ∀
[Equation]
Definition C.7.
A randomized function f ( X, y ) : χ n 1 × R n 2 → R , is ( ϵ, δ ) -differentially private with respect to X if ∀ S ⊆ R , and ∀ X, ˆ X ∈ χ n : ∥ X − ˆ X ∥ ≤ 1 , eq.
41 holds.
[Equation]
Definition C.8 ( l 1 -sensitivity, [11]) .
The l 1 -sensitivity of a function f : N | χ | → R k is:
[Equation]
Claim C.9.
For Algorithm 1, calculating ˘ n 1 , n 2 is (2 ϵ, 0) differentially private.
Proof of Claim C.9.
n 1 l 1 -sensitivity is 1; therefore, calculating ˘ n is ( ϵ, 0) DP by the Laplace mechanism’s privacy guarantees.
For a given ˘ n 1 value, the l 1 -sensitivity of | V | is 1.
Therefore, given ˘ n 1 , calculating n 2 is ( ϵ, 0) DP by the Laplace mechanism’s privacy guarantees.
Consequently, by the sequential composition theorem, the composition is (2 ϵ, 0) differentially private.
Claim C.10.
For Algorithm 1, p ( n 2 ≤ | V || D, ˘ n 1 ) =
1 − δ .
Proof of Claim C.10.
[Equation]
Claim C.11.
Given ˘ n 1 , n 2 and n 2 < | V | , calculating ˘ m in Algorithm 1 is ( ϵ, 0) differentially private with respect to D .
Proof of Claim C.11.
Given two neighbouring datasets, D 5 and ˆ D 5 , mark by V 5 and ˆ V 5 the realizations of V (calculated at line 10) when Algorithm 1 runs on each of the datasets, respectively.
If V 5 =
ˆ V
then the claim follows trivially.
In case they differ, assume w.l.o.g that | V 5 | ≥ | ˆ V 5 | , and that if | V 5 | = | ˆ V 5 | then they differ in their last sample.
Define q = (cid:80)
[Equation]
Therefore, by the Laplace mechanism’s privacy guarantees, calculating ˘ m is ( ϵ, 0) differentially private.
Claim C.12.
Lines 8-15 of Algorithm 1 are (3 ϵ, δ ) differentially private.
Proof of Claim C.12.
Define ˆ D as a neighbouring dataset to D .
[Equation]
where inequality * follows Claim C.10 and inequality ** follows Claims C.11 and C.9.
Claim C.13.
Given n 2 , ˘ m and | W | < n min , lines 19-25 of Algorithm 1 are ( ϵ, δ ) differentially private with respect to D .
Proof of Claim C.13.
Mark l ∼ Lap ( 1 ϵ ) , and ˆ D as a neighbouring dataset to D .
Eq.
42 proves the claim.
[Equation]
where the first inequality is true from eq.
43 and the Laplace mechanism’s privacy guarantees for n W .
[Equation]
Claim C.14.
Line 25 of Algorithm 1 is ( ϵ, δ ) differentially private with respect to D for | W | ≥ n min and given n 2 , ˘ m .
Proof of Claim C.14.
For a given n 2 and ˘ m the group W can change by up to one sample for a neighbouring dataset.
Mark n = | W | and c = ˘ m .
As n ≥ n ρ 2 γ 1 2 , then n 12 > n γ 1 ≥ n ρ 2 2 , and therefore W ∈ D ( n, γ 1 , x h , x l , c ) , as defined in eq.
Because W ∈ D ( n, γ 1 , x h , x l , c ) , n ≥ n b 1 , and n ≥ n b 2 , the problem of sampling from p ( θ | W ) for | W | ≥ n min holds the constraints of Claim D.27.
Therefore one sample from p ( θ | W ) is ( ϵ, δ ) differentially private.
Claim C.15.
Lines 19-24 of Algorithm 1 are ( ϵ, 0) differentially private with respect to D for | W | ≥ n min and given ˘ m, n 2 .
Proof of Claim C.15.
The only data released in lines 19-24 is n W .
Since the l 1 -sensitivity of | W | given ˘ m, n 2 is 1, then the
Laplace mechanism ensures ( ϵ, 0) differential privacy.
Corollary C.16.
Lines 19-25 of Algorithm 1 are (2 ϵ, δ ) differentially private with respect to D for | W | ≥ n min and given ˘ m, n 2 .
Corollary C.16 follows directly from Claims C.15 and C.14.
Corollary C.17.
Lines 19-25 of Algorithm 1 are (2 ϵ, δ ) differentially private with respect to D given ˘ m, n 2 .
Corollary C.17 follows directly from Claims C.16 and C.13.
Appendix D contains claims used to simplify the otherwise complex proofs throughout the paper.
A. Stochastic Gradient Langevin Dynamics Privacy
This subsection provides auxiliary claims for SGLD privacy analysis performed in subsection A-D.
It uses the notations defined in section IV, subsection IV-B, and subection A-D, specifically: α, β, θ, p ( y | x, θ ) (defined in eq. 4), D ( n, γ 1 , x h , x l , c ) (defined in eq. 5), D 1 , D 2 (defined in eq.
8), η, θ j , ˆ θ j , µ j , ˆ µ rj , σ j , ˆ σ rj (defined in subsection IV-B), and λ, ˆ λ, ρ, ˆ ρ (defined in eq.
[Equation]
Proof of Claim D.1.
[Equation]
Claim D.2.
ρ 1 − λ n − 1 1 − λ
[Equation]
Proof of Claim D.2.
[Equation]
where the last equality holds from Claim D.1.
Claim D.3.
ρ (cid:16) 1 − λ n
[Equation]
Proof of Claim D.3.
[Equation]
where the last equality holds from Claim D.1.
Claim D.4.
14 λ + 34 − ˆ λ =
η 2 α .
Proof of Claim D.4.
[Equation]
Claim D.5.
∀ k ∈ Z > 0 : (cid:0) 1 − λ kn (cid:1) (cid:16) 1 − ˆ λλ n − 1 (cid:17) − (cid:16) 1 − (cid:16) ˆ λλ ( n − 1) (cid:17)(cid:17)
k
(cid:18) 1 − λ n
[Equation]
[Table] [Table]
[Table]
Proof of Claim D.6.
[Equation]
where equality * follows from Claim D.1.
Claim D
[Equation] [Equation]
Proof of Claim D.7.
[Equation]
where equality * follows from Claims D.1 and D.3.
Claim D.8.
[Equation] [Equation]
α (cid:1)
[Equation]
Proof of Claim D
[Equation]
[Equation]
where equality * holds from Claim D.4.
Claim D.9.
∀ k ∈ Z > 0 :
[Equation]
[Table] [Table]
[Equation]
[Table]
where equality * follows from Claim D.8 and equality ** follows from Claim D
[Equation]
Claim D.10.
∀ k ∈ Z > 0 :
[Equation]
Proof of Claim D.10.
[Equation]
Claim D.11.
∀ k ∈ Z > 0 : ncx 2 h β α + nx 2 h β
[Equation] [Equation]
ρ
[Equation]
[Table]
[Equation]
where the last inequality holds because λ, ˆ λ < 1 and α > 0 .
[Equation]
D
[Equation]
is true for all k such that
[Equation]
Proof of Claim D.12.
[Equation]
Claim D.13.
1 α
[Equation]
=
[Equation]
(cid:16) ˆ
[Equation]
λ
[Equation] [Equation]
1) (cid:17) j is true for
all k ∈ Z
[Equation]
Proof of Claim D.13.
First, note that the inequality can also be written as
[Equation]
Second, the right-hand term of the inequality could be upper bound as in eq.
Therefore, for the claim’s inequality to hold, it is enough that 1 α ≥ ηλ − 2 1 − λ − 2 nk 1 − λ − 2 , which is proved by Claim D.12 to be true for 0 < k ≤ 12 n log λ (cid:16)
[Equation]
(cid:17)
[Equation] [Equation] [Table] [Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation] [Table] [Equation] [Table]
[Equation]
[Table] [Equation] [Table] [Equation]
[Table] [Equation] [Table] [Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table] [Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
Proof of Claim D.14.
Eq.
45 holds because λ, ˆ λ < 1 .
By multiplying both sides with (cid:80) n − 1 i =
λ
i , we get eq.
Then, noticing that the right term equals to the right term of Claim D.13 inequality, and hence smaller than the left term of Claim D. inequality, Claim D.14 is proved.
[Equation]
Claim D.15.
The inequality
[Equation]
holds for all k ∈ Z > 0 and x 2 h β > 3 , n >
[Equation]
Proof of Claim D.15.
We start with eq.
47, where the first inequality holds because λ < 1 and r > 1 , and the second inequality holds because λ < ˆ λ .
Using eq.
47, we can lower-bound the left-hand side of the claim’s inequality.
We continue with eq. 48, where the inequality holds because λ < ˆ λ and r > 1 .
This allows us to upper-bound the right side of the claim’s inequality.
Given these lower and upper bounds, it’s enough to show that λ
[Equation]
n (
[Equation]
) > η 1 − λ 2 n 1 − λ 2 , which according to eq.is equivalent to showing that (2 nx 2 h β − 1) 1 α λ 2( k +1) n + 2(2 λ 2 n − 1) > 0 .
Since n >
[Equation]
h β − 1 x 2 h β , Claim D.18 applies, and therefore λ 2 n ≥ e − 2 x 2 hβ .
Consequently, it’s enough to show that (2 nx 2 h β − 1) 1 α λ 2( k +1) n + 2(2 e − 2 x 2 hβ − 1) > 0 , which is true for x 2 h β > 3 by Claim D.16.
[Equation]
[Table]
[Equation]
Claim D.16.
For x 2 β > 3 , the inequality (2 e − 2 x 2 β − 1) > 0 holds.
Proof of Claim D.16.
It’s easy to see that the inequality holds only if x 2 β ≥ − 2 ln 12 .
Since − 2 ln 12 < 3 , the claim is proved.
Claim D.17.
For ˙ k as defined in Lemma A.
[Equation]
and the conditions of Claim D.18:
[Equation]
Proof of Claim D.17.
[Equation]
 where the fourth equality holds from eq.
50 and the second inequality holds from D.18.
[Equation]
Claim D.18.
For the conditions of claim D.20:
[Equation]
Claim D.19.
[Equation]
Proof of Claim D.19.
From eq.
51, it is enough to find lim n →∞ ln(1 −
[Equation]
+ nx
[Equation]
n .
Since lim n →∞ ln(1 − 1 α + nx 2 β )n = 00 , and both the numerator and denominator are differentiable around ∞ , the use of L’Hˆopital’s rule is possible as shown in eq.
52, with the result proving the claim.
[Equation]
Claim D.20.
[Equation]
Proof of Claim D.20.
First, we find a simplified term for the derivative:
[Equation]
A lower bound for the ln term can be found using Taylor’s theorem as shown in eq.
where 0 ≤ ξ ≤ 1 α + nx 2 β .
[Equation]
From eq.
53 and 54, it is enough to find the conditions for which
[Equation]
A simplified version of this inequality is found at eq. 55, and it can be easily seen that for α > 12 ( 1 nx 2 β + 1) , and therefore also for n >
[Equation]
2 β − 1 x 2 β , this inequality holds.
[Equation]
Claim D.21.
For n > αx 2 h β ( e 2 x 2 hβ − 2) + 1 2 x 2 h β and the conditions of Claim D.18, ˙ k defined in Lemma A.6 is positive.
[Equation]
By Claim D.18, λ − 2 n − 1 < e 2 x 2 hβ − 1 ; therefore it is enough to find conditions for e 2 x 2 hβ − 1 < 1 αη (1 − λ 2 ) , which is done at eq.
As this condition matches the claim conditions
[Equation]
the claim is proved.
[Equation]
B. Posterior Sampling Privacy
This subsection provides auxiliary claims for the posterior sampling privacy analysis performed in subsection IV-A.
It uses the notations defined in section IV, subsection IV-A, and subection A-B, specifically: α, β, θ, p ( y | x, θ ) (defined in eq. 4), D ( n, γ 1 , x h , x l , c ) (defined in eq. 5), p ( θ | D ) , p ( θ | ˆ D ) , θ, µ, σ, ˆ µ, ˆ σ, ( σ 2 ) ∗ ν , ν (defined in subsection IV-A),
D, ˆ D, x n , y n , ˆ x n , ˆ y n , z, q (defined in eq. 18).
Claim D.22.
For n > 1 + 10 x 2 h x 2 l νβ , the inequality 1 10 ( α + ( z + x 2 n ) β ) >
ν
(ˆ x 2 n − x 2 n ) holds.
Proof Claim D.22.
Notice that 110 ( α + ( z + x 2 n ) β ) > 110 zβ > 110 ( n − 1) x 2 l β and νx 2 h > ν (ˆ x 2 n − x 2 n ) .
Therefore a sufficient condition will be that 110 ( n − 1) x 2 l β > νx 2 h , which is equivalent to n > 1 + x 2 h x 2 l 10 νβ .
Claim D.23.
( σ 2 ) ∗ ν is positive.
Proof Claim D.23.
[Equation]
therefore, a sufficient condition is that α + ( z + x 2 n ) β
+ ν ( x 2 n − ˆ x 2 n ) > 0 .
Since the condition of Lemma A.1 dictates that n > 1 + 10 x 2 h x 2 l νβ , then Claim D.22 holds, and therefore the condition is satisfied.
Claim D.24.
The value ln σ ˆ σ can be bounded as following:
[Equation]
Proof of Claim D.24.
For ˆ x n ≤ x n , the term ln σ ˆ σ is negative and the claim trivially holds.
For ˆ x n > x n , consider c 1 = x 2 h ( n − 1) x
2 l :
[Equation]
From eq. 59, by Taylor theorem:
[Equation]
where 0 ≤ ζ ≤ c 1 .
Consequently, because the natural logarithm is monotonically increasing, the following equation also holds:
[Equation]
Therefore ln
[Equation]
Claim D.25.
For the conditions of Lemma A.
[Equation]
the value of 12 ( ν − 1) ln
ˆ σ 2 ( σ 2 ) ∗ ν can be upper bounded as following:
[Equation]
Proof of Claim D.25.
Consider c 1 = νx
[Equation]
=
[Equation]
where inequalities * holds under the assumption that n > 1 + ν x 2 h x 2 l , and last equality holds from eq.
Therefore, by using
Taylor theorem:
[Equation]
where 0 ≤ ζ ≤ c 1 .
From this inequality, and because the natural logarithm is monotonically increasing, it is true that ln ˆ σ 2 ( σ 2 ) ∗ ν ≤ c 1 .
Therefore
[Equation]
Claim D.26.
For the conditions of Lemma A.1, the value ν 2 ( µ − ˆ µ ) 2 ( σ 2 ) ∗ ν is bounded by
[Equation] [Equation]
( z + ˆ x 2 n ) β ) | .
Therefore
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
nwhere inequality * is true because the conditions of Lemma A.1 dictates that n > 1 + x 2 h x 2 l 10 νβ , and according to Claim D. this guarantee that 110 ( α + ( z + x 2 n ) β ) > ν (ˆ x 2 n − x 2 n ) .
Inequality ** follows from n >> 1 ⇒ ( n − 1) x
l ≈ nx l .
Claim D.27.
For the conditions and definitions of Lemma IV.4, one sample from the posterior is ( ϵ, δ ) differentially private for the following conditions on n and ν :
[Equation]
Proof of Claim D.27.
By Lemma A.1, one sample from the posterior is ( ϵ 1 + ln( 1 δ ) ν − 1 , δ ) differentially private.
For each of the six terms of ϵ 1 + ln( 1 δ ) ν − 1 , the lower bounds on n and ν , found at equations 60, 61, 62, 63, 64, and 65, guarantee that the sum of terms is upper bounded by ϵ .
These bounds match the claim’s guarantee over n and ν , thus proving the claim.
ln(
− 1 :
[Equation]
For
[Equation]
For
[Equation]
For
[Equation]
For
[Equation]
For
[Equation]
Claim D.28.
For c = n γ 2 , γ 1 < γ 2 < 32 , and the conditions and definitions of Lemma IV.4, one sample from the posterior is ( ϵ, δ ) differentially private for following terms on n and ν :
[Equation]

[Equation]

[Equation] [Equation]
Proof of Claim D.28.
Claim D.27 provides lower bounds on n such that one sample from the posterior will be ( ϵ, δ ) differential privacy.
When c = n γ 2 , γ 2 > γ 1 , these bounds can be refined.
The condition n ≥ ( 16 νϵ · x 4 h ( α + x 2 h β ) 910 x 4 l
c + n γ 1 )) 1 2 − γ 1 can be refined as follows:
[Equation]
   
[Equation]
where the inequality holds because Lemma IV.4 dictates that n > 1 + 10 x 2 h x 2 l νβ .
Consequently it’s enough that
[Equation]
Following the same considerations for condition n ≥
[Equation]
 
Therefore
[Equation]
it is enough that
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
Previous work [15] suggested training machine learning models using an SGLD-inspired learning step with clipped gradients to get differentially private models.
Given the definitions in section III-B and a gradient clipping threshold C ∈ R > 0 , the SGLDinspired learning step with clipped gradient is
[Equation]
We repeated the attack described in subsection V with models that were trained with the learning step described in eq. 66.
The models were trained with clipping threshold C = 0 .
2 , a learning rate of 0 .
001 3 , and a batch size of 4 .
We created a novel sample, ( x ∗ , y ∗ ) , and used 200 models to train the classifier and another 200 models on which we used the classifier to estimate the DP lower bound.
Lastly, we used the ”Opacus” framework [41] to run the experiment.
Figure 3 depicts the model’s accuracy as well as lower ( ϵ emplb ) and upper ( ϵ ub ) bounds over ϵ , given δ = 10 − 5 .
The lower bound has a confidence value of 90% , i.e., P ( ϵ ≥ ϵ emplb ) ≥ 0 .
9025 , while the upper bound is computed using the ”Opacus” framework [41] in R´enyi-DP terms (See definition III.3) and converted to ( ϵ, δ ) -DP terms using Lemma III.4.
From figure 3, we see that the attack did not succeed in showing a privacy breach.
However, we also see that the maximum accuracy is 90 .
6% (which is 8% lower than the accuracy for models trained with SGLD, as shown in figure 2).
[Table]