The Complexity of Computing the Optimal Composition of Differential Privacy

Jack Murtagh, Salil Vadhan

Introduction

Differential privacy is a framework that allows statistical analysis of private databases while minimizing the risks to individuals in the databases. The idea is that an individual should be relatively unaffected whether he or she decides to join or opt out of a research dataset. More specifically, the probability distribution of outputs of a statistical analysis of a database should be nearly identical to the distribution of outputs on the same database with a single person’s data removed. Here the probability space is over the coin flips of the randomized differentially private algorithm that handles the queries. To formalize this, we call two databases D0,D1D_{0},D_{1} with nn rows each neighboring if they are identical on at least n1n-1 rows, and define differential privacy as follows:

where the probabilities are over the coin flips of the algorithm MM.

In the practice of differential privacy, we generally think of ϵ\epsilon as a small, non-negligible, constant (e.g. ϵ=.1\epsilon=.1). We view δ\delta as a “security parameter” that is cryptographically small (e.g. δ=230\delta=2^{-30}). One of the important properties of differential privacy is that if we run multiple distinct differentially private algorithms on the same database, the resulting composed algorithm is also differentially private, albeit with some degradation in the privacy parameters (ϵ,δ)(\epsilon,\delta). In this paper, we are interested in quantifying the degradation of privacy under composition. We will denote the composition of kk differentially private algorithms M1,M2,,MkM_{1},M_{2},\ldots,M_{k} as (M1,M2,,Mk)(M_{1},M_{2},\ldots,M_{k}) where

A handful of composition theorems already exist in the literature. The first basic result says:

For every ϵ0\epsilon\geq 0, δ\delta\in, and (ϵ,δ)(\epsilon,\delta)-differentially private algorithms M1,M2,,MkM_{1},M_{2},\ldots,M_{k}, the composition (M1,M2,,Mk)(M_{1},M_{2},\ldots,M_{k}) satisfies (kϵ,kδ)(k\epsilon,k\delta)-differential privacy.

This tells us that under composition, the privacy parameters of the individual algorithms “sum up,” so to speak. We care about understanding composition because in practice we rarely want to release only a single statistic about a dataset. Releasing many statistics may require running multiple differentially private algorithms on the same database. Composition is also a very useful tool in algorithm design. Often, new differentially private algorithms are created by combining several simpler algorithms. Composition theorems help us analyze the privacy properties of algorithms designed in this way.

Theorem 1.2 shows a linear degradation in global privacy as the number of algorithms in the composition (k)(k) grows and it is of interest to improve on this bound. If we can prove that privacy degrades more slowly under composition, we can get more utility out of our algorithms under the same global privacy guarantees. Dwork, Rothblum, and Vadhan gave the following improvement on the basic summing composition above [DRV10].

Theorem 1.3 shows that privacy under composition degrades by a function of O(kln(1/δ))O(\sqrt{k\ln(1/\delta^{\prime})}) which is an improvement if δ=2O(k)\delta^{\prime}=2^{-O(k)}. It can be shown that a degradation function of Ω(kln(1/δ))\Omega(\sqrt{k\ln(1/\delta)}) is necessary even for the simplest differentially private algorithms, such as randomized response [War65].

Despite giving an asymptotically correct upper bound for the global privacy parameter, ϵg\epsilon_{g}, Theorem 1.3 is not exact. We want an exact characterization because, beyond being theoretically interesting, constant factors in composition theorems can make a substantial difference in the practice of differential privacy. Furthermore, Theorem 1.3 only applies to “homogeneous” composition where each individual algorithm has the same pair of privacy parameters, (ϵ,δ)(\epsilon,\delta) . In practice we often want to analyze the more general case where some individual algorithms in the composition may offer more or less privacy than others. That is, given algorithms M1,M2,,MkM_{1},M_{2},\ldots,M_{k}, we want to compute the best achievable privacy parameters for (M1,M2,,Mk)(M_{1},M_{2},\ldots,M_{k}). Formally, we want to compute the function:

It is convenient for us to view δg\delta_{g} as given and then compute the best ϵg\epsilon_{g}, but the dual formulation, viewing ϵg\epsilon_{g} as given, is equivalent (by binary search). Actually, we want a function that depends only on the privacy parameters of the individual algorithms:

Empirically (see Appendix A), this optimal bound provides a 30-40%\% savings in ϵg\epsilon_{g} compared to Theorem 1.3 (and a 20%20\% savings compared to an improved asymptotic bound from [KOV15]). The problem remains to find the optimal composition behavior for the more general heterogeneous case. Kairouz, Oh, and Viswanath also provide an upper bound for heterogeneous composition that generalizes the O(kln(1/δ))O(\sqrt{k\ln(1/\delta^{\prime})}) degradation found in Theorem 1.3 for homogeneous composition but do not comment on how close it is to optimal.

We begin by extending the results of Kairouz, Oh, and Viswanath [KOV15] to the general heterogeneous case.

Theorem 1.5 exactly characterizes the optimal composition behavior for any arbitrary set of differentially private algorithms. It also shows that optimal composition can be computed in time exponential in kk by computing the sum over S{1,,k}S\subseteq\{1,\ldots,k\} by brute force. Of course in practice an exponential-time algorithm is not satisfactory for large kk. Our next result shows that this exponential complexity is necessary:

There is a polynomial-time algorithm that given rational ϵ1,,ϵk0,δ1,δk,δg[0,1),\epsilon_{1},\ldots,\epsilon_{k}\geq 0,\delta_{1},\ldots\delta_{k},\delta_{g}\in[0,1), and η(0,1)\eta\in(0,1), outputs ϵ\epsilon^{*} satisfying

where ϵ=i[k]ϵi/k\overline{\epsilon}=\sum_{i\in[k]}\epsilon_{i}/k, assuming constant-time arithmetic operations.

Note that we incur a relative error of η\eta in approximating δg\delta_{g} and an additive error of η\eta in approximating ϵg\epsilon_{g}. Since we always take ϵg\epsilon_{g} to be non-negligible or even constant, we get a very good approximation when η\eta is polynomially small or even a constant. Thus, it is acceptable that the running time is polynomial in 1/η1/\eta.

In addition to the results listed above, our proof of Theorem 1.5 also provides a somewhat simpler proof of the Kairouz-Oh-Viswanath homogeneous composition theorem (Theorem 1.4 [KOV15]). The proof in [KOV15] introduces a view of differential privacy through the lens of hypothesis testing and uses geometric arguments. Our proof relies only on elementary techniques commonly found in the differential privacy literature.

The theoretical results presented here were motivated by our work on an applied project called “Privacy Tools for Sharing Research Data”privacytools.seas.harvard.edu. We are building a system that will allow researchers with sensitive datasets to make differentially private statistics about their data available through data repositories using the Dataversedataverse.org platform [Cro11, Kin07]. Part of this system is a tool that helps both data depositors and data analysts distribute a global privacy budget across many statistics. Users select which statistics they would like to compute and are given estimates of how accurately each statistic can be computed. They can also redistribute their privacy budget according to which statistics they think are most valuable in their dataset. We implemented the approximation algorithm from Theorem 1.7 and integrated it with this tool to ensure that users get the most utility out of their privacy budget.

Technical Preliminaries

A useful notation for thinking about differential privacy is defined below.

For two discrete random variables YY and ZZ taking values in the same output space SS, the δ\delta-approximate max-divergence of YY and ZZ is defined as:

Notice that an algorithm MM is (ϵ,δ)(\epsilon,\delta) differentially private if and only if for all pairs of neighboring databases, D0,D1D_{0},D_{1}, we have Dδ(M(D0)M(D1))ϵD_{\infty}^{\delta}(M(D_{0})\|M(D_{1}))\leq\epsilon. The standard fact that differential privacy is closed under “post processing” [DMNS06, DR13] now can be formulated as:

If f ⁣:SRf\colon S\to R is any randomized function, then

The composition results in our paper actually hold for a more general model of composition than the one described in the introduction. The model is called kk-fold adaptive composition and was formalized in [DRV10]. We generalize their formulation to the heterogeneous setting where privacy parameters may differ across different algorithms in the composition.

The idea is that instead of running kk differentially private algorithms chosen all at once on a single database, we can imagine an adversary adaptively engaging in a “composition game.” The game takes as input a bit b{0,1}b\in\{0,1\} and privacy parameters (ϵ1,δ1),,(ϵk,δk)(\epsilon_{1},\delta_{1}),\ldots,(\epsilon_{k},\delta_{k}). A randomized adversary AA, tries to learn bb through kk rounds of interaction as follows: on the iith round of the game, AA chooses an (ϵi,δi)(\epsilon_{i},\delta_{i})-differentially private algorithm MiM_{i} and two neighboring databases D(i,0),D(i,1)D_{(i,0)},D_{(i,1)}. AA then receives an output yi=Mi(D(i,b))y_{i}=M_{i}(D_{(i,b)}) where the internal randomness of MiM_{i} is independent of the internal randomness of M1,,Mi1M_{1},\ldots,M_{i-1}. The choices of Mi,D(i,0),M_{i},D_{(i,0)}, and D(i,1)D_{(i,1)} may depend on y0,,yi1y_{0},\ldots,y_{i-1} as well as the adversary’s own randomness.

The outcome of this game is called the view of the adversary, VbV^{b} which is defined to be (y1,,yk)(y_{1},\ldots,y_{k}) along with AA’s coin tosses. The algorithms MiM_{i} and databases D(i,0),D(i,1)D_{(i,0)},D_{(i,1)} from each round can be reconstructed from VbV^{b}. Now we can formally define privacy guarantees under kk-fold adaptive composition.

We say that the sequences of privacy parameters ϵ1,,ϵk0,δ1,,δk[0,1)\epsilon_{1},\ldots,\epsilon_{k}\geq 0,\delta_{1},\ldots,\delta_{k}\in[0,1) satisfy (ϵg,δg)(\epsilon_{g},\delta_{g})-differential privacy under adaptive composition if for every adversary AA we have Dδg(V0V1)ϵgD_{\infty}^{\delta_{g}}(V^{0}\|V^{1})\leq\epsilon_{g}, where VbV^{b} represents the view of AA in composition game bb with privacy parameter inputs (ϵ1,δ1),,(ϵk,δk)(\epsilon_{1},\delta_{1}),\ldots,(\epsilon_{k},\delta_{k}).

Computing real-valued functions.

where ϵg\epsilon_{g} is the true optimal parameter with full precision.

Characterization of OptComp

Following [KOV15], we show that to analyze the composition of arbitrary (ϵi,δi)(\epsilon_{i},\delta_{i})-DP algorithms, it suffices to analyze the composition of the following simple variant of randomized response [War65].

Given an (ϵ,δ)(\epsilon,\delta)-DP algorithm MM with output space RR and neighboring databases D0,D1D_{0},D_{1}, let P0,P1P_{0},P_{1} be the probability mass functions of M(D0)M(D_{0}) and M(D1)M(D_{1}), respectively. The definition of differential privacy tells us that for all sets SRS\subseteq R:

The left-hand side of the first inequality is maximized by S=S0S=S_{0} for

and the left-hand side of the second inequality is maximized by

We will show how to simulate MM using the following algorithm.

To see that all of the terms are non-negative we need to show that the recurring terms eϵα1α0e^{\epsilon}\alpha_{1}-\alpha_{0} and eϵα0α1e^{\epsilon}\alpha_{0}-\alpha_{1} are non-negative and the rest follows by inspection.

For every (ϵ,δ)(\epsilon,\delta)-DP algorithm, MM with output space RR and neighboring databases D0D_{0} and D1D_{1}, eϵα1α0e^{\epsilon}\alpha_{1}-\alpha_{0} and eϵα0α1e^{\epsilon}\alpha_{0}-\alpha_{1} are non-negative where α0=1δ0,α1=1δ1\alpha_{0}=1-\delta_{0},\alpha_{1}=1-\delta_{1} and δ0,δ1\delta_{0},\delta_{1} are defined in Equations 4 and 5.

The other inequality follows by symmetry. ∎

Fix neighboring databases, D0,D1D_{0},D_{1} and let P0,P1P_{0},P_{1} be the probability mass functions of MM on D0,D1D_{0},D_{1}, respectively. We will use S0,S1,δ0,S_{0},S_{1},\delta_{0}, and δ1\delta_{1} as defined above in Equations 2, 3, 4, and 5. Fix rRr\in R. T ⁣:{0,1,2,3}RT^{\prime}\colon\{0,1,2,3\}\to R is defined in the table below.

We need to show that T(x)T^{\prime}(x) is a valid probability distribution for each xx. All of the terms are non-negative because eϵα1α0e^{\epsilon}\alpha_{1}-\alpha_{0} and eϵα0α1e^{\epsilon}\alpha_{0}-\alpha_{1} are non-negative by Lemma 3.4.

The sums of Pr[T(0)=r]\Pr[T^{\prime}(0)=r] and Pr[T(3)=r]\Pr[T^{\prime}(3)=r] are immediate from the definitions of δ0\delta_{0} and δ1\delta_{1}, respectively:

A symmetrical argument works for Pr[T(3)=r]\Pr[T^{\prime}(3)=r]. We now analyze the sum for Pr[T(1)=r]\Pr[T^{\prime}(1)=r]. The sum for Pr[T(2)=r]\Pr[T^{\prime}(2)=r] follows by symmetry. We use the following identities:

From here we break the calculation into the three possible cases:

Case 3: rRS0S1r\in R\setminus S_{0}\setminus S_{1}

All of the weights are non-negative because α1α0α\alpha_{1}\geq\alpha_{0}\geq\alpha, eϵα1α0e^{\epsilon}\alpha_{1}\geq\alpha_{0}, and pp is also at most 11, which we verify now:

Next we check the probabilities with which TT^{\prime\prime} outputs 11 and 22 when b=0b=0.

For all ϵ1,,ϵk0,δ1,,δk,δg[0,1)\epsilon_{1},\ldots,\epsilon_{k}\geq 0,\delta_{1},\ldots,\delta_{k},\delta_{g}\in[0,1),

For the other direction, it suffices to show that for every M1,,MkM_{1},\ldots,M_{k} that are (ϵ1,δ1),,(ϵk,δk)(\epsilon_{1},\delta_{1}),\ldots,(\epsilon_{k},\delta_{k})-differentially private, we have

without loss of generality. Given ϵg\epsilon_{g}, the set S{0,1,2,3}kS\subseteq\{0,1,2,3\}^{k} that maximizes the right-hand side is

We can further split S(ϵg)S(\epsilon_{g}) into S(ϵg)=S0(ϵg)S1(ϵg)S(\epsilon_{g})=S_{0}(\epsilon_{g})\cup S_{1}(\epsilon_{g}) with

Fix an adversary AA. On each round ii, AA uses its coin tosses rr and the previous outputs y1,,yi1y_{1},\ldots,y_{i-1} to select an (ϵi,δi)(\epsilon_{i},\delta_{i})-differentially private algorithm Mi=Mir,y1,,yi1M_{i}=M_{i}^{r,y_{1},\ldots,y_{i-1}} and neighboring databases D0=D0r,y1,,yi1,D1=D1r,y1,,yi1D_{0}=D_{0}^{r,y_{1},\ldots,y_{i-1}},D_{1}=D_{1}^{r,y_{1},\ldots,y_{i-1}}. Let VbV^{b} be the view of AA with the given privacy parameters under composition game bb for b=0b=0 and b=1b=1.

For i=1,,k,i=1,\ldots,k, let yiTir,y1,,yi1(zi)y_{i}\leftarrow T_{i}^{r,y_{1},\ldots,y_{i-1}}(z_{i})

Hardness of OptComp

#P\#P is the class of all counting problems associated with decision problems in NP. It is a set of functions that count the number of solutions to some NP problem. More formally:

A function gg is called #P\#P-hard if every function f#Pf\in\#P can be computed in polynomial time given oracle access to gg. That is, evaluations of gg can be done in one time step.

If a function is #P\#P-hard, then there is no polynomial-time algorithm for computing it unless there is a polynomial-time algorithm for counting the number of solutions of all NP problems.

A function ff is called #P\#P-easy if there is some function g#Pg\in\#P such that ff can be computed in polynomial time given oracle access to gg.

If a function is both #P\#P-hard and #P\#P-easy, we say it is #P\#P-complete. Proving that computing OptComp is #P\#P-complete can be broken into two steps: showing that it is #P\#P-easy and showing that it is #P\#P-hard.

For convenience we will view rational (ϵ1,δ1),,(ϵk,δk)(\epsilon_{1},\delta_{1}),\ldots,(\epsilon_{k},\delta_{k}) and ϵg\epsilon_{g} as given arguments to OptComp and compute δg\delta_{g}. Recall that the two versions of OptComp, viewing ϵg\epsilon_{g} as given and computing δg\delta_{g} and vice versa, are equivalent up to a polynomial factor (just run binary search over values of δg\delta_{g} computing polynomially many bits of precision). So the formulation we choose for the proof will not affect whether OptComp is in #\#P or not. Recall that in our model of computing real valued functions, we will take another input qq and we will output an approximation of δg\delta_{g} to qq bits of precision in polynomial time using a #P\#P oracle where δg\delta_{g} satisfies the following:

Notice that the only part of the expression above that cannot be computed in polynomial time is the summation over subsets of {1,,k}\{1,\ldots,k\}. If we knew the sum, computing δg\delta_{g} would be easy given our inputs. We show how to compute the sum in polynomial time using a #\#P oracle and it follows that computing δg\delta_{g} is #\#P-easy .

We can now phrase a decision problem in NP: Does there exist a pair (S,n)(S,n) such that g(S,n)=1g(S,n)=1? This is in NP because given a witness (S,n)(S,n), we can compute mf^(S)m\cdot\hat{f}(S) and compare the output to nn, thereby verifying the solution, in polynomial time. Since this is an NP problem, a #P\#P oracle can count the number of solutions to it in one time step. Notice that for every set SS, the number of solutions (pairs of the form (S,n)(S,n) satisfying g(S,n)=1g(S,n)=1) is exactly mf^(S)m\cdot\hat{f}(S) because gg will output 11 for g(S,1),g(S,2),,g(S,mf^(S))g(S,1),g(S,2),\ldots,g(S,m\cdot\hat{f}(S)). So over all possible sets SS, the number of solutions as counted by the #P\#P oracle equals mS[k]f^(S)m\cdot\sum_{S\subseteq[k]}\hat{f}(S). Dividing this by mm gives us the sum up to an additive error of 2k2q+k=12q\frac{2^{k}}{2^{q+k}}=\frac{1}{2^{q}}, which can be used to compute δg\delta_{g} to qq bits of precision in polynomial time. This only required one call to a #P\#P oracle. So computing OptComp is #P\#P-easy. ∎

Next we show that computing OptComp is also #P\#P-hard through a series of reductions. We start with a multiplicative version of the partition problem that is known to be #P\#P-complete by Ehrgott [Ehr00]. The problems in the chain of reductions are defined below.

#\textscINTPARTITION\#\textsc{INT-PARTITION} is the following problem: given a set Z={z1,z2,,zk}Z=\{z_{1},z_{2},\ldots,z_{k}\} of positive integers, count the number of partitions P[k]P\subseteq[k] such that

All of the remaining problems in our chain of reductions take inputs {w1,,wk}\{w_{1},\ldots,w_{k}\} where 1wie1\leq w_{i}\leq e is the DthDth root of a positive integer ziz_{i} for all i[k]i\in[k] and some positive integer DD. All of the reductions we present actually hold for every positive integer DD, including D=1D=1 (in which case the inputs are integers). However, we will constrain DD to be large enough so that our inputs are in the range [1,e][1,e]. This is because in the final reduction to OptComp, ϵi\epsilon_{i} values in the proof are set to ln(wi)\ln(w_{i}). We want to show that our reductions hold for reasonable values of ϵ\epsilon’s in a differential privacy setting so throughout the proofs we use wiw_{i}’s [1,e]\in[1,e] to correspond to ϵi\epsilon_{i}’s \in in the final reduction. In fact, we will later state our reductions as applying to instances where iwieϵ\prod_{i}w_{i}\leq e^{\epsilon} (and hence iϵiϵ\sum_{i}\epsilon_{i}\leq\epsilon) for any desired ϵ>0\epsilon>0.

(The real numbers w1,,wkw_{1},\ldots,w_{k} are specified in the input by z1,,zkz_{1},\ldots,z_{k} and DD with the input size being the combined bit length of these integers in binary).

(The real numbers w1,,wkw_{1},\ldots,w_{k} and TT are specified in the input by z1,,zk,t,tz_{1},\ldots,z_{k},t,t^{\prime} and DD with the input size being the combined bit length of these integers in binary).

(The real numbers w1,,wkw_{1},\ldots,w_{k} are specified in the input by z1,,zkz_{1},\ldots,z_{k} and DD with the input size being the combined bit length of these integers and the numerator and denominator of rr in binary).

Since the output of SUM-PARTITION is irrational, the actual computational problem is defined according to our convention in Section 2 for computing real-valued functions. That is, given an additional input qq, compute a number yy such that

We prove that computing OptComp is #P\#P-hard by the following series of reductions:

For every constant c>1c>1, #\textscPARTITION\#\textsc{PARTITION} is #P\#P-hard, even on instances where iwic\prod_{i}w_{i}\leq c.

There is a one-to-one correspondence between solutions to the #\textscPARTITION\#\textsc{PARTITION} problem and solutions to the given #\textscINTPARTITION\#\textsc{INT-PARTITION} instance. We can solve #\textscINTPARTITION\#\textsc{INT-PARTITION} in polynomial time with a #\textscPARTITION\#\textsc{PARTITION} oracle. Therefore #\textscPARTITION\#\textsc{PARTITION} is #P\#P-hard. ∎

For every constant c>1c>1, #\textscTPARTITION\#\textsc{T-PARTITION} is #P\#P-hard, even on instances where iwic\prod_{i}w_{i}\leq c.

Let c>1c>1 be a constant. We will reduce from #\textscPARTITION\#\textsc{PARTITION}, so consider an instance of the #\textscPARTITION\#\textsc{PARTITION} problem, W={w1,w2,,wk}W=\{w_{1},w_{2},\ldots,w_{k}\} of DDth roots of integers z1,,zkz_{1},\ldots,z_{k}, respectively. We may assume iwic\prod_{i}w_{i}\leq\sqrt{c} since c\sqrt{c} is also a constant greater than 11.

Set W=W{wk+1}W^{\prime}=W\cup\{w_{k+1}\}, where wk+1=i=1kwiw_{k+1}=\prod_{i=1}^{k}w_{i}. Notice that i=1k+1wi(c)2=c\prod_{i=1}^{k+1}w_{i}\leq(\sqrt{c})^{2}=c. Set T=wk+1(wk+11)T=\sqrt{w_{k+1}}\left(w_{k+1}-1\right). Notice that wk+1=(i=1kzi)1Dw_{k+1}=\left(\prod_{i=1}^{k}z_{i}\right)^{\frac{1}{D}} so by setting integers t=(i=1kzi)3t=\left(\prod_{i=1}^{k}z_{i}\right)^{3} and t=i=1kzit^{\prime}=\prod_{i=1}^{k}z_{i} we get that

which meets the input requirement for #\textscTPARTITION\#\textsc{T-PARTITION}. So we can use a #\textscTPARTITION\#\textsc{T-PARTITION} oracle to count the number of partitions Q{1,,k+1}Q\subseteq\{1,\ldots,k+1\} such that

Let P=Q{1,,k}P=Q\cap\{1,\ldots,k\}. We will argue that iQwii∉Qwi=T\prod_{i\in Q}w_{i}-\prod_{i\not\in Q}w_{i}=T if and only if iPwi=i∉Pwi\prod_{i\in P}w_{i}=\prod_{i\not\in P}w_{i}, which completes the proof. There are two cases to consider: wk+1Qw_{k+1}\in Q and wk+1∉Qw_{k+1}\not\in Q.

Case 1: wk+1Qw_{k+1}\in Q. In this case, we have:

So there is a one-to-one correspondence between solutions to the #\textscTPARTITION\#\textsc{T-PARTITION} instance WW^{\prime} where wk+1Qw_{k+1}\in Q and solutions to the original #\textscPARTITION\#\textsc{PARTITION} instance WW.

Case 2: wk+1∉Qw_{k+1}\not\in Q. Solutions now look like:

One way this can be true is if wi=1w_{i}=1 for all i[k]i\in[k]. We can check ahead of time if our input set WW contains all ones. If it does, then there are 2k22^{k}-2 partitions that yield equal products (all except P=[k]P=[k] and P=P=\emptyset) so we can just output 2k22^{k}-2 as the solution and not even use our oracle. The only other way to satisfy the above expression is for iPwi>i[k]wi\prod_{i\in P}w_{i}>\prod_{i\in[k]}w_{i} which cannot happen because P[k]P\subseteq[k]. So there are no solutions in the case that wk+1∉Qw_{k+1}\not\in Q.

Therefore the output of the #\textscTPARTITION\#\textsc{T-PARTITION} oracle on WW^{\prime} is the solution to the #\textscPARTITION\#\textsc{PARTITION} problem. So #\textscTPARTITION\#\textsc{T-PARTITION} is #P\#P-hard. ∎

For the next two proofs we will make use of the following fact to bound the amount of precision needed when approximating irrational numbers by rational ones in our reductions:

For all real numbers y>xy>x and functions ff that are differentiable on the interval [x,y][x,y]:

For every constant c>1c>1, SUM-PARTITION is #P\#P-hard even on instances where iwic\prod_{i}w_{i}\leq c and where there are no partitions SS such that iSwi=ri∉Swi\prod_{i\in S}w_{i}=r\cdot\prod_{i\not\in S}w_{i}.

We will use a SUM-PARTITION oracle to solve #\textscTPARTITION\#\textsc{T-PARTITION} given a set W={w1,,wk}W=\{w_{1},\ldots,w_{k}\} of DDth roots of positive integers z1,,zkz_{1},\ldots,z_{k}, respectively, and a positive real number T=t2Dt2DT=\sqrt[2D]{t}-\sqrt[2D]{t^{\prime}} for integers t,tt,t^{\prime} given in the input. Notice that for every x>0x>0:

Above, jj must be a positive integer greater than (i=1kzi)1/2\left(\prod_{i=1}^{k}z_{i}\right)^{1/2}, which tells us that the gap in products from every partition must take a particular form. This means that for a given DD and WW, #\textscxPARTITION\#\textsc{x-PARTITION} can only be non-zero on a discrete set of possible values of xx. So given our #\#T-PARTITION instance we can find a T>TT^{\prime}>T such that the above has no solutions for xx in the interval (T,T)(T,T^{\prime}). Specifically, solve the above quadratic for jD\sqrt[D]{j}. If jj is not an integer, then we know the answer to the #\#T-PARTITION instance is 0, so assume jj is an integer and set T=j+1Diwi/j+1DT^{\prime}=\sqrt[D]{j+1}-\prod_{i}w_{i}/\sqrt[D]{j+1}. We can also find an interval (T,T)(T^{\prime\prime},T) just below TT where no value of xx in the interval can yield a solution above by setting T=j1Diwi/j1DT^{\prime\prime}=\sqrt[D]{j-1}-\prod_{i}w_{i}/\sqrt[D]{j-1}. We use these discreteness properties twice in the proof. Also notice that these intervals are not too small:

TT2poly(n)T^{\prime}-T\geq 2^{-\text{poly}(n)} and TT2poly(n)T-T^{\prime\prime}\geq 2^{-\text{poly}(n)} where nn is the input length (i.e. the bit lengths of the integers z1,,zk,t,tz_{1},\ldots,z_{k},t,t^{\prime}).

where the last inequality follows from Fact 4.11. This final value is only exponentially small because jj is upper bounded by i=1kzi\prod_{i=1}^{k}z_{i}, which is at most exponentially large in the bit length of the ziz_{i}’s. A very similar proof shows that (T,T)(T^{\prime\prime},T) is only exponentially small. ∎

This means that we can always find T^(T,T)\hat{T}\in(T,T^{\prime}) such that T^\hat{T} is rational and can be fully specified with a bit length that is polynomial in the input length. Fix such a quantity T^\hat{T}. For all y>0y>0, define Py{P[k]iPwii∉Pwiy}P^{y}\equiv\{P\subseteq[k]\mid\prod_{i\in P}w_{i}-\prod_{i\not\in P}w_{i}\geq y\}. Then, since xx-PARTITION has no solutions for x(T,T)x\in(T,T^{\prime}):

We now show how to compute the two sums in the final term using the SUM-PARTITION oracle. We will give the procedure for computing PPT(iPwii∉Pwi)\sum\limits_{P\in P^{T}}\left(\prod\limits_{i\in P}w_{i}-\prod\limits_{i\not\in P}w_{i}\right) and the case with T^\hat{T} will follow by symmetry. The oracle returns a real number, so by our model of computing real valued functions, we will also give the oracle an additional input that specifies the number of bits of precision in its output. Ultimately we only need to approximate each sum to within ±T/4\pm T/4. This will give an approximation to the #\textscTPARTITION\#\textsc{T-PARTITION} problem to within ±1/2\pm 1/2, thereby solving it by rounding the approximation because the solution will be an integer. We want to set the input rr to the SUM-PARTITION oracle to be r=rTr=r_{T} such that for all P[k]P\subseteq[k], we have:

Taking w=i[k]wiw=\prod_{i\in[k]}w_{i} and thinking of v=iPwiv=\prod_{i\in P}w_{i}, it suffices that all positive solutions to each of the following two inequalities are the same:

The positive solutions to the left one are vrTwv\geq\sqrt{r_{T}w}, and to the right one are v(T+T2+4w)/2v\geq(T+\sqrt{T^{2}+4w})/2. Setting the right-hand sides equal gives

Since rTr_{T} might be irrational and SUM-PARTITION takes as input rational values of rr, we need to find a rational rr that approximates rTr_{T} and preserves the set of solutions PTP^{T}. Recall from Claim 4.13 that there is an (only) exponentially small interval (T,T)(T^{\prime\prime},T) below TT such that for all Tˉ(T,T)\bar{T}\in(T^{\prime\prime},T), PT=PTˉP^{T}=P^{\bar{T}}. This translates to a corresponding interval (rT,rT)(r_{T^{\prime\prime}},r_{T}) such that for all r(rT,rT)r\in(r_{T^{\prime\prime}},r_{T}), equivalence (6) holds. Furthermore, this interval is also only exponentially small.

rTrT2poly(n)r_{T}-r_{T^{\prime\prime}}\geq 2^{-\text{poly}(n)} where nn is the input length (i.e. the bit lengths of the integers z1,,zk,t,tz_{1},\ldots,z_{k},t,t^{\prime}).

To see this, view rTr_{T} from Equation 7 as a function r(T)r(T) of TT, and calculate the derivative:

(Recall that 1w=iwic1\leq w=\prod_{i}w_{i}\leq c). This is only exponentially small in the input length by Claim 4.13. ∎

So we can choose a rational r(rT,rT)r\in(r_{T^{\prime\prime}},r_{T}) that can be specified with a number of bits that is polynomial in the input length and preserves PT={P[k]iPwiri∉Pwi0}P^{T}=\left\{P\subseteq[k]\mid\prod_{i\in P}w_{i}-r\cdot\prod_{i\not\in P}w_{i}\geq 0\right\}. However the SUM-PARTITION oracle gives us

whereas we want to compute the right-hand side without the rr coefficient. To get this we just pick another rational r(rT,rT)r^{\prime}\in(r_{T^{\prime\prime}},r_{T}) such that rr2poly(n)r^{\prime}-r\geq 2^{-\text{poly}(n)}. If precision were not an issue, we could run our SUM-PARTITION oracle for rr and rr^{\prime} and receive the output:

Then the following linear combination of S1S_{1} and S2S_{2} gives us what we want:

Computing S1S_{1} and S2S_{2} to within ±2poly(n)\pm 2^{-\text{poly}(n)} yields an approximation of PPT(iPwii∉Pwi)\sum_{P\in P^{T}}\left(\prod_{i\in P}w_{i}-\prod_{i\not\in P}w_{i}\right) to within ±T/4\pm T/4.

We just need to approximate S1S_{1} and S2S_{2} to within ±T8rrr1\pm\frac{T}{8}\cdot\frac{r^{\prime}-r}{r^{\prime}-1} to get the desired precision. This additive error is only exponentially small by Claim 4.14. ∎

Running this whole procedure again for T^(T,T)\hat{T}\in(T,T^{\prime}), which we fixed above gives us all the information we need to count the number of solutions to the #\textscTPARTITION\#\textsc{T-PARTITION} instance we were given. We can solve #\textscTPARTITION\#\textsc{T-PARTITION} in polynomial time with four calls to a SUM-PARTITION oracle. Therefore SUM-PARTITION is #P\#P-hard. ∎

Now we prove that computing OptComp is #P\#P-complete.

We have already shown that computing OptComp is #P\#P-easy. Here we prove that it is also #P\#P-hard, thereby proving #P\#P-completeness.

This last expression is exactly the solution to the instance of SUM-PARTITION we were given. Taking precision into account, the input SUM-PARTITION instance has an additional input qq that specifies the desired number of bits of precision in the output and we can only pass OptComp rational values so we will have to approximate ϵi=ln(wi)\epsilon_{i}=\ln(w_{i}) for all ii and ϵg=ln(r)\epsilon_{g}=\ln(r). Again there is a worry that when we approximate these values the set of partitions SS that make iSwiri∉Swi>0\prod_{i\in S}w_{i}-r\cdot\prod_{i\not\in S}w_{i}>0 might change. We want to get enough precision in our inputs so that the set of partitions over which we sum does not change and enough precision so that the output is accurate to qq bits. We will calculate the approximations required for each of these two goals separately and the final precision that we use will just be the maximum of the two. We prove that we can achieve both of these goals with the next two claims.

There exists a polynomial p(n)p(n) in the length nn of the input (the bit lengths of z1,,zk,qz_{1},\ldots,z_{k},q, and the numerator and denominator of rr) such that if wiwi2p(n)|w_{i}-w^{\prime}_{i}|\leq 2^{-p(n)} for each ii, then the set of partitions SS satisfying

is the same as the set of partitions satisfying

Recall that SUM-PARTITION is #\#P-hard even on instances where there are no partitions SS such that iSwi=ri∉Swi\prod_{i\in S}w_{i}=r\cdot\prod_{i\not\in S}w_{i} so we may assume our input instance of SUM-PARTITION has no such partitions and still prove the hardness of OptComp. So to ensure that we have enough precision such that the set over which we sum does not change, we must make the error smaller than the minimum possible (in absolute value) nonzero outcome of iSwiri∉Swi\prod_{i\in S}w_{i}-r\cdot\prod_{i\not\in S}w_{i}. We now bound this quantity. Let

Since rr is rational, r=a/br=a/b for two integers aa and bb. Let a=aDa^{\prime}=a^{D} and b=bDb^{\prime}=b^{D}. Then:

Where the last line follows from Fact 4.11 applied to the function f(x)=x1/Df(x)=x^{1/D}. 1/(i[k]zi)(D1)/D1/\left(\prod_{i\in[k]}z_{i}\right)^{(D-1)/D} is only exponentially small because i[k]zi\prod_{i\in[k]}z_{i} is at most exponentially large in the bit length of the integers z1,,zkz_{1},\ldots,z_{k}. We claim that iSziabi∉Szi\left|\prod_{i\in S}z_{i}-\frac{a^{\prime}}{b^{\prime}}\prod_{i\not\in S}z_{i}\right| is at least 1/b1/b^{\prime} for all SSS\in\mathcal{S}. Fix SSS\in\mathcal{S}:

Where the last implication follows because biSziai∉Szib^{\prime}\cdot\prod_{i\in S}z_{i}-a^{\prime}\cdot\prod_{i\not\in S}z_{i} is just a difference of integers so the closest nonzero value it can take on is ±1\pm 1. ∎

There exists a polynomial p(n)p(n) in the length nn of the input (the bit lengths of z1,,zk,qz_{1},\ldots,z_{k},q, and the numerator and denominator of rr) such that if wiwi2p(n)|w_{i}-w^{\prime}_{i}|\leq 2^{-p(n)} for each ii, then

We will choose p(n)=p1(n)+p2(n)p(n)=p_{1}(n)+p_{2}(n) where p1(n)p_{1}(n) is the polynomial that exists from Claim 4.16 and p2(n)p_{2}(n) will be determined later. Define

Bounding each term in the final expression above by 2(q+1)2^{-(q+1)} then gives us the accuracy we want. We will show directly how to bound the second term and the argument for the first term follows symmetrically. By hypothesis we have that for all S[k]S\subseteq[k]:

Since S+2k|S^{+}|\leq 2^{k} and 1i∉Swic1\leq\prod_{i\not\in S}w_{i}\leq c for all SS we get:

Picking p2(n)p_{2}(n) such that p(n)=p1(n)+p2(n)>2k+log(rc)+q+1p(n)=p_{1}(n)+p_{2}(n)>2k+\log(rc)+q+1 then suffices to bound the absolute value of the sum by 2(q+1)2^{-(q+1)}. Repeating the same calculation for SS+(iSwiiSwi)\sum_{S\in S^{+}}\left(\prod_{i\in S}w^{\prime}_{i}-\prod_{i\in S}w_{i}\right) will yield the same approximation except without the factor of rr. So we can bound both terms by 2(q+1)2^{-(q+1)} (and therefore their sum by 2q2^{-q}) by approximating each wiw_{i} to a precision that is polynomial in nn, which proves the claim. ∎

Approximation of OptComp

There is a polynomial-time algorithm that given rational ϵ1,,ϵk0,δ1,δk,δg[0,1),\epsilon_{1},\ldots,\epsilon_{k}\geq 0,\delta_{1},\ldots\delta_{k},\delta_{g}\in[0,1), and η(0,1)\eta\in(0,1), outputs ϵ\epsilon^{*} satisfying

where ϵ=i[k]ϵi/k\overline{\epsilon}=\sum_{i\in[k]}\epsilon_{i}/k, assuming constant-time arithmetic operations.

We prove Theorem 1.7 using the following three lemmas:

In other words, if the ϵ\epsilon values we are given are all integer multiples of some ϵ0\epsilon_{0} where eϵ0e^{\epsilon_{0}} is rational, we can determine whether or not the composition of those privacy parameters is (aϵ0,δg)(a^{*}\cdot\epsilon_{0},\delta_{g})-DP in pseudo-polynomial time, for every positive integer aa^{*}. Running binary search over integers aa^{*}, we can find the minimum such integer. When ϵ0\epsilon_{0} is small, this gives us a good overestimate of the optimal composition of the discrete input privacy parameters. This means that given any inputs (ϵ1,δ1),,(ϵk,δk),δg(\epsilon_{1},\delta_{1}),\ldots,(\epsilon_{k},\delta_{k}),\delta_{g} to OptComp, we can discretize and polynomially bound the ϵi\epsilon_{i} values to new values ϵi\epsilon_{i}^{\prime} for all i[k]i\in[k] and use Lemma 5.2 to approximate OptComp((ϵ1,δ1),,(ϵk,δk),δg)((\epsilon_{1}^{\prime},\delta_{1}),\ldots,(\epsilon_{k}^{\prime},\delta_{k}),\delta_{g}). The next lemma tells us that this is also a good approximation of OptComp((ϵ1,δ1),,(ϵk,δk),δg)((\epsilon_{1},\delta_{1}),\ldots,(\epsilon_{k},\delta_{k}),\delta_{g}).

For all ϵ1,,ϵk,c1,,ck0\epsilon_{1},\ldots,\epsilon_{k},c_{1},\ldots,c_{k}\geq 0 and δ1,,δk,δg[0,1)\delta_{1},\ldots,\delta_{k},\delta_{g}\in[0,1):

Next we prove the three lemmas and then show that Theorem 1.7 follows.

Each cell F(r,s)F(r,s) in the table can be computed in constant time given earlier cells F(r,s)F(r^{\prime},s^{\prime}) where r<rr^{\prime}<r. Thus filling the entire table takes time O(Bk)O(Bk). ∎

Given a rational eϵ00e^{\epsilon_{0}}\geq 0 and ϵ1=a1ϵ0,,ϵk=akϵ0,ϵ=aϵ0\epsilon_{1}=a_{1}\cdot\epsilon_{0},\ldots,\epsilon_{k}=a_{k}\cdot\epsilon_{0},\epsilon^{*}=a^{*}\cdot\epsilon_{0} for positive integers a1,,ak,aa_{1},\ldots,a_{k},a^{*} and rational δ1,δk,δg[0,1)\delta_{1},\ldots\delta_{k},\delta_{g}\in[0,1) Theorem 1.5 tells us that answering whether or not

is equivalent to answering whether or not the following inequality holds:

The right-hand side and i=1k(1+eϵi)\prod_{i=1}^{k}(1+e^{\epsilon_{i}}) are easy to compute given the inputs (note that eϵie^{\epsilon_{i}} is rational for all i[k]i\in[k] because each is an integer power of eϵ0e^{\epsilon_{0}}). So in order to check the inequality, we will show how to compute the sum. Define

and observe that by setting T=ScT=S^{\mathsf{c}}, we have

Multiplying both sides by ec/2e^{c/2} gives:

The above inequality together with Theorem 1.5 means that showing the following will complete the proof:

Since (1+eϵi+ci)/(1+eϵi)eci/2(1+e^{\epsilon_{i}+c_{i}})/(1+e^{\epsilon_{i}})\geq e^{c_{i}/2} for every ϵi,ci>0\epsilon_{i},c_{i}>0, it suffices to show:

This inequality holds term by term. If a right-hand term is zero (iSϵiϵg+i∉Sϵi)\left(\sum_{i\in S}\epsilon_{i}\leq\epsilon_{g}+\sum_{i\not\in S}\epsilon_{i}\right), then so is the corresponding left-hand term (iS(ϵi+ci)ϵg+c+i∉S(ϵi+ci))\left(\sum_{i\in S}(\epsilon_{i}+c_{i})\leq\epsilon_{g}+c+\sum_{i\not\in S}(\epsilon_{i}+c_{i})\right). For the nonzero terms, the factor of ece^{c} ensures that the right-hand terms are larger than the left-hand terms. ∎

Lemma 5.2 tells us that we can determine whether a set of privacy parameters satisfies some (ϵg,δg)(\epsilon_{g},\delta_{g}) differential privacy guarantee if the ϵi\epsilon_{i} values and ϵg\epsilon_{g} are all positive integer multiples of some ϵ0\epsilon_{0} where eϵ0e^{\epsilon_{0}} is rational. We are given rational ϵ1,,ϵk0,δ1,δk,δg[0,1),\epsilon_{1},\ldots,\epsilon_{k}\geq 0,\delta_{1},\ldots\delta_{k},\delta_{g}\in[0,1), and η(0,1)\eta\in(0,1). Let ϵ=i[k]ϵi/k\overline{\epsilon}=\sum_{i\in[k]}\epsilon_{i}/k be the arithmetic mean of the ϵi\epsilon_{i} values. Let β=η/(k(1+ϵ)+1)\beta=\eta/(k\cdot(1+\overline{\epsilon})+1), set ϵ0=ln(1+β)\epsilon_{0}=\ln(1+\beta), and for all i[k]i\in[k] set ai=ϵi(1/β+1)a_{i}=\lceil{\epsilon_{i}\cdot(1/\beta+1)}\rceil and ϵi=ϵ0ai\epsilon_{i}^{\prime}=\epsilon_{0}\cdot a_{i}. We will use the following bounds on ϵ0\epsilon_{0} in the proof:

With these settings, the aia_{i}’s are non-negative integers, the ϵi\epsilon_{i}^{\prime} values are all integer multiples of ϵ0\epsilon_{0} and eϵ0e^{\epsilon_{0}} is rational. So for every positive integer aa we can apply Lemma 5.2 to determine whether or not OptComp((ϵ1,δ1),,(ϵk,δk),δg)aϵ0((\epsilon_{1}^{\prime},\delta_{1}),\ldots,(\epsilon_{k}^{\prime},\delta_{k}),\delta_{g})\leq a\cdot\epsilon_{0} in time O(ki[k]ai)O\left(k\cdot\sum_{i\in[k]}a_{i}\right). Running binary search over integers aa, we can find the minimum such integer, which we will call aa^{*}. The algorithm’s estimate of OptComp((ϵ1,δ1),,(ϵk,δk),δg)((\epsilon_{1},\delta_{1}),\ldots,(\epsilon_{k},\delta_{k}),\delta_{g}) will be aϵ0a^{*}\cdot\epsilon_{0}. However since this number is irrational, we will use the Taylor approximation of the natural logarithm to output ϵ\epsilon^{*} satisfying aϵ0ϵaϵ0+βϵ0a^{*}\cdot\epsilon_{0}\leq\epsilon^{*}\leq a^{*}\cdot\epsilon_{0}+\beta-\epsilon_{0}. Since we only need to calculate a few terms of the Taylor expansion of ln(1+β)\ln(1+\beta) to achieve this approximation, this step will not affect our running time.

Since we choose aa^{*} to be the minimum integer satisfying composition we have:

aa^{*} can range from to i[k]ai\sum_{i\in[k]}a_{i} so the binary search can be done in log(i[k]ai)=logO(k2ϵ(1+ϵ)/η)\log\left(\sum_{i\in[k]}a_{i}\right)=\log O\left(k^{2}\cdot\overline{\epsilon}\cdot(1+\overline{\epsilon})/\eta\right) iterations. This gives us a total running time of:

Now we argue that ϵ\epsilon^{*} is a good approximation of OptComp((ϵ1,δ1),,(ϵk,δk),δg)((\epsilon_{1},\delta_{1}),\ldots,(\epsilon_{k},\delta_{k}),\delta_{g}). For all i[k]i\in[k] we have:

So all of the ϵi\epsilon_{i}^{\prime} values are overestimates of their corresponding ϵi\epsilon_{i} values and therefore

satisfying one of the inequalities in the theorem. We also have for all i[k]i\in[k]:

Let ci=β(ϵi+1)c_{i}=\beta\cdot(\epsilon_{i}+1) for all i[k]i\in[k] and let c=i[k]ci=βk(1+ϵ)c=\sum_{i\in[k]}c_{i}=\beta\cdot k\cdot(1+\overline{\epsilon}). Now we get

by Lemma 5.3. Noting that βk(1+ϵ)\beta\cdot k\cdot(1+\overline{\epsilon}) and βk(1+ϵ)+β\beta\cdot k\cdot(1+\overline{\epsilon})+\beta are both at most η\eta completes the proof. ∎

References

Appendix A Comparison of Composition Theorems

The figures below compare the performances of four homogeneous composition theorems. In all figures, “Summing” refers to basic composition - Theorem 1.2 [DKMMN06], “DRV” refers to advanced composition - Theorem 1.3 [DRV10], “KOV Bound” refers to a bound in [KOV15] that is a closed form approximation of the optimal composition theorem, and “Optimal” refers to the optimal composition theorem - Theorem 1.4 [KOV15]. Here we are composing kk mechanisms that are (ϵ,δ)(\epsilon,\delta) differentially private to obtain an (ϵg,δg)(\epsilon_{g},\delta_{g}) differentially private mechanism as guaranteed by one of the composition theorems.