






























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!































After reviewing a few probabilistic tools, we present the Laplace mech- anism, which gives differential privacy for real (vector) valued queries. An application of this leads naturally to the exponential mechanism, which is a method for differentially private selection from a discrete set of candidate outputs. We then analyze the cumulative privacy loss incurred by composing multiple differentially private mechanisms. Finally we give a method — the sparse vector technique — for pri- vately reporting the outcomes of a potentially very large number of computations, provided that only a few are “significant.” In this section, we describe some of the most basic techniques in differential privacy that we will come back to use again and again. The techniques described here form the basic building blocks for all of the other algorithms that we will develop.
The following concentration inequalities will frequently be useful. We state them in easy to use forms rather than in their strongest forms.
3.2. Randomized response 29
Theorem 3.1 (Additive Chernoff Bound). Let X 1 ,... , X m be indepen- dent random variables bounded such that 0 ≤ X i ≤ 1 for all i. Let S = (^) m^1
∑ m i =1 X i^ denote their mean, and let^ μ^ =^ E[S]^ denote their expected mean. Then:
Pr[S > μ + ε] ≤ e−^2 mε 2
Pr[S < μ − ε] ≤ e−^2 mε
2
Theorem 3.2 (Multiplicative Chernoff Bound). Let X 1 ,... , X m be inde- pendent random variables bounded such that 0 ≤ X i ≤ 1 for all i. Let S = (^) m^1
∑ m i =1 X i^ denote their mean, and let^ μ^ =^ E[S]^ denote their expected mean. Then:
Pr[S > (1 + ε)μ] ≤ e− mμε (^2) / 3
Pr[S < (1 − ε)μ] ≤ e− mμε (^2) / 2
When we do not have independent random variables, all is not lost. We may still apply Azuma’s inequality:
Theorem 3.3 (Azuma’s Inequality). Let f be a function of m random variables X 1 ,... , X m , each X i taking values from a set A i such that E[f ] is bounded. Let c i denote the maximum effect of X i on f — i.e., for all a i , a′ i ∈ A i : ∣∣ E[f |X 1 ,... , X i − 1 , X i = a i ] − E[f |X 1 ,... , X i − 1 , X i = a′ i ]
∣∣ ≤ c i
Then:
Pr [f (X 1 ,... , X m ) ≥ E[f ] + t] ≤ exp
( − 2 t^2 ∑ m i =1 c^2 i
)
Theorem 3.4 √ (Stirling’s Approximation). n! can be approximated by 2 nπ(n/e) n : √ 2 nπ(n/e) n e^1 / (12 n +1)^ < n! <
2 nπ(n/e) n e^1 / (12 n ).
Let us recall the simple randomized response mechanism, described in Section 2, for evaluating the frequency of embarrassing or illegal
3.3. The laplace mechanism 31
real numbers. One of the important parameters that will determine just how accurately we can answer such queries is their ` 1 sensitivity:
Definition 3.1 (1 -sensitivity)**.** The 1 -sensitivity of a function f : N|X |^ → R k^ is:
∆f = max x,y ∈N|X | ‖ x − y ‖ 1 =
‖f (x) − f (y)‖ 1.
The ` 1 sensitivity of a function f captures the magnitude by which a single individual’s data can change the function f in the worst case, and therefore, intuitively, the uncertainty in the response that we must introduce in order to hide the participation of a single individual. Indeed, we will formalize this intuition: the sensitivity of a function gives an upper bound on how much we must perturb its output to pre- serve privacy. One noise distribution naturally lends itself to differential privacy.
Definition 3.2 (The Laplace Distribution). The Laplace Distribution (centered at 0) with scale b is the distribution with probability density function:
Lap(x|b) =
2 b exp
( −
|x| b
) .
The variance of this distribution is σ^2 = 2b^2. We will sometimes write Lap(b) to denote the Laplace distribution with scale b, and will some- times abuse notation and write Lap(b) simply to denote a random vari- able X ∼ Lap(b).
The Laplace distribution is a symmetric version of the exponential distribution. We will now define the Laplace Mechanism. As its name suggests, the Laplace mechanism will simply compute f , and perturb each coor- dinate with noise drawn from the Laplace distribution. The scale of the noise will be calibrated to the sensitivity of f (divided by ε).^1
(^1) Alternately, using Gaussian noise with variance calibrated to ∆ f ln(1 /δ ) /ε , one can achieve ( ε, δ )-differential privacy (see Appendix A). Use of the Laplace mechanism is cleaner and the two mechanisms behave similarly under composition (Theorem 3.20).
32 Basic Techniques and Composition Theorems
Definition 3.3 (The Laplace Mechanism). Given any function f : N|X |^ → R k , the Laplace mechanism is defined as:
M L (x, f (·), ε) = f (x) + (Y 1 ,... , Y k )
where Y i are i.i.d. random variables drawn from Lap(∆f /ε).
Theorem 3.6. The Laplace mechanism preserves (ε, 0)-differential privacy.
Proof. Let x ∈ N|X |^ and y ∈ N|X |^ be such that ‖x − y‖ 1 ≤ 1 , and let f (·) be some function f : N|X |^ → R k. Let p x denote the probabil- ity density function of M L (x, f, ε) , and let p y denote the probability density function of M L (y, f, ε). We compare the two at some arbitrary point z ∈ R k
p x (z) p y (z)
∏^ k
i =
exp(− ε | f^ ( x ∆) if − zi |) exp(− ε | f^ ( y ∆) if − zi |)
∏^ k
i =
exp
( ε(|f (y) i − z i | − |f (x) i − z i |) ∆f
)
∏^ k i =
exp
( ε|f (x) i − f (y) i | ∆f
)
= exp
( ε · ‖f (x) − f (y)‖ 1 ∆f
)
≤ exp(ε),
where the first inequality follows from the triangle inequality, and the last follows from the definition of sensitivity and the fact that ‖x − y‖ 1 ≤ 1. That p pxy (( zz )) ≥ exp(−ε) follows by symmetry.
Example 3.1 (Counting Queries). Counting queries are queries of the form “How many elements in the database satisfy Property P ?” We will return to these queries again and again, sometimes in this pure form, sometimes in fractional form (“What fraction of the elements in the databases...?”), sometimes with weights (linear queries), and sometimes in slightly more complex forms (e.g., apply h : N|X |^ → [0, 1] to each element in the database and sum the results). Counting is an
34 Basic Techniques and Composition Theorems
This fact, together with a union bound, gives us a simple bound on the accuracy of the Laplace mechanism:
Theorem 3.8. Let f : N|X |^ → R k , and let y = M L (x, f (·), ε). Then ∀δ ∈ (0, 1]:
Pr
[ ‖f (x) − y‖∞ ≥ ln
( k δ
) ·
( ∆f ε
)] ≤ δ
Proof. We have:
Pr
[ ‖f (x) − y‖∞ ≥ ln
( k δ
) ·
( ∆f ε
)] = Pr
[ max i ∈[ k ]
|Y i | ≥ ln
( k δ
) ·
( ∆f ε
)]
≤ k · Pr
[ |Y i | ≥ ln
( k δ
) ·
( ∆f ε
)]
= k ·
( δ k
)
= δ
where the second to last inequality follows from the fact that each Y i ∼ Lap(∆f /ε) and Fact 3.7.
Example 3.3 (First Names). Suppose we wish to calculate which first names, from a list of 10,000 potential names, were the most common among participants of the 2010 census. This question can be repre- sented as a query f : N|X |^ → R^10000. This is a histogram query, and so has sensitivity ∆f = 1, since every person can only have at most one first name. Using the above theorem, we see that we can simultaneously calculate the frequency of all 10 , 000 names with (1, 0)-differential pri- vacy, and with probability 95%, no estimate will be off by more than an additive error of ln(10000/.05) ≈ 12. 2. That’s pretty low error for a nation of more than 300 , 000 , 000 people!
Differentially Private Selection. The task in Example 3.3 is one of differentially private selection : the space of outcomes is discrete and the task is to produce a “best” answer, in this case the most populous histogram cell.
3.3. The laplace mechanism 35
Example 3.4 (Most Common Medical Condition). Suppose we wish to know which condition is (approximately) the most common in the med- ical histories of a set of respondents, so the set of questions is, for each condition under consideration, whether the individual has ever received a diagnosis of this condition. Since individuals can experience many conditions, the sensitivity of this set of questions can be high. Nonetheless, as we next describe, this task can be addressed using addi- tion of Lap(1/ε) noise to each of the counts (note the small scale of the noise, which is independent of the total number of conditions). Cru- cially, the m noisy counts themselves will not be released (although the “winning” count can be released at no extra privacy cost).
Report Noisy Max. Consider the following simple algorithm to deter- mine which of m counting queries has the highest value: Add indepen- dently generated Laplace noise Lap(1/ε) to each count and return the index of the largest noisy count (we ignore the possibility of a tie). Call this algorithm Report Noisy Max. Note the “information minimization” principle at work in the Report Noisy Max algorithm: rather than releasing all the noisy counts and allowing the analyst to find the max and its index, only the index corresponding to the maximum is made public. Since the data of an individual can affect all counts, the vector of counts has high ` 1 - sensitivity, specifically, ∆f = m, and much more noise would be needed if we wanted to release all of the counts using the Laplace mechanism.
Claim 3.9. The Report Noisy Max algorithm is (ε, 0)-differentially private.
Proof. Fix D = D′^ ∪ {a}. Let c, respectively c′, denote the vector of counts when the database is D, respectively D′. We use two properties:
3.4. The exponential mechanism 37
which, after multiplying through by e ε , yields what we wanted to show: Pr[i|D′, r− i ] ≤ e ε^ Pr[i|D, r− i ].
In both the “most common name” and “most common condition” exam- ples the “utility” of a response (name or medical condition, respec- tively) we estimated counts using Laplace noise and reported the noisy maximum. In both examples the utility of the response is directly related to the noise values generated; that is, the popularity of the name or condition is appropriately measured on the same scale and in the same units as the magnitude of the noise. The exponential mechanism was designed for situations in which we wish to choose the “best” response but adding noise directly to the computed quantity can completely destroy its value, such as setting a price in an auction, where the goal is to maximize revenue, and adding a small amount of positive noise to the optimal price (in order to protect the privacy of a bid) could dramatically reduce the resulting revenue.
Example 3.5 (Pumpkins.). Suppose we have an abundant supply of pumpkins and four bidders: A, F, I, K, where A, F, I each bid $1. 00 and K bids $3. 01. What is the optimal price? At $3. 01 the revenue is $3. 01 , at $3. 00 and at $1. 00 the revenue is $3. 00 , but at $3. 02 the revenue is zero!
The exponential mechanism is the natural building block for answering queries with arbitrary utilities (and arbitrary non-numeric range), while preserving differential privacy. Given some arbitrary range R, the exponential mechanism is defined with respect to some utility function u : N|X |^ × R → R, which maps database/output pairs to utility scores. Intuitively, for a fixed database x, the user prefers that the mechanism outputs some element of R with the maximum possible utility score. Note that when we talk about the sensitivity of the utility score u : N|X |^ × R → R, we care only about the sensitivity of u with respect to its database argument; it can be arbitrarily sensitive in its
38 Basic Techniques and Composition Theorems
range argument:
∆u ≡ max r ∈R max x,y :‖ x − y ‖ 1 ≤ 1 |u(x, r) − u(y, r)|.
The intuition behind the exponential mechanism is to output each pos- sible r ∈ R with probability proportional to exp(εu(x, r)/∆u) and so the privacy loss is approximately:
ln
( exp(εu(x, r)/∆u) exp(εu(y, r)/∆u)
) = ε[u(x, r) − u(y, r)]/∆u) ≤ ε.
This intuitive view overlooks some effects of a normalization term which arises when an additional person in the database causes the utilities of some elements r ∈ R to decrease and others to increase. The actual mechanism, defined next, reserves half the privacy budget for changes in the normalization term.
Definition 3.4 (The Exponential Mechanism). The exponential mech- anism M E (x, u, R) selects and outputs an element r ∈ R with probability proportional to exp( εu 2∆( x,ru )).
The exponential mechanism can define a complex distribution over a large arbitrary domain, and so it may not be possible to implement the exponential mechanism efficiently when the range of u is super- polynomially large in the natural parameters of the problem. Returning to the pumpkin example, utility for a price p on database x is simply the profit obtained when the price is p and the demand curve is as described by x. It is important that the range of potential prices is independent of the actual bids. Otherwise there would exist a price with non-zero weight in one dataset and zero weight in a neighboring set, violating differential privacy.
Theorem 3.10. The exponential mechanism preserves (ε, 0)- differential privacy.
Proof. For clarity, we assume the range R of the exponential mecha- nism is finite, but this is not necessary. As in all differential privacy proofs, we consider the ratio of the probability that an instantiation
40 Basic Techniques and Composition Theorems
OPT u (x). Then:
Pr
[ u(M E (x, u, R)) ≤ OPT u (x) − 2∆u ε
( ln
( |R| |ROPT|
)
)] ≤ e− t
Proof.
Pr[u(M E (x, u, R)) ≤ c] ≤ |R| exp(εc/2∆u) |ROPT| exp(εOPT u (x)/2∆u)
=
exp
( ε(c − OPT u (x)) 2∆u
) .
The inequality follows from the observation that each r ∈ R with u(x, r) ≤ c has un-normalized probability mass at most exp(εc/2∆u), and hence the entire set of such “bad” elements r has total un-normalized probability mass at most |R| exp(εc/2∆u). In contrast, we know that there exist at least |ROPT| ≥ 1 elements with u(x, r) = OPT u (x), and hence un-normalized probability mass exp(εOPT u (x)/2∆u), and so this is a lower bound on the normalization term. The theorem follows from plugging in the appropriate value for c.
Since we always have |ROPT| ≥ 1 , we can more commonly make use of the following simple corollary:
Corollary 3.12. Fixing a database x, we have:
Pr
[ u(M E (x, u, R)) ≤ OPT u (x) − 2∆u ε
(ln (|R|) + t)
] ≤ e− t
As seen in the proofs of Theorem 3.11 and Corollary 3.12, the Expo- nential Mechanism can be particularly easy to analyze.
Example 3.6 (Best of Two). Consider the simple question of determin- ing which of exactly two medical conditions A and B is more common. Let the two true counts be 0 for condition A and c > 0 for condition B. Our notion of utility will be tied to the actual counts, so that conditions with bigger counts have higher utility and ∆u = 1. Thus, the utility of A is 0 and the utility of B is c. Using the Exponential Mechanism
3.5. Composition theorems 41
we can immediately apply Corollary 3.12 to see that the probability of observing (wrong) outcome A is at most 2 e− c ( ε/ (2∆ u ))^ = 2e− cε/^2. Analyzing Report Noisy Max appears to be more complicated, as it requires understanding what happens in the (probability 1 / 4 ) case when the noise added to the count for A is positive and the noise added to the count for B is negative.
A function is monotonic in the data set if the addition of an element to the data set cannot cause the value of the function to decrease. Counting queries are monotonic; so is the revenue obtained by offering a fixed price to a collection of buyers. Consider the Report One-Sided Noisy Arg-Max mechanism, which adds noise to the utility of each potential output drawn from the one- sided exponential distribution with parameter ε/∆u in the case of a monotonic utility, or parameter ε/2∆u for the case of a non-monotonic utility, and reports the resulting arg-max. With this algorithm, whose privacy proof is almost identical to that of Report Noisy Max (but loses a factor of two when the utility is non-monotonic), we immediately obtain in Example 3.6 above that outcome A is exponentially in c(ε/∆u) = cε less likely to be selected than outcome B.
Theorem 3.13. Report One-Sided Noisy Arg-Max, when run with parameter ε/2∆u is -differentially private.
Remark 3.1. Report noisy max when instantiated with Laplace noise or exponential noise both have similar guarantees to the exponential mechanism, but lead to distinct distributions. It turns out that instan- tiating report noisy max with the Gumbel distribution leads to an algorithm that samples exactly from the exponential mechanism dis- tribution. This fact is folklore in machine learning, and known as the “Gumbel Max Trick”.
Now that we have several building blocks for designing differentially private algorithms, it is important to understand how we can combine
3.5. Composition theorems 43
Corollary 3.15. Let M i : N|X |^ → R i be an (ε i , 0)-differentially private algorithm for i ∈ [k]. Then if M[ k ] : N|X |^ →
∏ k i =1 R i^ is defined to be M k = (M 1 (x),... , M k (x)), then M[ k ] is (
∑ k i =1 ε i ,^ 0)-differentially private.
A proof of the generalization of this theorem to (ε, δ)-differential privacy appears in Appendix B:
Theorem 3.16. Let M i : N|X |^ → R i be an (ε i , δ i )-differentially private algorithm for i ∈ [k]. Then if M[ k ] : N|X |^ → ∏ k i =1 R i^ is defined to be M k = (M 1 (x),... , M k (x)), then M[ k ] is (
∑ k i =1 ε i ,^
∑ k i =1 δ i )- differentially private.
It is a strength of differential privacy that composition is “automatic,” in that the bounds obtained hold without any special effort by the database curator.
3.5.1 Composition: some technicalities
In the remainder of this section, we will prove a more sophisticated composition theorem. To this end, we will need some definitions and lemmas, rephrasing differential privacy in terms of distance measures between distributions. In the fractional quantities below, if the denom- inator is zero, then we define the value of the fraction to be infinite (the numerators will always be positive).
Definition 3.5 (KL-Divergence). The KL-Divergence, or Relative Entropy, between two random variables Y and Z taking values from the same domain is defined to be:
D(Y ‖Z) = E y ∼ Y
[ ln
Pr[Y = y] Pr[Z = y]
] .
It is known that D(Y ‖Z) ≥ 0 , with equality if and only if Y and Z are identically distributed. However, D is not symmetric, does not satisfy the triangle inequality, and can even be infinite, specifically when Supp(Y ) is not contained in Supp(Z).
Definition 3.6 (Max Divergence). The Max Divergence between two random variables Y and Z taking values from the same domain is
44 Basic Techniques and Composition Theorems
defined to be:
D∞(Y ‖Z) = max S ⊆Supp( Y )
[ ln
Pr[Y ∈ S] Pr[Z ∈ S]
] .
The δ-Approximate Max Divergence between Y and Z is defined to be:
D δ ∞(Y ‖Z) = max S ⊆Supp( Y ):Pr[ Y ∈ S ]≥ δ
[ ln Pr[Y ∈ S] − δ Pr[Z ∈ S]
]
Remark 3.2. Note that a mechanism M is
One other distance measure that will be useful is the statistical distance between two random variables Y and Z, defined as
∆(Y, Z) def = max S | Pr[Y ∈ S] − Pr[Z ∈ S]|.
We say that Y and Z are δ -close if ∆(Y, Z) ≤ δ. We will use the following reformulations of approximate max- divergence in terms of exact max-divergence and statistical distance:
Lemma 3.17.
Proof. For Part 1, suppose there exists Y ′^ δ-close to Y such that D∞(Y ‖Z) ≤ ε. Then for every S,
Pr[Y ∈ S] ≤ Pr[Y ′^ ∈ S] + δ ≤ e ε^ · Pr[Z ∈ S] + δ,
and thus D δ ∞(Y ‖Z) ≤ ε.
46 Basic Techniques and Composition Theorems
eliminate the gap with e ε^ · Z, we also increase the probability mass of Z on S. Specifically, for every y ∈ S, we’ll take
Pr[Y ′^ = y] = e ε^ · Pr[Z′^ = y]
= e ε 1 + e ε^
· (Pr[Y = y] + Pr[Z = y])
∈ [e ε^ · Pr[Z = y], Pr[Y = y]].
This also implies that for y ∈ S, we have:
Pr[Y = y] − Pr[Y ′^ = y]
= Pr[Z′^ = y] − Pr[Z = y] Pr[Y = y] − e ε^ · Pr[Z = y] e ε^ + 1
and thus
α def =
∑
y ∈ S
( Pr[Y = y] − Pr[Y ′^ = y]
)
∑
y ∈ S
( Pr[Z′^ = y] − Pr[Z = y]
)
Pr[Y ∈ S] − e ε^ · Pr[Z ∈ S] e ε^ + 1 ≤
δ e ε^ + 1
Similarly on the set S′^ = {y : Pr[Z = y] > e ε^ · Pr[Y = y]}, we can decrease the probability mass of Z and increase the probability mass of Y by a total of some α′^ ≤ δ/(e ε^ + 1) so that for every y ∈ S′, we have Pr[Z′^ = y] = e ε^ · Pr[Y ′^ = y]. If α = α′, then we can take Pr[Z′^ = y] = Pr[Z = y] and Pr[Y ′^ = y] = Pr[Y = y] for all y ∈/ S ∪ S′, giving D∞(Y ‖Z) ≤ ε and ∆(Y, Y ′) = ∆(Z, Z′) = α. If α 6 = α′, say α > α′, then we need to still increase the probability mass of Y ′^ and decrease the mass of Z′ by a total of β = α − α′^ on points outside of S ∪ S′^ in order to ensure that the probabilities sum to 1. That is, if we try to take the “mass functions” Pr[Y ′^ = y] and Pr[Z′^ = y] as defined above, then while we do have the property that for every y, Pr[Y ′^ = y] ≤ e ε^ · Pr[Z′^ = y] and Pr[Z′^ = y] ≤ e ε^ · Pr[Y ′^ = y] we also have ∑ y Pr[Y^ ′ (^) = y] = 1 − β
3.5. Composition theorems 47
and
∑ y Pr[Z ′ (^) = y] = 1 + β. However, this means that if we let
R = {y : Pr[Y ′^ = y] < Pr[Z′^ = y]}, then ∑
y ∈ R
( Pr[Z′^ = y] − Pr[Y ′^ = y]
) ≥
∑ y
( Pr[Z′^ = y] − Pr[Y ′^ = y]
) = 2β.
So we can increase the probability mass of Y ′^ on points in R by a total of β and decrease the probability mass of Z′^ on points in R by a total of β, while retaining the property that for all y ∈ R, Pr[Y ′^ = y] ≤ Pr[Z′^ = y]. The resulting Y ′^ and Z′^ have the properties we want: D∞(Y ′, Z′) ≤ ε and ∆(Y, Y ′), ∆(Z, Z′) ≤ α.
Lemma 3.18. Suppose that random variables Y and Z satisfy D∞(Y ‖Z) ≤ ε and D∞(Z‖Y ) ≤ ε. Then D(Y ‖Z) ≤ ε · (e ε^ − 1).
Proof. We know that for any Y and Z it is the case that D(Y ‖Z) ≥ 0 (via the “log-sum inequality”), and so it suffices to bound D(Y ‖Z) + D(Z‖Y ). We get:
D(Y ‖Z) ≤ D(Y ‖Z) + D(Z‖Y )
=
∑ y
Pr[Y = y] ·
( ln Pr[Y = y] Pr[Z = y]
)
( ln
Pr[Z = y] Pr[Y = y]
)
∑ y
[0 + |Pr[Z = y] − Pr[Y = y]| · ε]
= ε ·
∑ y
[max{Pr[Y = y], Pr[Z = y]}
− min{Pr[Y = y], Pr[Z = y]}] ≤ ε ·
∑ y
[(e ε^ − 1) · min{Pr[Y = y], Pr[Z = y]}]
≤ ε · (e ε^ − 1).
Lemma 3.19 (Azuma’s Inequality). Let C 1 ,... , C k be real-valued ran- dom variables such that for every i ∈ [k], Pr[|C i | ≤ α] = 1, and for