Algorithm Search⌘K

Theoremintro

Basic composition theorem

Also called sequential composition.

If k mechanisms, each (epsilon_i, delta_i)-DP, run on the same data, even adaptively, the k outputs together are (sum of epsilon_i, sum of delta_i)-DP.

The basic composition theorem says that privacy loss adds up. If kk mechanisms run on the same dataset, and mechanism ii is (εi,δi)(\varepsilon_i, \delta_i)-differentially private, then the tuple of all kk outputs is (∑iεi,∑iδi)(\sum_i \varepsilon_i, \sum_i \delta_i)-differentially private. This holds when each mechanism may depend on the outputs of the ones before it. The theorem is the reason that differential privacy can be managed as a budget: an analyst gets a total ε\varepsilon and spends part of it on each query. The bound on ε\varepsilon is tight for a worst-case mechanism. For many queries with small εi\varepsilon_i the advanced composition theorem gives a much smaller total, at the cost of a small extra δ\delta.

Statement

Fix a set of datasets and a symmetric neighbor relation x∼x′x \sim x'. The theorem holds for any such relation, for example add/remove or replace, because it is a statement about one pair at a time. A randomized mechanism MM is (ε,δ)(\varepsilon, \delta)-differentially private (approximate DP) if for every pair x∼x′x \sim x' and every event SS of outputs,

Pr⁡[M(x)∈S]≤eεPr⁡[M(x′)∈S]+δ.\Pr[M(x) \in S] \le e^{\varepsilon} \Pr[M(x') \in S] + \delta.

Adaptive composition. For i=1,…,ki = 1, \ldots, k, let Mi(x;y1,…,yi−1)M_i(x; y_1, \ldots, y_{i-1}) be a mechanism that reads the dataset xx and the earlier outputs y1,…,yi−1y_1, \ldots, y_{i-1}. The composed mechanism MM draws Y1∼M1(x)Y_1 \sim M_1(x), then Y2∼M2(x;Y1)Y_2 \sim M_2(x; Y_1), and so on, and outputs (Y1,…,Yk)(Y_1, \ldots, Y_k). The coins of the steps are independent given the earlier outputs.

Theorem (basic composition). If for each ii and each fixed prefix (y1,…,yi−1)(y_1, \ldots, y_{i-1}) the mechanism Mi(⋅ ;y1,…,yi−1)M_i(\cdot\,; y_1, \ldots, y_{i-1}) is (εi,δi)(\varepsilon_i, \delta_i)-DP, then MM is (∑i=1kεi,∑i=1kδi)\left(\sum_{i=1}^k \varepsilon_i, \sum_{i=1}^k \delta_i\right)-DP.

The non-adaptive case, where each MiM_i ignores the earlier outputs, is a special case. For pure DP (δi=0\delta_i = 0 for all ii) the result is (∑iεi)(\sum_i \varepsilon_i)-DP.

In plain words

Each private answer leaks a little about each person. If you ask a second question, the second answer leaks a little more, and the two leaks add up. This stays true when you choose the second question after you see the first answer.

So a data holder can give an analyst a fixed privacy budget. Each question costs part of the budget. When the budget is spent, the data holder stops answering. The total leak about any one person is then at most the budget.

The rule is simple, and it is safe in the worst case. It can be too careful when you ask many small questions; a sharper rule exists for that case.

Proof

All probabilities below are for one fixed pair x∼x′x \sim x'. Write PP and QQ for the laws of the output under xx and under x′x'.

Lemma 1. If P(S)≤eεQ(S)+δP(S) \le e^{\varepsilon} Q(S) + \delta for every event SS, then EP[h]≤eεEQ[h]+δE_P[h] \le e^{\varepsilon} E_Q[h] + \delta for every measurable function hh with values in [0,1][0, 1].

Proof. By the layer-cake formula, EP[h]=∫01P(h>t) dt≤∫01(eεQ(h>t)+δ)dt=eεEQ[h]+δE_P[h] = \int_0^1 P(h > t)\,dt \le \int_0^1 \left(e^{\varepsilon} Q(h > t) + \delta\right) dt = e^{\varepsilon} E_Q[h] + \delta.

Two steps. Let P1,Q1P_1, Q_1 be the laws of Y1Y_1 under xx and x′x', and let P2y,Q2yP_2^{y}, Q_2^{y} be the laws of M2(x;y)M_2(x; y) and M2(x′;y)M_2(x'; y). Fix an event SS of pairs, and write Sy={y2:(y,y2)∈S}S_{y} = \{y_2 : (y, y_2) \in S\}. Then

Pr⁡[(Y1,Y2)∈S∣x]=Ey∼P1[P2y(Sy)].\Pr[(Y_1, Y_2) \in S \mid x] = E_{y \sim P_1}\left[P_2^{y}(S_{y})\right].

For each yy, the step-2 guarantee gives P2y(Sy)≤eε2Q2y(Sy)+δ2P_2^{y}(S_y) \le e^{\varepsilon_2} Q_2^{y}(S_y) + \delta_2. A probability is also at most 1, so P2y(Sy)≤g(y)+δ2P_2^{y}(S_y) \le g(y) + \delta_2 with g(y)=min⁡(1,eε2Q2y(Sy))g(y) = \min\left(1, e^{\varepsilon_2} Q_2^{y}(S_y)\right). The function gg takes values in [0,1][0, 1], so Lemma 1 applies to it with the step-1 guarantee:

Pr⁡[(Y1,Y2)∈S∣x]≤EP1[g]+δ2≤eε1EQ1[g]+δ1+δ2.\Pr[(Y_1, Y_2) \in S \mid x] \le E_{P_1}[g] + \delta_2 \le e^{\varepsilon_1} E_{Q_1}[g] + \delta_1 + \delta_2.

Now g(y)≤eε2Q2y(Sy)g(y) \le e^{\varepsilon_2} Q_2^{y}(S_y), so EQ1[g]≤eε2Ey∼Q1[Q2y(Sy)]=eε2Pr⁡[(Y1,Y2)∈S∣x′]E_{Q_1}[g] \le e^{\varepsilon_2} E_{y \sim Q_1}[Q_2^{y}(S_y)] = e^{\varepsilon_2} \Pr[(Y_1, Y_2) \in S \mid x']. This gives

Pr⁡[(Y1,Y2)∈S∣x]≤eε1+ε2Pr⁡[(Y1,Y2)∈S∣x′]+δ1+δ2.\Pr[(Y_1, Y_2) \in S \mid x] \le e^{\varepsilon_1 + \varepsilon_2} \Pr[(Y_1, Y_2) \in S \mid x'] + \delta_1 + \delta_2.

Induction on kk. The case k=1k = 1 is the hypothesis. For k≥2k \ge 2, the first k−1k - 1 steps form one mechanism with output (Y1,…,Yk−1)(Y_1, \ldots, Y_{k-1}). By the induction hypothesis it is (∑i<kεi,∑i<kδi)(\sum_{i<k} \varepsilon_i, \sum_{i<k} \delta_i)-DP. Step kk is a mechanism that reads this output as its prefix, and it is (εk,δk)(\varepsilon_k, \delta_k)-DP for each prefix. The two-step argument, with the first k−1k - 1 steps as step 1, gives the claim. ■\blacksquare

Consequences

  • The privacy budget. A system can keep a running sum of the εi\varepsilon_i and δi\delta_i that it has spent and refuse queries past a limit. PINQ did this. The sparse vector technique and report noisy max are ways to pay less than the sum for special query patterns.
  • Building blocks. Many algorithms are a sequence of private steps, for example a Laplace mechanism per query, or one noisy gradient per step of DP-SGD. Basic composition gives a first bound for each of them. With post-processing, any function of the outputs keeps the bound.
  • Parallel composition. When the mechanisms read disjoint parts of the data, the parallel composition theorem replaces the sum by the maximum. Its proof uses the theorem above for each pair of neighbors.
  • Sharper rules. The advanced composition theorem and the optimal composition theorem improve the sum when kk is large. Renyi DP and zCDP compose by a plain sum of their own parameters, and the conversion to (ε,δ)(\varepsilon, \delta) is done once, at the end.
  • A rule of thumb, not a theorem. Splitting a budget evenly, εi=ε/k\varepsilon_i = \varepsilon/k, is common. It is a choice of the analyst. The theorem gives the same total for any split.

Tightness

The sum of the epsilons. Take randomized response with ε=ln⁡3\varepsilon = \ln 3: a person with bit bb reports bb with probability 3/43/4 and 1−b1 - b with probability 1/41/4. Use replace neighbors on a dataset of one person: xx has bit 1 and x′x' has bit 0. Run it twice with fresh coins. The outputs (1,1),(1,0),(0,1),(0,0)(1,1), (1,0), (0,1), (0,0) have probabilities (9,3,3,1)/16(9, 3, 3, 1)/16 under xx and (1,3,3,9)/16(1, 3, 3, 9)/16 under x′x'. At the output (1,1)(1, 1) the ratio is 9=e2ln⁡39 = e^{2 \ln 3}. So the pair is not (ε′,0)(\varepsilon', 0)-DP for any ε′<2ln⁡3\varepsilon' < 2 \ln 3, and the bound ε1+ε2\varepsilon_1 + \varepsilon_2 is exact. The same computation with kk runs gives the ratio 3k=ekln⁡33^k = e^{k \ln 3}.

The sum of the deltas. Let MδM_\delta output the whole dataset with probability δ\delta and a fixed symbol ⊥\perp otherwise. It is (0,δ)(0, \delta)-DP. Run kk independent copies on xx, and let SS be the event that some copy outputs xx. Then Pr⁡[S∣x]=1−(1−δ)k\Pr[S \mid x] = 1 - (1 - \delta)^k and Pr⁡[S∣x′]=0\Pr[S \mid x'] = 0. So the composition is not (ε′,δ′)(\varepsilon', \delta')-DP for any ε′\varepsilon' when δ′<1−(1−δ)k=kδ−O(k2δ2)\delta' < 1 - (1 - \delta)^k = k\delta - O(k^2 \delta^2). The sum kδk\delta is tight up to the second-order term.

The two parts are not tight at the same time for all parameters. Kairouz, Oh and Viswanath found the exact set of pairs (ε′,δ′)(\varepsilon', \delta') that k-fold composition reaches; see the optimal composition theorem.

History

The additive rule appears in the first papers on differential privacy, by Dwork, McSherry, Nissim and Smith (2006) and by Dwork, Kenthapadi, McSherry, Mironov and Naor (2006), as the way to answer several queries. McSherry (2009) named it sequential composition, together with parallel composition, and made it the privacy budget of the PINQ query system. Dwork and Roth (2014) give the pure case as Theorem 3.14 and Corollary 3.15 and the (ε,δ)(\varepsilon, \delta) case as Theorem 3.16. Dwork, Rothblum and Vadhan (2010) set up the adaptive model, in which an adversary picks each mechanism after it sees the earlier outputs, that this page uses.

References

  1. Cynthia Dwork and Aaron Roth, The Algorithmic Foundations of Differential Privacy, Foundations and Trends in Theoretical Computer Science 9(3-4), pages 211 to 407, 2014, Section 3.5, Theorem 3.14 (two pure mechanisms), Corollary 3.15 (k pure mechanisms) and Theorem 3.16 (k mechanisms with (epsilon_i, delta_i)); Appendix B (the proof of Theorem 3.16)
  2. Frank McSherry, Privacy integrated queries: an extensible platform for privacy-preserving data analysis, SIGMOD 2009, pages 19 to 30, the section on sequential and parallel composition
  3. Peter Kairouz, Sewoong Oh and Pramod Viswanath, The composition theorem for differential privacy, IEEE Transactions on Information Theory 63(6), pages 4037 to 4049, 2017, the exact privacy region of k-fold composition, which shows when the sum of the deltas can be improved

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/RX173Z/text.yaml