Private Stochastic Convex Optimization with Optimal Rates
Raef Bassily, Vitaly Feldman, Kunal Talwar, Abhradeep Thakurta
Introduction
The first work to address the population loss for SCO with differential privacy (DP-SCO) is . It gives bounds based on two natural approaches. The first approach is to use the generalization properties of differential privacy itself to bound the gap between the empirical and population losses , and thus derive bounds for SCO from bounds on ERM. This approach leads to a suboptimal bound (specifically For clarity, in the introduction we focus on the dependence on and and for -DP. We suppress the dependence on and on parameters of the loss function such as Lipschitz constant and the constraint set radius., [4, Sec. F]). For the important case when and this results in the bound of on excess population loss. The second approach relies on generalization properties of stability to bound the gap between the empirical and population losses . Stability is ensured by adding a strongly convex regularizer to the empirical loss . This technique also yields a suboptimal bound on the excess population loss .
There are two natural lower bounds that apply to DP-SCO. The lower bound of for the excess loss of non-private SCO applies for DP-SCO. Further it is not hard to show that lower bounds for DP-ERM translate to essentially the same lower bound for DP-SCO, leading to a lower bound of (see Appendix C for the proof).
In this work, we address the gap between the known bounds for DP-SCO. Specifically, we show that the optimal rate of is achievable, matching the known lower bounds. In particular, we obtain the statistically optimal rate of whenever . This is in contrast to the situation for DP-ERM where the cost of privacy grows with the dimension for all .
In our first result we show that, under relatively mild smoothness assumptions, this rate is achieved by a variant of the standard noisy mini-batch SGD. The classical analyses for non-private SCO depend crucially on making only one pass over the dataset. However, a single pass noisy SGD is not sufficiently accurate as we need a non-trivial amount of noise in each step to carry out the privacy analysis. We rely instead on generalization properties of uniform stability . Unlike in , our analysis of stability is based on extension of recent stability analysis of SGD to noisy SGD. In this analysis, the stability parameter degrades with the number of passes over the dataset, while the empirical loss decreases as we make more passes. In addition, the batch size needs to be sufficiently large to ensure that the noise added for privacy is small. To satisfy all these constraints the parameters of the scheme need to be tuned carefully. Specifically we show that steps of SGD with a batch size of are sufficient to get all the desired properties.
Finally, we show that Objective Perturbation also achieves optimal bounds for DP-SCO. However, objective perturbation is only known to satisfy privacy under some additional assumptions, most notably, Hessian being rank on all points in the domain. The generalization analysis in this case is based on the uniform stability of the solution to strongly convex ERM. Aside from extending the analysis of this approach to population loss, we show that it can lead to algorithms for DP-SCO that use only near-linear number of gradient evaluations (whenever these assumptions hold). In particular, we give a variant of objective perturbation in conjunction with the stochastic variance reduced gradient descent (SVRG) with only gradient evaluations. We remark that the known lower bounds for uniform convergence hold even under those additional assumptions invoked in objective perturbation. Finding algorithms with near-linear running time in the general setting of SCO is a natural avenue for future research.
Our work highlights the importance of uniform stability as a tool for analysis of this important class of problems. We believe it should have applications to other differentially private statistical analyses.
Differentially private empirical risk minimization (ERM) is a well-studied area spanning over a decade . Aside from and work in the local model of DP these works focus on achieving optimal empirical risk bounds under privacy. Our work builds heavily on algorithms and analyses developed in this line of work while contributing additional insights.
Preliminaries
where the expectation is taken only over the internal randomness of .
We will use the following simple generalization property of stability that upper bounds the expectation of population loss. Our bounds on excess population loss can also be shown to hold (up to log factors) with high probability using the results from .
where the expectation is taken over the choice of , and any internal randomness in .
A randomized algorithm is -differentially private if, for any pair of datasets and differ in exactly one data point, and for all events in the output range of , we have
where the probability is taken over the random coins of . For meaningful privacy guarantees, the typical settings of the privacy parameters are and .
An -DP-SCO algorithm is a SCO algorithm that satisfies -differential privacy.
Private SCO via Mini-batch Noisy SGD
Algorithm 1 is -differentially private.
The proof follows from [1, Theorem 1], which gives a tight privacy analysis for mini-batch NSGD via the Moments Accountant technique and privacy amplification via sampling. We note that the setting of the mini-batch size in Step 2 of Algorithm 1 satisfies the condition in [1, Theorem 1] (we obtain here an explicit value for the universal constants in the aforementioned theorem in that reference). We also note that the setting of the Gaussian noise in is not normalized by the mini-batch size, and hence the noise variance reported in [1, Theorem 1] is larger than our setting of by a factor of . ∎
The population loss attained by is given by the next theorem.
Let be any distribution over and let . Suppose . Let and . Then,
Before proving the above theorem, we first state and prove the following useful lemmas.
Let . Suppose the parameter set is convex and -bounded. For any the excess empirical loss of satisfies
where the expectation is taken with respect to the choice of the mini-batch (step 5) and the independent Gaussian noise vectors .
The proof follows from the classical analysis of the stochastic oracle model (see, e.g., ).In particular, we can show that
where the last term captures the additional empirical error due to privacy. The statement now follows from the setting of in Algorithm 1. ∎
The following lemma is a simple extension of the results on uniform stability of GD methods that appeared in and [17, Lemma 4.3] to the case of mini-batch noisy SGD. For completeness, we provide a proof in Appendix A.
By Lemma 2.2, -uniform stability implies that the expected population loss is upper bounded by plus the expected empirical loss. Hence, by combining Lemma 3.3 with Lemma 3.4, we have
Private SCO for Non-smooth Losses
In this section, we consider the setting where the convex loss is non-smooth. First, we show a generic reduction to the smooth case by employing the smoothing technique known as Moreau-Yosida regularization (a.k.a. Moreau envelope smoothing) . Given an appropriately smoothed version of the loss, we obtain the optimal population loss w.r.t. the original non-smooth loss function. Computing the smoothed loss via this technique is generally computationally inefficient. Hence, we move on to describe a computationally efficient algorithm for the non-smooth case with essentially optimal population loss. Our construction is based on an adaptation of our noisy SGD algorithm (Algorithm 1) that exploits some useful properties of Moreau-Yosida smoothing technique that stem from its connection to proximal operations.
Moreau envelope has direct connection with the proximal operator of a function defined below.
It follows that the Moreau envelope can be written as
The following lemma states some useful, known properties of Moreau envelope.
is convex, -Lipschitz, and -smooth.
The convexity and -smoothness together with properties 2 and 3 are fairly standard and the proof can be found in the aforementioned references. The fact that is -Lipschitz follows easily from property 3. We include the proof of this fact in Appendix B for completeness.
Let be the output of . Using property 1 of Lemma 4.3 together with Theorem 3.2, we have
Now, by property 2 of Lemma 2 and the setting of in the theorem statement, for every , we have
Putting these together gives the stated result. ∎
Computing the Moreau envelope of a function is computationally inefficient in general. However, by property 3 of Lemma 4.3, we note that evaluating the gradient of Moreau envelope at any point can be attained by evaluating the proximal operator of the function at that point. Evaluating the proximal operator is equivalent to minimizing a strongly convex function (see Definition 4.2). This can be approximated efficiently, e.g., via gradient descent. Since our algorithm (Algorithm 1) requires only sufficiently accurate gradient evaluations, we can hence use an efficient, approximate proximal operator to approximate the gradient of the smoothed losses. The gradient evaluations in will thus be replaced with such approximate gradients evaluated via the approximate proximal operator. The resulting algorithm, referred to as , will approximately minimize the smoothed empirical loss without actually computing the smoothed losses.
This fact follows from the fact that where . This is minimization of -strongly convex and -Lipschitz function over , The Lipschitz constant follows from the fact that . Hence, one can run ordinary Gradient Descent to obtain an approximate minimizer. From a standard result on convergence of GD for strongly convex and Lipschitz functions , in gradient steps we obtain an approximate satisfying , where . Since is -strongly convex, we get .
if we use the approximate proximal operator in Fact 4.6, then it is easy to see that requires a number of gradient evaluations that is a factor of more than , where That is, the total number of gradient evaluations is where is the mini-batch size.
We now argue that privacy, stability, and accuracy of the algorithm are preserved under the approximate proximal operator.
Note that the approximation error in the gradient of the mini-batch (due to the approximate proximal operation) can be viewed as a fixed error term of magnitude at most that is added to the exact gradient of the smoothed loss. It is well-known and easy to see that the effect of this additional approximation error on the standard convergence bounds is that excess empirical loss may grow by at most the error times the diameter of the domain (e.g. ). Hence, compared to the error bound error in Lemma 3.3, the bound we get incurs an additional term of . Clearly, this additional error is dominated by the other terms in the empirical loss bound in Lemma 3.3, and thus will have no significant impact on the final bound.
This easily follows from the following facts. First, note that the additional approximation error due to gradient approximation is . Second, the gradient update w.r.t. the exact gradient of the smoothed loss is non-expansive operation (which is the key fact in proving uniform stability of (stochastic) gradient methods ), and hence the approximation error in the gradient is not going to be amplified by the gradient update step. Hence, for any trajectory of approximate gradient updates, the accumulated approximation error in the final output cannot exceed . This cannot increase the final uniform stability bound by more than an additive term of . Thus, we obtain basically the same bound in Lemma 3.4.
Putting these together, we have argued that is computationally efficient algorithm that achieves the optimal population loss bound in Theorem 4.4.
Private SCO via Objective Perturbation
In this section, we show that the technique known as objective perturbation can be used to attain optimal population loss for a large subclass of convex, smooth losses. In objective perturbation, the empirical loss is first perturbed by adding two terms: a noisy linear term and a regularization term. As shown in , under some additional assumptions on the Hessian of the loss, an appropriate random perturbation ensures differential privacy. The excess empirical loss of this technique for smooth convex losses was originally analyzed in the aforementioned works, and was shown to be optimal by the lower bound in . We revisit this technique and show that the regularization term added for privacy can be used to attain the optimal excess population loss by exploiting the stability-inducing property of regularization.
The description of the objective perturbation algorithm is given in Algorithm 2. The outline of the algorithm is the same as the one in for the case of -differential privacy.
The regularization term as appears in is of different scaling than the one that appears in . In particular, the regularization term in is normalized by , whereas here it is not. Hence, whenever the results from are used here, the regularization parameter in their statements should be replaced with . This presentation choice is more consistent with literature on regularization.
The privacy guarantee of is given in the following theorem, which follows directly from .
Suppose that Assumption 5.1 holds and that the smoothness parameter satisfies . Then, is -differentially private.
We now state our main result for this section showing that, with appropriate setting for , yields asymptotically optimal excess population loss.
Let be any distribution over and let . Suppose that Assumption 5.1 holds. Suppose that is -bounded. In set Then, we have
According to Theorem 5.2, -differential privacy of entails the assumption that With the setting of in Theorem 5.3, it would suffice to assume that
To prove the above theorem, we use the following lemmas.
Let . Under Assumption 5.1, the excess empirical loss of satisfies
where the expectation is taken over the Gaussian noise in .
The next lemma states the well-known stability property of regularized empirical risk minimization.
Proof of Theorem 5.3
where we assume (since otherwise we would have the trivial error).
1 Oracle Efficient Objective Perturbation
Suppose that Assumption 5.1 holds and that the smoothness parameter satisfies . Then, Algorithm is -differentially private.
Let , and , where is the optimizer defined in Algorithm . Notice that one can compute from the tuple by simple post-processing. Furthermore, the algorithm that outputs is -differentially private by Theorem 5.2. In the following, we will bound in order to make differentially private, conditioned on the knowledge of .
As is -strongly convex, so that
Let be any distribution over and let . Suppose that Assumption 5.1 holds and that is -bounded. In Algorithm , set , . Then, we have
Let . For defined in Step 3 of , notice that using Theorem 5.3,
when . Therefore, , which completes the proof. ∎
Let be -smooth, -strongly convex functions over , , and . Let be an arbitrary initial point. For , let . For , let
where is drawn uniformly at random from , and . Then, for it holds that:
Acknowledgements
We thank Adam Smith, Thomas Steinke and Jon Ullman for the insightful discussions of the problem at the early stages of this project. We are also grateful to Tomer Koren for bringing the Moreau-Yosida smoothing technique to our attention.
References
Appendix A Proof of Lemma 3.4
Consider iterations of . Let denote the noise vectors and denote the index sets of the mini-batches selected in the iterations. Consider any pair of datasets and differing in exactly one data point for some fixed . Let and denote the trajectories of corresponding to input datasets and , respectively. For any let .
We follow the proof technique of [17, Lemma 4.3]. We prove the following claim via induction on :
where the expectation is taken over . First, it’s trivial to see that the claim is true for . Suppose the claim holds for all . Fix the randomness in and . Let denote the number of occurrences of the index (where and differ) in . By the non-expansiveness property of the gradient update step, we have
Now, we now invoke the randomness in and . Note that is a Binomial random variable with mean . Hence, by taking expectation and using the induction hypothesis, we end up with
Appendix B Proof of Lipschitz property of Moreau envelope (Lemma 4.3)
Fix any . We will show that Define . Note that Let denote . Now, observe that
where the last inequality follows from the fact that is -Lipschitz. Thus, we get By property 3, we have . This together with the above bound gives the desired result.
Appendix C Optimality of Our Bounds
Our upper bounds in Sections 3 and 4 are tight (up to logarithmic factors in ). In particular, our bounds match a lower bound of on the excess population loss. The first term is simply the known lower bound on the excess population loss in the non-private setting. The second term follows from the lower bound in on excess empirical loss, and the fact that a lower bound on excess empirical loss implies nearly the same lower bound on the excess population loss. We elaborate on this below.
Fix any . Suppose algorithm described above exists. We construct algorithm as follows:
Given input dataset let be the empirical distribution induced by .
First, note that . This easily follows from the fact that for any , . In particular, observe that
Next, we show that is -differentially private. Let be neighboring datasets differing in single point whose index is . Let be the samples obtained by running on respectively, with the same set of random coins in Step 2. More precisely, let denote the random sampling procedure used in Step 2, and define and . Let be the number of times the -th point of the input dataset is sampled by . Hence, , i.e., is the number of points where and differ. By Chernoff’s bound, with probability . Let be any measurable subset of the range of . Observe that
where the third inequality follows from the fact that is -differentially private and group differential privacy (e.g. ). This shows that is -differentially private, proving the reduction, and hence, the lower bound.