Chapter 3: Composition of Differential Privacy & Privacy Amplification by Subsampling
-
Published:2025
Thomas Steinke, 2025. "Composition of Differential Privacy & Privacy Amplification by Subsampling", Differential Privacy in Artificial Intelligence: From, Theory to Practice, Ferdinando Fioretto, Pascal Van Hentenryck
Download citation file:
3.1 Introduction
Our data is subject to many different uses. Many entities will have access to our data, including government agencies, healthcare providers, employers, technology companies, and financial institutions. Those entities will perform many different analyses that involve our data and those analyses will be updated repeatedly over our lifetimes. The greatest risk to privacy is that an attacker will combine multiple pieces of information from the same or different sources and that the combination of these will reveal sensitive details about us. Thus we cannot study privacy leakage in a vacuum; it is important that we can reason about the accumulated privacy leakage over multiple independent analyses.
As a concrete example to keep in mind, consider the following simple differencing attack: Suppose your employer provides healthcare benefits. The employer pays for these benefits and thus may have access to summary statistics like how many employees are currently receiving pre-natal care or currently are being treated for cancer. Your pregnancy or cancer status is highly sensitive information, but intuitively the aggregated count is not sensitive as it is not specific to you. However, this count may be updated on a regular basis and your employer may notice that the count increased on the day you were hired or on the day you took off for a medical appointment. This example shows how multiple pieces of information – the date of your hire or medical appointment, the count before that date, and the count afterwards – can be combined to reveal sensitive information about you, despite each piece of information seeming innocuous on its own. Attacks could combine many different statistics from multiple sources and hence we need to be careful to guard against such attacks, which leads us to differential privacy.
Differential privacy has strong composition properties – if multiple independent analyses are run on our data and each analysis is differentially private on its own, then the combination of these analyses is also differentially private. This property is key to the success of differential privacy. Composition enables building complex differentially private systems out of simple differentially private subroutines. Composition allows the re-use data over time without fear of a catastrophic privacy failure. And, when multiple entities use the data of the same individuals, they do not need to coordinate to prevent an attacker from learning private details of individuals by combining the information released by those entities. To prevent the above differencing attack, we could independently perturb each count to make it differentially private; then taking the difference of two counts would be sufficiently noisy to obscure your pregnancy or cancer status.
Composition is quantitative. The differential privacy guarantee of the overall system will depend on the number of analyses and the privacy parameters that they each satisfy. The exact relationship between these quantities can be complex. There are various composition theorems that give bounds on the overall parameters in terms of the parameters of the parts of the system. In this chapter, we will study several composition theorems (including the relevant proofs) and we will also look at some examples that demonstrate how to apply the composition theorems and why we need them.
Composition theorems provide privacy bounds for a given system. A system designer must use composition theorems to design systems that simultaneously give good privacy and good utility (i.e., good statistical accuracy). This process often called “privacy budgeting” or “privacy accounting.” Intuitively, the system designer has some privacy constraint (i.e., the overall system must satisfy some final privacy guarantee) which can be viewed as analogous to a monetary budget that must be divided amongst the various parts of the system. Composition theorems provide the accounting rules for this budget. Allocating more of the budget to some part of the system makes that part more accurate, but then less budget is available for other parts of the system. Thus the system designer must also make a value judgement about which parts of the system to prioritize.
Overview of the Chapter
This chapter provides an in-depth discussion of composition theorems and privacy amplification techniques in Differential Privacy. It begins by introducing the basic composition theorem in Section 3.2, and examining whether basic composition strategies achieve optimal privacy guarantees. Next, in Section 3.3, it reviews the concept of privacy loss distributions and offers a statistical hypothesis testing perspective to understand approximate Differential Privacy. The chapter then discusses advanced composition via the privacy loss distribution, in Section 3.4, revisiting basic composition and exploring composition through Gaussian approximation. It reviews the notion of Concentrated Differential Privacy, adaptive composition, and post-processing, and examines the composition of approximate Differential Privacy. Then, the chapter focuses on privacy amplification by subsampling, in Section 3.6, covering subsampling techniques for pure and approximate Differential Privacy, the differences between addition/removal and replacement for neighboring datasets, and how subsampling interacts with composition. Here, the concept of Rényi Differential Privacy is introduced, along with analytic bounds for privacy amplification and practical guidance on the use of privacy amplification by subsampling in real-world applications. Finally, the chapter concludes, in Section 3.7, with a reflection on the historical development of the discussed concepts and provides further reading for a deeper understanding of these concepts.
3.2 Basic Composition
The simplest composition theorem is what is known as basic composition. This applies to pure ε-DP (although it can be extended to approximate (ε,δ)-DP). Basic composition says that, if we run k independent ε-DP algorithms, then the composition of these is kε-DP. More generally, we have the following result.
Theorem 3.1 (Basic Composition). Letbe randomized algorithms. Suppose Mj is εj-DP for each j ∈ [k]. Defineby M(x) = (M1(x), M2(x),…,Mk(x)), where each algorithm is run independently. Then M is ε-DP for.
Proof. Fix an arbitrary pair of neighboring datasets and output . To establish that M is ε-DP, we must show that . By independence, we have
where the inequality follows from the fact that each Mj is εj-DP and, hence, . Similarly, , which completes the proof.
Basic composition is already a powerful result, despite its simple proof; it establishes the versatility of differential privacy and allows us to begin reasoning about complex systems in terms of their building blocks. For example, suppose we have k functions each of sensitivity 1. For each j ∈ [k], we know that adding Laplace (1/ε) noise to the value of fj(x) satisfies ε-DP. Thus, if we add independent Laplace (1/ε) noise to each value fj(x) for all j ∈ [k], then basic composition tells us that releasing this vector of k noisy values satisfies kε−DP. If we want the overall system to be ε-DP, then we should add independent Laplace (k/ε) noise to each value fj(x).
3.2.1 Is Basic Composition Optimal?
If we want to release k values each of sensitivity 1 (as above) and have the overall release be ε-DP, then, using basic composition, we can add Laplace (k/ε) noise to each value. The variance of the noise for each value is 2k2/ε3, so the standard deviation is . In other words, the scale of the noise must grow linearly with the number of values k if the overall privacy and each value's sensitivity is fixed. It is natural to wonder whether the scale of the Laplace noise can be reduced by improving the basic composition result. We now show that this is not possible.
For each j ∈ [k], let be the algorithm that releases fj(x) with Laplace (k/ε) noise added. Let be the composition of these k algorithms. Then Mj is ε/k-DP for each j ∈ [k] and basic composition tells us that M is ε-DP. The question is whether M satisfies a better DP guarantee than this – i.e., does M satisfy ε*-DP for some ε* < ε ? Suppose we have neighboring datasets such that fj(x) = fj(x′) + 1 for each j ∈ [k]. Let y = (a,a,…,a) ∈ ℝk for some . Then
This shows that basic composition is optimal. For this example, we cannot prove a better guarantee than what is given by basic composition.
Is there some other way to improve upon basic composition that circumvents this example? Note that we assumed that there are neighboring datasets such that fj(x) = fj(x′) + 1 for each j ∈ [k]. In some settings, no such worst case datasets exist. In that case, instead of scaling the noise linearly with k, we can scale the Laplace noise according to the ℓ1 sensitivity .
Instead of adding assumptions to the problem, we will look more closely at the example above. We showed that there exists some output y ∈ ℝd such that . However, such outputs y are very rare, as we require yj ≥ max{fj(x), fj(x′)} for each j ∈ [k] where yj = fj(x)+ Laplace (k/ε). Thus, in order to observe an output y such that the likelihood ratio is maximal, all of the k Laplace noise samples must be positive, which happens with probability 2−k. The fact that outputs y with maximal likelihood ratio are exceedingly rare turns out to be a general phenomenon and not specific to the example above.
Can we improve on basic composition if we only ask for a high probability bound? That is, instead of demanding for all , we demand for some 0 < δ ≪ 1. Can we prove a better bound ε* < ε in this relaxed setting? The answer turns out to be yes.
The limitation of pure ε-DP is that events with tiny probability – which are negligible in real-world applications – can dominate the privacy analysis. This motivates us to move to relaxed notions of differential privacy, such as approximate (ε,δ)-DP and concentrated DP, which are less sensitive to low probability events. In particular, these relaxed notions of differential privacy allow us to prove quantitatively better composition theorems. The rest of this chapter develops this direction further.
3.3 Privacy Loss Distributions
Qualitatively, an algorithm is differentially private if, for all neighboring datasets , the output distributions M(x) and M(x′) are “indistinguishable” or “close.” The key question is how do we quantify the closeness or indistinguishability of a pair of distributions?
Pure DP (a.k.a. pointwise DP) [DMNS06] uniformly bounds the likelihood ratio for all . As discussed at the end of the section on basic composition (Section 3.2), this can be too strong as the outputs y that maximize this likelihood ratio may be very rare.
We could also consider the total variation distance (a.k.a. statistical distance):
Another option would be the KL divergence (a.k.a. relative entropy). Both TV distance and KL divergence turn out to give poor privacy-utility tradeoffs; that is, to rule out bad algorithms M, we must set these parameters very small, but that also rules out all the good algorithms. Intuitively, both TV and KL are not sensitive enough to low-probability bad events (whereas pure DP is too sensitive). We need to introduce a parameter (δ) to determine what level of low probability events we can ignore.
Approximate (ε,δ)-DP [Dwo+06] is a combination of pure ε-DP and δ TV distance. Specifically, M is (ε,δ)-DP if, for all neighboring datasets and all measurable . Intuitively, (ε,δ)-DP is like ε-DP except we can ignore events with probability ≤ δ. That is, δ represents a failure probability, so it should be small (e.g., δ ≤ 10−6), while ε can be larger (e.g., ε ≈ 1); having two parameters with very different values allows us to circumvent the limitations of either pure DP or TV distance as a similarity measure.
All of these options for quantifying indistinguishability can be viewed from the perspective of the privacy loss distribution. The privacy loss distribution also turns out to be essential to the analysis of composition. Approximate (ε,δ)-DP bounds are usually proved via the privacy loss distribution.
We now formally define the privacy loss distribution and relate it to the various quantities we have considered. Then, in Section 3.3.1, we will calculate the privacy loss distribution corresponding to the Gaussian mechanism, which is a particularly nice example. In the next Section 3.3.2, we explain how the privacy loss distribution arises naturally via statistical hypothesis testing. To conclude, in Section 3.3.3, we precisely relate the privacy loss back to approximate (ε,δ)-DP. In the next section (Section 3.4), we will use the privacy loss distribution as a tool to analyze composition.
Definition 3.2 (Privacy Loss Distribution). Let P and Q be two probability distributions on. Defineby.iThe privacy loss random variable is given by Z = fP∥Q (Y) for Y ← P. The distribution of Z is denoted PrivLoss (P∥Q).
In the context of differential privacy, the distributions P = M(x) and Q = M(x′) correspond to the outputs of the algorithm M on neighboring inputs x,x′. Successfully distinguishing these distributions corresponds to learning some fact about an individual person's data. The randomness of the privacy loss random variable Z comes from the randomness of the algorithm M (e.g., added noise). Intuitively, the privacy loss tells us which input (x or x′) is more likely given the observed output (Y←M(⋅)). If Z > 0, then the hypothesis Y ← P = M(x) explains the observed output better than the hypothesis Y ← Q = M(x′) and vice versa. The magnitude of the privacy loss Z indicates how strong the evidence for this conclusion is. If Z = 0, both hypotheses explain the output equally well, but, if Z → ∞, then we can be nearly certain that the output came from P, rather than Q. A very negative privacy loss Z ≪ 0 means that the observed output Y ← P strongly supports the wrong hypothesis (i.e., Y ← Q).
As long as the privacy loss distribution is well-defined,ii we can easily express almost all the quantities of interest in terms of it:
Pure ε-DP of M is equivalent to demanding that for all neighboring x,x′.iii
The KL divergence is the expectation of the privacy loss: .iv
- The TV distance is given by
- Approximate (ε,δ)-DP of M is implied by for all neighboring x,x′. So we should think of approximate DP as a tail bound on the privacy loss. To be precise, (ε,δ)-DP of M is equivalent tofor all neighboring x,x′. (See Proposition 3.7.)
3.3.1 Privacy Loss of Gaussian Noise Addition
As an example, we will work out the privacy loss distribution corresponding to the addition of Gaussian noise to a bounded-sensitivity query. This example is particularly clean, as the privacy loss distribution is also a Gaussian, and it will turn out to be central to the story of composition.
Proposition 3.3 (Privacy Loss Distribution of Gaussian). Letand. Thenfor.
Proof. We have and . Thus the log likelihood ratio is
The log likelihood ratio fP∥Q is an affine linear function. Thus the privacy loss random variable Z = fP∥Q (Y) for will also follow a Gaussian distribution. Specifically, , so
and, similarly, , so
To relate Proposition 3.3 to the standard Gaussian mechanism , recall that , where q is a sensitivity-Δ query – i.e., q(x) − q(x′)∣ ≤ Δ for all neighboring datasets . Thus, for neighboring datasets x, x′, we have for some .
The privacy loss of the Gaussian mechanism is unbounded; thus it does not satisfy pure ε-DP. However, the Gaussian distribution is highly concentrated, so we can say that with high probability the privacy loss is not too large. This is the basis of the privacy guarantee of the Gaussian mechanism.
3.3.2 Statistical Hypothesis Testing Perspective
To formally quantify differential privacy, we must measure the closeness or indistinguishability of the distributions P = M(x) and Q = M(x′) corresponding to the outputs of the algorithm M on neighboring inputs x,x′. Distinguishing a pair of distributions is precisely the problem of (simple) hypothesis testing in the field of statistical inference. Thus it is natural to look at hypothesis testing tools to quantify the (in)distinguishability of a pair of distributions.
In the language of hypothesis testing, the two distributions P and Q would be the null hypothesis and the alternate hypothesis, which correspond to a positive or negative example. We are given a sample Y drawn from one of the two distributions and our task is to determine which. Needless to say, there is, in general, no hypothesis test that perfectly distinguishes the two distributions and, when choosing a hypothesis test, we face a non-trivial tradeoff between false positives and false negatives. There are many different ways to measure how good a given hypothesis test is.
For example, we could measure the accuracy of the hypothesis test evenly averaged over the two distributions. In this case, given the sample Y, an optimal test chooses P if P(Y) ≥ Q(Y) and otherwise chooses Q; the accuracy of this test is
This measure of accuracy thus corresponds to TV distance. The greater the TV distance between the distributions, the more accurate this test is. However, as we mentioned earlier, TV distance does not yield good privacy-utility tradeoffs. Intuitively, the problem is that this hypothesis test doesn't care about how confident we are. That is, the test only asks whether P(Y) ≥ Q(Y), but not how big the difference or ratio is. Hence we want a more refined measure of accuracy that does not count false positives and false negatives equally.
Regardless of how we measure how good the hypothesis test is, there is an optimal test statistic, namely the log likelihood ratio. This test statistic gives a real number and thresholding that value yields a binary hypothesis test; any binary hypothesis test is dominated by some value of the threshold. In other words, the tradeoff between false positives and false negatives reduces to picking a threshold. This remarkable – yet simple – fact is established by the Neyman-Pearson lemma:
Lemma 3.4 (Neyman-Pearson Lemma [NP33]). Fix distributions P and Q onand define the log-likelihood ratio test statisticby. Letbe any (possibly randomized) test. Then there exists some t ∈ ℝ such that
How is this related to the privacy loss distribution? The test statistic Z = fP∥Q (Y) under the hypothesis Y ← P is precisely the privacy loss random variable Z ← PrivLoss (P∥Q. Thus the Neyman-Pearson lemma tells us that the privacy loss distribution PrivLoss (P∥Q) captures everything we need to know about distinguishing P from Q.
Note that the Neyman-Pearson lemma also references the test statistic fP∥Q (Y) under the hypothesis Y ← Q. This is fundamentally not that different from the privacy loss. There are two ways we can relate this quantity back to the usual privacy loss: First, we can relate it to PrivLoss (Q∥P) and this distribution is something we should be able to handle due to the symmetry of differential privacy guarantees.
Remark 3.5.Fix distributions P and Q onsuch that the log likelihood ratiois well-defined for all. Since fP∥Q (y) = −fQ∥P (y) for all, if Z ← PrivLoss (Q∥P), then −Z follows the distribution of fP∥Q (Y) under the hypothesis Y ← Q.
Second, if we need to compute an expectation of some function g of fP∥Q (Y) under the hypothesis Y ← Q, then we can still express this in terms of the privacy loss PrivLoss (P∥Q) :
Lemma 3.6 (Change of Distribution for Privacy Loss). Fix distributions P and Q onsuch that the log likelihood ratiois well-defined for all. Let g:ℝ → ℝ be measurable. Then
Proof. By the definition of the log likelihood ratio (see Definition 3.2), we have for all measurable functions h. Setting yields , as required. We can also write these expressions out as an integral to obtain a more intuitive proof:
3.3.3 Approximate DP & the Privacy Loss Distribution
So far, in this section, we have defined the privacy loss distribution, given an example, and illustrated that it is a natural quantity to consider that captures essentially everything we need to know about the (in)distinguishability of two distributions. To wrap up this section, we will relate the privacy loss distribution back to the definition of approximate (ε,δ)-DP:
Proposition 3.7 (Conversion from Privacy Loss Distribution to Approximate Differential Privacy). Let P and Q be two probability distributions onsuch that the privacy loss distribution PrivLoss (P∥Q) is well-defined. Fix ε ≥ 0 and define
Then
Proof. For any measurable , we have
where denotes the indicator function – it takes the value 1 if the condition is true and 0 otherwise. To maximize this expression, we want y ∈ S whenever P(y)−eε. Q(y) > 0 and we want y ∉ S when this is negative. Thus δ = P(S*) − eε⋅Q(S*) for
Now
and, by Remark 3.5,
This gives the first expression in the result:
Alternatively, and, by Lemma 3.6,
which yields
Note that for all z ∈ ℝ. This produces the second expression in our result.
To obtain the third expression in the result, we apply integration by parts to the second expression: Let be the complement of the cumulative distribution function of the privacy loss distribution. Then the probability density function of Z evaluated at z is given by the negative derivative, −F′(z).v Then
If the privacy loss is well-defined, then .
The final expression (an upper bound, rather than a tight characterization) is easily obtained from any of the other three expressions. In particular, dropping the second term from the first expression yields the upper bound.
The expression in Proposition 3.7 is known as the “hockey stick divergence” and it determines the smallest δ for a given ε such that P(S) ≤ eεQ(S) + δ for all . If P = M(x) and Q = M(x′) for arbitrary neighboring datasets x,x′, then this expression gives the best approximate (ε,δ)-DP guarantee.
Proposition 3.7 gives us three equivalent ways to calculate δ, each of which will be useful in different circumstances. To illustrate how to use Proposition 3.7, we combine it with Proposition 3.3 to prove a tight approximate differential privacy guarantee for Gaussian noise addition:
Corollary 3.8 (Tight Approximate Differential Privacy for Univariate Gaussian). Letbe a deterministic function and letbe its sensitivity. Define a randomized algorithmbyfor some σ2 > 0. Then, for any ε ≥ 0, M satisfies (ε, δ)-DP with
where ρ* := Δ2/2σ2 and .
Furthermore, this guarantee is optimal – for every ε ≥ 0, there is no δ′ < δ such that M is (ε, δ′)-DP for general q.
Proof. Fix arbitrary neighboring datasets and . Let μ = q(x) and μ′ = q(x′). Let and . We must show P(S) ≤ eε ⋅ Q(S) + δ for arbitrary ε ≥ 0 and the value δ given in the result.
By Proposition 3.3, , where .
By Proposition 3.7, we have P(S) ≤ eε ⋅ Q(S) + δ, where
Since ρ ≤ ρ* and the above expression is increasing in ρ, we can substitute in ρ* as an upper bound.
Optimality follows from the fact that both Propositions 3.3 and 3.7 give exact characterizations. Note that we must assume that there exist neighboring x,x′ such that ρ = ρ*.
The guarantee of Corollary 3.8 is exact, but it is somewhat hard to interpret. We can easily obtain a more interpretable upper bound:
3.4 Composition via the Privacy Loss Distribution
The privacy loss distribution captures essentially everything about the (in)distinguishability of a pair of distributions. It is also the key to understanding composition. Suppose we run multiple differentially private algorithms on the same dataset and each has a well-defined privacy loss distribution. The composition of these algorithms corresponds to the convolution of the privacy loss distributions. That is, the privacy loss random variable corresponding to running all of the algorithms independently is equal to the sum of the independent privacy loss random variables of each of the algorithms:
Theorem 3.9 (Composition is Convolution of Privacy Loss Distributions). For each j ∈ [k], let Pj and Qj be distributions onand assume PrivLoss (Pj∥Qj) is well defined. Let P = P1 × P2 × … × Pk denote the product distribution onobtained by sampling independently from each Pj. Similarly, let Q = Q1 × Q2 × … × Qk denote the product distribution onobtained by sampling independently from each Qj. Then PrivLoss (P∥Q) is the convolution of the distributions PrivLoss (Pj∥Qj) for all j ∈ [k]. That is, sampling Z ← PrivLoss(P∥Q) is equivalent towhen Zj ← PrivLoss(Pj∥Qj) independently for each j ∈ [k].
Proof. For all , the log likelihood ratio (Definition 3.2) satisfies
Since P is a product distribution, sampling Y ← P is equivalent to sampling Y1 ← P1, Y2 ← P2,…, Yk ← Pk independently.
A sample from the privacy loss distribution Z ← PrivLoss(P∥Q) is given by Z = fP∥Q (Y) for Y ← P. By the above two facts, this is equivalent to for Y1 ← P1, Y2 ← P2,…, Yk ← Pk independently. For each j ∈ [k], sampling Zj ← PrivLoss(Pj∥Qj) is given by for Yj ← Pj. Thus sampling Z ← PrivLoss (P∥Q) is equivalent to Z = Z1 + Z2 + … + Zk where Z1 ← PrivLoss(P1∥Q1), Z2 ← PrivLoss(P2∥Q2),…, Zk ← PrivLoss(Pk∥Qk) are independent.
Theorem 3.9 is the key to understanding composition of differential privacy. More concretely, we should think of a pair of neighboring inputs x,x′ and k algorithms M1,…, Mk. Suppose M is the composition of M1,…, Mk. Then the the differential privacy of M can be expressed in terms of the privacy loss distribution PrivLoss (M(x)∥M(x′)). Theorem 3.9 allows us to decompose this privacy loss as the sum/convolution of the privacy losses of the constituent algorithms PrivLoss (Mj(x)∥Mj(x′)) for j ∈ [k]. Thus if we have differential privacy guarantees for each Mj, this allows us to prove differential privacy guarantees for M.
Basic Composition, Revisited
We can revisit basic composition (Theorem 3.1 in Section 3.2) with the perspective of privacy loss distributions. Suppose are each ε-DP. Fix neighboring datasets . This means that for each j ∈ [k]. Now let be the composition of these algorithms. We can express the privacy loss Z ← PrivLoss(M(x)∥M(x′)) as Z = Z1 + Z2 + … + Zk where Zj ← PrivLoss (Mj(x)∥Mj(x′)) for each j ∈ [k]. Basic composition simply adds up the upper bounds:
This bound is tight if each Zj is a point mass (i.e., ). However, this is not the case. (It is possible to prove, in general, that .) The way we will prove better composition bounds is by applying concentration of measure bounds to this sum of independent random variables. That way we can prove that the privacy loss is small with high probability, which yields a better differential privacy guarantee.
Intuitively, we will apply the central limit theorem. The privacy loss random variable of the composed algorithm M can be expressed as the sum of independent bounded random variables. That means the privacy loss distribution PrivLoss (M(x)∥M(x′)) is well-approximated by a Gaussian, which is the information we need to prove a composition theorem. What is left to do is to obtain bounds on the mean and variance of the summands and make this Gaussian approximation precise.
Gaussian Composition
It is instructive to look at composition when each constituent algorithm Mj is the Gaussian noise addition mechanism. In this case the privacy loss distribution is exactly Gaussian and convolutions of Gaussians are also Gaussian. This is the ideal case and our general composition theorem will be an approximation to this ideal.
Specifically, we can prove a multivariate analog of Corollary 3.8:
Corollary 3.10 (Tight Approximate Differential Privacy for Multivariate Gaussian). Letbe a deterministic function and letbe its sensitivity in the 2-norm. Define a randomized algorithmbyfor some σ2 > 0, where I is the identity matrix. Then, for any ε ≥ 0, M satisfies (ε, δ)-DP with
where ρ* := Δ2/2σ2and.
Furthermore, this guarantee is optimal – for every ε ≥ 0, there is no δ′ < δ such that M is (ε, δ′)-DP for general q.
Proof. Fix arbitrary neighboring datasets and . Let μ = q(x) and μ′ = q(x′) ∈ ℝd. Let and . We must show P(S) ≤ eε⋅Q(S) + δ for arbitrary ε ≥ 0 and the value δ given in the result.
Now both P and Q are product distributions: For j ∈ [d], let and . Then P = P1 × P2 × … Pd and Q = Q1 × Q2 × …× Qd.
By Theorem 3.9, and .
By Proposition 3.3, , where for all j ∈ [d].
Thus , where .
By Proposition 3.7, we have P(S) ≤ eε⋅Q(S) + δ, where
Since ρ ≤ ρ* and the above expression is increasing in ρ, we can substitute in ρ* as an upper bound.
Optimality follows from the fact that Propositions 3.3 and 3.7 and Theorem 3.9 give exact characterizations. Note that we must assume that there exist neighboring x,x′ such that ρ = ρ*.
The key to the analysis of Gaussian composition in the proof of Corollary 3.10 is that sums of Gaussians are Gaussian. In general, the privacy loss of each component is not Gaussian, but the sum still behaves much like a Gaussian and this observation is the basis for improving the composition analysis.
Composition Via Gaussian Approximation
After analyzing Gaussian composition, our next step is to analyze the composition of k independent ε-DP algorithms. We will use the same tools as we did for Gaussian composition and we will develop a new tool, which is called concentrated differential privacy.
Let each be ε-DP and let be the composition of these algorithms. Let be neighboring datasets. For notational convenience, let Pj = Mj(x) and Qj = Mj(x′) for all j ∈ [k] and let P = M(x) = P1 × P2 × … × Pk and Q = M(x′) = Q1 × Q2 × … × Qk.
For each j ∈ [k], the algorithm Mj satisfies ε-DP, which ensures that the privacy loss random variable Zj ← PrivLoss(Pj∥Qj) = PrivLoss(Mj(x)∥Mj(x′)) is supported on the interval [−ε, ε]. The privacy loss being bounded immediately implies a bound on the variance: . We also can prove a bound on the expectation: . We will prove this bound formally later (in Proposition 3.16). For now, we give some intuition: Clearly and the only way this can be tight is if Zj = ε with probability 1. But Zj = log(Pj(Yj)/Qj(Yj)) for Yj ← Pj. Thus implies Pj(Yj) = eε ⋅ Qj(Yj) with probability 1. This yields a contradiction: . Thus we conclude and, with a bit more work, we can obtain the bound from the fact that |Zj| ≤ ε and .
Our goal is to understand the privacy loss Z ← PrivLoss(P∥Q) = PrivLoss (M(x)∥M(x′)) of the composed algorithm. Theorem 3.9 tells us that this is the convolution of the constituent privacy losses. That is, we can write where Zj ← PrivLoss(Pj∥Qj) = PrivLoss(Mj(x)∥Mj(x′)) independently for each j ∈ [k].
By independence, we have
Since Z can be written as the sum of independent bounded random variables, the central limit theorem tells us that it is well approximated by a Gaussian – i.e.,
Are we done? Can we substitute this approximation into Proposition 3.7 to complete the proof of a better composition theorem? We must make this approximation precise. Unfortunately, the approximation guarantee of the quantitative central limit theorem (a.k.a., the Berry-Esseen Theorem) is not quite strong enough. To be precise, converting the guarantee to approximate (ε,δ)-DP would incur an error of , which is larger than we want.
Our approach is to look at the moment generating function – i.e., the expectation of an exponential function – of the privacy loss distribution. To be precise, we will show that, for all t ≥ 0,
In other words, rather than attempting to prove a Gaussian approximation, we prove a one-sided bound. Informally, this says that PrivLoss . The expectation of an exponential function turns out to be a nice way to formalize this inequality, because, if X and Y are independent, then .
To formalize this approach, we next introduce concentrated differential privacy.
3.4.1 Concentrated Differential Privacy
Concentrated differential privacy [DR16; BS16] is a variant of differential privacy (like pure DP and approximate DP). The main advantage of concentrated DP is that it composes well. Thus we will use it as a tool to prove better composition results.
Definition 3.11 (Concentrated Differential Privacy). Letbe a randomized algorithm. We say that M satisfies ρ-concentrated differential privacy (ρ−zCDP) if, for all neighboring inputs, the privacy loss distribution PrivLoss (M(x)∥M(x′)) is well-defined (see Definition 3.2) and
To contextualize this definition, we begin by showing that the Gaussian mechanism satisfies it.
Lemma 3.12 (Gaussian Mechanism is Concentrated DP). Lethave sensitivity Δ – that is, ‖q(x)−q(x′)‖2 ≤ Δ for all neighboring. Let σ > 0. Define a randomized algorithmby. Then M is ρ-zCDP for.
Proof. Fix neighboring inputs and t ≥ 0. By Proposition 3.3, for each j ∈ [d], for . By Theorem 3.9, for . Thus , as required.
To analyze the composition of k independent ε-DP algorithms, we will prove three results: (i) Pure ε-DP implies -zCDP. (ii) The composition of k independent -zCDP algorithms satisfies -zCDP. (iii) -zCDP implies approximate (ε′,δ)-DP with δ ∈ (0,1) arbitrary and . We begin with composition, as this is the raison d'être for concentrated DP:
Theorem 3.13 (Composition for Concentrated Differential Privacy). Letbe randomized algorithms. Suppose Mj is ρj−zCDP for each j ∈ [k]. Defineby M(x) = (M1(x),M2(x),…, Mk(x)), where each algorithm is run independently. Then M is ρ−zCDP for.
Proof. Fix neighboring inputs . By our assumption that each algorithm Mj is ρj-zCDP,
By Theorem 3.9, Z ← PrivLoss(M(x)∥M(x′)) can be written as , where Zj ← PrivLoss(Mj(x)∥Mj(x′)) independently for each j ∈ [k].
Thus, for any t ≥ 0, we have
Since x and x′ were arbitrary, this proves that M satisfies ρ-zCDP, as required.
Next we show how to convert from concentrated DP to approximate DP, which applies the tools we developed earlier.
Proposition 3.14 (Conversion from Concentrated DP to Approximate DP). For anyand any ε, t ≥ 0, M satisfies (ε,δ)-DP with
In particular, if M satisfies ρ−zCDP, then M satisfies (ε, δ)−DP for any ε ≥ ρ with
Proof. Fix arbitrary neighboring inputs x,x′. Fix ε,t ≥ 0. We must show that for all S we have for the value of δ given in the statement above.
Let Z ← PrivLoss(M(x)∥M(x′)). By Proposition 3.7, it suffices to show
for the value of δ given in the statement above.
Let c > 0 be a constant such that, with probability 1,
Taking expectations of both sides we have , which is the kind of bound we need. It only remains to identify the appropriate value of c to obtain the desired bound.
We trivially have 0 ≤ c ⋅ exp(tZ) as long as c > 0. Thus we only need to ensure 1 − exp(ε − Z) ≤ c ⋅ exp(tZ). That is, for any value of t > 0, we can set
where the final equality follows from using calculus to determine that z = ε + log(1 + 1/t) is the optimal value of z. Thus , which proves the first part of the statement.
Now assume M is ρ-zCDP. Thus
which immediately yields the equality in the second part of the statement.
To obtain the inequality in the second part of the statement, we observe that
whence c ≤ exp(−εt). Substituting in this upper bound on c and setting t = (ε − ρ)/2ρ completes the proof
Remark 3.15.Proposition 3.14 shows that ρ-zCDP implies (ε,δ = exp(−(ε − ρ)2/4ρ))-DP for all ε ≥ ρ. Equivalently, ρ-zCDP implies-DP for all δ > 0. Also, to obtain a given a target (ε,δ)-DP guarantee, it suffices to have ρ-zCDP with
This gives a sufficient condition; tighter bounds can be obtained from Proposition 3.14.
The final piece of the puzzle is the conversion from pure DP to concentrated DP.
Proposition 3.16.Suppose M satisfies ε-DP, then M satisfies.
Proof. Fix neighboring inputs x,x′. Let Z ← PrivLoss(M(x)∥M(x′)). By our ε-DP assumption, Z is supported on the interval [−ε, +ε]. Our task is to prove that for all t > 0.
The key additional fact is the following consequence of Lemma 3.6
We can write this out as an integral to make it clear:
The combination of these two facts −Z ∈ [−ε, ε] and is all we need to know about Z to prove the result. The technical ingredient is Hoeffding's lemma [Hoe63]:
Lemma 3.17 (Hoeffding's lemma). Let Z be a random variable supported on the interval [−ε, +ε]. Then for all.
Proof. To simplify things, we can assume without loss of generality that Z is supported on the discrete set {−ε, +ε}. To prove this claim, let be a randomized rounding of Z. That is, for all z ∈ [−ε, +ε]. By Jensen's inequality, since exp(tz) is a convex function of z ∈ ℝ for any fixed t ∈ ℝ, we have
Note that . Thus it suffices to prove for all t ∈ ℝ.
The final step in the proof is some calculus: Let . Then . Define f : ℝ → ℝ by
For all t ∈ ℝ,
and
The final line sets and uses the fact that the function x ⋅ (1 − x) is maximized at .
Note that f(0) = 0 and . By the fundamental theorem of calculus, for all t ∈ ℝ,
This proves the lemma, as .
If we substitute t = −1 into Lemma 3.17, we have
which rearranges to .
Substituting this bound on the expectation back into Lemma 3.17 yields the result: For all t > 0, we have
Combining these three results lets us prove what is known as the advanced composition theorem where we start with each individual algorithm satisfying pure DP [DRV10]:
Theorem 3.18 (Advanced Composition Starting with Pure DP). Letbe randomized algorithms. Suppose Mj is εj-DP for each j ∈ [k]. Defineby M(x) = (M1(x),M2(x),…, Mk(x)), where each algorithm is run independently. Then M is (ε, δ)-DP for any δ > 0 with
Proof of Theorem 3.18. By Proposition 3.16, for each j ∈ [k], Mj satisfies ρj-zCDP with . By composition of concentrated DP (Theorem 3.13), M satisfies ρ-zCDP with . Finally, Proposition 3.14 can convert this concentrated DP guarantee to approximate DP: M satisfies (ε,δ)-DP for all ε ≥ ρ and δ = exp(−(ε−ρ)2/4ρ). We can rearrange this so that δ > 0 is arbitrary and .
Comparison of different composition bounds. We compose k independent 0.1-DP algorithms to obtain a (ε,10−6)-DP guarantee. Theorem 3.1 – basic composition gives ε = k⋅0.1. For comparison, we have advanced composition (Theorem 3.18), an optimal bound [KOV15], and Concentrated DP (CDP) with the improved conversion from Proposition 3.14. For comparison, we also consider composing the Gaussian mechanism using Corollary 3.10, where the Gaussian noise is scaled to have the same variance as Laplace noise would have to attain 0.1-DP.
Recall that the basic composition theorem (Theorem 3.1) gives δ = 0 and . That is, basic composition scales with the 1-norm of the vector (ε1,ε2,…, εk), whereas advanced composition scales with the 2 -norm of this vector (and the squared 2 -norm). Neither bound strictly dominates the other. However, asymptotically (in a sense we will make precise in the next paragraph) advanced composition dominates basic composition.
Suppose we have a fixed (ε,δ)-DP guarantee for the entire system and we must answer k queries of sensitivity 1. Using basic composition, we can answer each query by adding Laplace (k/ε) noise to each answer. However, using advanced composition, we can answer each query by adding Laplace noise to each answer,
where
(per Remark 3.15). If the privacy parameters ε,δ > 0 are fixed (which implies ρ is fixed) and k → ∞, we can see that asymptotically advanced composition gives noise per query scaling as , while basic composition results in noise scaling as Θ(k).
3.4.2 Adaptive Composition & Post-processing
Thus far we have only considered non-adaptive composition. That is, we assume that the algorithms M1,M2,…, Mk being composed are independent. More generally, adaptive composition considers the possibility that Mj can depend on the outputs of M1,…, Mj−1. This kind of dependence arises very often, either in an iterative algorithm, or an interactive system where a human chooses analyses to perform sequentially. Fortunately, adaptive composition is easy to deal with.
Proposition 3.19 (Adaptive Composition of Concentrated DP). Letbe ρ1−zCDP. Letbe such that, for all, the algorithm x ↦ M(x,y1) is ρ2−zCDP. That is, M2is ρ2−zCDP in terms of its first argument for any fixed value of the second argument. Defineby M(x) = M2(x,M1(x)). Then M is (ρ1 + ρ2)-zCDP.
Proposition 3.19 only considers the composition of two algorithms, but it can be extended to k algorithms by induction.
Proof. Fix neighboring inputs . Fix t ≥ 0. Let Z ← PrivLoss (M(x)∥M(x′)). We must prove .
For non-adaptive composition, we could write Z = Z1 + Z2 where Z1 ← PrivLoss(M1(x) ∥ M1(x′)) and Z2 ← PrivLoss(M2(x) ∥ M2(x′)) are independent. However, we cannot do this in the adaptive case – the two privacy losses are not independent. Instead, we use the fact that, conditioned on the value of the first privacy loss Z1, the privacy loss Z2 still satisfies the bound on the moment generating function. That is, for all z1, we have . To make this argument precise, we must expand out the relevant definitions.
For now, we make a simplifying technical assumption (which we will justify later): We assume that, given y2 = M(x,y1), we can determine y1. This means we can decompose . Thus
as required. All that remains is to justify our simplifying technical assumption. We can perforce ensure this assumption holds by defining by where y1 = M1(x) and y2 = M2(x,y1) and proving the theorem for in lieu of M. Since the output of includes both outputs, rather than just the last output, the above decomposition works. The result holds in general because M is a post-processing of . That is, we can obtain M(x) by running and discarding the first part of the output. Intuitively, discarding part of the output cannot hurt privacy. Formally, this is the post-processing property of concentrated DP, which we prove in Lemma 3.20 and Corollary 3.21.
Lemma 3.20 (Post-processing for Concentrated DP). Letandbe distributions onand letbe an arbitrary function. Defineandto be the distributions onobtained by applying g to a function fromandrespectively. Then, for all t ≥ 0,
Proof. To generate a sample from Y ← Q, we sample and set . We consider the reverse process: Given , define to be the conditional distribution of conditioned on . That is, is a distribution such that we can generate a sample by first sampling Y ← Q and then sampling . Note that if g is an injective function, then is a point mass.
We have the following key identity. Formally, this relates the Radon-Nikodym derivative of the postprocessed distributions (P with respect to Q) to the RadonNikodym derivative of the original distributions ( with respect to ) via the conditional distribution .
To see where this identity comes from, write
Finally, we have
where the inequality follows from Jensen's inequality and the convexity of the function v ↦ vt+1.
Corollary 3.21.Letsatisfy ρ-zCDP. Letbe an arbitrary function. Defineby. Then M is also ρ-zCDP.
Proof. Fix neighboring inputs . Let , and . By Lemma 3.20 and the assumption that is ρ-zCDP, for all t ≥ 0,
which implies that M is also ρ-zCDP.
3.4.3 Composition of Approximate (ε,δ)-DP
Thus far we have only considered the composition of pure DP mechanisms (Theorems 3.1 & 3.18) and the Gaussian mechanism (Corollary 3.10). What about approximate (ε,δ)-DP?
We have the following result which extends Theorems 3.1 & 3.18 to approximate DP and to adaptive composition.
Theorem 3.22 (Advanced Composition Starting with Approximate DP). For j ∈ [k], letbe randomized algorithms. Suppose Mj is (εj, δj)−DP for each j ∈ [k]. For j ∈ [k], inductively defineby, where each algorithm is run independently and M1…0 (x) = y0for some fixed. Then M1…kis (ε, δ)-DP for anywith
where.
Intuitively, if you consider the privacy loss PrivLoss (M(x)∥M(x′)) (where are arbitrary neighboring inputs), then M being (ε,δ)-DP is equivalent to the privacy loss being in [−ε, +ε] with probability at least 1 − δ; otherwise the privacy loss can be arbitrary (including possibly infinite). Informally, the proof of Theorem 3.22 uses a union bound to show that with probability at least all of the privacy losses of the k algorithms are bounded by their respective εjs. Once we condition on this event, the proof proceeds as before.
Formally, rather than reasoning about possibly infinite privacy losses, we use the following decomposition result.
Lemma 3.23.Let P and Q be probability distributions over. Fix ε, δ ≥ 0. Suppose that, for all measurable, we have P(S) ≤ eε ⋅ Q(S) + δ and Q(S) ≤ eεP(S) + δ.
Then there exist distributions P′, Q′, P″, Q″ overwith the following properties. We can express P and Q as convex combinations of these distributions, namely P = (1 − δ) P′ + δP″ and Q = (1 − δ)Q′ + δQ″. And, for every measurable, we have e−ε ⋅ Q′ (S) ≤ P′ (S) ≤ eε ⋅ Q′ (S).
Proof. Fix ε1,ε2 ∈ [0, ε] to be determined later. Define distributions P′, P″, Q′, and Q″ as follows.vi For all points ,
where δ1 and δ2 are appropriate normalizing constants.
By construction, (1 − δ1)P′ + δ1P″ = P and (1 − δ2) Q′ + δ2Q″ = Q.
If δ1 = δ2 = δ, then we have the appropriate decomposition and, for all , we have
as required. If δ1 = δ2 < δ, we can change the decomposition to , and likewise for Q, which also yields the result.
It only remains to show that we can ensure that δ1 = δ2 ≤ δ by appropriately setting ε1,ε2 ∈ [0, ε]. We have
where . If ε1 = ε, then δ1 ≤ δ by the assumptions of the Lemma. If ε1 = 0, then δ1 = dTV (P,Q). By decreasing ε1, we continuously increase δ1. Thus we can pick ε1 ∈ [0, ε] such that δ1 = min{δ,dTV (P,Q)}. Similarly, we can pick ε2 ∈ [0, ε], such that δ2 = min{δ, dTV (P,Q)}.
The proof of Theorem 3.22 is, unfortunately, quite technical. Most of the steps are the same as we have seen in the pure DP case. The only novelty is applying the decomposition of Lemma 3.23 inductively; this requires cumbersome notation, but is otherwise straightforward.
Proof of Theorem 3.22. Fix neighboring datasets . We inductively define distributions Pj and Qj on as follows. For j ∈ [k], Pj = (Y0,Y1,…, Yj−1, Mj(x,Yj−1)), where (Y1,…, Yj−1) ← Pj−1, and Qj = (Y0,Y1,…, Yj−1, Mj(x′,Yj−1)), where (Y1,…, Yj−1) ← Qj−1. We define P0 = Q0 to be the point mass on y0.
We will prove by induction that, for each j ∈ [k], there exist distributions , , and on such that
and
and, for all t ≥ 0,
and, for all measurable .
Before proving the inductive claim, we show that it suffices to prove the result. Fix an arbitrary measurable and let . We have
The inequality follows the proof we have seen before. Our inductive conclusion includes a pure DP result – and a concentrated DP result – for all t ≥ 0, we have , which implies
where the final inequality holds for the case and requires setting .
It only remains for us to perform the induction. The base case (j = 0) is trivial.
Fix j ∈ [k] and assume the induction hypothesis holds for j − 1. The distribution Pj is defined as a mixture (i.e., convex combination) of Pj|Y for Y ← Pj−1, where Pj|Y := (Y, Mj(x, Yj−1)). For every y, we apply Lemma 3.23 to the conditional distribution Pj|y and then we take the convex combination of these decompositions to obtain a decomposition of Pj. Of course, we must also decompose Qj at the same time.
For each , the conditional distributions satisfy and vice versa. Thus Lemma 3.23 allows us to decompose the conditional distributions Pj|Y and Qj|Y as and where for all S. This gives us the desired decomposition:
Thus we define the new decomposition as for and for . The “weight” of is the product of the weight of (i.e., ) and the weight of (i.e., 1−δj), as required. The remaining parts of the decomposition are combined to define ; note that includes both for and for Y ← Pj−1. It is easy to verify that this decomposition satisfies the requirements of the induction:
And, for pure DP, we have . for all measurable S.
3.5 Asymptotic Optimality of Composition
Is the advanced composition theorem optimal? That is, could we prove a result that is stronger? This is an important question, but we first need to think about what optimality even means. Recall that, in Section 3.2.1, we proved that basic composition is optimal, but then we showed that we could do better by relaxing the requirement from pure DP to approximate DP or concentrated DP. To prove asymptotic optimality of advanced composition, we will show that no algorithm can provide better accuracy than advanced composition gives (except for constant factors) subject to approximate DP. Furthermore, we will see that the analysis is not specific to approximate DP.
Combining advanced composition (Theorem 3.18 or 3.22) with Laplace noise addition shows that we can answer k bounded sensitivity queries (e.g., counting queries) with noise scale for each query, where ρ only depends on the privacy parameters, e.g., ρ = Θ(ε2/log(1/δ)) for (ε,δ)-DP. (Gaussian noise addition also gives the same asymptotics, per Corollary 3.10.)
We can prove that this asymptotics – average error per query – is optimal. Formally, we have the following result.
Theorem 3.24 (Negative Result for Error of Private Mean Estimation). Letand. Letsatisfy (ε, δ)-DP. If δ ≤ 1/100n and k ≥ 200(eε − 1)2n, then there exists somesuch that
whereis the mean of input dataset.
Theorem 3.24 shows that any DP algorithm answering k queries must have error per query scaling with , which matches the guarantees of the advanced composition theorem. We briefly remark on some of the properties of this theorem:
First, M could just output for each coordinate; this is trivially private and has root mean square error at most . The theorem must apply to such an algorithm too, which is the fundamental reason why the lower bound in the conclusion of Theorem 3.24 cannot be larger than a constant .
Second, the assumption δ ≤ 1/100n is also necessary, up to constant factors. If δ ≫ 1/n, then M could sample nδ of the inputs and return the sample mean. This would be (0, δ)-DP and would give accuracy . Note that the advanced composition theorem includes a term. It is possible to extend the negative results to include such a term too [SU15] (see also Lemma 2.3.6 of Bun [Bun16]), but we do not do this here for simplicity.
Third, the assumption k ≥ 200(eε − 1)2n is not really necessary; it is an artifact of our analysis. If k ≪ ε2n, then the privacy error is lower than the sampling error (if we think of x as consisting of n samples from some distribution). A different analysis is possible in this case.
Fourth, Theorem 3.24 has eε − 1 in the denominator, where our positive results have ε. For small ε, we have eε − 1 ≈ ε. But, for large ε, there is an exponential difference. Surprisingly, this is inherent; by using discrete noise [CKS20] in place of continuous Laplace noise it is possible to improve the positive results to yield this asymptotic behavior. However, we are generally not interested in the large ε setting.
Finally, fifth, this theorem is not merely an esoteric impossibility result. It corresponds to realistic attacks, which are known as “tracing attacks” [DSSU17] or “membership inference attacks” [SSSS17], which are the subject of Chapter 5 of this book.
Proof of Theorem 3.24. The theorem guarantees that there exists a specific input x on which M has high error. In general, x must depend on M. To prove this we show that, for a random input from a carefully chosen distribution, any M must have high error. It follows that for each specific M there must exist some fixed input with high error.
For p ∈ [0, 1]k, let be the product distribution over {0, 1}k with mean p. Our random input will consist of n independent draws from . Furthermore, we select the mean parameter randomly too. That is, P ∈ [0, 1]d is uniformly random and X consists of n conditionally independent draws from .
We analyze the quantity
Applying Lemma 3.25 with and summing over the coordinates j ∈ [k] shows that
Denoting , we have . Intuitively, Z measures the total correlation between the output of M and its inputs. What Lemma 3.25 shows is that, if M is accurate – i.e., – then this correlation must be large.
The punchline of the proof is that we show that differential privacy means the correlation must be small, which conflicts with the fact that we have proven it must be large. Ergo, we will obtain the desired impossibility result.
For i ∈ [n], define
so that . Let X0 be a fresh sample from that is (conditionally) independent from X1,…, Xn. Let M(X0,X−i) denote running M on the dataset X where Xi has been replaced by X0 and define
By differential privacy, M(X0,X−i) is indistinguishable from M(X), even if we condition on X0, X1,…, Xn. Thus the distributions of and Zi are also indistinguishable.
Since M(X0,X−i) and Xi are independent (conditioned on P) and and
Now .vii
Lemma 3.26, , and (i.e., Jensen's inequality) gives
Putting things together, we have
Ignoring terms that are (hopefully) low order, this is , which rearranges to , which is the desired asymptotic result. To be precise, this rearranges to
If α ≤ 1/10 and δ ≤ 1/100n, then . If k ≥ 200(eε − 1)2n, then . If all three of these conditions hold, then
Hence, if δ ≤ 1/100n and k ≥ 200(eε − 1)2n, then either α > 1/10 or , as required.
Now we prove the two lemma that were used to prove Theorem 3.24. We begin with the lemma showing that the correlation Z must be large if M is accurate.
The lemma only contemplates one coordinate and then we sum over the k coordinates in the proof of Theorem 3.24. That is, the function f in the theorem is simply one coordinate of M and we average out the randomness of M and the other coordinates.
Lemma 3.25.Let f: {0,1}d → [0,1] be an arbitrary function. Let P ∈ [0, 1] be uniformly random and, conditioned on P, let X1,…, Xn ∈ {0, 1} be independent withfor each i ∈ [n]. Then
By Jensen's inequality . Thus
To gain some intuition for the lemma statement, suppose . Then
The constant in this example is slightly better than the constant in the general result. However, if is a constant function, then the constant is tight, as .
Proof of Lemma 3.25. Define g:[0,1] → [0,1] by , where denotes the product distribution over {0, 1}n with each coordinate having mean p. Then
Now we apply integration by parts to this derivative:
Using the fact that and , we can center these expressions:
Lemma 3.26.Let X and Y be random variables supported on [−Δ, Δ] satisfying and for all measurable S. Then
Proof.
as 1 − e−ε ≤ eε − 1 and 1 + e−ε ≤ 2.
Remark 3.27.The only part of the proof of Theorem 3.24 that uses differential privacy is Lemma 3.26. Thus, if we were to consider a different definition of differential privacy, as long as an analog of Lemma 3.26 holds for this alternative definition, an analog of Theorem 3.24 would still apply. That is to say, this negative result is robust to our choice of privacy definition (unlike the the negative result in Section 3.2.1).
3.6 Privacy Amplification by Subsampling
Thus far we have considered the composition of Gaussian mechanisms, and generic mechanisms satisfying pure or approximate DP. We now turn our attention to subsampled privacy mechanisms. These mechanisms introduce some additional quirks into the picture, which will force us to develop new tools.
The premise of privacy amplification by subsampling is that we run a DP algorithm on some random subset of the data. The subset introduces additional uncertainty, which benefits privacy. In particular, there is some probability that your data is not included in the analysis, which can only enhance your privacy. Furthermore, a potential attacker does not know whether or not your data was dropped; this uncertainty can benefit your privacy even when your data is included. Privacy amplification by subsampling theorems make this intuition precise.
Subsampling arises naturally. We often would like to collect the data of the entire population, but this is impractical. Thus we collect the data of a subset of the population and use statistical methods to generalize from this sample to the entire population. In particular, in deep learning applications, we will use stochastic gradient descent. That is, we choose a random subset of our training data (called a minibatch) and compute the gradient of the loss function with respect to this subset, rather than the entire dataset. This method reduces the computational cost for training. If we want to make deep learning differentially private, then we will add noise to the gradients and we should exploit privacy amplification by subsampling to analyze the privacy properties of this algorithm.
In this section we will analyze subsampling precisely and we will show how it interacts with composition.
3.6.1 Subsampling for Pure or Approximate DP
We begin by analyzing privacy amplification by subsampling under pure or approximate differential privacy. This is a relatively simple result, but it will be instructive as we later attempt to derive more precise bounds.
Theorem 3.28 (Privacy Amplification by Subsampling for Approximate DP). Let U ⊂ [n] be a random subset. For a dataset, letdenote the entries of x indexed by U. That is, (xU)i = xi if i ∈ U and (xU)i = ⊥ if i ∉ U, whereis some null value.
Assume that, for all i ∈ [n], we can define U−i ⊂ [n] \ {i} such that the following two conditions hold.
For alland i ∈ [d], xU andare always neighboring datasets.
For all i ∈ [n], the marginal distribution of U−i conditioned on i ∈ U is equal to the marginal distribution of U conditioned on i ∉ U.
Letsatisfy (ε, δ)-DP. Defineby MU(x) = M(xU).
Let. Then MU is (ε′, δ′)-DP for ε′ = log(1+p(eε−1)) and δ′ = p ⋅ δ.
For small values of ε, we have ε′ = log(1 + p(eε − 1)) ≈ p ⋅ ε. More precisely, ε′ = log(1 + p(eε − 1)) ≤ p ⋅ (eε − 1) and, for ε ≤ 1, we have eε − 1 ≤ ε + ε2 ≤ 2ε.
The technical assumption about U in the theorem statement is satisfied by many natural subsampling distributions: If U is a uniformly random subset of [n] of a fixed size m, then U−i can be obtained by replacing i with a a uniformly random element that is not in U. If U is Poisson subsampled – i.e., each i ∈ [n] is independently included in U with probability p – then, by independence, we can simply remove i, namely U−i = U∖{i}.
The technical assumption should be thought of as an independence assumption. For example, it rules out distributions of the form and , which do not yield meaningful privacy amplification.
Proof of Theorem 3.28. Fix neighboring inputs and some measurable . Let i ∈ [n] be the index on which they differ (i.e., for all j ∈ [n] \ {i}) and let . We have
where , and .
Note that xU and are always neighboring datasets. And, if i ∉ U, then . Since M is (ε, δ)-DP, we have for all values of U; thus
However, this inequality alone is not sufficient to prove the claim. We also need to show that b ≤ eε ⋅ a + δ. Using our technical assumption, we have
Now we can complete the proof: For any λ ∈ [0, 1],
Set λ = pi + (1 − pi) ⋅ e−ε to obtain
Theorem 3.28 is tight: Consider an algorithm M : {0, 1, ⊥}n → {0, 1} that sums its input (excluding ⟂ values) and performs randomized response on whether or not the sum is 0.viii That is, if y ∈ {0, 1, ⊥}n satisfies , then and and, if y ∈ {0, 1, ⊥}n satisfies , then and . This algorithm satisfies ε-DP.
Let U ⊂ [n] be random and let MU : {0, 1}n → {0,1} be as in Theorem 3.28. Consider neighboring datasets x = (0,0,…, 0) and x′ = (1,0,0,…, 0). We have
where ε′ is the pure DP parameter satisfied by MU. We can assume without loss of generality that . Thus this bound matches the guarantee of Theorem 3.28. (This example can be extended to approximate DP too.)
3.6.2 Addition or Removal versus Replacement for Neighboring Datasets
For this discussion of subsampling, we need to be careful about what it means for datasets to be neighboring. There are three common definitions of what qualifies as neighboring datasets: (i) addition or removal of one person's data, (ii) replacement of one person's data, or (iii) both. Each of these three options is a reasonable choice. Work on differential privacy often glosses over this choice – often the choice is irrelevant. But it becomes relevant if we want sharp analyses of privacy amplification by subsampling.
For the discussion of composition so far in this chapter, it does not matter at all how we define neighboring datasets, as long as we are consistent. In general, it only matters slightly which we choose: A replacement can be accomplished by a combination of a removal and an addition. Thus, by group privacy, if the algorithm is (ε, δ)-DP with respect to addition or removal, then it is (2ε, (1 + eε)δ)-DP with respect to replacement. Conversely, we can simulate a removal or addition by replacing the record with a “null” value (⟂ in the formalism of Theorem 3.28). Thus DP with respect to replacement entails DP with respect to addition or removal with the same parameters, unless the semantics of the algorithm forbids null values.
This subtlety already arises in Theorem 3.28. Let's take a close look at the technical assumption: Theorem 3.28 assumes that, for all i ∈ [n], we can define U−i ⊂ [n] \ {i} such that the following two conditions hold.
For all and i ∈ [d], xU and are always neighboring datasets.
For all i ∈ [n], the marginal distribution of U−i conditioned on i ∈ U is equal to the marginal distribution of U conditioned on i ∉ U.
Suppose U ⊂ [n] is a uniformly random subset of a fixed size |U| = m. Then we would define U−i to be U with i replaced by a uniformly random element that is not already in U. Thus, for xU and to be neighboring datasets, our neighboring relation must allow replacement, not just addition or removal.
However, if U corresponds to Poisson subsampling (i.e., each i ∈ [n] is included in U independently with probability p), then U−i would just correspond to removing i. In that case, for xU and to be neighboring datasets, our neighboring relation must allow addition and removal.
It turns out to be easier to work with Poisson subsampling and assuming the neighboring relation is addition or removal. In this case, the proof of Theorem 3.28 simplifies to the following.
Proof of Theorem 3.28 for the special case of Poisson sampling and addition or removal. Let U ⊂ [n] independently include each element with probability p. Let be neighboring datasets in terms of addition or removal. Without loss of generality, assume x′ is x with xi removed (or, rather, replaced by ).ix For any measurable ,
and, by the same calculation,
The key step in the proof is the equality . This holds because so whether or not i ∈ U is irrelevant for , and because the event i ∈ U is independent from U \ {i}.
For the rest of this section, we will restrict our attention to Poisson subsampling and assume that the neighboring relation corresponds to addition or removal of one individual's data.
3.6.3 Subsampling & Composition
How does composition work with subsampling? Of course, we can combine the advanced composition theorem (Theorem 3.22) with our privacy amplification by subsampling result (Theorem 3.28). However, it turns out this is not the best way to analyze many realistic systems.
Consider the following algorithm (which arises in differentially private deep learning applications). Let be the private input. Iteratively, for t = 1,…, T, we pick some function and randomly sample a subset Ut ⊂ [n]; then we reveal .
This algorithm interleaves composition with privacy amplification by subsampling. That is, we combine multivariate Gaussian noise addition (which is a form of composition over the d coordinates) with subsampling and then we compose over the T iterations.
We can use Corollary 3.10 to show that releasing satisfies (ε0, δ0)-DP for , where is the sensitivity of qt. Then we can use Theorem 3.28 to show that, if Ut is a Poisson sample which contains each element with probability p, then is (ε1, δ1)-DP where and δ1 = p ⋅ δ0. Finally, Theorem 3.22 tells us that the composition over T iterations satisfies (ε,δ)-DP with and δ = δ2 + T ⋅ δ1. Overall, we have
This result is asymptotically suboptimal because we have picked up two terms. We obtained one from the Gaussian noise addition (Corollary 3.10) and another from the composition (Theorem 3.22). Both arise from bounding the tails of the privacy loss distribution. This is redundant; we should only need to bound the tails of the privacy loss distribution once.
Intuitively, we started with a Gaussian privacy loss; then we applied a tail bound to obtain a (ε0,δ0)-DP guarantee to which we applied the subsampling theorem; and then we converted this back into a concentrated DP guarantee to apply advanced composition and finally we applied a tail bound to convert this back to (ε,δ)-DP.
We are going to avoid this redundancy by analyzing privacy amplification by subsampling directly in terms of the privacy loss distribution, rather than needing to go via approximate DP. To do so, we need to introduce a new tool.
3.6.4 Rényi Differential Privacy
Rényi differential privacy was introduced by Mironov [Mir17] and was motivated by analyzing privacy amplification by subsampling interleaved with composition, which arises in differentially private deep learning [Aba+16].
Definition 3.29 (Rényi Differential Privacy). Letbe a randomized algorithm. We say that M satisfies (α, ε)-Rényi differential privacy ((α, ε)RDP) if, for all neighboring inputs, the privacy loss distribution PrivLoss (M(x)∥M(x′)) is well-defined (see Definition 3.2) and
Rényi DP is closely related to concentrated DP (Definition 3.11). Specifically, ρ-zCDP is equivalent to satisfying (α, α ⋅ ρ)-RDP for all α ∈ (1, ∞). Rényi DP inherits the nice composition properties of concentrated DP:
Lemma 3.30.Letbe (α, ε1)-RDP. Letbe such that, for all y1 ∈ Y1, the algorithm x ↦ M(x,y1) is (α,ε2)-RDP. Defineby M(x) = M2(x, M1(x)). Then M is (α, ε1 + ε2)-RDP.
The proof of Lemma 3.30 is identical to that of Proposition 3.19. Note that, while the ε parameter adds up, the α parameter does not change. More generally, composing an (α1,ε1)-RDP algorithm with an (α2,ε2)-RDP algorithm yields (min{α1,α2 },ε1+ε2)-RDP.
It is helpful to think of ε in (α, ε)-RDP as a function of α, rather than a single number. This function can encode a rich variety of privacy guarantees. (Concentrated DP corresponds to a linear function.) In particular, it allows us to more precisely represent the kinds of guarantees obtained by subsampling.
Concentrated DP corresponds to the privacy loss being subgaussian (i.e., ρ-zCDP implies for all and all neighboring inputs x and x′), whereas Rényi DP corresponds to the privacy loss being subexponential (i.e., (α, ε)-RDP implies . That is, Rényi DP is more appropriate for analyzing privacy loss distributions with slightly heavier tails than Gaussian. In contrast, pure DP corresponds to the privacy loss being bounded (i.e., ε-DP implies ). So we can view concentrated DP as a relaxation of pure DP and, in turn, Rényi DP is a relaxation of concentrated DP.
Rényi DP is typically formulated in terms of Rényi divergences [Rén61], which were studied in the information theory literature long before differential privacy was discovered.
Definition 3.31 (Rényi Divergences). Let P and Q be distributions over.xFor α ∈ (1, ∞), define
Also, define
Thus an equivalent definition of M satisfying (α, ε)-RDP is that Dα (M(x)∥M(x′)) ≤ ε for all neighboring x,x′.
We now state several key properties of Rényi divergences; most of these are properties we have proved earlier, but we now restate them in a new language.
Lemma 3.32.Let P, Q be probability distributions overwith a common sigmaalgebra such that P is absolutely continuous with respect to Q.
Post-processing (a.k.a. data processing inequality) & non-negativity: Letbe a measurable function. Let f(P) denote the distribution onobtained by applying f to a sample from P; define f(Q) similarly. Then 0 ≤ Dα (f(P)∥f(Q)) ≤ Dα (P∥Q) for all α ∈ [1, ∞].
Composition: If P = P′ × P″ and Q = Q′ × Q″ are product distributions, then Dα (P∥Q) = Dα (P′ ∥ Q′) + Dα (P″ ∥ Q″) for all α ∈ [1, ∞].
More generally, suppose P and Q are distributions on. Let P′ and Q′ be the marginal distributions oninduced by P and Q respectively. For, letand, be the conditional distributions oninduced by P and Q respectively. That is, we can generate a sample Y = (Y′, Y″) ← P by first sampling Y′ ← P′ and then samplingand similarly for Q. Thenfor all α ∈ [1, ∞].
Monotonicity: For all.
- Gaussian divergence: For all μ, μ′, σ ∈ ℝ with σ > 0 and all α ∈ [1, ∞),
- Pure DP to Concentrated DP: For all α ∈ [1, ∞),
- Quasi-convexity: Let P′ and Q′ be probability distributions oversuch that P′ is absolutely continuous with respect to Q′. For s ∈ [0, 1], let (1 − s) ⋅ P + s ⋅ P′ denote the convex combination of the distributions P and P′ with weighting s. For all α ∈ (1, ∞) and all s ∈ [0,1],
and D1((1−s) ⋅ P + s ⋅ P′∥(1 − s) ⋅ Q + s ⋅ Q′) ≤ (1 − s) ⋅ D1(P∥Q) + s ⋅ D1(P′∥Q′).
- Triangle-like inequality (a.k.a. group privacy): Let R be a distribution onand assume that Q is absolutely continuous with respect to R. For all 1 < α < α′ < ∞,
In particular, if Dα (P∥Q) ≤ ρ1 ⋅ α and Dα (Q∥R) ≤ ρ2 ⋅ α for all α ∈ (1, ∞), thenfor all α ∈ (1, ∞).
- Conversion to approximate DP: For all measurable, all α ∈ (1, ∞), and all,
Proof. 1. Post-processing (a.k.a. data processing inequality) & non-negativity: See Lemma 3.20. Non-negativity follows from setting f to be a constant function and noting that the divergence between two point masses is zero.
2. Composition: See Proposition 3.19.
- 3. Monotonicity: Let 1 < α ≤ α′ < ∞. (The cases where α = 1 and α′ = ∞ follow from continuity.) Let . Then f is convex and, by Jensen's inequality,
which implies .
4. Gaussian divergence: See Lemma 3.12.
5. Pure DP to Concentrated DP: See Proposition 3.16.
6. Quasi-convexity: See Lemma B. 6 of Bun and Steinke [BS16].
- 7. Triangle-like inequality (a.k.a. group privacy): Let α ∈ (1,∞). Let p, q ∈ (1, ∞) satisfy . By Hölder's inequality,This rearranges to
where the final equality sets and
Now assume Dα (P∥Q) ≤ ρ1 ⋅ α and Dα (Q∥R) ≤ ρ2 ⋅ α for all α ∈ (1, ∞). Then 8. Conversion to approximate DP: See Proposition 3.14.
3.6.5 Sharp Privacy Amplification by Poisson Subsampling for Rényi DP
Now we analyze privacy amplification by subsampling under Rényi DP. We start with a Rényi DP guarantee and we obtain an amplified Rényi DP guarantee. The goal is to obtain a sharp analysis that avoids converting to approximate DP and back.
For mathematical simplicity, we restrict our attention to Poisson subsampling and assume that neighboring datasets correspond to addition or removal of one person's data.
Theorem 3.33 (Tight Privacy Amplification by Subsampling for Rényi DP). Let U ⊂ [n] be a random set that contains each element independently with probability p. Forletbe given byif i ∈ U andif i ∉ U, whereis some fixed value.
Letbe a function. Letsatisfy (α, ε(α))-RDP for allwith respect to addition or removal – i.e., are neighboring if, for some i ∈ [n], we have xi = ⊥ or, and.
Defineby MU (x) = M(xU). Then MU satisfies-RDP for allwhere
Note that (1 − p)α−1(1 + (α − 1)p) ≤ 1. It is easy to see from the proof that this analysis is tight. That is, if the assumption that M satisfies (α, ε(α))-RDP for all α is tight for some fixed pair of neighboring inputs, then the conclusion that MU satisfies -RDP is also tight.
Theorem 3.33 only considers Rényi DP with orders . This restriction arises because the proof uses a binomial expansion, which only works for integer exponents. In certain cases, it is possible to obtain an expression all α ∈ (1, ∞) using an infinite binomial series [MTZ19]. In general, we can use Monotonicity (part 3 of Lemma 3.32) to bound non-integer α, namely for all α ∈ (1, ∞), MU satisfies -RDP.
Proof of Theorem 3.33. Fix neighboring datasets . Without loss of generality, assume that x′ is x with one element removed – i.e., . Fix this i.
Let . Let be the conditional distribution of M(xU) with i ∈ U. Note that because when i ∉ U and the event i ∈ U is independent from U \ {i}. (This is where we use the Poisson subsampling assumption.)
Thus we can express the distribution of MU (x) as a convex combination: M(xU) = p ⋅ P + (1 − p) ⋅ Q, since .
For all is assumed to be (α,ε(α))-RDP, so we have Dα (P∥Q) ≤ ε(α) and Dα (Q∥P) ≤ ε(α).
To complete the proof we must show that
and
for all .
Fix . We have
Note that .
An identical calculation shows that
Finally, Theorem 3.34 gives
The following result shows that, in terms of subsampling for Rényi DP, it suffices to analyze one side of the add/remove neighboring relation.
Theorem 3.34.Let P and Q be probability distributions that are absolutely continuous with respect to each other. Let p ∈ [0,1] and α ∈ (1, ∞). Set. Then
Since λ ∈ [0,1], this implies
Proof. Define f : (0, ∞) → ℝ by
We have
where for Y ← Q. Thus our objective is to show that .xi
We claim that f is convex. Convexity implies f(x) ≥ f(1) + f′ (1) ⋅ (x − 1) for all x ∈ (0, ∞). Since f(1) = 0 and , this implies , as required.
It only remains to prove that f is convex. We have, for all x > 0,
We now give the auxiliary lemmata used in the proof of Theorem 3.34.
Lemma 3.35.For all p ∈ [0,1] and x ∈ (0, ∞),
Proof. Let f(t) = t+1/t. Then f′ (t) = 1 − 1/t2 and f″(t) = 2/t3 > 0 for all t > 0. Thus f′(t) = 0 ⟺ t = 1 and f(x) ≥ f(1) = 2. Now
Rearranging yields the result.
Lemma 3.36.For all v ≥ 1, p ∈ [0,1], and x ∈ (0, ∞),
Proof. Define f : (0, ∞) → ℝ by
Our goal is to prove that f(x) ≥ f(1) = 3(1 − p) + vp for all x ∈ (0, ∞). It suffices to prove that f is convex and that f′(1) = 0. We have
From these expressions, it is easy to see that f′(1) = 0 and f″(x) ≥ 0 for all x ∈ (0,∞).
3.6.6 Analytic Rényi DP Bound for Privacy Amplification by Poisson Subsampling
Theorem 3.33 gives a tight RDP bound for privacy amplification by Poisson subsampling. However, the bound is in the form of a series. This is adequate for numerical purposes, but it is helpful for our understanding to have a simpler closed-form expression.
In this subsection we will provide a simpler expression and attempt to build some understanding of how privacy amplification by subsampling applies to Rényi DP.
Comparison of Rényi divergence guarantees for Poisson subsampling – i.e., including each person with probability p = 0.05. The unamplified algorithm satisfies 0.5-zCDP. The exact bound is given by Theorem 3.33. For comparison, we have the analytic upper bound from Proposition 3.40 as well as the behavior in the limit given by Proposition 3.41.
Theorem 3.37 (Asymptotic Privacy Amplification by Subsampling for Rényi DP). Let p ∈ [0,1/2] and ρ ∈ (0,1]. Define. Assume.
Letsatisfy ρ-zCDP with respect to addition or removal.xii
Defineby MU(x) = M(xU), where U ⊂ [n] be a random set that contains each element independently with probability p and, foris given by (xU)i = xi if i ∈ U and (xU)i = ⊥ if i ∉ U.
Then MU satisfies (α,10p2ρα)-RDP for all α ∈ (1, ω).
There are many caveats in the statement of Theorem 3.37, but the high level message is that Poisson subsampling a p fraction of the dataset amplifies ρ-zCDP to something like O(p2 ⋅ ρ)-zCDP. We will discuss these caveats in a moment, but, ignoring these caveats and the constant factor in the guarantee, this is exactly the kind of guarantee we would hope for.
Consider the following example, which illustrates what kind guarantee we would hope for. Suppose we have a query and a sensitive dataset and our goal is to estimate . We could release a sample from , which satisfies -zCDP and has mean squared error σ2. However, perhaps due to computational constraints, we might instead select a random p fraction U ⊂ [n] and instead release a sample from . We can calculate that the mean squared error of this algorithm is at most . Without amplification this satisfies -zCDP. With amplification, Theorem 3.37 tells us that this satisfies (α, O(p2 ⋅ ρ)) RDP for α not too large. Now is exactly the guarantee that we obtained by simply evaluating q on the entire dataset and avoiding subsampling. We cannot hope to do better than this.
The constant factor of 10 in the theorem can be improved, but a constant factor loss is the price we pay for having a simpler expression; if we want tight constants we should apply Theorem 3.33.
The main caveat in Theorem 3.37 is the requirement that . This is necessary, as the (α, ε(α))-RDP guarantee qualitatively changes when α ≥ O(log(1/p)/ρ). It changes from ε(α) = O(p2ρα) to ε(α) = ρα−O(log(1/p)). To see why this is inherent, consider the following lower bound. For all p ∈ [0,1], all α ∈ (1, ∞), and all absolutely continuous probability distributions P and Q, we have
Thus . This tells us that, for large α, we cannot have more than an additive improvement in the RDP guarantee, whereas for small α we have a multiplicative improvement. Proposition 3.41 shows that this lower bound is tight.
We now proceed to prove Theorem 3.37.
Lemma 3.38.Let α ∈ (1, ∞), p ∈ [0, 1 − e−1], and x ∈ [0, ∞). If either α ≤ 2 or α > 2 and, then
Proof. We assume p > 0. Otherwise the result is trivial.
Define f : (0, ∞) → ℝ by
For all x ∈ [0,∞), we have
By Taylor's theorem, for all x ∈ [0,∞), there exists ξx ∈ [min{1,x},max{1,x}] such that
To complete the proof is suffices to show that f″ (ξ) ≤ e ⋅ α(α−1)p2 in two cases: First, for all ξ ∈ [0, ∞) assuming α ≤ 2. Second, for all assuming α > 2. (Note that, is implied by the assumptions and p > 0.)
First, suppose α ≤ 2. Then f″′)(x) ≤ 0 for all x ∈ [0, ∞). Thus f″ is decreasing (or constant) and, for all ξ ∈ [0, ∞), we have
Second, assume α > 2 and , which implies .
We have f″′(x) > 0 for all x ∈ [0, ∞). Thus f″ is increasing and, for all , we have
Lemma 3.39.Let α, ω ∈ (1, ∞) with α ≤ ω, p ∈ [0,1−e−1 ], and x ∈ [0, ∞). Then
Proof. We can assume p > 0, as otherwise the result is trivial.
If α ≤ 2 or if α > 2 and , then the result follows from Lemma 3.38, as ((α−1)px)ω ≥ 0.
Thus we assume α > 2 and .
Since x ≥ 1, we have . Therefore it suffices to prove that (1 − p + px)α ≤ ((α − 1)px)ω.
The assumption x ≥ 1 implies 1 − p + px ≥ 1 and, hence, that (1 − p + px)α ≤ (1 − p + px)ω, as we have α ≤ ω. The assumption rearranges to 1 − p ≤ px(α − 2), which implies 1 − p + px ≤ (α − 1)px and, hence, (1 − p + px)ω ≤ ((α − 1)px)ω, as required.
Proposition 3.40 (Analytic Privacy Amplification by Subsampling for Rényi Divergence). Let P and Q be probability distributions with P absolutely continuous with respect to Q. Let p ∈ [0, 1 − e−1] and α, ω ∈ (1, ∞) with α ≤ ω. Then
Proof. We have
The second inequality in the result follows from the fact that log(1 + u) ≤ u for all u > −1.
We also have the following simpler result that provides better bounds when the Rényi order α is large.
Proposition 3.41.Let P and Q be probability distributions with P absolutely continuous with respect to Q. Let p ∈ [0,1] and α ∈ (1, ∞). Then
Proof. We assume 0 < p < 1, as the result is immediate otherwise. By Jensen's inequality and the convexity of v ↦ vα, for all x ∈ [0, ∞) and all λ ∈ (0, 1),
Now, for all λ ∈ (0,1), we have
We can choose λ to minimize this expression. It turns out to be optimal to set . Now we have
Rearranging yields the result.
Proof of Theorem 3.37. Fix neighboring inputs . Fix some α ∈ (1, ω) with .
Without loss of generality x′ is x with some element removed. That is, we can fix some i ∈ [n] such that and for all j≠i.
Let and let . Then MU (x) = M(xU) = pP+(1−p)Q. Also M(x′) = Q
Thus we must prove that Dα (pP+(1−p)Q∥Q) ≤ 10p2ρα and Dα (Q∥pP+(1−p)Q) ≤ 10p2ρα. Since M is assumed to be ρ-zCDP, we have and for all α′ ∈ (1, ∞).
By Proposition 3.40,
Symmetrically, we have Dα (pQ+(1 − p)P∥P) ≤ α ⋅ p2 ⋅ ρ ⋅ 10. By Theorem 3.34,
3.6.7 How to Use Privacy Amplification by Subsampling
The most common use case for privacy amplification by subsampling is analyzing noisy stochastic gradient descent. That is, we repeatedly sample a small subset of the data, compute a function on this subset, and add Gaussian noise. To be precise, let be the private input. Iteratively, for t = 1,…, T, we pick some function and randomly sample a subset Ut ⊂ [n]; then we reveal .
The addition of Gaussian noise satisfies concentrated DP. Specifically, Lemma 3.12 shows that releasing satisfies -zCDP, where is the sensitivity of qt. We can thus apply Theorem 3.33 to obtain a tight Rényi DP guarantee for , where Ut is a Poisson sample. Finally, we can apply the composition property of Rényi DP (Lemma 3.30) over the T rounds and we can convert this final Rényi DP guarantee to approximate DP using Proposition 3.14. This is how differentially private deep learning is analyzed in practice by libraries such as TensorFlow Privacy [Goo18; McM+18].
We can also obtain an asymptotic analysis: Theorem 3.37 shows that with Ut ⊂ [n] including each element independently with probability p satisfies -RDP for all α ∈ (1, ω). Composition over T rounds yields -RDP for all α ∈ (1, ω), which implies (ε, δ)-DP for all δ > 0 and
This bound is directly comparable to the bound from Section 3.6.3, which was derived by converting back and forth between concentrated DP and approximate DP. The difference is that here we have a whereas there we had a log(T/δ) term. This is the asymptotic improvement obtained by keeping the analysis within RDP. This asymptotic improvement also translates into a significant improvement in practice.
We have only analyzed Poisson subsampling, where the size of the sample is random. (Specifically, it follows a binomial distribution.) Naturally, other subsampling schemes may arise in practice. In particular, a fixed size sample is common. As discussed in Section 3.6.2, this corresponds to neighboring datasets allowing the replacement of one individual's data, rather than addition or removal. In terms of Rényi divergences, we must analyze , whereas addition and removal correspond to Dα (pP+(1−p)Q∥Q) and . However, we can apply group privacy (part 7 of Lemma 3.32) to reduce the analysis to the case we have already analyzed: For all α′ > α, we have
3.7 Concluding Remarks
Composition
Differential privacy (specifically, pure DP) was introduced by Dwork, McSherry, Nissim, and Smith [DMNS06].xiii The original paper gives a form of basic composition (Theorem 3.1), but does not state it in full generality; rather it states a result specific to Laplace noise addition. Approximate DP was introduced by Dwork, Kenthapadi, McSherry, Mironov, and Naor [Dwo+06] and this work gave a more general statement of the basic composition result, as well as an analysis of the Gaussian mechanism (although not as tight as Corollary 3.8). The tight analysis of the Gaussian mechanism (Corollaries 3.8 & 3.10) is due to Balle and Wang [BW18].
The advanced composition theorem (Theorem 3.22) was proved by Dwork, Rothblum, and Vadhan [DRV10]. xiv The key concepts of privacy loss distributions and concentrated DP were implicit in this proof, but they were only made explicit in a separate paper by Dwork and Rothblum [DR16]. Bun and Steinke [BS16] refined the notion of concentrated DP and presented the definition that we use here (Definition 3.11).
Kairouz, Oh, and Viswanathan [KOV15] proved an optimal composition theorem for approximate differential privacy. Specifically, the k-fold composition of (ε,δ)-differential privacy satisfies (ε′,δ′)-differential privacy if and only if
This expression is rather complex, but the proof is relatively intuitive. The key insight is that we can reduce the analysis to the k-fold composition of a specific worst-case (ε,δ)-DP mechanism. With probability δ, this mechanism has infinite privacy loss. With probability , it has privacy loss ε. And, with probability , it has privacy loss −ε. The privacy loss of the k-fold composition is the convolution of k of these privacy losses. Thus, with probability 1 − (1 − δ)k the privacy loss of the composition is infinite. Otherwise – i.e., with probability (1 − δ)k – the privacy loss has a shifted binomial distribution. Namely, for all ℓ ∈ [k] ∪ {0},
where Z is the privacy loss of the k-fold composition of the worst-case (ε,δ)-DP mechanism. Applying Proposition 3.7 to this distribution yields the expression for the optimal composition theorem.
Kairouz, Oh, and Viswanathan [KOV15] also considered heterogeneous optimal composition. That is, the composition of k mechanisms where each mechanism j ∈ [k] has a different (εj,δj)-DP guarantee. However, the expression becomes more complicated. Intuitively, this is because the privacy loss distribution can be supported on 2k points in the heterogeneous case, whereas, in the homogeneous case, it is supported on only k+1 points. Thus it takes exponential time to compute the privacy loss distribution. To be precise, Murtagh and Vadhan [MV16] showed that exactly computing the optimal composition is #P-complete, even if δj = 0 for each j ∈ [k]. However, Murtagh and Vadhan also showed that the optimal composition theorem could be approximated to arbitrary precision in polynomial time.
Although these composition results [KOV15; MV16] are optimal, they are limited in that they begin by assuming some (εj,δj)-DP guarantees about the algorithms being composed. However, we usually know more about the algorithms being composed than simply these two parameters. For example, we may know that the algorithms being composed are Gaussian noise addition. Incorporating this additional information allows us to prove even better bounds than optimal composition. This was the main impetus for the development of concentrated DP and Rényi DP, which we have discussed.
A recent line of work [MM18; KJH20; KJPH21; KH21; GLW21; DRS19; ZDW22; CKS20; GKKM22] has explored optimal composition guarantees whilst incorporating additional information about the mechanisms being composed. To make these computations efficient they consider the (discrete) Fourier transform of the privacy loss.xv That is, where concentrated DP and Rényi DP consider the moment generating function of the privacy loss , these works look at the characteristic function , where i2 = −1. These methods provide composition guarantees which are arbitrarily close to optimal, which are thus better than what is attainable via concentrated DP or Rényi DP.
The optimality of advanced composition (Theorem 3.24) is due to Bun, Ullman, and Vadhan [BUV14]. We present the analysis following Kamath and Ullman [KU20].
The composition results we have presented all assume that the privacy parameters of the algorithms being composed (i.e., (εj,δj) for j ∈ [k] in the language of Theorem 3.22) are fixed. It is natural to consider the setting where these parameters are chosen adaptively [RRUV16] – i.e., (εj,δj) could depend on the output of Mj−1. For the most part, the composition results carry over seamlessly to the setting of adaptively-chosen privacy parameters. In particular, for Concentrated or Rényi DP, as long as the sum of the adaptively-chosen privacy parameters remains bounded, we attain privacy with that bound [FZ21]. Another extension is “concurrent composition” [VW21], which applies when an adversary may simultaneously access multiple interactive DP systems. Fortunately, the standard composition results readily extend to this setting [VZ22; Lyu22].
Privacy Amplification by Subsampling
The first explicit statement of differential privacy amplification by subsampling was in a blog post by Smith [Smi09], although it appeared implicitly earlier [Kas+11] and the privacy effects of sampling on its own had also been studied [CM06].
For approximate DP, Balle, Barthe, and Gaborardi [BBG18] provide a thorough analysis of privacy amplification by subsampling (cf. Theorem 3.28). They present tight results for Poisson sampling (i.e., including each element independently), sampling a subset of a fixed size (without replacement), and also sampling with replacement, which means a person's data may appear multiple times in the subsampled dataset.
As discussed in Sections 3.6.3 and 3.6.7, subsampling arises in differentially private versions of stochastic gradient descent [CMS11; BST14]. Abadi, Chu, Goodfellow, McMahan, Mironov, Talwar, and Zhang [Aba+16] applied this in the context of deep learning. To obtain better analyses, they developed the “Moments Accountant” – i.e., Rényi DP (although the connection to Rényi divergences was only made later [Mir17; BS16]).
Abadi et al. [Aba+16] obtained asymptotic Rényi DP bounds for the Poisson subsampled Gaussian mechanism, but they used numerical integration for their implementation. Mironov, Talwar, and Zhang [MTZ19] improved these asymptotic results and gave a better numerical method for exact computation (cf. Theorem 3.33); our presentation in Section 3.6.5 largely follows theirs. Bun, Dwork, Rothblum, and Steinke [BDRS18] prove asymptotic Rényi DP bounds for Poisson subsampling applied to a concentrated DP mechanism (cf. Theorem 3.37). Zhu and Wang [ZW19] gave generic Rényi DP bounds for Poisson subsampling.xvi
Moving away from Poisson subsampling, Wang, Balle, and Kasiviswanathan [WBK19] provide Rényi DP results for sampling a fixed-size set without replacement.
Koskela, Jälkö, and Honkela [KJH20] provide expressions for the privacy loss distribution of the subsampled Gaussian (under both Poisson subsampling and sampling a fixed size set with or without replacement) which can be numerically integrated to obtain optimal composition results.
Closely related to privacy amplification by subsampling is privacy amplification by shuffling[Bit+17; Erl+19; Che+19; BBGN19; FMT21; FMT22]. Privacy amplification by shuffling is usually presented in terms of local differential privacy [Kas+11]. That is, there are n individuals who independently generate random messages that satisfy local ε-DP. Those messages are then “shuffled” so that the potential adversary/attacker cannot identify which message originated from which individual. The additional randomness of the shuffling amplifies the privacy to -DP.
Intuitively, shuffling is similar to subsampling with composition. Suppose we repeatedly sample one individual uniformly at random and perform an ε-DP computation on their data and the number of repetitions is equal to the number of individuals n. We can analyze this as subsampling a 1/n fraction (fixed size set) composed n times. Privacy amplification by subsampling (Theorem 3.28) says each repetition is ε′-DP for . Advanced composition (Theorem 3.18) over the n repetitions yields (ε″,δ)-DP for .
In contrast, for shuffling, we sample without replacement, so no individual is sampled more than once. This means the samples are not independent, so we cannot appeal to the subsampling plus composition analysis. Nevertheless, this intuition leads to the correct result.
Notes
The function fP∥Q is called the log likelihood ratio of P with respect to Q. Formally, fP∥Q is the natural logarithm of the Radon-Nikodym derivative of P with respect to Q. This function is defined by the property that for all measurable . For this to exist, we must assume that P and Q have the same sigma-algebra and that P is absolutely continuous with respect to Q and vice versa – i.e., .
The privacy loss distribution is not well-defined if absolute continuity fails to hold. Intuitively, this corresponds to the privacy loss being infinite. We can extend most of these definitions to allow for an infinite privacy loss. For simplicity, we do not delve into these issues.
Note that, by the symmetry of the neighboring relation (i.e., if x,x′ are neighboring datasets then x′,x are also neighbors), we also have as a consequence of .
The expectation of the privacy loss is always non-negative. Intuitively, this is because we take the expectation of the log likelihood ratio fP∥Q(Y) with respect to Y ← P – i.e., the true answer is P, so on average the log likelihood ratio should point towards the correct answer.
In general, the privacy loss may not be continuous – i.e., F may not be differentiable. Nevertheless, the final result still holds in this case.
Formally, P(y),P′ (y),P″ (y),Q(y),Q′ (y), and Q″ (y) denote the Radon-Nikodym derivative of these distributions with respect to some base measure – usually either the counting measure (in which case these quantities are probability mass functions) or Lebesgue measure (in which case these quantities are probability density functions) – in any case, we can take P + Q to be the base measure.
.
Alternatively (and equivalently), consider an algorithm that adds discrete Laplace noise to the sum of its non-null inputs.
To be formal, we assume is a null value that is equivalent to removing the item. In particular, for and U ⊂ [n] we can define such that if i ∈ U and if i ∈ [n] \ U.
We make the usual measure theoretic disclaimers: We assume the P and Q have the same sigma-algebra. We assume P is absolutely continuous with respect to Q – i.e., ∀SQ(S) = 0⟹P(S) = 0 – so that the Radon-Nikodym derivative is well-defined; we denote the Radon-Nikodym derivative of P with respect to Q evaluated at y by P(y)/Q(y). More generally, if the absolute continuity assumption does not hold, then we define Dα (P∥Q) = ∞ for all α ∈ [1,∞].
Note that we assume P and Q are absolutely continuous with respect to each other – i.e., ∀SP(S) = 0 ⟺ Q(S) = 0. This ensures that the Radon-Nikodym derivative is well-defined and, further that . Thus the function f need only be defined on (0,∞).
I.e., are neighboring if, for some i ∈ [n], we have xi = ⊥ or , and , where is some fixed value.
The original proof showed that the k-fold composition of (ε,δ)-DP algorithms satisfies (ε′,kδ + δ′)-DP with δ′ > 0 arbitrary and . The first term kε(eε−1) is slightly worse than Theorem 3.22, which gives instead.
To apply a discrete Fourier transform, we must first discretize the privacy loss distribution, e.g., by rounding it to a grid. The choice of discretization determines the tightness of the final guarantee, and the computational complexity of computing it.



