A statistical framework for differential privacy
Larry Wasserman, Shuheng Zhou
Introduction
One goal of data privacy research is to derive a mechanism that takes an input database and releases a transformed database such that individual privacy is protected yet information content is preserved. This is known as disclosure limitation. In this paper we will consider various methods for producing a transformed database and we will study the accuracy of inferences from under various loss functions.
There are numerous approaches to this problem. The literature is vast and includes papers from computer science, statistics and other fields. The terminology also varies considerably. We will use the terms “disclosure limitation” and “privacy guarantee” interchangeably.
One approach to defining a privacy guarantee that has received much attention in the computer science literature is known as differential privacy (Dwork et al., 2006, Dwork, 2006). There is a large body of work on this topic including, for example, Dinur and Nissim (2003), Dwork and Nissim (2004), Blum et al. (2005), Dwork et al. (2007), Nissim et al. (2007), Barak et al. (2007), McSherry and Talwar (2007), Blum et al. (2008), Kasiviswanathan et al. (2008). Blum et al. (2008) gives a machine learning approach to inference under differential privacy constraints and to some extent our results are inspired by that paper. Smith (2008) shows how to provide efficient point estimators while preserving differential privacy. He constructs estimators for parametric models with mean squared error where is the Fisher information. Machanavajjhala et al. (2008) consider privacy for histograms by sampling from the posterior distribution of the cell probabilities. We discuss Machanavajjhala et al. (2008) further in Section 4. After submitting the first draft of this paper, new work has appeared on differential privacy that is also statistical in nature, namely, Ghosh et al. (2009), Dwork and Lei (2009), Dwork et al. (2009), Feldman et al. (2009).
The goals of this paper are to explain differential privacy in statistical language, to show how to compare different privacy mechanisms by computing the rate of convergence of distributions and densities based on the released data , and to study a general privacy method, called the exponential mechanism, due to McSherry and Talwar (2007). We show that the accuracy of this method is intimately linked to the rate at which the probability that the empirical distribution concentrates in a small ball around the true distribution. These so called “small ball probabilities” are well-studied in probability theory. To the best of our knowledge, this is the first time a connection has been made between differential privacy and small ball probabilities. We need to make two disclaimers. First, the goal of our paper is to investigate differential privacy. We will not attempt to review all approaches to privacy or to compare differential privacy with other approaches. Such an undertaking is beyond the scope of this paper. Second, we focus only on statistical properties here. We shall not concern ourselves in this paper with computational efficiency.
In Section 2 we define differential privacy and provide motivation for the definition. In Section 3 we discuss conditions that ensure that a privacy mechanism preserves information. In Section 4 we consider two histogram based methods. In Section 5 and 6, we examine another method known as the exponential mechanism. Section 7 contains a small simulation study and Section 8 contains concluding remarks. All technical proofs appear in Section 9.
We consider several different data release mechanisms that satisfy differential privacy. We evaluate the utility of these mechanisms by evaluating the rate at which goes to 0, where is the distribution of the data , is the empirical distribution of the released data , and is some distance between distributions. This gives an informative way to compare data release mechanisms. In more detail, we consider the Kolmogorov-Smirnov (KS) distance: , where , denote the cumulative distribution function (cdf) corresponding to and the empirical distribution function corresponding to , respectively. We also consider the squared distance: , where is a density estimator based on . Our results are summarized in the following tables, where denotes the sample size.
The next table summarizes the results for the case where the dimension of is and the density is assumed to be in a Sobolev space of order . We only consider the squared distance between the true density and the estimated density in this case. The results are from Section 6 of the paper.
Our results show that, in general, privacy schemes seem not to yield minimax rates. Two exceptions are perturbation methods evaluated under loss which do yield minimax rates. An open question is whether the slower than minimax rates are intrinsic to the privacy methods. It is possible, for example, that our rates are not tight. This question could be answered by establishing lower bounds on these rates. We consider this an important topic for future research.
Differential Privacy
Let be a random sample (independent and identically distributed) of size from a distribution where . To be concrete, we shall assume that for some integer . Extensions to more general sample spaces are certainly possible but we focus on this sample space to avoid unnecessary technicalities. (In particular, it is difficult to extend differential privacy to unbounded domains.) Let denote Lebesgue measure and let if the density exists. We call a database. Note that . We focus on mechanisms that take a database as input and output a sanitized database for public release. In general, need not be the same size as . For some schemes, we shall see that large can lead to low privacy and high accuracy while while small can lead to high privacy and low accuracy. We will let change with . Hence, any asymptotic statements involving increasing will also allow to change as well.
A data release mechanism is a conditional distribution for given . Thus, is the probability that the output database is in a set given that the input database is , where are the measurable subsets of . We call a sanitized database. Schematically:
The marginal distribution of the output database induced by and is where is the -fold product measure of .
A simple example to help the reader have a concrete example in mind is adding noise. In this case, where and are mean 0 independent observations drawn from some known distribution with density . Hence has density .
Given two databases and , let denote the Hamming distance between and : \delta(X,Y)=\#\Bigl{\{}i:\ X_{i}\neq Y_{i}\Bigr{\}}.
A general data release mechanism is the exponential mechanism (McSherry and Talwar, 2007) which is defined as follows. Let be any function. Each such defines a different exponential mechanism. Let
that is, is the maximum change to caused by altering a single entry in . Finally, let be a random vector drawn from the density
where , and . In this case, has density . We’ll discuss the exponential mechanism in more detail later.
There are many definitions of privacy but in this paper we focus on the following definition due to Dwork et al. (2006) and Dwork (2006).
Let . We say that satisfies -differential privacy if
where are the measurable sets on . The ratio is interpreted to be 1 whenever the numerator and denominator are both 0.
The definition of differential privacy is based on ratios of probabilities. It is crucial to measure closeness by ratios of probabilities since that protects rare cases which have small probability under . In particular, if changing one entry in the database cannot change the probability distribution very much, then we can claim that a single individual cannot guess whether he is in the original database or not. The closer is to 1, the stronger privacy guarantee is. Thus, one typically chooses close to 0. See Dwork et al. (2006) for more discussion on these points. Indeed, suppose that two subjects each believe that one of them is in the original database. Given and full knowledge of and can they test who is in ? The answer is given in the following result. (In this result, we drop the assumption that the user does not know .)
Suppose that is obtained from a data release mechanism that satisfies -differential privacy. Any level test which is a function of , and of versus has power bounded above by .
Thus, if satisfies differential privacy then it is virtually impossible to test the hypothesis that either of the two subjects is in the database since the power of such a test is nearly equal to its level. A similar calculation shows that if one does a Bayes test between and then the Bayes factor is always between and . For more detail on the motivation for the definition as well as consequences, see Dwork et al. (2006), Dwork (2006), Ganta et al. (2008), Rastogi et al. (2009).
The following result, which is proved in McSherry and Talwar (2007) (Theorem 6), shows that the exponential mechanism always preserves differential privacy.
(McSherry and Talwar, 2007) The exponential mechanism satisfies the -differential privacy.
If satisfies differential privacy then also satisfies differential privacy for any measurable function .
(Proposition 1 from Dwork et al. (2006).) Let be a function of and define where . Let have density . Then satisfies differential privacy.
Informative Mechanisms
A challenge in privacy theory is to find that satisfies differential privacy and yet yields datasets that preserve information. Informally, a mechanism is informative if it is possible to make precise inferences from the released data . Whether or not a mechanism is informative will depend on the goals of the inference. From a statistical perspective, we would like to infer or functionals of from . Blum et al. (2008) show that the probability content of some classes of intervals can be estimated accurately while preserving privacy. Their results motivated the current paper. We will assume throughout that the user has access to the sanitized data but not the mechanism . The question of how a data analyst can use knowledge of to improve inferences is left to future work.
There are many ways to measure the information in . One way is through distribution functions. Let denote the cumulative distribution function (cdf) on corresponding to . Thus where . Let denote the empirical distribution function corresponding to and similarly let denote the empirical distribution function corresponding to . Let denote any distance measure on distribution functions.
is consistent with respect to if . is -informative if .
An alternative to requiring to be small is to require to be small. Or one could require be small for all as in Blum et al. (2008). These requirements are similar. Indeed, suppose satisfies the triangle inequality and that is consistent in the distance, that is, . Assume further that . Then implies that
Similarly, implies that .
There are many possible choices for . We shall mainly focus on the Kolmogorov-Smirnov (KS) distance and the squared distance where and . However, our results can be carried over to other distances as well.
Before proceeding let us note that we will need some assumptions on otherwise we cannot have a consistent scheme as shown in the following theorem. The following result — essentially a re-expression of a result in Blum et al. (2008) in our framework — makes this clear.
Suppose that satisfies differential privacy and that . Let be a point mass distribution. Thus for some point . Then is inconsistent, that is, there is a such that .
Sampling From a Histogram
The goal of this section is to give two concrete, simple data release methods that achieve differential privacy. The idea is to draw a random sample from histogram. The first scheme draws observations from a smoothed histogram. The second scheme draws observations from a randomly perturbed histogram. We use the histogram for its familiarity and simplicity and because it is used in applications of differential privacy. We will see that the histogram has to be carefully constructed to ensure differential privacy. We then compare the two schemes by studying the accuracy of the inferences from the released data. We will see that the accuracy depends both on how the histogram is constructed and on what measure of accuracy we use.
Let be a constant and suppose that where
is the class of Lipschitz functions. We assume throughout this section that . The minimax rate of convergence for density estimators in squared distance for is (Scott, 1992).
Let be a binwidth such that and such that is an integer. Partition into bins where each bin is a cube with sides of length . Let denote the indicator function. Let denote the corresponding histogram estimator on , namely,
where and is the number of observations in . Recall that is a consistent estimator of if and . Also, the optimal choice of for error under is , in which case (Scott, 1992). Here, means that both and are bounded for large .
The first method for generating released data from a histogram while achieving differential privacy proceeds as follows. Recall that the sample space is . Fix a constant and define the smoothed histogram
Let where are iid draws from . If
then -differential privacy holds.
Note that for and , . Thus (6) is approximately the same as requiring
Equation (7) shows an interesting tradeoff between , and . We note that sampling from the usual histogram corresponding to does not preserve differential privacy.
Now we give a result that shows how accurate the inferences are in the KS distance using the smoothed histogram sampling scheme.
In this case we see that we have consistency since but the rate is slower than the minimax rate of convergence for density estimators in KS distance, which is . Now let and
Assume the conditions of the previous theorem. Let be the squared distance as defined in (8). Then choosing
Again, we have consistency but the rate is slower than the minimax rate which is . (Scott, 1992)
2 Sampling From a Perturbed Histogram
The second method, which we call the sampling from a perturbed histogram, is due to Dwork et. al. (2006). Recall that is the number of observations in bin . Let where are independent, identically distributed draws from a Laplace density with mean 0 and variance . Thus the density of is . Dwork et. al. (2006) show that releasing preserves differential privacy. However, our goal is to release a database rather than just a set of counts. Now define
Since preserves differential privacy, it follows from Lemma 2.6 that also preserve differential privacy; Moreover, any sample from preserve differential privacy for any .
Hence, this method achieves the minimax rate of convergence in while the first data release method does not. This suggests that the perturbation method is preferable for the distance. The perturbation method does not achieve the minimax rate of convergence in KS distance; in fact, the exponential mechanism based method achieves a better rate as we shown in Section 5 (Theorem 5.4). We examine this method numerically in Section 7.
They show that differential privacy requires for all . If we take then this is similar to the first histogram-based data release method we discussed in this section. They also suggest a weakened version of differential privacy.
Exponential Mechanism
In this section we will consider the exponential mechanism in some detail. We’ll derive some general results about accuracy and apply the method to the mean, and to density estimation. Specifically, we will show the following for exponential mechanisms:
Choosing the size of the released database is delicate. Taking too large compromises privacy. Taking too small compromises accuracy.
The accuracy of the exponential scheme can be bounded by a simple formula. This formula has a term that measures how likely it is for a distribution based on sample size , to be in a small ball around the true distribution. In probability theory, this is known as a small ball probability.
The formula can be applied to several examples such as the KS distance, the mean, and nonparametric density estimation using orthogonal series. In each case we can use our results to choose and to find the rate of convergence of an estimator based on the sanitized data.
In light of Theorem 3.2, we know that some assumptions are needed on . We shall assume throughout this section that has a bounded density ; note that this is a weaker condition than (4).
Recall the exponential mechanism. We draw the vector from where
For KS distance .
This framework is used in Blum et al. (2008). For the rest of this section, assume that are drawn from an exponential mechanism .
Let denote the cumulative distribution function on corresponding to . Let denote the empirical cdf from a sample of size from , and let
is called the small ball probability associated with .
The following theorem bounds the accuracy of the estimator from the sanitized data by a simple formula involving the small ball probability.
Assume that has a bounded density , and that there exists such that
for some . Further suppose that satisfies the triangle inequality. Let be drawn from given in (9). Then,
Thus, if we can choose in such a way that the right hand side of (11) goes to 0, then the mechanism is consistent. We now show some examples that satisfy these conditions and we show how to choose .
Suppose that has a bounded density and let . Let be drawn from given in (9) with being the KS distance. By requiring that , we have for , and for being the KS distance,
Note that converges to 0 at a slower rate than . We thus see that the rate after sanitization is which is slower than the optimal rate of . It is an open question whether this rate can be improved.
2 The Mean
It is interesting to consider what happens when where and is the sample mean of . In this case . Thus, so, approximately, . Indeed, it suffices to take in this case since then . Thus converges at the same rate as . This is not surprising: preserving a single piece of information requires a database of size .
Orthogonal Series Density Estimation
In this section, we develop an exponential scheme based on density estimation and we compare it to the perturbation approach. For simplicity we take . Let be an orthonormal basis for and assume that . Hence
We assume that the basis functions are uniformly bounded so that
Let denote the Sobolev ellipsoid
The minimax rate of convergence in norm for is (Efromovich, 1999). Thus
for some . This rate is achieved by the estimator
where and See Efromovich (1999).
Under the above scheme we have for as defined in (13). Hence,
Let be drawn from given in (17). Assume that . If we choose then
We conclude that the sanitized estimator converges at a slower rate than the minimax rate. Now we compare this to the perturbation approach. Let be an iid sample from
where are iid draws from a Laplace distribution with density . Thus, i the notation of 2.6, . It follows from Lemma 2.6 that, for any , this preserves differential privacy. If for any then we replace by as in Hall and Murison (1993).
Let be drawn from . Assume that . If we choose , then
where is the orthogonal series density estimator based on .
Hence, again, the perturbation technique achieves the minimax rate of convergence and so appears to be superior to the exponential mechanism. We do not know if this is because the exponential mechanism is inherently less accurate, or if our bounds for the exponential mechanism are not tight enough.
Example
Here we consider a small simulation study to see the effect of perturbation on accuracy. We focus on the histogram perturbation method with . We take the true density of to be a Beta(10,10) density. We considered sample sizes and and privacy levels , and . We take to be squared error distance. Figure 1 shows the results of 1,000 simulations for various numbers of bins .
As expected, smaller values of induce a larger information loss which manifests itself as a larger mean squared error. Despite the fact that the perturbed histogram achieves the minimax rate, the error is substantially inflated by the perturbation. This means that the constants in the risk are important, not just the rate. Also, the risk of the sanitized histograms is much more sensitive to the choice of the number of cells than the original histogram is.
We repeated the simulations with a bimodal density, namely, being an equal mixture of a Beta(10,3) density and Beta(3,10) density. The results turned out to be nearly identical to those above.
Conclusion
Differential privacy is an important type of privacy guarantee when releasing data. Our goal has been to present the idea in statistical language and then to show that loss functions based on distributions and densities can be useful for comparing privacy mechanisms.
We have seen that sampling from a histogram leads to differential privacy as long as either the histogram is shifted away from 0 by a factor or if the cells are perturbed appropriately. The latter method achieves a faster rate of convergence in distance. But, the simulation showed that the risk can nonetheless be quite large. This suggests that more work is needed to get precise finite sample risk bounds. Also, the choice of the smoothing parameter (number of cells in the histogram) has a larger effect on the sanitized histogram than on the original histogram.
We also studied the exponential mechanism. Here we derived a formula for assessing the accuracy of the method. The formula involves small ball probabilities. As far as we know, the connection between differential privacy and small ball probabilities has not been observed before.
Minimaxity is desirable for any statistical procedure. We have seen that in some cases the minimax rate is achieved and in some cases it is not. We do not yet have a complete minimax theory for differential privacy and this is the focus of our current work. We close with some open questions.
When is it possible for to have the same rate as ?
When adaptive minimax methods are used, such as adapting to in Section 6 or when using wavelet estimation methods, is some form of adaptivity preserved after sanitization?
Many statistical methods involve some sort of risk minimization. A example is choosing a bandwidth by cross-validation. What is the effect of sanitization on these procedures?
Are there other, better methods of sanitization that preserve differential privacy?
Proofs
Without loss of generality take . Let and . By the Neyman-Pearson lemma, the highest power test is to reject when where and is chosen so that . Since and differ in only one coordinate, and so the power is .
2 Proof of Lemma 2.6
For the second part, let and note that is independent of given . Let be the distribution of . Hence,
3 Proof of Theorem 3.2
Let be any point in $Q_{n}(Z=v|X=X_{(0)})=0X_{(1)}=\{v,0,\ldots,0\}X_{(2)}=\{v,v,0,\ldots,0\}X_{(n)}=\{v,v,\ldots,v\}Q_{n}(Z=X_{(j)}|X=X_{(0)})=0j\geq 1Q_{n}(Z=X_{(j)}|X=X_{(1)})=0j\geq 1Q_{n}(Z=X_{(j)}|X=X_{(2)})=0j\geq 1Q_{n}(Z=X_{(j)}|X=X_{(n)})=0j\geq 1$.
Next let . Arguing as before, we know that . And since we also have that . Here, where and . Hence, for , which is a contradiction.
4 Proof of Theorem 4.1
Suppose that differs from in at most one observation. Let denote the perturbed histogram based on and let denote the histogram based on , such that and differ in one entry. We also use and for cell proportions. Note that by definition. It is clear that the maximum density ratio for a single draw , or all , occurs in one bin . Now consider such that for all , we have and the following bounds.
Let ; then in order to maximize , we let and obtain
Otherwise, we let , (as by definition of , it takes for non-negative integers ) and let . Now it is clear that in order to maximize the density ratio at , we may need to reverse the role of and ,
where the maximum is achieved when and , given a fixed set of parameters .
and the theorem holds.
5 Proof of Theorem 4.2
The Vapnik-Chervonenkis dimension of the class of sets of the form is and so by the standard Vapnik-Chervonenkis bound, we have for that
By the triangle inequality, we have for all ,
where the last step follows from the VC bound as in (18) for .
Next we bound . Now where . If for some integers then . For not of this form, let where . Let . So
where and the set intersects at most number of cubes in , given that . Now by the Lipschitz condition (4), we have and
6 Proof of Theorem 4.3
Let be the histogram based on as in (8). Then
where means less than, up to constants. Hence,
where is the usual risk of a histogram under the Lipschitz condition (4), namely, . Conditional on , is an unbiased estimate of with integrated variance . So,
7 Proof of Theorem 4.4
(1) Note that When , the latter error is lower order than the other terms and may be ignored. Now,
The expected value of the first term is the usual risk, namely, .
For the second term, we proceed as follows. Let and
almost surely, for all large . We have
where . Now
where . Let . The density for has the form . So,
By choosing large enough we have that a.s. for large , by the Borel-Cantelli lemma. Therefore,
Therefore, and thus
Next we claim that a.s. To see this, note that , by definition of : . Hence, by Bernstein’s inequality,
for all ; Thus a.s. for all large . Thus, almost surely for all large . Hence,
for . This is the usual risk. Hence, we can choose to achieve risk for all large enough.
(2) Let be the cdf based on the original histogram and let be the cdf based on the perturbed histogram. We have
Since we may take as large as we like, we can make the last term arbitrarily small. From (22),
Let and Let . Let where . Recall that are the bins of with sides of length of . Let denote the cube with the left-most corner being and the right-most corner being . Then for all , we have
where we use the fact that there are at most cubes. Hence,
where we use the fact that a.s. So,
Hence for , the rate is . For , the rate is dominated by the first term inside , and hence the rate is .
8 Proof of Theorem 5.3
Let B_{\epsilon}=\Bigl{\{}u=(u_{1},\ldots,u_{k}):\ \rho(F,\widehat{F}_{u})\leq\epsilon\Bigr{\}} where is the empirical distribution based on . Also, let . For notational simplicity set . Then
By the triangle inequality . Then,
By the triangle inequality, we also have and
where is the empirical cdf from a sample of size drawn from . Thus we have
Thus the theorem holds.
9 Proof of Lemma 5.1
Proof of Lemma 5.1. We start with KS, By the triangle inequality, we have for all and for all ,
Notice that changing one entry in will change by at most at any by definition, that is,
Thus the conclusion holds for the KS-distance.
10 Proof of Theorem 5.4
We need the following small ball result; see Li and Shao (2001).
Let , and be the Brownian sheet. Then there exists such that for all ,
where depends only on . The same bound holds for a Brownian bridge.
Proof of theorem 5.4. The Vapnik-Chervonenkis dimension of the class of sets of the form is and so by the standard Vapnik-Chervonenkis bound, we have for as specified in the theorem statement,
for some constants for large enough. Thus (10) holds. Now we compute the small ball probability. Note that converges to a Brownian bridge on . More precisely, from Csörgő and Révész (1975) there exist a sequence of Brownian bridges such that
where . It is clear that the RHS of (25) is a.s. given a fixed . Hence we have for and as chosen in the theorem statement, and for all , it holds that
for all large , where (26) follows from (25) and (27) holds given that for some constant due to our choice of and . Also, for KS distance. Hence, by Theorem 5.3 and (24), we have for ,
for some constants and , where (28) holds when we take w.l.o.g. and , given that and hence . Thus the result follows.
The constants taken in the proof are arbitrary; indeed, when we take and with some constant , (28) will hold with slightly different constants . For and as chosen above, it holds that .
11 Proofs for Lemma 6.1 and Theorem 6.2
Throughout this section, we let denote the estimator as defined in (14), which is based on a sample of size drawn independently from ; Similarly, we let denote the same estimator based on an i.i.d. sample of size drawn from , with replacing and in (14). We let denote the estimator as in (16), based on an i.i.d. sample of size drawn from as in (17).
Proof of Lemma 6.1. Without loss of generality, let and so that and let . Recall that
In particular, let us define and and thus
Hence .
Proof of Theorem 6.2. For , we let
where and .
Let be the empirical distribution based on . Our proof follows that of Theorem 5.3, with
as defined in (15) for . Now
Thus the corresponding triangle inequalities that we use to replace that in Theorem 5.3 are:
We need to compute the small ball probability. Recall that denote the estimator based on a sample of size . By Parseval’s relation,
Let and where is the covariance matrix of . Hence, has mean 0 and identity covariance matrix. Let denote the largest eigenvalue of . From Lemma 9.3 below, . Let and let . Then, for all large , and any ,
From Theorem 1.1 of Bentkus (2003) we have that
since . We see that for all large
as since , where are some constants. Hence the theorem holds.
Let . Then .
where we used the fact that for all and for all . So, we have for all ,
Hence, and the lemma holds.
12 Proof of Theorem 6.3
The proof is similar to the proof of Theorem 4.4, so we provide a short outline. In particular, the effect of truncation can be shown to be negligible as in the proof of Theorem 4.4. We have and the latter term is negligible for . Now . The term is the usual error term and contributes to the risk. For the second term, .