D O NOT L ET P RIVACY O VERBILL U TILITY : G RADIENT E MBEDDING P ERTURBATION FOR P RIVATE L EARNING
Anonymous authors
Paper under double-blind review
A BSTRACT
The privacy leakage of the model about the training data can be bounded in the differential privacy mechanism.
However, for meaningful privacy parameters, a differentially private model degrades the utility drastically when the model comprises a large number of trainable parameters.
In this paper, we propose an algorithm Gradient
Embedding Perturbation (GEP) towards training differentially private deep models with decent accuracy.
Speciﬁcally, in each gradient descent step, GEP ﬁrst projects individual private gradient into a non-sensitive anchor subspace, producing a low-dimensional gradient embedding and a small-norm residual gradient.
Then, GEP perturbs the low-dimensional embedding and the residual gradient separately according to the privacy budget.
Such a decomposition permits a small perturbation variance, which greatly helps to break the dimensional barrier of private learning.
With GEP, we achieve decent accuracy with reasonable computational cost and modest privacy guarantee for deep models.
Especially, with privacy bound (cid:15) = 8 , we achieve 74 .
9% test accuracy on CIFAR10 and 95 .
1% test accuracy on SVHN, signiﬁcantly improving over existing results.
I NTRODUCTION
Recent works have shown that the trained model may leak/memorize the information of its training set (Fredrikson et al., 2015;
Wu et al., 2016; Shokri et al., 2017; Hitaj et al., 2017), which raises privacy issue when the model are trained with sensitive data.
Differential privacy (DP) mechanism provides a way to quantitatively measure and upper bound such information leakage.
It theoretically ensures that the inﬂuence of any individual sample is negligible with the DP parameter (cid:15) or ( (cid:15), δ ) .
Moreover, it has been observed that differentially private models can also resist model inversion attack (Carlini et al., 2019), membership inference attack (Rahman et al., 2018; Bernau et al., 2019), gradient matching attack (Zhu et al., 2019), and data poisoning attack (Ma et al., 2019).
One popular way to achieve differentially private machine learning is to perturb the training process with noise (Song et al., 2013;
Bassily et al., 2014; Shokri & Shmatikov, 2015; Wu et al., 2017;
Fukuchi et al., 2017; Iyengar et al., 2019; Phan et al., 2020).
Speciﬁcally, gradient perturbation perturbs the gradient at each iteration of (stochastic) gradient descent algorithm and guarantees the privacy of the ﬁnal model via composition property of DP.
It is worthy to note that gradient perturbation does not assume (strongly) convex objective and hence is applicable to various settings (Abadi et al., 2016; Wang et al., 2017; Lee & Kifer, 2018; Jayaraman et al., 2018; Wang & Gu, 2019).
Speciﬁcally, for given gradient sensitivity S , a general form of gradient perturbation is to add an isotropic Gaussian noise z to the gradient g ∈ R p independently for each step,
[Equation]
One can set proper variance σ 2 to make each update differentially private with parameter ( (cid:15), δ ) .
It is easy to see that the intensity of the added noise E [ (cid:107) z (cid:107) 2 ] scales linearly with the model dimension p .
This indicates that as the model becomes larger, the useful signal, i.e., gradient, would be submerged in the added noise (see Figure 1).
This dimensional barrier restricts the utility of deep learning models trained with gradient perturbation.
The dimensional barrier is attributed to the fact that the added noise is isotropic while the gradients live on a very low dimensional manifold, which has been observed in (Gur-Ari et al., 2018;
Vogels
[Figure]
of at initialization
The variance is chosen such that SGD sat
Abadi et al
[Figure]
et al., 2019; Gooneratne et al., 2020; Li et al., 2020) and is also veriﬁed in Figure 2 for the gradients of a 20-layer ResNet (He et al., 2016).
Hence to limit the noise energy, it is natural to think “Can we reduce the dimension of gradients ﬁrst and then add the isotropic noise onto a low-dimensional gradient embedding?"
The answer is afﬁrmative.
We propose a new algorithm Gradient
Embedding Perturbation (GEP) , illustrated in Figure 3.
Speciﬁcally, we ﬁrst compute anchor gradients on some non-sensitive auxiliary data, and identify an anchor subspace that is spanned by several top principal components of the anchor gradient matrix.
Then we project the private gradients into the anchor subspace and obtain low-dimensional gradient embeddings and small-norm residual gradients .
Finally, we perturb the gradient embedding and residual gradient separately according to the sensitivities and privacy budget.
We intuitively argue why GEP could reduce the perturbation variance and achieve good utility for large models.
First, because the gradient embedding has a very low dimension, the added isotropic noise on embedding has small energy that scales linearly only with the subspace dimension.
Second, if the anchor subspace can cover most of the gradient information, the residual gradient, though high dimensional, should have small magnitude, which permits smaller added noise to guarantee the same level privacy because of the reduced sensitivity.
Overall, we can use a much lower perturbation compared with the original gradient perturbation to guarantee the same level of privacy.
We emphasize several properties of GEP.
First, the non-sensitive auxiliary data assumption is weak.
In fact, GEP only requires a small number of non-sensitive unlabeled data following a similar feature distribution as the private data, which often exist even for learning on sensitive data.
In our experiments, we use a few unlabeled samples from ImageNet to serve as auxiliary data for MNIST,
SVHN, and CIFAR-10.
This assumption is much weaker than the public data assumption in previous works (Papernot et al., 2017; 2018;
Alon et al., 2019; Wang & Zhou, 2020), where the public data should follow exactly the same distribution as the private data.
Second, GEP produces an unbiased estimator of the target gradient because of releasing both the perturbed gradient embedding and the perturbed residual gradient, which turns out to be critical for good utility.
Third, we use power method to estimate the principal components of anchor gradients, achievable with a few matrix multiplications.
The fact that GEP is not sensitive to the choices of subspace dimension further allows a very efﬁcient implementation.
Compared with existing works of differentially private machine learning, our contribution can be summarized as follows: (1) we propose a novel algorithm GEP that achieves good utility for large models with modest differential privacy guarantee; (2) we show that GEP returns an unbiased estimator of target private gradient with much lower perturbation variance than original gradient perturbation; (3) we demonstrate that GEP achieves state-of-the-art utility in differentially private learning with three benchmark datasets.
Speciﬁcally, for (cid:15) = 8 , GEP achieves 74 .
9% test accuracy on CIFAR-10 with a ResNet20 model.
To the best of our knowledge, GEP is the ﬁrst algorithm that can achieve such utility with training deep models from scratch for a “single-digit" privacy budget 1 .
1) We estimate an anchor subspace on some non-sensitive data; 2) We project the private gradients into the anchor subspace, producing lowdimensional embeddings and residual gradients; 3) We perturb the gradient embedding and residual gradient separately to guarantee differential privacy.
The auxiliary data are only required to share similar features as the private data.
In our experiments, we use 2000 images from ImageNet as auxiliary data for MNIST, SVHN, and CIFAR-10 datasets.
1. R ELATED WORK
Existing works studying differentially private machine learning in high-dimensional setting can be roughly categorized into two sets.
One is treating the optimization of the machine learning objective as a whole mechanism and adding noise into this process.
The other one is based on the knowledge transfer of machine learning models, which trains a differentially private publishable student model with private signals from teacher models.
We review them one by one.
Differentially private convex optimization in high-dimensional setting has been studied extensively over the years (Kifer et al., 2012; Thakurta & Smith, 2013; Talwar et al., 2015; Wang & Xu, 2019;
Wang & Gu, 2019).
Although these methods demonstrate good utility on some convex settings, their analyses can not be directly applied to non-convex setting.
Right before the submission, we note two independent and concurrent works (Zhou et al., 2020; Kairouz et al., 2020) that also leverage the gradient redundancy to reduce the added noise.
Speciﬁcally, Kairouz et al.
(2020) track historical gradients to do dimension reduction for private AdaGrad.
Zhou et al.
(2020) requires gradients on some public data and then project the noisy gradients into a public subspace at each update.
One core difference between these two works and GEP is that we introduce residual gradient perturbation and
GEP produces an unbiased estimator of the private gradients, which is essential for achieving the superior utility.
Moreover, we weaken the auxiliary data assumption and introduce several designs that signiﬁcantly boost the efﬁciency and applicability of GEP.
One recent progress towards training arbitrary models with differential privacy is Private Aggregation of Teacher Ensembles (PATE) (Papernot et al., 2017; 2018; Jordon et al., 2019).
PATE ﬁrst trains independent teacher models on disjoint shards of private data.
Then it trains a student model with privacy guarantee by distilling noisy predictions of teacher models on some public samples.
In comparison, GEP only requires some non-sensitive data that have similar natural features as the private data while PATE requires the public data follow exactly the same distribution as the private data and in practice it uses a portion of the test data to serve as public data.
Moreover, GEP demonstrates better performance than PATE especially for complex datasets, e.g., CIFAR-10, because GEP can train the model with the whole private data rather than a small shard of data.
P RELIMINARIES
We introduce some notations and deﬁnitions.
We use bold lowercase letters, e.g., v , and bold capital letters, e.g., M , to denote vectors and matrices, respectively.
The L 2 norm of a vector v is denoted by (cid:107) v (cid:107) .
The spectral norm and the Frobenius norm of a matrix M are denoted by (cid:107) M (cid:107) and (cid:107) M (cid:107) F , respectively.
A sample d = ( x , y ) consists of feature x and label y .
A dataset D is a collection of individual samples.
A dataset D (cid:48) is said to be a neighboring dataset of D if they differ in a single sample, denoted as D ∼ D (cid:48) .
Differential privacy ensures that the outputs of an algorithm on neighboring datasets have approximately indistinguishable distributions.
Deﬁnition 1 ( ( (cid:15), δ ) -DP
(Dwork et al., 2006a;b)) .
A randomized mechanism M guarantees ( (cid:15), δ ) - differential privacy if for any two neighboring input datasets D ∼ D (cid:48) and for any subset of outputs S it holds that Pr [ M ( D ) ∈ S ] ≤ e (cid:15)
Pr [ M ( D (cid:48) )
∈ S ] + δ .
By its deﬁnition, ( (cid:15), δ ) -DP controls the maximum inﬂuence that any individual sample can produce.
One can adjust the privacy parameters to trade off between privacy and utility.
Differential privacy is immune to post-processing (Dwork et al., 2014), i.e., any function applied on the output of a differentially private algorithm would not increase the privacy loss as long as it does not have new interaction with the private dataset.
Differential privacy also allows composition , i.e., the composition of a series of differentially private mechanisms is also differentially private but with different parameters.
Several variants of ( (cid:15), δ ) -DP have been proposed (Bun & Steinke, 2016; Dong et al., 2019) to address certain weakness of ( (cid:15), δ ) -DP, e.g., they achieve better composition property.
In this work, we use Rényi differential privacy (Mironov, 2017) to track the privacy loss and then convert it to ( (cid:15), δ ) -DP.
Suppose that there is a private dataset D
= { ( x i , y i ) } ni =1 with n samples.
We want to train a model f to learn the mapping in D .
Speciﬁcally, f takes x as input and outputs a label y , and f has parameter θ ∈ R p .
The training objective is to minimize an empirical risk 1 n (cid:80) ni =1 (cid:96) ( f ( x i ) , y i ) , where (cid:96) ( · , · ) is a loss function.
We further assume that there is an auxiliary dataset D ( a ) = { (˜ x j , ˜ y j ) } mj =1 that ˜ x shares similar features as x in D while ˜ y could be random.
G RADIENT EMBEDDING PERTURBATION
An overview of GEP is given in Figure 3.
GEP has three major ingredients: 1) ﬁrst, estimate an anchor subspace that contains the principal components of some non-sensitive anchor gradients via power method; 2) then, project private gradients into the anchor subspace and produce low-dimensional embeddings of private gradients and residual gradients; 3) ﬁnally, perturb gradient embedding and residual gradient separately to establish differential privacy guarantee.
In Section 3.1, we present the
GEP algorithm in detail.
In Section 3.2, we given an analysis on the residual gradients.
In Section 3.3, we give a differentially private learning algorithm that updates the model with the output of GEP.
3. T HE GEP ALGORITHM AND ITS PRIVACY ANALYSIS
The pseudocode of GEP is presented in Algorithm 1.
For convenience, we write a set of gradients and a set of basis vectors as matrices with each row being one gradient/basis vector.
The anchor subspace is constructed as follows.
We ﬁrst compute the gradients of the model on an auxiliary dataset D ( a ) with m samples, which is referred to as the anchor gradients G ( a ) ∈ R m × p .
We then use the power method to estimate the principal components of G ( a ) to construct a subspace basis B ∈ R k × p , which is referred to as the anchor subspace.
All these matrices are publishable because D ( a ) is non-sensitive.
We expect that the anchor subspace B can cover most energy of private gradients when the auxiliary data are not far from private data and m, k are reasonably large.
Suppose that the private gradients are G ∈ R n × p .
Then, we project the private gradients into the anchor subspace B .
The projection produces low-dimensional embeddings W = GB T and residual gradients R =
G − GB T B .
The magnitude of residual gradients is usually much smaller than original gradient even when k is small because of the gradient redundancy.
Then, we aggregate the gradient embeddings and the residual gradients, respectively.
We perturb the aggregated embedding and the aggregated residual gradient respectively to guarantee certain differential privacy.
Finally, we release the perturbed embedding and the perturbed residual gradient and construct an unbiased estimator of the private gradient: ˜ v :=
( ˜ w T B + ˜ r ) /n .
This construction process does not resulting in additional privacy loss because of DP’s post-processing property.
The privacy analysis of the whole process of GEP is given in Theorem 3.1.
Theorem 3.1.
Let S 1 and S 2 be the sensitivity of w and r , respectively, the output of Algorithmsatisﬁes ( (cid:15), δ ) -DP for any δ ∈ (0 , 1) and (cid:15) ≤ 2 log(1 /δ ) if we choose σ 1 ≥ 2 S 1 (cid:112) 2 log(1 /δ ) /(cid:15) and σ 2 ≥ 2 S 2 (cid:112) 2 log(1 /δ ) /(cid:15) .
A common practice to control sensitivity is to clip the output with a pre-deﬁned threshold.
In our experiments, we use different thresholds S 1 and S 2 to clip the gradient embeddings and residual gradients, respectively.
The privacy loss of GEP consists of two parts: the privacy loss incurred by releasing the perturbed embedding and the privacy loss incurred by releasing the perturbed residual gradient.
We compose these two parts via the Rényi differential privacy and convert it to ( (cid:15), δ ) -DP.
We highlight several implementation techniques that make GEP widely applicable and implementable with reasonable computational cost.
Firstly, auxiliary non-sensitive data do not have to be the same source as the private data and the auxiliary data can be randomly labeled.
This non-sensitive data assumption is very weak and easy to satisfy in practical scenarios.
To understand why random label works, a quick example is that for the least squares regression problem the individual gradient is aligned with the feature vector while the label only scales the length but does not change the direction.
This auxiliary data assumption avoids conducting principal component analysis (PCA) on private gradients, which requires releasing private high-dimensional basis vectors and hence introduces large privacy loss.
Secondly, we use power method (Panju, 2011; Vogels et al., 2019) to approximately estimate the principal components.
The new operation we introduce is standard matrix multiplication that enjoys efﬁcient implementation on GPU.
The computational complexity of each power iteration is 2 mkp , where p is the number of model parameters, m is the number of anchor gradients and k is the number of subspace basis vectors.
Thirdly, we divide the parameters into different groups and compute one orthonormal basis for each group.
This further reduces the computational cost.
For example, suppose the parameters are divided into two groups with size p 1 , p 2 and the numbers of basis vectors are k 1 , k 2 , the computational complexity of each power iteration is 2 m ( k 1 p 1 + k 2 p 2 ) , which is smaller than 2 m ( k 1 + k 2 )
( p 1 + p 2 ) .
In Appendix B, we analyze the additional computational and memory costs of GEP compared to standard gradient perturbation.
Curious readers may wonder if we can use random projection to reduce the dimensionality as
Johnson–Lindenstrauss Lemma (Dasgupta & Gupta, 2003) guarantees that one can preserve the pairwise distance between any two points after projecting into a random subspace of much lower dimension.
However, preserving the pairwise distance is not sufﬁcient for high quality gradient reconstruction, which is veriﬁed by the empirical observation in Appendix C.
3. A N ANALYSIS ON THE RESIDUAL GRADIENTS OF GEP
Let g :=
1 n (cid:80) i G i, : be the target private gradient.
For a given anchor subspace B , the residual gradients are deﬁned as R :
= G − GB T B .
We then analyze how large the residual gradients could be.
The following argument holds for all time steps and we ignore the time step index for simplicity.
For the ease of discussion, we introduce ξ i :=
( G i, : ) T for i ∈ [ n ] to denote the the private gradients and the ˆ ξ j :=
( G ( a ) j, : ) T for j ∈ [ m ] to denote the anchor gradients.
We use λ k ( · ) to denote the k th largest eigenvalue of a given matrix.
We assume that the private gradients ξ 1 , ..., ξ n and the anchor gradients ˆ ξ 1 , ..., ˆ ξ m are sampled independently from a distribution P .
We assume Σ :=
E ξ ∼P ξξ T ∈ R p × p to be the population gradient (uncentered) covariance matrix.
We also consider the (uncentered) empirical gradient covariance matrix ˆ S :
= 1 m (cid:80) mi
=
ˆ ξ i ˆ ξ Ti .
One case is that the population gradient covariance matrix Σ is low-rank k .
In this case we can argue that the residual gradients are 0 once the number of anchor gradients m > k .
Lemma 3.1.
Assume that the population covariance matrix Σ is with rank k and the distribution P satisﬁes P ( ξ ∈ F s )
=
for all s -ﬂats F s in R p with 0 ≤ s < k .
Let Σ
= V k Λ V
Tk and ˆ S
= ˆ V k [Equation]
ˆΛ ˆ V Tk [Equation] be the eigendecompositions of Σ and the empirical covariance matrix ˆ S , respectively, such that λ k (cid:48)
( ˆ S ) > 0 and λ k (cid:48) +
( ˆ S )
= 0 .
Then if m ≥ k , we have with probability 1, k (cid:48)
=
[Equation] and (cid:107) V [-k V Tk − ˆ V k ˆ V Tk (cid:107) 
-][Equation]
[Equation]
Proof.
The proof is based on the non-singularity of covariance matrix.
See Appendix D.
We note that s -ﬂat is the translate F s = x + F s (0) of an s -dimensional linear subspace F s (0) in R p and the normal distribution satisﬁes such condition (Eaton & Perlman, 1973; Muirhead, 2009).
Therefore, we have seen that for low-rank case of population covariance matrix, the residual gradients are 0 once m > k .
In the general case, we measure the expected norm of the residual gradients.
Lemma 3.2.
Assume that ξ ∼ P and (cid:107) ξ (cid:107) 2 <
T almost surely.
Let Σ = V Λ V T be the eigendecomposition of the population covariance matrix Σ .
Let ˆ S
=
ˆ V k ˆΛ
ˆ V Tk be the eigendecomposition of the empirical covariance matrix ˆ S .
Then we have with probability 1 − 2 exp( − δ ) ,
[Equation]
where C = (cid:2) E (cid:107) ξ (cid:107) 4 − (cid:80) i λ
2 i ( Σ ) (cid:3) + (cid:104) 1 m (cid:80) mj
=1 (cid:107)
ˆ ξ j (cid:107) 4 − (cid:80) i λ
2 i ( ˆ S ) (cid:105) , Π ˆ V k is a projection operator onto the subspace ˆ V k and the E is taken over the randomness of ξ ∼ P .
Proof.
The proof is an adaptation of Theorem 3.1 in Blanchard et al.
From Lemma 3.2, we can see the larger the number of anchor gradients and the dimension of the anchor subspace k , the smaller the residual gradients.
We can choose m, k properly such that the upper bound on the expected residual gradient norm is small.
This indicates that we may use a smaller clipping threshold and consequently apply smaller noises with achieving the same privacy guarantee.
We next empirically examine the projection error r
= (cid:80) i R i, : by training a 20 -layer ResNet on
CIFAR10 dataset.
We try two different types of auxiliary data to compute the anchor gradients: 1) samples from the same source as private data with correct labels, i.e., 2000 random samples from the test data; 2) samples from different source with random labels, i.e., 2000 random samples from
ImageNet.
The relation between the dimension of anchor subspace k and the projection error rate ( (cid:13)(cid:13) 1 n r (cid:13)(cid:13) / (cid:107) g (cid:107) ) is presented in Figure 4.
We can see that the project error is small and decreases with k , and the beneﬁt of increasing k diminishes when k is large, which is implied by Lemma 3.2.
In practice one can only use small or moderate k because of the memory constraint.
GEP needs to store at least k individual gradients and each individual gradient consumes the same amount of memory as the model itself.
Moreover, we can see that the projection into anchor subspace of random labeled auxiliary data yields comparable projection error, corroborating our argument that unlabeled auxiliary data are sufﬁcient for ﬁnding the anchor subspace.
We also verify that the redundancy of residual gradients is small, by plotting the stable rank ( (cid:107)·(cid:107) F / (cid:107)·(cid:107) ) of residual gradient matrix in Figure 5.
The stable rank of residual gradient matrix is an order of magnitude higher than the stable rank of original gradient matrix.
This implies that it could be hard to further approximate R with low-dimensional embeddings.
We next compare the GEP with a scheme that simply discards the residual gradients and only outputs the perturbed gradient embedding, i.e., the output is ˜ u := ˜ w T B /n .
Remark 1.
Let ˜ u :
= ˜ w T B /n be the reconstructed gradient from noisy gradient embedding and ˜ v be the output of GEP.
If ignoring the effect of gradient clipping, we have
[Equation]
[Figure] [Figure] where r = (cid:80) i R i, : is the aggregated residual gradients, ˜ w , B are given in Algorithm 1 and the expectation is over the random noises
This indicates that ˜ u contains a systematic error that makes ˜ u always deviate from g by the residual gradient.
This systematic error is the projection error, which is plotted in Figure 4.
The systematic error cannot be mitigated by reducing the noise magnitude (e g., increasing the privacy budget or collecting more private data).
We refer to the algorithm releasing ˜ u directly as Biased-GEP or B-GEP for short, which can be viewed as an efﬁcient implementation of the algorithm in (Zhou et al., 2020).
In our experiments, B-GEP can outperform standard gradient perturbation when k is large but is inferior to GEP.
We note that the above remark is made with ignoring the clipping effect (or set a large clipping threshold).
In practice, we do apply clipping for the individual gradients at each time step, which makes the expectations in Remark 1 obscure (Chen et al., 2020b).
We note that the claim that ˜ v is an unbiased estimator of g is not that precise when applying gradient clipping.
3. P RIVATE LEARNING WITH GRADIENT EMBEDDING PERTURBATION
GEP (Algorithm 1) describes how to release one-step gradient with privacy guarantee.
In this section, we compose the privacy losses at each step to establish the privacy guarantee for the whole learning process.
The differentially private learning process with GEP is given in Algorithm 2 and the privacy analysis is presented in Theorem 3.2.
Theorem 3.2.
For any (cid:15) < 2 log(1 /δ )
and δ ∈ (0 , 1) , the output of Algorithm 2 satisﬁes ( (cid:15), δ ) -DP if we set σ ≥ 2 (cid:112) 2 T log(1 /δ ) /(cid:15) .
If the private gradients are randomly sampled from the full batch gradients, the privacy guarantee can be strengthened via the privacy ampliﬁcation by subsampling theorem of DP (Balle et al., 2018;
Wang et al., 2019; Zhu & Wang, 2019; Mironov et al., 2019).
Theorem 3.3 gives the expected excess error of Algorithm 2.
Expected excess error measures the distance between the algorithm’s output and the optimal solution in expectation.
Theorem 3.3.
Suppose the loss L ( θ ) = 1 n (cid:80) ( x ,y ) ∈ D (cid:96) ( f θ ( x ) , y ) is 1-Lipschitz, convex, and βsmooth.
If η = 1 β , T = nβ(cid:15) √ p , and ¯ θ = 1 T (cid:80) Tt =1 θ t , then we have
[Equation]
where ¯ r = 1 T (cid:80) T − 1 t =0 r 2 t and r t = max i (cid:107) ( R t ) i, : (cid:107) is the sensitivity of residual gradient at step t .
The ¯ r term represents the average projection error over the training process.
The previous best expected excess error for gradient perturbation is O ( (cid:112) p log(1 /δ ) / ( n(cid:15) ))
(Wang et al., 2017).
As shown in Lemma 3.1, if the gradients locate in a k -dimensional subspace over the training process, ¯ r = 0 and the excess error is O ( (cid:112) k log(1 /δ ) / ( n(cid:15) )) , independent of the problem ambient dimension p .
When the gradients are in general position, i.e., gradient matrix is not exact low-rank, Lemma 3.
and the empirical result give a hint on how small the residual gradients could be.
However, it is hard to get a good bound on max i (cid:107) ( R t ) i, : (cid:107) and the bound in Theorem 3.3 does not explicitly improve over previous result.
One possible solution is to use a clipping threshold based on the expected residual gradient norm.
Then the output gradient becomes biased because of clipping and the utility/privacy guarantees in Theorem 3.3/3.2 require new elaborate derivation.
We leave this for future work.
E XPERIMENTS
We conduct experiments on MNIST, extended SVHN, and CIFAR-10 datasets.
The model for MNIST has two convolutional layers with max-pooling and one fully connected layer.
The model for SVHN and CIFAR-10 is ResNet20 in He et al.
We replace all batch normalization (Ioffe & Szegedy, 2015) layers with group normalization (Wu & He, 2018) layers because batch normalization mixes the representations of different samples and makes the privacy loss cannot be analyzed accurately.
The non-private accuracy for MNIST, SVHN, and CIFAR-10 is 99.1%, 95.9%, and 90.4%, respectively.
We also provide experiments with pre-trained models in Appendix A. Anonymous (2020) show that differentially private linear classiﬁer can achieve high accuracy using the features produced by pre-trained models.
We examine whether GEP can improve the performance of such private linear classiﬁers. Notably, using the features produced by a model pre-trained on unlabeled ImageNet, GEP achieves 94.8% validation accuracy on CIFAR10 with (cid:15)
= 2 .
Evaluated algorithms
We use the algorithm in Abadi et al.
as benchmark gradient perturbation approach, referred to as “GP”.
We also compare GEP with PATE (Papernot et al., 2017).
We run the experiments for PATE using the ofﬁcial implementation 2 .
The privacy parameter (cid:15) of PATE is data-dependent and hence cannot be released directly (see Section 3.3 in Papernot et al.
Nonetheless, we report the results of PATE anyway.
Implementation details At each step, GEP needs to release two vectors: the noisy gradient embedding and the noisy residual gradient.
The gradient embeddings have a sensitivity of S 1 and the residual gradients have a sensitivity of S 2 because of the clipping.
The output of GEP can be constructed as follows: (1) normalize the gradient embeddings and residual gradients by 1 /Sand 1 /S 2 , respectively, (2) concatenate the rescaled vectors, (3) release the concatenated vector via gaussian mechanism with sensitivity √ 2 , (4) rescale the two components by S 1 and S 2 .
B-GEP only needs to release the normalized noisy gradient embedding.
We use the numerical tool in Mironov et al.
(2019) to compute the privacy loss.
For given privacy budget and sampling probability, σ is set to be the smallest value such that the privacy budget is allowable to run desired epochs.
All experiments are run on a single Tesla V100 GPU with 16G memory.
For ResNet20, the parameters are divided into ﬁve groups: input layer, output layer, and three intermediate stages.
For a given quota of basis vectors, we allocate it to each group according to the square root of the number of parameters in each group.
We compute an orthonormal subspace basis on each group separately.
Then we concatenate the projections of all groups to construct gradient embeddings.
The number of power iterations t is set as 1 as empirical evaluations suggest more iterations do not improve the performance for GEP and B-GEP.
[Table]
[Figure]
For all datasets, the anchor gradients are computed on 2000 random samples from ImageNet.
In
Appendix C, we examine the inﬂuence of choosing different numbers of anchor gradients and different sources of auxiliary data.
The selected images are downsampled into size of 32 × 32 ( 28 × 28 for
MNIST)
and we label them randomly at each update.
For SVHN and CIFAR-10, k is chosen from [500 , 1000 , 1500 , 2000] .
For MNIST, we halve the size of k .
We use SGD with momentum 0.9 as the optimizer.
Initial learning rate and batchsize are 0 .
1 and 1000 , respectively.
The learning rate is divided by 10 at middle of training.
Weight decay is set as 1 × 10 − 4 .
The clipping threshold for is 10 for gradients and 2 for residual gradients.
training epochs CIFARand MNIST is 50, 100, privacy parameter (cid:15)
= respectively. The respectively
Privacy
Results The best accuracy with given (cid:15) is in Table 4.
For all datasets, GEP achieves considerable improvement over GP in Abadi et al.
Speciﬁcally, GEP achieves 74 .
9% test accuracy on
CIFAR-10 with (8 , 10 − 5 )
-DP, outperforming GP by 18 .
PATE achieves best accuracy on MNIST but its performance drops as the dataset becomes more complex.
We also plot the relation between accuracy and k in Figure 6.
GEP is less sensitive to the choice of k and outperforms B-GEP for all choices of k .
The improvement of increasing k becomes smaller as k becomes larger.
We note that the memory cost of choosing large k is high because we need to store at least k individual gradients to compute anchor subspace.
C ONCLUSION
In this paper, we propose Gradient Embedding Perturbation (GEP) for learning with differential privacy.
GEP leverages the gradient redundancy to reduce the added noise and outputs an unbiased estimator of target gradient.
The several key designs of GEP signiﬁcantly boost the applicability of GEP.
Extensive experiments on real world datasets demonstrate the superior utility of GEP.
In the future, it is exciting to explore the usage of GEP in other kinds of tasks under the constraint of differential privacy, e.g., language modeling (McMahan et al., 2018) and GAN (Xie et al., 2018).
A E XPERIMENTS WITH PRE - TRAINED MODELS
Recent works have shown that pre-training the models on unlabeled data can be beneﬁcial for subsequent learning tasks (Chen et al., 2020a;
He et al., 2020).
Anonymous (2020) demonstrate that differentially private linear classiﬁer can achieve high accuracy using the features produced by those per-trained models.
We show that GEP can also beneﬁt from such pre-trained models.
Inspired by Anonymous (2020), we use the output of the penultimate layer of a pre-trained ResNet model as feature to train a private linear classiﬁer.
The ResNet152 model is pre-trained on unlabeled
ImageNet using SimCLR (Chen et al., 2020a).
The feature dimension is 4096.
Implementation Details We choose the privacy parameter (cid:15) from [0 . 1 , 0 . 5 , 1 , 2] .
The privacy parameter δ is 1 × 10 − 5 .
We run all experiments for 5 times and report the average accuracy.
The clipping threshold of residual gradients is still one-ﬁfth of the clipping threshold of the original gradients.
The dimension of anchor subspace is set as 200 (cid:39) √ p where p = 40960 is the model dimension.
The optimizer is Adam with default momentum coefﬁcients.
Other hyper-parameters are listed in Table 2.
[Table]
Results The experiment results are shown in Table 3.
GEP outperforms GP on all values of (cid:15) .
With privacy bound (cid:15) = 2 , GEP achieves 94.8% validation accuracy on CIFAR10 dataset, improving over the GP baseline by 1.4%.
For very strong privacy guarantee ( (cid:15) = 0 . 1 ), B-GEP performs on par with
GEP because strong privacy guarantee requires large noise and the useful signal in residual gradient is submerged in the added noise.
B-GEP beneﬁts less from larger (cid:15) compared to GP or GEP.
For (cid:15) = 1 and 2 , the performance of B-GEP is worse than the performance of GP.
This is because larger (cid:15) can not reduce the systematic error of B-GEP (see Remark 1 in Section 3.2).
[Table]
B C OMPLEXITY A NALYSIS
We provide an analysis of the computational and memory costs of the construction of anchor subspace.
The computation of the anchor subspace is the dominant additional cost of GEP compared to conventional gradient perturbation.
Notations: k , m , n [Table] and p are the dimension of anchor subspace, number of anchor gradients, number of private gradients
[Table]
and the model dimension, respectively.
In order to reduce the computational and memory costs, we divide the parameters into g groups and compute one orthonormal basis for each group.
We refer to this approach as ‘parameter grouping’.
In this section, we assume the parameters and the dimension of the anchor subspace are both divided evenly.
Table 4 summarizes the additional costs of GEP with/without parameter grouping.
Using parameter grouping can reduce the computational/memory cost signiﬁcantly.
C A BLATION S TUDY
The inﬂuence of choosing different auxiliary datasets.
We conduct experiments with different choices of auxiliary datasets.
For CIFAR10, we try 2000 random test samples from CIFAR10,
[Table]
random samples from CIFAR100, and 2000 random samples from ImageNet.
When the auxiliary dataset is CIFAR10, we try both correct labels and random labels.
For all choices of auxiliary datasets, the test accuracy is evaluated on 8000 test samples of CIFAR10 that are not used as auxiliary data.
Other implementation details are the same as in Section 4.
The results are shown in Table 5.
Surprisingly, using samples from CIFAR10 with correct labels yields the worst accuracy.
This may because the model ‘overﬁts’ the auxiliary data when it has access to correct labels, which makes the anchor subspace contains less information about the private gradients.
The best accuracy is achieved using samples from CIFAR10 with random labels, this makes sense because in this case the features of auxiliary data and private data have the same distribution.
Using samples from CIFAR100 or
ImageNet as auxiliary data has a small inﬂuence on the test accuracy.
[Table]
The inﬂuence of the number of anchor gradients.
In the main text, the size of auxiliary dataset is m = 2000 .
We conduct more experiments with different sizes of auxiliary dataset to examine the inﬂuence of m .
The auxiliary data is randomly sampled from ImageNet.
Table 6 reports the test accuracy on CIFAR10 with different choices of m .
For both B-GEP and GEP, increasing m leads to slightly improved performance.
[Table]
The projection error of random basis vectors.
It is tempting to construct the anchor subspace using random basis vectors because Johnson–Lindenstrauss Lemma (Dasgupta & Gupta, 2003) guarantees that one can preserve the pairwise distance between any two points after projecting into a random subspace of much lower dimension.
We empirically verify the projection error of Gaussian random basis vectors on CIFAR10 and SVHN.
The experiment settings are the same as in Section 4.
The projection errors over the training process are plotted in Figure 7.
The projection error of random basis vectors is very high ( > 95% ) throughout training.
This is because preserving the pairwise distance is not sufﬁcient for high quality gradient reconstruction, which requires one to preserve the average ‘distance’ between any individual gradient and all other gradients.
[Figure]
D M ISSING P ROOFS
Lemma 3.1.
Assume that the population covariance matrix Σ is with rank k and the distribution P satisﬁes P ( ξ ∈ F s )
=
for all s -ﬂats F s in R p with 0 ≤ s < k .
Let Σ = V k Λ V T k and ˆ S
= ˆ V k (cid:48)
ˆ Λ ˆ V Tk (cid:48) be the eigendecompositions of Σ and the empirical covariance matrix ˆ S , respectively, such that λ k (cid:48)
( ˆ S ) > 0 and λ k (cid:48) +
( ˆ S )
= 0 .
Then if m ≥ k , we have with probability 1, k (cid:48)
=
k and (cid:107) V k V
Tk − ˆ V k ˆ V Tk (cid:107)
= 0 .
Proof.
We extend the Theorem 3.2 in Eaton & Perlman (1973) to the low-rank case.
Theorem D.1 (Theorem 3.2 in Eaton & Perlman (1973)) .
Let X =
( x 1 , ..., x n ) where the x i are i.i.d.
random vectors in R p , n ≥ p .
If P { x 1 ∈ M } = 0 for all proper manifolds M ⊂ R p , then P { X is non-singular } =1.
We note that the subspace spanned by ˆ V k (cid:48) is in the space spanned by V k by deﬁnition.
Hence k (cid:48) ≤ k .
Let ˆ x
i := V Tk
ˆ ξ
i ∈ R k for i ∈ [ m ] .
Then ˆ X :=
(ˆ x 1 , ..., ˆ x m ) is non-singular because of the assumption and Theorem D.1.
That is rank ( ˆ X ) =
k .
Therefore rank ((ˆ ξ 1 , ..., ˆ ξ m )) ≥ k , rank ( ˆ S ) ≥ k and k (cid:48) ≥ k .
Therefore k (cid:48)
=
k and the subspace spanned by ˆ V k (cid:48) and the subspace spanned by V k are identical.
Theorem 3.1.
Let S 1 and S 2 be the sensitivity of w and r , respectively, the output of Algorithmsatisﬁes ( (cid:15), δ ) -DP for any δ ∈ (0 , 1) and (cid:15) ≤ 2 log(1 /δ ) if we choose σ 1 ≥ 2 S 1 (cid:112) 2 log(1 /δ ) /(cid:15) and σ 2 ≥ 2 S 2 (cid:112) 2 log(1 /δ ) /(cid:15) .
Proof of Theorem 3.1.
We ﬁrst introduce some background knowledge of Rényi differential privacy (RDP) (Mironov, 2017).
RDP measures the Rényi divergence between two output distributions.
Deﬁnition 2 ( ( λ, γ ) -RDP) .
A randomized mechanism f is said to guarantee ( λ, γ )
-RDP if for any neighboring datasets D , D (cid:48) and λ > 1 it holds that
[Equation]
where D λ ( ·||· ) denotes the Rényi divergence of order λ .
We next introduce some useful properties of RDP.
Lemma D.2 (Gaussian mechanism of RDP) .
Let S = max D ∼ D (cid:48) (cid:107) f
( D ) − f
( D (cid:48) )
(cid:107) be the l 2 sensitivity, then Gaussian mechanism M =
f ( D ) + z satisﬁes ( λ, λS 2 2 σ 2 ) -RDP, where z ∼ N (0 , σ 2 I p × p ) .
Lemma D.3 (Composition of RDP) .
If M 1 , M 2 satisfy ( λ, γ 1 ) -RDP and ( λ, γ 2 ) -RDP respectively, then their composition satisﬁes ( λ, γ 1 + γ 2 ) -RDP.
Lemma D.4 (Conversion from RDP to ( (cid:15), δ ) -DP) .
If M obeys ( λ, γ ) -RDP, then M obeys ( γ + log(1 /δ ) /
( λ − 1) , δ ) -DP for all 0 < δ < 1 .
Now we proof Theorem 3.1.
Let W , W (cid:48) be the gradient embeddings of two neighboring datasets D ∼ D (cid:48) and R , R (cid:48) be corresponding residual gradients.
Without loss of generality, suppose W ( R ) has one more row than W (cid:48)
( R (cid:48) ).
For given sensitivity S 1 , S 2 ,
[Equation]
If we set σ 1 = S 1 σ and σ 2 = S 2 σ for some σ , then Algorithm 1 satisﬁes ( λ, λσ 2 ) -RDP because of
Lemma D.2 and D.3.
In order to guarantee ( (cid:15), δ ) -DP, we need
[Equation]
Choose λ
= 1 + 2log(1 /δ )
(cid:15) and rearrange Eq (5), we need
[Equation]
Then using the constraint on (cid:15) concludes the proof.
Theorem 3.2.
For any (cid:15) < 2 log(1 /δ )
and δ ∈ (0 , 1) , the output of Algorithm 2 satisﬁes ( (cid:15), δ ) -DP if we set σ ≥ 2 (cid:112) 2 T log(1 /δ ) /(cid:15) .
Proof of Theorem 3.2.
From the proof of Theorem 3.1, we have each call of GEP satisﬁes ( λ, λσ 2 ) -
RDP.
Then by the composition property of RDP (Lemma D.3), the output of Algorithm 2 satisﬁes ( λ, Tλσ 2 ) -RDP.
Plugging Tλσ 2 into Equation 5 and 6 concludes the proof.
Theorem 3.3.
Suppose the loss L ( θ ) = 1 n (cid:80) ( x ,y ) ∈ D (cid:96) ( f θ ( x ) , y ) is 1-Lipschitz, convex, and βsmooth.
If η = 1 β , T = nβ(cid:15) √ p , and ¯ θ = 1 T (cid:80) Tt =1 θ t , then we have
[Equation]
where ¯ r = 1 T (cid:80) T − 1 t =0 r 2 t and r t = max i (cid:107) ( R t ) i, : (cid:107) is the sensitivity of residual gradient at step t .
Proof of Theorem 3.3.
The β -smooth condition gives
[Equation] [Equation]
Based on the update rule of GEP we have
[Equation] [Equation]
where z (1) t ∼
[Equation] [Equation]
∼ N (0 , σ 2 r 2 t I p × p ) are the perturbation noises and r t = max i (cid:107) ( R t )
i, : (cid:107) is the sensitivity of residual gradients at step t .
Take expectation on Eq (7) with respect to the perturbation noises.
[Equation]
Subtract L ( θ ∗ ) from both sides, we have
[Equation]
[Equation]
The second inequality holds because L is convex.
Then choose η = 1 β and plug ∇ L ( θ t ) =
( θ t − θ t +1 )
/η − ( z t 1 B + z t 2 ) /n into Eq (10).
[Equation]
Sum over t = 0 , . .
, T − 1 and use convexity, we have
[Equation]
Then substituting T = nβ(cid:15) √ p and σ = O ( (cid:112) T log(1 /δ ) /(cid:15) )
yields the desired bound.