Differentially Private Empirical Risk Minimization

Kamalika Chaudhuri, Claire Monteleoni, Anand D. Sarwate

Introduction

Privacy has become a growing concern, due to the massive increase in personal information stored in electronic databases, such as medical records, financial records, web search histories, and social network data. Machine learning can be employed to discover novel population-wide patterns, however the results of such algorithms may reveal certain individuals’ sensitive information, thereby violating their privacy. Thus, an emerging challenge for machine learning is how to learn from datasets that contain sensitive personal information.

At the first glance, it may appear that simple anonymization of private information is enough to preserve privacy. However, this is often not the case; even if obvious identifiers, such as names and addresses, are removed from the data, the remaining fields can still form unique “signatures” that can help re-identify individuals. Such attacks have been demonstrated by various works, and are possible in many realistic settings, such as when an adversary has side information (Sweeney, 1997; Narayanan and Shmatikov, 2008; Ganta et al., 2008), and when the data has structural properties (Backstrom et al., 2007), among others. Moreover, even releasing statistics on a sensitive dataset may not be sufficient to preserve privacy, as illustrated on genetic data (Homer et al., 2008; Wang et al., 2009). Thus, there is a great need for designing machine learning algorithms that also preserve the privacy of individuals in the datasets on which they train and operate.

In this paper we focus on the problem of classification, one of the fundamental problems of machine learning, when the training data consists of sensitive information of individuals. Our work addresses the Empirical risk minimization (ERM) framework for classification, in which a classifier is chosen by minimizing the average over the training data of the prediction loss (with respect to the label) of the classifier in predicting each training data point. In this work, we focus on regularized ERM in which there is an additional term in the optimization, called the regularizer, which penalizes the complexity of the classifier with respect to some metric. Regularized ERM methods are widely used in practice, for example in logistic regression and support vector machines (SVMs), and many also have theoretical justification in the form of generalization error bounds with respect to independently, identically distributed (i.i.d.) data (see Vapnik (1998) for further details).

For our privacy measure, we use a definition due to Dwork et al. (2006b), who have proposed a measure of quantifying the privacy-risk associated with computing functions of sensitive data. Their ϵ\epsilon-differential privacy model is a strong, cryptographically-motivated definition of privacy that has recently received a significant amount of research attention for its robustness to known attacks, such as those involving side information (Ganta et al., 2008). Algorithms satisfying ϵ\epsilon-differential privacy are randomized; the output is a random variable whose distribution is conditioned on the data set. A statistical procedure satisfies ϵ\epsilon-differential privacy if changing a single data point does not shift the output distribution by too much. Therefore, from looking at the output of the algorithm, it is difficult to infer the value of any particular data point.

In this paper, we develop methods for approximating ERM while guaranteeing ϵ\epsilon-differential privacy. Our results hold for loss functions and regularizers satisfying certain differentiability and convexity conditions. An important aspect of our work is that we develop methods for end-to-end privacy; each step in the learning process can cause additional risk of privacy violation, and we provide algorithms with quantifiable privacy guarantees for training as well as parameter tuning. For training, we provide two privacy-preserving approximations to ERM. The first is output perturbation, based on the sensitivity method proposed by Dwork et al. (2006b). In this method noise is added to the output of the standard ERM algorithm. The second method is novel, and involves adding noise to the regularized ERM objective function prior to minimizing. We call this second method objective perturbation. We show theoretical bounds for both procedures; the theoretical performance of objective perturbation is superior to that of output perturbation for most problems. However, for our results to hold we require that the regularizer be strongly convex (ruling L1L_{1} regularizers) and additional constraints on the loss function and its derivatives. In practice, these additional constraints do not affect the performance of the resulting classifier; we validate our theoretical results on data sets from the UCI repository.

In practice, parameters in learning algorithms are chosen via a holdout data set. In the context of privacy, we must guarantee the privacy of the holdout data as well. We exploit results from the theory of differential privacy to develop a privacy-preserving parameter tuning algorithm, and demonstrate its use in practice. Together with our training algorithms, this parameter tuning algorithm guarantees privacy to all data used in the learning process.

Guaranteeing privacy incurs a cost in performance; because the algorithms must cause some uncertainty in the output, they increase the loss of the output predictor. Because the ϵ\epsilon-differential privacy model requires robustness against all data sets, we make no assumptions on the underlying data for the purposes of making privacy guarantees. However, to prove the impact of privacy constraints on the generalization error, we assume the data is i.i.d. according to a fixed but unknown distribution, as is standard in the machine learning literature. Although many of our results hold for ERM in general, we provide specific results for classification using logistic regression and support vector machines. Some of the former results were reported in Chaudhuri and Monteleoni (2008); here we generalize them to ERM and extend the results to kernel methods, and provide experiments on real datasets.

More specifically, the contributions of this paper are as follows:

We derive a computationally efficient algorithm for ERM classification, based on the sensitivity method due to Dwork et al. (2006b). We analyze the accuracy of this algorithm, and provide an upper bound on the number of training samples required by this algorithm to achieve a fixed generalization error.

We provide a general technique, objective perturbation, for providing computationally efficient, differentially private approximations to regularized ERM algorithms. This extends the work of Chaudhuri and Monteleoni (2008), which follows as a special case, and corrects an error in the arguments made there. We apply the general results on the sensitivity method and objective perturbation to logistic regression and support vector machine classifiers. In addition to privacy guarantees, we also provide generalization bounds for this algorithm.

For kernel methods with nonlinear kernel functions, the optimal classifier is a linear combination of kernel functions centered at the training points. This form is inherently non-private because it reveals the training data. We adapt a random projection method due to Rahimi and Recht (Rahimi and Recht, 2007, 2008b), to develop privacy-preserving kernel-ERM algorithms. We provide theoretical results on generalization performance.

Because the holdout data is used in the process of training and releasing a classifier, we provide a privacy-preserving parameter tuning algorithm based on a randomized selection procedure (McSherry and Talwar, 2007) applicable to general machine learning algorithms. This guarantees end-to-end privacy during the learning procedure.

We validate our results using experiments on two datasets from the UCI Machine Learning repositories (Asuncion and Newman, 2007)) and KDDCup (Hettich and Bay, 1999). Our results show that objective perturbation is generally superior to output perturbation. We also demonstrate the impact of end-to-end privacy on generalization error.

There has been a significant amount of literature on the ineffectiveness of simple anonymization procedures. For example, Narayanan and Shmatikov (2008) show that a small amount of auxiliary information (knowledge of a few movie-ratings, and approximate dates) is sufficient for an adversary to re-identify an individual in the Netflix dataset, which consists of anonymized data about Netflix users and their movie ratings. The same phenomenon has been observed in other kinds of data, such as social network graphs (Backstrom et al., 2007), search query logs (Jones et al., 2007) and others. Releasing statistics computed on sensitive data can also be problematic; for example, Wang et al. (2009) show that releasing R2R^{2}-values computed on high-dimensional genetic data can lead to privacy breaches by an adversary who is armed with a small amount of auxiliary information.

There has also been a significant amount of work on privacy-preserving data mining (Agrawal and Srikant, 2000; Evfimievski et al., 2003; Sweeney, 2002; Machanavajjhala et al., 2006), spanning several communities, that uses privacy models other than differential privacy. Many of the models used have been shown to be susceptible to composition attacks, attacks in which the adversary has some reasonable amount of prior knowledge (Ganta et al., 2008). Other work (Mangasarian et al., 2008) considers the problem of privacy-preserving SVM classification when separate agents have to share private data, and provides a solution that uses random kernels, but does provide any formal privacy guarantee.

An alternative line of privacy work is in the Secure Multiparty Computation setting due to Yao (1982), where the sensitive data is split across multiple hostile databases, and the goal is to compute a function on the union of these databases. Zhan and Matwin (2007) and Laur et al. (2006) consider computing privacy-preserving SVMs in this setting, and their goal is to design a distributed protocol to learn a classifier. This is in contrast with our work, which deals with a setting where the algorithm has access to the entire dataset.

Differential privacy, the formal privacy definition used in our paper, was proposed by the seminal work of Dwork et al. (2006b), and has been used since in numerous works on privacy (Chaudhuri and Mishra, 2006; McSherry and Talwar, 2007; Nissim et al., 2007; Barak et al., 2007; Chaudhuri and Monteleoni, 2008; Machanavajjhala et al., 2008). Unlike many other privacy definitions, such as those mentioned above, differential privacy has been shown to be resistant to composition attacks (attacks involving side-information) (Ganta et al., 2008). Some follow-up work on differential privacy includes work on differentially-private combinatorial optimization, due to Gupta et al. (2010), and differentially-private contingency tables, due to Barak et al. (2007) and Kasivishwanathan et al. (2010). Wasserman and Zhou (2010) provide a more statistical view of differential privacy, and Zhou et al. (2009) provide a technique of generating synthetic data using compression via random linear or affine transformations.

Previous literature has also considered learning with differential privacy. One of the first such works is Kasiviswanathan et al. (2008), which presents a general, although computationally inefficient, method for PAC-learning finite concept classes. Blum et al. (2008) presents a method for releasing a database in a differentially-private manner, so that certain fixed classes of queries can be answered accurately, provided the class of queries has a bounded VC-dimension. Their methods can also be used to learn classifiers with a fixed VC-dimension – see Kasiviswanathan et al. (2008); however the resulting algorithm is also computationally inefficient. Some sample complexity lower bounds in this setting have been provided by Beimel et al. (2010). In addition, Dwork and Lei (2009) explore a connection between differential privacy and robust statistics, and provide an algorithm for privacy-preserving regression using ideas from robust statistics. However, their algorithm also requires a running time which is exponential in the data dimension, and is hence computationally inefficient.

This work builds on our preliminary work in Chaudhuri and Monteleoni (2008). We first show how to extend the sensitivity method, a form of output perturbation, due to Dwork et al. (2006b), to classification algorithms. In general, output perturbation methods alter the output of the function computed on the database, before releasing it; in particular the sensitivity method makes an algorithm differentially private by adding noise to its output. In the classification setting, the noise protects the privacy of the training data, but increases the prediction error of the classifier. Recently, independent work by Rubinstein et al. (2009) has reported an extension of the sensitivity method to linear and kernel SVMs. Their utility analysis differs from ours, and thus the analogous generalization bounds are not comparable. Because Rubinstein et al. use techniques from algorithmic stability, their utility bounds compare the private and non-private classifiers using the same value for the regularization parameter. In contrast, our approach takes into account how the value of the regularization parameter might change due to privacy constraints. In contrast, we propose the objective perturbation method, in which noise is added to the objective function before optimizing over the space classifiers. Both the sensitivity method and objective perturbation result in computationally efficient algorithms for our specific case. In general, our theoretical bounds on sample requirement are incomparable with the bounds of Kasiviswanathan et al. (2008) because of the difference between their setting and ours.

Our approach to privacy-preserving tuning uses the exponential mechanism of McSherry and Talwar (2007) by training classifiers with different parameters on disjoint subsets of the data and then randomizing the selection of which classifier to release. This bears a superficial resemblance to the sample-and-aggregate (Nissim et al., 2007) and V-fold cross-validation, but only in the sense that only a part of the data is used to train the classifier. One drawback is that our approach requires significantly more data in practice. Other approaches to selecting the regularization parameter could benefit from a more careful analysis of the regularization parameter, as in Hastie et al. (2004).

Model

In regularized empirical risk minimization (ERM), we choose a predictor f\mathbf{f} that minimizes the regularized empirical loss:

This minimization is performed over f\mathbf{f} in an hypothesis class H\mathcal{H}. The regularizer N(⋅)N(\cdot) prevents over-fitting. For the first part of this paper we will restrict our attention to linear predictors and with some abuse of notation we will write f(x)=fTx\mathbf{f}(\mathbf{x})=\mathbf{f}^{T}\mathbf{x}.

2 Assumptions on loss and regularizer

The conditions under which we can prove results on privacy and generalization error depend on analytic properties of the loss and regularizer. In particular, we will require certain forms of convexity (see Rockafellar and Wets (1998)).

It is said to be λ\lambda-strongly convex if for all α∈(0,1)\alpha\in(0,1), f\mathbf{f}, and g\mathbf{g},

3 Privacy model

We are interested in producing a classifier in a manner that preserves the privacy of individual entries of the dataset D\mathcal{D} that is used in training the classifier. The notion of privacy we use is the ϵ\epsilon-differential privacy model, developed by Dwork et al. (2006b); Dwork (2006), which defines a notion of privacy for a randomized algorithm A(D)\mathcal{A}(\mathcal{D}). Suppose A(D)\mathcal{A}(\mathcal{D}) produces a classifier, and let D′\mathcal{D}^{\prime} be another dataset that differs from D\mathcal{D} in one entry (which we assume is the private value of one person). That is, D′\mathcal{D}^{\prime} and D\mathcal{D} have n−1n-1 points (xi,yi)(\mathbf{x}_{i},y_{i}) in common. The algorithm A\mathcal{A} provides differential privacy if for any set \SS\SS, the likelihood that A(D)∈\SS\mathcal{A}(\mathcal{D})\in\SS is close to the likelihood A(D′)∈\SS\mathcal{A}(\mathcal{D}^{\prime})\in\SS, (where the likelihood is over the randomness in the algorithm). That is, any single entry of the dataset does not affect the output distribution of the algorithm by much; dually, this means that an adversary, who knows all but one entry of the dataset, cannot gain much additional information about the last entry by observing the output of the algorithm.

The following definition of differential privacy is due to Dwork et al. (2006b), paraphrased from Wasserman and Zhou (2010).

An algorithm A(B)\mathcal{A}(\mathcal{B}) taking values in a set T\mathcal{T} provides ϵp\epsilon_{p}-differential privacy if

where the first supremum is over all measurable S⊆T\mathcal{S}\subseteq\mathcal{T}, the second is over all datasets D\mathcal{D} and D′\mathcal{D}^{\prime} differing in a single entry, and μ(⋅∣B)\mu(\cdot|\mathcal{B}) is the conditional distribution (measure) on T\mathcal{T} induced by the output A(B)\mathcal{A}(\mathcal{B}) given a dataset B\mathcal{B}. The ratio is interpreted to be 1 whenever the numerator and denominator are both 0.

Note that if S\mathcal{S} is a set of measure 0 under the conditional measures induced by D\mathcal{D} and D′\mathcal{D}^{\prime}, the ratio is automatically 1. A more measure-theoretic definition is given in Zhou et al. (2009). An illustration of the definition is given in Figure 1.

The following form of the definition is due to Dwork et al. (2006a).

An algorithm A\mathcal{A} provides ϵp\epsilon_{p}-differential privacy if for any two datasets D\mathcal{D} and D′\mathcal{D}^{\prime} that differ in a single entry and for any set \SS\SS,

where A(D)\mathcal{A}(\mathcal{D}) (resp. A(D′)\mathcal{A}(\mathcal{D}^{\prime})) is the output of A\mathcal{A} on input D\mathcal{D} (resp. D′\mathcal{D}^{\prime}).

We observe that an algorithm A\mathcal{A} that satisfies Equation 4 also satisfies Equation 5, and as a result, Definition 2 is stronger than Definition 3.

From this definition, it is clear that the A(D)\mathcal{A}(\mathcal{D}) that outputs the minimizer of the ERM objective (1) does not provide ϵp\epsilon_{p}-differential privacy for any ϵp\epsilon_{p}. This is because an ERM solution is a linear combination of some selected training samples “near” the decision boundary. If D\mathcal{D} and D′\mathcal{D}^{\prime} differ in one of these samples, then the classifier will change completely, making the likelihood ratio in (5) infinite. Regularization helps by penalizing the L2L_{2} norm of the change, but does not account how the direction of the minimizer is sensitive to changes in the data.

To compute a function gg on a dataset D={z1,…,zn}\mathcal{D}=\{z_{1},\ldots,z_{n}\}, the sensitivity method outputs g(z1,…,zn)+ηg(z_{1},\ldots,z_{n})+\eta, where η\eta is a random variable drawn according to the Laplace distribution, with mean and standard deviation S(g)ϵp\frac{S(g)}{\epsilon_{p}}. It is shown in Dwork et al. (2006b) that such a procedure is ϵp\epsilon_{p}-differentially private.

Privacy-preserving ERM

Here we describe two approaches for creating privacy-preserving algorithms from (1).

Algorithm 1 is derived from the sensitivity method of Dwork et al. (2006b), a general method for generating a privacy-preserving approximation to any function A(⋅)A(\cdot). In this section the norm ∥⋅∥\|\cdot\| is the L2L_{2}-norm unless otherwise specified. For the function A(D)=argminJ(f,D)A(\mathcal{D})=\mathop{\rm argmin}J(\mathbf{f},\mathcal{D}), Algorithm 1 outputs a vector A(D)+bA(\mathcal{D})+\mathbf{b}, where b\mathbf{b} is random noise with density

where α\alpha is a normalizing constant. The parameter β\beta is a function of ϵp\epsilon_{p}, and the L2L_{2}-sensitivity of A(⋅)A(\cdot), which is defined as follows.

The L2L_{2}-sensitivity of a vector-valued function is defined as the maximum change in the L2L_{2} norm of the value of the function when one input changes. More formally,

The interested reader is referred to Dwork et al. (2006b) for further details. Adding noise to the output of A(⋅)A(\cdot) has the effect of masking the effect of any particular data point. However, in some applications the sensitivity of the minimizer argminJ(f,D)\mathop{\rm argmin}J(\mathbf{f},\mathcal{D}) may be quite high, which would require the sensitivity method to add noise with high variance.

2 Objective perturbation

A different approach, first proposed by Chaudhuri and Monteleoni (2008), is to add noise to the objective function itself and then produce the minimizer of the perturbed objective. That is, we can minimize

where b\mathbf{b} has density given by (7), with β=ϵp\beta=\epsilon_{p}. Note that the privacy parameter here does not depend on the sensitivity of the of the classification algorithm.

The algorithm requires a certain slack, log⁡(1+2cnΛ+c2n2Λ2)\log(1+\frac{2c}{n\Lambda}+\frac{c^{2}}{n^{2}\Lambda^{2}}), in the privacy parameter. This is due to additional factors in bounding the ratio of the densities. The “If” statement in the algorithm is from having to consider two cases in the proof of Theorem 2, which shows that the algorithm is differentially private.

3 Privacy guarantees

In this section, we establish the conditions under which Algorithms 1 and 2 provide ϵp\epsilon_{p}-differential privacy. First, we establish guarantees for Algorithm 1.

The proof of Theorem 1 follows from Corollary 1, and Dwork et al. (2006b). The proof is provided here for completeness.

where b1\mathbf{b}_{1} and b2\mathbf{b}_{2} are the corresponding noise vectors chosen in Step 1 of Algorithm 1, and g(f∣D)g(\mathbf{f}|\mathcal{D}) (g(f∣D′)g(\mathbf{f}|\mathcal{D}^{\prime}) respectively) is the density of the output of Algorithm 1 at f\mathbf{f}, when the input is D\mathcal{D} (D′\mathcal{D}^{\prime} respectively). If f1\mathbf{f}_{1} and f2\mathbf{f}_{2} are the solutions respectively to non-private regularized ERM when the input is D\mathcal{D} and D′\mathcal{D}^{\prime}, then, b2−b1=f2−f1\mathbf{b}_{2}-\mathbf{b}_{1}=\mathbf{f}_{2}-\mathbf{f}_{1}. From Corollary 1, and using a triangle inequality,

Moreover, by symmetry, the density of the directions of b1\mathbf{b}_{1} and b2\mathbf{b}_{2} are uniform. Therefore, by construction, ν(b1)ν(b2)≤eϵp\frac{\nu(\mathbf{b}_{1})}{\nu(\mathbf{b}_{2})}\leq e^{\epsilon_{p}}. The theorem follows. ∎

The main ingredient of the proof of Theorem 1 is a result about the sensitivity of regularized ERM, which is provided below.

Let G(f)G(\mathbf{f}) and g(f)g(\mathbf{f}) be two vector-valued functions, which are continuous, and differentiable at all points. Moreover, let G(f)G(\mathbf{f}) and G(f)+g(f)G(\mathbf{f})+g(\mathbf{f}) be λ\lambda-strongly convex. If f1=argminfG(f)\mathbf{f}_{1}=\mathop{\rm argmin}_{\mathbf{f}}G(\mathbf{f}) and f2=argminfG(f)+g(f)\mathbf{f}_{2}=\mathop{\rm argmin}_{\mathbf{f}}G(\mathbf{f})+g(\mathbf{f}), then

Using the definition of f1\mathbf{f}_{1} and f2\mathbf{f}_{2}, and the fact that GG and gg are continuous and differentiable everywhere,

As G(f)G(\mathbf{f}) is λ\lambda-strongly convex, it follows from Lemma 14 of Shalev-Shwartz (2007) that:

Combining this with (13) and the Cauchy-Schwartz inequality, we get that

The conclusion follows from dividing both sides by λ∥f1−f2∥\lambda\left\|\mathbf{f}_{1}-\mathbf{f}_{2}\right\|. ∎

3.2 Privacy Guarantees for Objective Perturbation

In this section, we show that Algorithm 2 is ϵp\epsilon_{p}-differentially private. This proof requires stronger assumptions on the loss function than were required in Theorem 1. In certain cases, some of these assumptions can be weakened; for such an example, see Section 3.4.2.

First, we bound the ratio of the Jacobian determinants. Let b(j)\mathbf{b}^{(j)} denote the jj-th coordinate of b\mathbf{b}. From (17) we have

Given a dataset D\mathcal{D}, the (j,k)(j,k)-th entry of the Jacobian matrix J(f→b∣D)\mathbf{J}(\mathbf{f}\to\mathbf{b}|\mathcal{D}) is

Let D\mathcal{D} and D′\mathcal{D^{\prime}} be two datasets which differ in the value of the nn-th item such that D={(x1,y1),…,(xn−1,yn−1),(xn,yn)}\mathcal{D}=\{(\mathbf{x}_{1},y_{1}),\ldots,(\mathbf{x}_{n-1},y_{n-1}),(\mathbf{x}_{n},y_{n})\} and D′={(x1,y1),…,(xn−1,yn−1),(xn′,yn′)}\mathcal{D^{\prime}}=\{(\mathbf{x}_{1},y_{1}),\ldots,(\mathbf{x}_{n-1},y_{n-1}),(\mathbf{x}^{\prime}_{n},y^{\prime}_{n})\}. Moreover, we define matrices AA and EE as follows:

Let λ1(M)\lambda_{1}(M) and λ2(M)\lambda_{2}(M) denote the largest and second largest eigenvalues of a matrix MM. As EE has rank at most 22, from Lemma 2,

Therefore, ∣λ1(E)∣⋅∣λ2(E)∣≤c2|\lambda_{1}(E)|\cdot|\lambda_{2}(E)|\leq c^{2}, and

We now consider two cases. In the first case, Δ=0\Delta=0, and by definition, in that case, 1+2cnΛ+c2n2Λ2≤eϵp−ϵp′1+\frac{2c}{n\Lambda}+\frac{c^{2}}{n^{2}\Lambda^{2}}\leq e^{\epsilon_{p}-\epsilon_{p}^{\prime}}. In the second case, Δ>0\Delta>0, and in this case, by definition of Δ\Delta, (1+cn(Λ+Δ))2=eϵp/2=eϵp−ϵp′(1+\frac{c}{n(\Lambda+\Delta)})^{2}=e^{\epsilon_{p}/2}=e^{\epsilon_{p}-\epsilon_{p}^{\prime}}.

Finally, we are ready to bound the ratio of densities:

Thus, Algorithm 2 satisfies Definition 2. ∎

If AA is full rank, and if EE has rank at most 22, then,

where λj(Z)\lambda_{j}(Z) is the jj-th eigenvalue of matrix ZZ.

Note that EE has rank at most 22, so A−1EA^{-1}E also has rank at most 22. Using the fact that λi(I+A−1E)=1+λi(A−1E)\lambda_{i}(I+A^{-1}E)=1+\lambda_{i}(A^{-1}E),

4 Application to classification

In this section, we show how to use our results to provide privacy-preserving versions of logistic regression and support vector machines.

We quantify how well the outputs of Algorithms 1 and 2 approximate (non-private) logistic regression in Section 4.

4.2 Support Vector Machines

Another very commonly used classifier is L2L_{2}-regularized support vector machines. In this case, again, N(f)=12∣∣f∣∣2N(\mathbf{f})=\frac{1}{2}||\mathbf{f}||^{2}, and

Notice that this loss function is continuous, but not differentiable, and thus it does not satisfy conditions in Theorems 1 and 2.

As h→0h\rightarrow 0, this loss approaches the hinge loss. Taking derivatives, we observe that:

The second solution is to use Huber Loss, as suggested by Chapelle (2007), which is defined as follows:

Observe that Huber loss is convex and differentiable, and piecewise doubly-differentiable, with c=12hc=\frac{1}{2h}. However, it is not globally doubly differentiable, and hence the Jacobian in the proof of Theorem 2 is undefined for certain values of f\mathbf{f}. However, we can show that in this case, Algorithm 2, when run with c=12hc=\frac{1}{2h} satisfies Definition 3.

and a similar expression when B=D′\mathcal{B}=\mathcal{D}^{\prime}.

Remark: Because the privacy proof for Algorithm 1 does not require the analytic properties of 2, we can also use Huber loss in Algorithm 1 to get an ϵg\epsilon_{g}-differentially private approximation to the SVM. We quantify how well the outputs of Algorithms 1 and 2 approximate private support vector machines in Section 4. These approximations to the hinge loss are necessary because of the analytic requirements of Theorems 1 and 2 on the loss function. Because the requirements of Theorem 2 are stricter, it may be possible to use an approximate loss in Algorithm 1 that would not be admissible in Algorithm 2.

Generalization performance

In this section, we provide guarantees on the performance of privacy-preserving ERM algorithms in Section 3. We provide these bounds for L2L_{2}-regularization. To quantify this performance, we will assume that the nn entries in the dataset D\mathcal{D} are drawn i.i.d. according to a fixed distribution P(x,y)P(\mathbf{x},y). We measure the performance of these algorithms by the number of samples nn required to acheive error L∗+ϵgL^{\ast}+\epsilon_{g}, where L∗L^{\ast} is the loss of a reference ERM predictor f0\mathbf{f}_{0}. This resulting bound on ϵg\epsilon_{g} will depend on the norm ∥f0∥\left\|\mathbf{f}_{0}\right\| of this predictor. By choosing an upper bound ν\nu on the norm, we can interpret the result as saying that the privacy-preserving classifier will have error ϵg\epsilon_{g} more than that of any predictor with ∥f0∥≤ν\left\|\mathbf{f}_{0}\right\|\leq\nu.

Given a distribution PP the expected loss L(f)L(\mathbf{f}) for a classifier f\mathbf{f} is

The sample complexity for generalization error ϵg\epsilon_{g} against a classifier f0\mathbf{f}_{0} is number of samples nn required to achieve error L(f0)+ϵgL(\mathbf{f}_{0})+\epsilon_{g} under any data distribution PP. We would like the sample complexity to be low.

For a fixed PP we define the following function, which will be useful in our analysis:

The function Jˉ(f)\bar{J}(\mathbf{f}) is the expectation (over PP) of the non-private L2L_{2}-regularized ERM objective evaluated at f\mathbf{f}.

For non-private ERM, Shalev-Shwartz and Srebro (2008) show that for a given f0\mathbf{f}_{0} with loss L(f0)=L∗L(\mathbf{f}_{0})=L^{\ast}, if the number of data points

for some constant CC, then the excess loss of the L2L_{2}-regularized SVM solution fsvm\mathbf{f}_{svm} satisfies L(fsvm)≤L(f0)+ϵgL(\mathbf{f}_{svm})\leq L(\mathbf{f}_{0})+\epsilon_{g}. This order growth will hold for our results as well. It also serves as a reference against which we can compare the additional burden on the sample complexity imposed by the privacy constraints.

For most learning problems, we require the generalization error ϵg<1\epsilon_{g}<1. Moreover, it is also typically the case that for more difficult learning problems, ∣∣f0∣∣||\mathbf{f}_{0}|| is higher. For example, for regularized SVM, 1∣∣f0∣∣\frac{1}{||\mathbf{f}_{0}||} is the margin of classification, and as a result, ∣∣f0∣∣||\mathbf{f}_{0}|| is higher for learning problems with smaller margin. From the bounds provided in this section, we note that the dominating term in the sample requirement for objective perturbation has a better dependence on ∣∣f0∣∣||\mathbf{f}_{0}|| as well as 1ϵg\frac{1}{\epsilon_{g}}; as a result, for more difficult learning problems, we expect objective perturbation to perform better than output perturbation.

First, we provide performance guarantees for Algorithm 1, by providing a bound on the number of samples required for Algorithm 1 to produce a classifier with low error.

Recall that if a function g(z)g(z) is differentiable, with ∣g′(z)∣≤r|g^{\prime}(z)|\leq r for all zz, then g(z)g(z) is also rr-Lipschitz.

We will bound the terms on the right-hand side of (45).

For a regularizer N(f)=12∣∣f∣∣2N(\mathbf{f})=\frac{1}{2}||\mathbf{f}||^{2} the Hessian satisfies ∣∣∇2N(f)∣∣2≤1||\nabla^{2}N(\mathbf{f})||_{2}\leq 1 . Therefore, from Lemma 3, with probability 1−δ1-\delta over the privacy mechanism,

Furthermore, the results of Sridharan et al. (2008) show that with probability 1−δ1-\delta over the choice of the data distribution,

The constant in the last term depends on the derivative of the loss and the bound on the data points, which by assumption are bounded. Combining the preceeding two statements, with probability 1−2δ1-2\delta over the noise in the privacy mechanism and the data distribution, the second term in the right-hand-side of (45) is at most:

Solving for nn to make the total excess error equal to ϵg\epsilon_{g} yields (43). ∎

where the probability is taken over the randomness in the noise b\mathbf{b} of Algorithm 1.

where the second step follows by an application of the Cauchy-Schwartz inequality. Recall that

Moreover, recall that ∇J(f∗,D)=0\nabla J(\mathbf{f}^{*},\mathcal{D})=0, from the optimality of f∗\mathbf{f}^{*}. Therefore,

As 0≤t≤10\leq t\leq 1, we can combine (50), (51), and (52) to obtain

Let XX be a random variable drawn from the distribution Γ(k,θ)\Gamma(k,\theta), where kk is an integer. Then,

Since kk is an integer, we can decompose XX distributed according to Γ(k,θ)\Gamma(k,\theta) as a summation

2 Objective perturbation

We now establish performance bounds on Algorithm 2. The bound can be summarized as follows.

We will bound each of the terms on the right-hand-side.

If n>c∣∣f0∣∣2ϵgϵpn>\frac{c||\mathbf{f}_{0}||^{2}}{\epsilon_{g}\epsilon_{p}} and Λ>ϵg4∣∣f0∣∣2\Lambda>\frac{\epsilon_{g}}{4||\mathbf{f}_{0}||^{2}}, then nΛ>c4ϵpn\Lambda>\frac{c}{4\epsilon_{p}}, so from the definition of ϵp′\epsilon_{p}^{\prime} in Algorithm 2,

where the last step follows because log⁡(1+x)≤x\log(1+x)\leq x for x∈x\in. Note that for these values of Λ\Lambda we have ϵp′>0\epsilon_{p}^{\prime}>0.

Therefore, we can apply Lemma 5 to conclude that with probability at least 1−δ1-\delta over the privacy mechanism,

The following lemma is analogous to Lemma 3, and it establishes a bound on the distance between the output of Algorithm 2, and non-private regularized ERM. We note that this bound holds when Algorithm 2 has ϵp′>0\epsilon_{p}^{\prime}>0, that is, when Δ=0\Delta=0. Ensuring that Δ=0\Delta=0 requires an additional condition on nn, which is stated in Theorem 4.

where the probability is taken over the randomness in the noise b\mathbf{b} of Algorithm 2.

Therefore by the Cauchy-Schwartz inequality,

Since ∣∣b∣∣||\mathbf{b}|| is drawn from a Γ(d,2ϵp)\Gamma(d,\frac{2}{\epsilon_{p}}) distribution, from Lemma 4, with probability 1−δ1-\delta, ∣∣b∣∣≤2dlog⁡(d/δ)ϵp||\mathbf{b}||\leq\frac{2d\log(d/\delta)}{\epsilon_{p}}. The Lemma follows by plugging this in to the previous equation. ∎

3 Applications

In this section, we examine the sample requirement of privacy-preserving regularized logistic regression and support vector machines. Recall that in both these cases, N(f)=12∣∣f∣∣2N(\mathbf{f})=\frac{1}{2}||\mathbf{f}||^{2}.

The Huber loss is convex and differentiable with continuous derivatives. Moreover, since the derivative of the Huber loss is piecewise linear with slope or at most 12h\frac{1}{2h}, for any z1z_{1}, z2z_{2},

Kernel methods

A powerful methodology in learning problems is the “kernel trick,” which allows the efficient construction of a predictor f\mathbf{f} that lies in a reproducing kernel Hilbert space (RKHS) H\mathcal{H} associated to a positive definite kernel function k(⋅,⋅)k(\cdot,\cdot). The representer theorem (Kimeldorf and Wahba, 1970) shows that the regularized empirical risk in (1) is minimized by a function f(x)\mathbf{f}(\mathbf{x}) that is given by a linear combination of kernel functions centered at the data points:

This elegant result is important for both theoretical and computational reasons. Computationally, one releases the values aia_{i} corresponding to the f\mathbf{f} that minimizes the empirical risk, along with the data points x(i)\mathbf{x}(i); the user classifies a new x\mathbf{x} by evaluating the function in (80).

A crucial difficulty in terms of privacy is that this directly releases the private values x(i)\mathbf{x}(i) of some individuals in the training set. Thus, even if the classifier is computed in a privacy-preserving way, any classifier released by this process requires revealing the data. We provide an algorithm that avoids this problem, using an approximation method (Rahimi and Recht, 2007, 2008b) to approximate the kernel function using random projections.

Our approach works for kernel functions which are translation invariant, so k(x,x′)=k(x−x′)k(\mathbf{x},\mathbf{x}^{\prime})=k(\mathbf{x}-\mathbf{x}^{\prime}). The key idea in the random projection method is from Bochner’s Theorem, which states that a continuous translation invariant kernel is positive definite if and only if it is the Fourier transform of a nonnegative measure. This means that the Fourier transform K(θ)K(\theta) of translation-invariant kernel function k(t)k(\mathbf{t}) can be normalized so that Kˉ(θ)=K(θ)/∥K(θ)∥1\bar{K}(\theta)=K(\theta)/\left\|K(\theta)\right\|_{1} is a probability measure on the transform space Θ\Theta. We will assume Kˉ(θ)\bar{K}(\theta) is uniformly bounded over θ\theta.

where we will assume the feature functions ϕ(x;θ)\phi(\mathbf{x};\theta) are bounded:

A function f∈H\mathbf{f}\in\mathcal{H} can be written as

To prove our generalization bounds we must show that bounded classifiers f\mathbf{f} induce bounded functions a(θ)a(\theta). Writing the evaluation functional as an inner product with k(x,x′)k(\mathbf{x},\mathbf{x^{\prime}}) and (81) shows

This shows that a(θ)a(\theta) is bounded uniformly over Θ\Theta when f(x)\mathbf{f}(\mathbf{x}) is bounded uniformly over X\mathcal{X}. The volume of the unit ball is Vol(X)=πd/2Γ(d2+1)\mathop{\rm Vol}(\mathcal{X})=\frac{\pi^{d/2}}{\Gamma(\frac{d}{2}+1)} (see Ball (1997) for more details). For large dd this is (2πed)d(\sqrt{\frac{2\pi e}{d}})^{d} by Stirling’s formula. Furthermore, we have

2 A reduction to the linear case

As an example, consider the Gaussian kernel

3 Privacy guarantees

Because the workhorse of Algorithm 3 is a differentially-private version of ERM for linear classifiers (either Algorithm 1 or Algorithm 2), and the points {θj:j∈[D]}\{\theta_{j}:j\in[D]\} are independent of the data, the privacy guarantees for Algorithm 3 follow trivially from Theorems 1 and 2.

The proof trivially follows from a combination of Theorems 1, 2, and the fact that the θj\theta_{j}’s are drawn independently of the input dataset.

4 Generalization performance

Our first generalization result is the simplest, since it assumes a strong condition that gives easy guarantees on the projections. We would like the predictor produced by Algorithm 3 to be competitive against an f0\mathbf{f}_{0} such that

and ∣a0(θ)∣≤C|a_{0}(\theta)|\leq C (see Rahimi and Recht (2008b)). Our first result provides the technical building block for our other generalization results. The proof makes use of ideas from Rahimi and Recht (2008b) and techniques from Sridharan et al. (2008); Shalev-Shwartz and Srebro (2008).

We will choose DD to make this loss small. Furthermore, fp\mathbf{f}_{p} is guaranteed to have ∥fp∥∞≤C/D\left\|\mathbf{f}_{p}\right\|_{\infty}\leq C/D, so

From Lemma 5, with probability at least 1−δ1-\delta over the noise b\mathbf{b},

If we set n>c4ϵpΛn>\frac{c}{4\epsilon_{p}\Lambda}, then ϵp′>0\epsilon_{p}^{\prime}>0, and we can plug Lemma 5 into (96) to obtain:

Now we have, using (92) and (98), that with probability 1−4δ1-4\delta:

To set the remaining parameters, we will choose D<nD<n so that

We set D=O(C2log⁡(1/δ)/ϵg2)D=O(C^{2}\log(1/\delta)/\epsilon_{g}^{2}) to make the last term ϵg/6\epsilon_{g}/6, and:

Setting nn as in (90) proves the result. Moreover, setting n>c∥fp∥24ϵpϵg=C0⋅cϵgϵplog⁡(1/δ)n>\frac{c\left\|\mathbf{f}_{p}\right\|^{2}}{4\epsilon_{p}\epsilon_{g}}=C_{0}\cdot\frac{c\epsilon_{g}}{\epsilon_{p}\log(1/\delta)} ensures that n>c4Λϵpn>\frac{c}{4\Lambda\epsilon_{p}}. ∎

We can adapt the proof procedure to show that Algorithm 3 is competitive against any classifier f0\mathbf{f}_{0} with a given bound on ∥f0∥∞\left\|\mathbf{f}_{0}\right\|_{\infty}. It can be shown that for some constant ζ\zeta that ∣a0(θ)∣≤Vol(X)ζ∥f0∥∞|a_{0}(\theta)|\leq\mathop{\rm Vol}(\mathcal{X})\zeta\left\|\mathbf{f}_{0}\right\|_{\infty}. Then we can set this as CC in (90) to obtain the following result.

Substituting C=Vol(X)ζ∥f0∥∞C=\mathop{\rm Vol}(\mathcal{X})\zeta\left\|\mathbf{f}_{0}\right\|_{\infty} in Lemma 6 we get the result. ∎

We can also derive a generalization result with respect to classifiers with bounded ∥f0∥H\left\|\mathbf{f}_{0}\right\|_{\mathcal{H}}.

Let f0\mathbf{f}_{0} be a classifier with norm ∥f0∥H2\left\|\mathbf{f}_{0}\right\|_{\mathcal{H}}^{2} and expected loss L(f0)L(\mathbf{f}_{0}). Now consider

Parameter tuning

The privacy-preserving learning algorithms presented so far in this paper assume that the regularization constant Λ\Lambda is provided as an input, and is independent of the data. In actual applications of ERM, Λ\Lambda is selected based on the data itself. In this section, we address this issue: how to design an ERM algorithm with end-to-end privacy, which selects Λ\Lambda based on the data itself.

Our solution is to present a privacy-preserving parameter tuning technique that is applicable in general machine learning algorithms, beyond ERM. In practice, one typically tunes parameters (such as the regularization parameter Λ\Lambda) as follows: using data held out for validation, train predictors f(⋅;Λ)\mathbf{f}(\cdot;\Lambda) for multiple values of Λ\Lambda, and select the one which provides the best empirical performance. However, even though the output of an algorithm preserves ϵp\epsilon_{p}-differential privacy for a fixed Λ\Lambda (as is the case with Algorithms 1 and 2), by choosing a Λ\Lambda based on empirical performance on a validation set may violate ϵp\epsilon_{p}-differential privacy guarantees. That is, if the procedure that picks Λ\Lambda is not private, then an adversary may use the released classifier to infer the value of Λ\Lambda and therefore something about the values in the database.

We suggest two ways of resolving this issue. First, if we have access to a smaller publicly available data from the same distribution, then we can use this as a holdout set to tune Λ\Lambda. This Λ\Lambda can be subsequently used to train a classifier on the private data. Since the value of Λ\Lambda does not depend on the values in the private data set, this procedure will still preserve the privacy of individuals in the private data.

If no such public data is available, then we need a differentially private tuning procedure. We provide such a procedure below. The main idea is to train for different values of Λ\Lambda on separate subsets of the training dataset, so that the total training procedure still maintains ϵp\epsilon_{p}-differential privacy. We score each of these predictors on a validation set, and choose a Λ\Lambda (and hence f(⋅;Λ)\mathbf{f}(\cdot;\Lambda)) using a randomized privacy-preserving comparison procedure (McSherry and Talwar, 2007). The last step is needed to guarantee ϵp\epsilon_{p}-differential privacy for individuals in the validation set. This final algorithm provides an end-to-end guarantee of differential privacy, and renders our privacy-preserving ERM procedure complete. We observe that both these procedures can be used for tuning multiple parameters as well.

We note that the list of potential Λ\Lambda values input to this procedure should not be a function of the private dataset. It can be shown that the empirical error on Dm+1\mathcal{D}_{m+1} of the classifier output by this procedure is close to the empirical error of the best classifier in the set {f1,…,fm}\{\mathbf{f}_{1},\ldots,\mathbf{f}_{m}\} on Dm+1\mathcal{D}_{m+1}, provided ∣D∣|\mathcal{D}| is high enough.

2 Privacy and utility

The output of the tuning procedure of Algorithm 4 is ϵp\epsilon_{p}-differentially private.

To show that Algorithm 4 preserves ϵp\epsilon_{p}-differential privacy, we first consider an alternative procedure M\mathcal{M}. Let M\mathcal{M} be the procedure that releases the values (f1,…,fm,i)(\mathbf{f}_{1},\ldots,\mathbf{f}_{m},i) where, f1,…,fm\mathbf{f}_{1},\ldots,\mathbf{f}_{m} are the intermediate values computed in the second step of Algorithm 4, and ii is the index selected by the exponential mechanism step. We first show that M\mathcal{M} preserves ϵp\epsilon_{p}-differential privacy.

Let D\mathcal{D} and D′\mathcal{D}^{\prime} be two datasets that differ in the value of one individual such that D=Dˉ∪{(x,y)}\mathcal{D}=\bar{\mathcal{D}}\cup\{(\mathbf{x},y)\}, and D′=Dˉ∪{(x′,y′)}\mathcal{D}^{\prime}=\bar{\mathcal{D}}\cup\{(\mathbf{x}^{\prime},y^{\prime})\}.

Recall that the datasets D1,…,Dm+1\mathcal{D}_{1},\ldots,\mathcal{D}_{m+1} are disjoint; moreover, the randomness in the privacy mechanisms are independent. Therefore,

where μj(f)\mu_{j}(\mathbf{f}) is the density at f\mathbf{f} induced by the classifier run with parameter Λj\Lambda_{j}, and μ(f1,…,fm)\mu(\mathbf{f}_{1},\ldots,\mathbf{f}_{m}) is the joint density at f1,…,fm\mathbf{f}_{1},\ldots,\mathbf{f}_{m}, induced by M\mathcal{M}. Now suppose that (x,y)∈Dj(\mathbf{x},y)\in\mathcal{D}_{j}, for j=m+1j=m+1. Then, Dk=Dk′\mathcal{D}_{k}=\mathcal{D}^{\prime}_{k}, and μj(fj∣Dj)=μj(fj∣Dj′)\mu_{j}(\mathbf{f}_{j}|\mathcal{D}_{j})=\mu_{j}(\mathbf{f}_{j}|\mathcal{D}^{\prime}_{j}), for k∈[m]k\in[m]. Moreover, given any fixed set f1,…,fm\mathbf{f}_{1},\ldots,\mathbf{f}_{m},

Instead, if (x,y)∈Dj(\mathbf{x},y)\in\mathcal{D}_{j}, for j∈[m]j\in[m], then, Dk=Dk′\mathcal{D}_{k}=\mathcal{D}^{\prime}_{k}, for k∈[m+1],k≠jk\in[m+1],k\neq j. Thus, for a fixed f1,…,fm\mathbf{f}_{1},\ldots,\mathbf{f}_{m},

The lemma follows by combining (102)-(105).

Now, an adversary who has access to the output of M\mathcal{M} can compute the output of Algorithm 4 itself, without any further access to the dataset. Therefore, by a simulatibility argument, as in Dwork et al. (2006b), Algorithm 4 also preserves ϵp\epsilon_{p}-differential privacy. ∎

In the theorem above, we assume that the individual algorithms for privacy-preserving classification satisfy Definition 2; a similar theorem can also be shown when they satisfy a guarantee as in Corollary 4.

The following theorem shows that the empirical error on DK+1\mathcal{D}_{K+1} of the classifier output by the tuning procedure is close to the empirical error of the best classifier in the set {f1,…,fK}\{\mathbf{f}_{1},\ldots,\mathbf{f}_{K}\}. The proof of this Theorem follows from Lemma 7 of McSherry and Talwar (2007).

Let zmin⁡=min⁡iziz_{\min}=\min_{i}z_{i}, and let zz be the number of mistakes made on Dm+1D_{m+1} by the classifier output by our tuning procedure. Then, with probability 1−δ1-\delta,

In the notation of McSherry and Talwar (2007), the zmin⁡=OPTz_{\min}=OPT, the base measure μ\mu is uniform on [m][m], and St={i:zi<zmin⁡+t}S_{t}=\{i:z_{i}<z_{\min}+t\}. Their Lemma 7 shows that

where μ\mu is the uniform measure on [m][m]. Using min⁡μ(St)=1m\min\mu(S_{t})=\frac{1}{m} to upper bound the right side and setting it equal to δ\delta we obtain

Experiments

In this section we give experimental results for training linear classifiers with Algorithms 1 and 2 on two real datasets. Imposing privacy requirements necessarily degrades classifier performance. Our experiments show that provided there is sufficient data, objective perturbation (Algorithm 2) typically outperforms the sensitivity method (1) significantly, and achieves error rate close to that of the analogous non-private ERM algorithm. We first demonstrate how the accuracy of the classification algorithms vary with ϵp\epsilon_{p}, the privacy requirement. We then show how the performance of privacy-preserving classification varies with increasing training data size.

The first dataset we consider is the Adult dataset from the UCI Machine Learning Repository (Asuncion and Newman, 2007). This moderately-sized dataset contains demographic information about approximately 47,00047,000 individuals, and the classification task is to predict whether the annual income of an individual is below or above 50,000,basedonvariablessuchasage,sex,occupation,andeducation.Forourexperiments,theaveragefractionofpositivelabelsisabout50,000, based on variables such as age, sex, occupation, and education. For our experiments, the average fraction of positive labels is about0.25;therefore,atrivialclassifierthatalwayspredicts; therefore, a trivial classifier that always predicts-1willachievethiserror−rate,andonlyerror−ratesbelowwill achieve this error-rate, and only error-rates below0.25$ are interesting.

The second dataset we consider is the KDDCup99 dataset (Hettich and Bay, 1999); the task here is to predict whether a network connection is a denial-of-service attack or not, based on several attributes. The dataset includes about 5,000,000 instances. For this data the average fraction of positive labels is 0.200.20.

In order to implement the convex minimization procedure, we use the convex optimization library provided by Okazaki (2009).

In order to process the Adult dataset into a form amenable for classification, we removed all entries with missing values, and converted each categorial attribute to a binary vector. For example, an attribute such as (Male,Female) was converted into 2 binary features. Each column was normalized to ensure that the maximum value is 11, and then each row is normalized to ensure that the norm of any example is at most 11. After preprocessing, each example was represented by a 105105-dimensional vector, of norm at most 11.

For the KDDCup99 dataset, the instances were preprocessed by converting each categorial attribute to a binary vector. Each column was normalized to ensure that the maximum value is 11, and finally, each row was normalized, to ensure that the norm of any example is at most 11. After preprocessing, each example was represented by a 119119-dimensional vector, of norm at most 11.

2 Privacy-Accuracy Tradeoff

For our first set of experiments, we study the tradeoff between the privacy requirement on the classifier, and its classification accuracy, when the classifier is trained on data of a fixed size. The privacy requirement is quantified by the value of ϵp\epsilon_{p}; increasing ϵp\epsilon_{p} implies a higher change in the belief of the adversary when one entry in D\mathcal{D} changes, and thus lower privacy. To measure accuracy, we use classification (test) error; namely, the fraction of times the classifier predicts a label with the wrong sign.

To study the privacy-accuracy tradeoff, we compare objective perturbation with the sensitivity method for logistic regression and Huber SVM. For Huber SVM, we picked the Huber constant h=0.5h=0.5, a typical value (Chapelle, 2007)Chapelle (2007) recommends using hh between 0.010.01 and 0.50.5; we use h=0.5h=0.5 as we found that a higher value typically leads to more numerical stability, as well as better performance for both privacy-preserving methods.. For each data set we trained classifiers for a few fixed values of Λ\Lambda and tested the error of these classifiers. For each algorithm we chose the value of Λ\Lambda that minimizes the error-rate for ϵp=0.1\epsilon_{p}=0.1.For KDDCup99 the error of the non-private algorithms did not increase with decreasing Λ\Lambda. We then plotted the error-rate against ϵp\epsilon_{p} for the chosen value of Λ\Lambda. The results are shown in Figures 2 and 3 for both logistic regression and support vector machinesThe slight kink in the SVM curve on Adult is due to a switch to the second phase of the algorithm.. The optimal values of Λ\Lambda are shown in Tables 1 and 2. For non-private logistic regression and SVM, each presented error-rate is an average over 1010-fold cross-validation; for the sensitivity method as well as objective perturbation, the presented error-rate is an average over 1010-fold cross-validation and 5050 runs of the randomized training procedure. For Adult, the privacy-accuracy tradeoff is computed over the entire dataset, which consists of 45,22045,220 examples; for KDDCup99 we use a randomly chosen subset of 70,00070,000 examples.

For the Adult dataset, the constant classifier that classifies all examples to be negative acheives a classification error of about 0.250.25. The sensitivity method thus does slightly better than this constant classifier for most values of ϵp\epsilon_{p} for both logistic regression and support vector machines. Objective perturbation outperforms sensitivity, and objective perturbation for support vector machines achieves lower classification error than objective perturbation for logistic regression. Non-private logistic regression and support vector machines both have classification error about 0.150.15.

For the KDDCup99 dataset, the constant classifier that classifies all examples as negative, has error 0.190.19. Again, objective perturbation outperforms sensitivity for both logistic regression and support vector machines; however, for SVM and high values of ϵp\epsilon_{p} (low privacy), the sensitivity method performs almost as well as objective perturbation. In the low privacy regime, logistic regression under objective perturbation is better than support vector machines. In contrast, in the high privacy regime (low ϵp\epsilon_{p}), support vector machines with objective perturbation outperform logistic regression. For this dataset, non-private logistic regression and support vector machines both have a classification error of about 0.0010.001.

For SVMs on both Adult and KDDCup99, for large ϵp\epsilon_{p} (0.250.25 onwards), the error of either of the private methods can increase slightly with increasing ϵp\epsilon_{p}. This seems counterintuitive, but appears to be due the imbalance in fraction of the two labels. As the labels are imbalanced, the optimal classifier is trained to perform better on the negative labels than the positives. As ϵp\epsilon_{p} increases, for a fixed training data size, so does the perturbation from the optimal classifier, induced by either of the private methods. Thus, as the perturbation increases, the number of false positives increases, whereas the number of false negatives decreases (as we verified by measuring the average false positive and false negative rates of the private classifiers). Therefore, the total error may increase slightly with decreasing privacy.

3 Accuracy vs. Training Data Size Tradeoffs

Next we examine how classification accuracy varies as we increase the size of the training set. We measure classification accuracy as the accuracy of the classifier produced by the tuning procedure in Section 6. As the Adult dataset is not sufficiently large to allow us to do privacy-preserving tuning, for these experiments, we restrict our attention to the KDDCup99 dataset.

Figures 4 and 5 present the learning curves for objective perturbation, non-private ERM and the sensitivity method for logistic loss and Huber loss, respectively. Experiments are shown for ϵp=0.01\epsilon_{p}=0.01 and ϵp=0.05\epsilon_{p}=0.05 for both loss functions. The training sets (for each of 5 values of Λ\Lambda) are chosen to be of size n=60,000n=60,000 to n=120,000n=120,000, and the validation and test sets each are of size 25,00025,000. Each presented value is an average over 55 random permutations of the data, and 5050 runs of the randomized classification procedure. For objective perturbation we performed experiment in the regime when ϵp′>0\epsilon_{p}^{\prime}>0, so Δ=0\Delta=0 in Algorithm 2.This was chosen for a fair comparison with non-private as well as the output perturbation method, both of which had access to only 55 values of Λ\Lambda.

For non-private ERM, we present result for training sets from n=300,000n=300,000 to n=600,000n=600,000. The non-private algorithms are tuned by comparing 55 values of Λ\Lambda on the same training set, and the test set is of size 25,00025,000. Each reported value is an average over 55 random permutations of the data.

We see from the figures that for non-private logistic regression and support vector machines, the error remains constant with increasing data size. For the private methods, the error usually decreases as the data size increases. In all cases, objective perturbation outperforms the sensitivity method, and support vector machines generally outperform logistic regression.

Discussions and Conclusions

In this paper we study the problem of learning classifiers with regularized empirical risk minimization in a privacy-preserving manner. We consider privacy in the ϵp\epsilon_{p}-differential privacy model of Dwork et al. (2006b) and provide two algorithms for privacy-preserving ERM. The first one is based on the sensitivity method due to Dwork et al. (2006b), in which the output of the non-private algorithm is perturbed by adding noise. We introduce a second algorithm based on the new paradigm of objective perturbation. We provide bounds on the sample requirement of these algorithms for achieving generalization error ϵg\epsilon_{g}. We show how to apply these algorithms with kernels, and finally, we provide experiments with both algorithms on two real datasets. Our work is, to our knowledge, the first to propose computationally efficient classification algorithms satisfying differential privacy, together with validation on standard data sets.

In general, for classification, the error rate increases as the privacy requirements are made more stringent. Our generalization guarantees formalize this “price of privacy.” Our experiments, as well as theoretical results, indicate that objective perturbation usually outperforms the sensitivity methods at managing the tradeoff between privacy and learning performance. Both algorithms perform better with more training data, and when abundant training data is available, the performance of both algorithms can be close to non-private classification.

The conditions on the loss function and regularizer required by output perturbation and objective perturbation are somewhat different. As Theorem 1 shows, output perturbation requires strong convexity in the regularizer and convexity as well as a bounded derivative condition in the loss function. The last condition can be replaced by a Lipschitz condition instead. However, the other two conditions appear to be required, unless we impose some further restrictions on the loss and regularizer. Objective perturbation on the other hand, requires strong convexity of the regularizer, convexity, differentiability, and bounded double derivatives in the loss function. Sometimes, it is possible to construct a differentiable approximation to the loss function, even if the loss function is not itself differentiable, as shown in Section 3.4.2.

Our experimental as well as theoretical results indicate that in general, objective perturbation provides more accurate solutions than output perturbation. Thus, if the loss function satisfies the conditions of Theorem 2, we recommend using objective perturbation. In some situations, such as for SVMs, it is possible that objective perturbation does not directly apply, but applies to an approximation of the target loss function. In our experiments, the loss of statistical efficiency due to such approximation has been small compared to the loss of efficiency due to privacy, and we suspect that this is the case for many practical situations as well.

Finally, our work does not address the question of finding private solutions to regularized ERM when the regularizer is not strongly convex. For example, neither the output perturbation, nor the objective perturbation method work for L1L_{1}-regularized ERM. However, in L1L_{1}-regularized ERM, one can find a dataset in which a change in one training point can significantly change the solution. As a result, it is possible that such problems are inherently difficult to solve privately.

An open question in this work is to extend objective perturbation methods to more general convex optimization problems. Currently, the objective perturbation method applies to strongly convex regularization functions and differentiable losses. Convex optimization problems appear in many contexts within and without machine learning: density estimation, resource allocation for communication systems and networking, social welfare optimization in economics, and elsewhere. In some cases these algorithms will also operate on sensitive or private data. Extending the ideas and analysis here to those settings would provide a rigorous foundation for privacy analysis.

A second open question is to find a better solution for privacy-preserving classification with kernels. Our current method is based on a reduction to the linear case, using the algorithm of Rahimi and Recht (2008b); however, this method can be statistically inefficient, and require a lot of training data, particularly when coupled with our privacy mechanism. The reason is that the algorithm of Rahimi and Recht (2008b) requires the dimension DD of the projected space to be very high for good performance. However, most differentially-private algorithms perform worse as the dimensionality of the data grows. Is there a better linearization method, which is possibly data-dependent, that will provide a more statistically efficient solution to privacy-preserving learning with kernels?

A final question is to provide better upper and lower bounds on the sample requirement of privacy-preserving linear classification. The main open question here is to provide a computationally efficient algorithm for linear classification which has better statistical efficiency.

Privacy-preserving machine learning is the endeavor of designing private analogues of widely used machine learning algorithms. We believe the present study is a starting point for further study of the differential privacy model in this relatively new subfield of machine learning. The work of Dwork et al. (2006b) set up a framework for assessing the privacy risks associated with publishing the results of data analyses. Demanding high privacy requires sacrificing utility, which in the context of classification and prediction is excess loss or regret. In this paper we demonstrate the privacy-utility tradeoff for ERM, which is but one corner of the machine learning world. Applying these privacy concepts to other machine learning problems will lead to new and interesting tradeoffs and towards a set of tools for practical privacy-preserving learning and inference. We hope that our work provides a benchmark of the current price of privacy, and inspires improvements in future work.

The authors would like to thank Sanjoy Dasgupta and Daniel Hsu for several pointers, and to acknowledge Adam Smith, Dan Kifer, and Abhradeep Guha Thakurta, who helped point out an error in the previous version of the paper. The work of K. Chaudhuri and A.D. Sarwate was supported in part by the California Institute for Telecommunications and Information Technologies (CALIT2) at UC San Diego. K. Chaudhuri was also supported by National Science Foundation IIS-0713540. Part of this work was done while C. Monteleoni was at UC San Diego, with support from National Science Foundation IIS-0713540. The experimental results were made possibly by support from the UCSD FWGrid Project, NSF Research Infrastructure Grant Number EIA-0303622.

References