Private Selection from Private Candidates

Jingcheng Liu, Kunal Talwar

Introduction

Differential Privacy is the standard notion of privacy for statistical databases. It imposes a probabilistic constraint on the behavior of the algorithm on datasets that differ in one person’s input. Formally,

Let M:Dn→R\mathcal{M}:\mathcal{D}^{n}\rightarrow\mathcal{R} be a randomized algorithm mapping datasets to some range R\mathcal{R}. We say that M\mathcal{M} is (ε,δ)(\varepsilon,\delta)-differentially private if for all pairs of adjacent datasets D,D′∈DnD,D^{\prime}\in\mathcal{D}^{n}, and for all measurable subsets S⊆RS\subseteq\mathcal{R},

Here, two datasets are adjacent if they differ in one person’s input. When δ=0\delta=0, we will sometimes say that M\mathcal{M} is ε\varepsilon-differentially private.

Differential privacy (DP) satisfies nice post-processing and composition properties, allowing for complex differentially private algorithms to be built out of simpler building blocks. In the last decade or so, differentially private algorithms have been designed and analyzed for numerous statistical and machine learning tasks, in most cases by carefully putting together these building blocks. This approach to the design and analysis of differentially private algorithms has proven surprisingly robust and useful.

One can only hope to approximately maximize qq when single individuals in the dataset cannot change any of the score functions q(i,⋅)q(i,\cdot) too much. This stability of qq under small changes in DD is usually codified in an assumption that each score function q(i,D)q(i,D) is Lipschitz with respect to Hamming distance 11 changes to DD. The Exponential mechanism is an algorithm for DP selection under this assumption and has found numerous applications to the design of DP mechanisms. Several other mechanisms for the private selection problem have been proposed, that improve the utility guarantee under stronger assumptions .

In many settings however, the Lipschitzness assumption is much too strong. In this work, we ask: Are there weaker versions of the stability assumption that allow for private selection? We show that one can codify the stability simply as differential privacy: the function qq, viewed as a randomized algorithm, satisfies differential privacy. Indeed, one can convert a Lipschitz function q′q^{\prime} into an ε\varepsilon-DP random function qq by simply adding, say, a noise drawn from the Laplace distribution to q′q^{\prime}. We assume oracle access to a randomized function that on input (i,D)(i,D) computes a sample (x~,q~)(\widetilde{x},\widetilde{q}) from the ii-th candidate Mi(D)\mathcal{M}_{i}(D), where q~\widetilde{q} is the score and x~\widetilde{x} can be any additional output. Moreover, the output distributions of Mi(D)\mathcal{M}_{i}(D) and Mi(D′)\mathcal{M}_{i}(D^{\prime}) are promised to be close whenever DD and D′D^{\prime} are neighbors. Here closeness in distributions is taken to mean ε\varepsilon-DP or (ε,δ)(\varepsilon,\delta)-DP. Motivated by applications, we assume that the scores are bounded, say q~∈\widetilde{q}\in.

Our first result is a simple algorithm that given as input a threshold τ\tau, outputs a sample (x~,q~)(\widetilde{x},\widetilde{q}) with score q~≥τ\widetilde{q}\geq\tau, under the assumption that at least one candidate has a median score of at least τ\tau. This algorithm makes a near linear number of oracle calls, and improves on the quadratic bound that follows from a reinterpretation of a result in . We show that the loss in privacy, utility and efficiency for this algorithm are all close to optimal. Interestingly, this algorithm can be seen as, starting from a naive differentially private algorithm with a poor utility guarantee (e.g., pick a candidate uniformly at random), and then by repeating it in a private way to boost its utility guarantee. In doing so, we get simple algorithms that are both private and have good utility guarantees.

Fix any ε1>0,τ∈\varepsilon_{1}>0,\tau\in. Then given ε1\varepsilon_{1}-DP algorithms M1,…,MK\mathcal{M}_{1},\ldots,\mathcal{M}_{K}, there is an algorithm M\mathcal{M} that on any dataset DD, outputs a sample (x~,q~)(\widetilde{x},\widetilde{q}) such that

M\mathcal{M} is (2ε1)(2\varepsilon_{1})-DP.

Can we do this without knowing this target value τ\tau? We give two algorithms that compete with the best ii without knowing the target τ\tau. The first can be seen as modifying the naive non-private algorithm by employing a random stopping strategy. In doing so, it guarantees that “outputting the highest scored sample seen so far” is already private. However it pays a small additional privacy penalty: the final privacy cost is 3ε13\varepsilon_{1} instead of 2ε12\varepsilon_{1}.

Fix any ε1>0,γ∈\varepsilon_{1}>0,\gamma\in. Then given ε1\varepsilon_{1}-DP algorithms M1,…,MK\mathcal{M}_{1},\ldots,\mathcal{M}_{K}, there is an algorithm M\mathcal{M} that on any dataset DD, outputs a sample (x~,q~)(\widetilde{x},\widetilde{q}) such that

M\mathcal{M} is (3ε1)(3\varepsilon_{1})-DP.

q~\widetilde{q} is the highest scored sample among the T~\widetilde{T} samples seen so far.

Our second algorithm keeps the privacy cost to essentially 2ε12\varepsilon_{1}, at the cost of a slightly higher runtime and a more complicated algorithm and analysis. This is valuable since in some settings, the utility of the base algorithm is quite sensitive with respect to the privacy parameter ε1\varepsilon_{1}. In such settings, with a final target privacy parameter of εfin\varepsilon_{fin}, the second algorithm can allow us to give each Mi\mathcal{M}_{i} a privacy budget of ≈εfin/2\approx\varepsilon_{fin}/2, which can lead to a better utility than the ≈(εfin/3)\approx(\varepsilon_{fin}/3)-DP Mi\mathcal{M}_{i}’s needed for the first simpler algorithm.

M\mathcal{M} is (2ε1+ε0,δ)(2\varepsilon_{1}+\varepsilon_{0},\delta)-DP.

Except with probability β+δ/R\beta+\delta/R, x~\widetilde{x} has quality at least τ∗−1R\tau^{*}-\frac{1}{R}.

The number of calls T~\widetilde{T} that the algorithm makes to any Mi(D)\mathcal{M}_{i}(D) satisfies (deterministically)

Furthermore, \Pr\inb{\mathcal{M}\hbox{ outputs\bot}}\leq\beta+\delta.

In the process, we develop an online version of our algorithm, which can be seen as a generalization of the sparse vector technique to this privacy-instead-of-Lipschitzness setting. This algorithm takes as input a sequence of mechanisms Mi(⋅)\mathcal{M}_{i}(\cdot) and τi\tau_{i}, and stops at the first ii such that Mi(⋅)\mathcal{M}_{i}(\cdot) has median score larger than τi\tau_{i}.

There is an (ε3,δ)(\varepsilon_{3},\delta)-DP mechanism Msv\mathcal{M}_{sv} such that, for any p∗∈(0,1),β∈(0,1)p^{*}\in(0,1),\beta\in(0,1), and for any sequence of ε1\varepsilon_{1}-DP mechanisms M1,⋯ ,MK\mathcal{M}_{1},\cdots,\mathcal{M}_{K} and any sequence of thresholds τ1,⋯ ,τk\tau_{1},\cdots,\tau_{k}:

If there is an ii such that Pr⁡[Mi(D)≥τi]≥p∗\Pr[\mathcal{M}_{i}(D)\geq\tau_{i}]\geq p^{*}, then M\mathcal{M} outputs ii with probability (1−β)(1-\beta).

If M\mathcal{M} outputs ii, then except with probability β\beta, Pr⁡[Mi(D)≥τi]≥(βK)O(ε1/ε3)⋅p∗\Pr[\mathcal{M}_{i}(D)\geq\tau_{i}]\geq(\frac{\beta}{K})^{O(\varepsilon_{1}/\varepsilon_{3})}\cdot p^{*}.

We next outline some motivating applications of our work.

Hyperparameter/algorithm Selection: When designing practical machine learning algorithms, one often ends up choosing amongst different algorithms/models, or setting values for common hyperparameters such as the learning rate in an algorithm. This hyperparameter selection problem has attracted a lot of interest in recent years . Differentially private ML algorithms such as have many of these hyperparameters, and often add on a few hyperparameters of their own. A common approach in the non-private setting is to try out several (or all) values of the hyperparameters and select the best one based on the performance on a validation set. Doing this with privacy requires more care. Chaudhuri and Vinterbo studied this problem formally under strong assumptions on the algorithm. These assumptions, however, can be hard to enforce and one would like to design an algorithm that works without any additional assumptions. Note that given KK choices for the hyperparameters, and an ε\varepsilon-DP learner, one can publish KK models and select the best, say using the exponential mechanism. This approach only gives εK\varepsilon K-DP, which allows for privacy budget of only ε/K\varepsilon/K (or εlog⁡1δ/K\varepsilon\sqrt{\log\frac{1}{\delta}}/\sqrt{K} if using advanced composition) for the learner, which often translates to significantly poorer utility guarantee. In this setting, note also that each oracle call is a run of the DP learner for some hyperparameter setting, that can involve a large computational cost.

Our work shows how to compete with the best choices of hyperparameters in the non-private setting while satisfying O(ε)O(\varepsilon)-DP, at a small computational overhead.

Generalizing the Exponential Mechanism: Beyond these applications, our result can be viewed as a generalization of the expoenential mechanism. Given a score fuction qq that has sensitivity SS, observe that adding Laplace noise of scale S/εS/\varepsilon to the score gives us an ε\varepsilon-DP mechanism. Our algorithm can be then used to select amongst these. We can however relax the assumptions. If we allow the score functions to have different sensitivities, we can still use our framework and recover the generalized exponential mechanism of Raskhodnikova and Smith . If the score functions have small smoothed sensitivity , we get a smooth sensitivity version of the exponential mechanism. This last result does not seem to follow from known techniques.

Private amplification for private algorithms: Beyond these applications, our result can be viewed as an extension of the private amplification scheme introduced in . Given a private algorithm, which is usually a randomized algorithm, ideally one would like to run it multiple times, and then choose the best run so as to obtain an output with a higher quality. Here the quality measure can either be the success probability, or any other utility measure of the output. This is trivial in the non-private setting. Is it possible to compete with such a naive repetition strategy in a differentially private way? In this work, we present an algorithm that can be seen as modifying the naive repetition strategy with a random stopping time, which is arguably almost as competitive as the non-private naive repetition.

The Differentially Private Selection problem, often known as differentially private maximization, is a very general algorithmic problem that arises in many applications. Some examples include private PAC learning , private frequent itemset mining , private PCA and private multiple hypothesis testing . The Sparse Vector Technique can be viewed in hindsight as a novel solution to the online version of the selection problem, under the assumption that the target value τ\tau is known in advance. This technique was introduced by Dwork et al. . We refer the reader to the book by Dwork and Roth for further applications of these techniques.

Several generalization of the exponential mechanims have been proposed. Smith and Thakurta and Beimel et al. showed that the utility guarantee can be improved using the propose-test-release framework of Dwork and Lei when there is a large margin between the maximum and the rest. Chaudhuri et al. gave an elegant algorithm that can exploit a large margin between the maximum and the kkth maximum for any kk. Raskhodnikova and Smith proposed the generalized exponential mechanism whose utility depends on the sensitivity of the maximizer, rather than the worst-case sensitivity. Minami et al. show that under certain assumptions on the base distribution, the sensitivity assumptions on the loss function can be significantly relaxed. Our algorithms can also be seen as a natural generalization of the Laplace mechanism. Given a Lipschitz score function q′q^{\prime}, one can convert it into an ε\varepsilon-DP score function qq by adding a Laplace noise. Then the Laplace mechanism says that one can just output the max of the noise-added scores. However, the Laplace relies crucially on the fact that the noise is a Laplace noise. As we will discuss in Section B.1, under the mere assumption that the score function is ε\varepsilon-DP, outputting the max will inevitably incur a factor of KK loss in privacy.

The problem of algorithm selection has also been studied in where the best parameters are learnt from features of the problem. Ligett et al. study the problem of picking from a sequence of algorithms with increasing privacy costs, until one with good utility is found, for a special class of mechanisms.

The problem of private median finding, and more generally private percentile estimation has been studied in several works . While syntactically similar to the threshold estimation problem studied in Section 4, the assumptions on the data in those works are very different from ours and we do not believe that the techniques in those works apply to the setting of interest in this work.

2. Organization

The rest of the paper is organized as follows. In Section 3 we present our algorithm for the known threshold case. Section 4 describes our sparse vector and general selection algorithms. We sketch applications of our results in Section 5. The appendices contain some deferred proofs, show why simpler natural approaches do not work for our problem, and show a lower bound on the privacy overhead.

Preliminary and Notations

For a random variable XX and distribution QQ, we write X∼QX\sim Q if XX is distributed according to the law of QQ.

Given a function ff on dataset DD, we say that ff is tt-Lipschitz if for any two neighboring dataset D,D′D,D^{\prime}, ∣f(D)−f(D′)∣≤t\left|f(D)-f(D^{\prime})\right|\leq t.

Private selection

Let {Mi(D)}i=1K\left\{M_{i}(D)\right\}_{i=1}^{K} be a set of differentially private mechanisms, that is, for every ii, MiM_{i} is a differentially private mechanism with respect to the dataset DD. We will also refer to the set of MiM_{i} as private candidates. For convenience, we will also treat a randomized mechanism Mi(D)M_{i}(D) as a distribution, and write m∼Mi(D)m\sim M_{i}(D) if mm follows the output distribution of Mi(D)M_{i}(D). Let {qi}\left\{q_{i}\right\} be scoring functions over the output of these mechanisms, that is, for m∼Mi(D)m\sim M_{i}(D), qi(m)q_{i}(m) is the score for mm. We assume that there is a total ordering of the candidates: when two candidates have the same score, we assume that there is an arbitrary tie-breaking rule (e.g., by alphabetical ordering). Given a total ordering of the candidates, without loss of generality we will further assume that each option has a different score.

The goal of private selection is to select (m,i)(m,i) that (approximately) maximizes the score of qi(m)q_{i}(m). Naively, a natural algorithm is to draw samples mi∼Mim_{i}\sim M_{i} for every ii, and then output the pair (mi,i)(m_{i},i) with the highest score qi(mi)q_{i}(m_{i}). Unfortunately this naive algorithm is not private. The detailed discussion and analysis is deferred to Section B.1. The next natural algorithm would be to output the pp-th percentile best, which unfortunately is also not private. Again we defer the analysis to Section B.3.

In this section, we will start with the following naive algorithm that is guaranteed to be private but not very useful (has poor utility guarantee): we choose a candidate ii uniformly at random and output Mi(D)M_{i}(D). It is not hard to see that such a choice of candidate is at least as private as the individual candidates. However, the probability of getting a reasonably “good” candidate can be of the order O(1/K)O(1/K). Nevertheless, we will show how to boost its usefulness (utility guarantee) by thresholding or random stopping. As a result, this leads to simple and practical algorithms that are also able to compete with the best candidates in a differentially private way.

We consider a thresholding algorithm, which for a given threshold, repeatedly samples from the candidates until we get one that is above the threshold. In addition, we have a small probability γ\gamma of stopping at each step. See LABEL:alg:thresholding for a more formal description.

We assume that the adversary can only observe the final output of the algorithm. We show that for any choice of parameters, the algorithm is private; and if the given threshold τ\tau is a “good” threshold, the algorithm is unlikely to output ⊥\bot.

Fix any ε1,δ1>0,ε0∈,γ∈\varepsilon_{1},\delta_{1}>0,\varepsilon_{0}\in,\gamma\in. Let TT be any integer such that T≥max⁡{1γln⁡2ε0,1+1eγ}T\geq\max\left\{\frac{1}{\gamma}\ln\frac{2}{\varepsilon_{0}},1+\frac{1}{e\gamma}\right\}, Then LABEL:alg:thresholding with these parameters satisfies the following:

If QQ is ε1\varepsilon_{1}-DP, then the output is (2ε1+ε0)(2\varepsilon_{1}+\varepsilon_{0})-DP.

If QQ is (ε1,δ1)(\varepsilon_{1},\delta_{1})-DP, then the output is \inp2ε1+ε0,  3e2ε1+ε0⋅δ1γ\inp{2\varepsilon_{1}+\varepsilon_{0},\;3e^{2\varepsilon_{1}+\varepsilon_{0}}\cdot\frac{\delta_{1}}{\gamma}}-DP.

Let T~\widetilde{T} be the number of iterations of the algorithm, and let p1=Pr⁡q∼Q(D)\inbq≥τp_{1}=\Pr_{q\sim Q(D)}\inb{q\geq\tau}, then

Furthermore, \Pr\inb{\hbox{output\bot}}\leq\frac{(1-p_{1})(1+\varepsilon_{0}/2)}{p_{1}}\gamma.

Due to space considerations, we defer this proof to Section A.1. As a remark, it is clear that in the worst case, the number of iterations of LABEL:alg:thresholding is no more than TT; this theorem provides a more average-case guarantee: the larger p1p_{1} (or γ\gamma) is, the more likely that the algorithm will terminate (much) sooner than TT. Moreover, it is worth noting that the larger the setting of TT is, the smaller we can set ε0,γ\varepsilon_{0},\gamma, providing more privacy and utility. In particular, the above theorem holds even if we set γ=0,ε0=0\gamma=0,\varepsilon_{0}=0 but T=∞T=\infty, in other words, we run the algorithm till it stops by itself. However this would not be a very practical setting: if one started with a “bad” threshold, the algorithm may never stop. In that case, one may want to stop the algorithm and try a different threshold. Therefore, for practical purposes one may want to set γ>0\gamma>0 and ε0>0\varepsilon_{0}>0.

2. Random stopping without thresholding

In this subsection, we show that the idea of random stopping leads to a simple private algorithm, even without knowing the threshold. It is similar to LABEL:alg:thresholding but without the thresholding part: draw a random number of samples, and then output the best option.

Fix any ε1>0,γ∈\varepsilon_{1}>0,\gamma\in. If QQ is ε1\varepsilon_{1}-DP, then the output of LABEL:alg:maxRand is (3ε1)(3\varepsilon_{1})-DP.

We first consider the event of getting the output (x,q)(x,q) from LABEL:alg:maxRand on neighboring datasets DD and D′D^{\prime}. Without loss of generality, we assume that each option has a different score.Otherwise, whenever we write q1>qq_{1}>q, we break ties using the same total ordering of the candidates. Then we denote

Notice that p=Pr⁡(x~,q~)∼Q(D)\inb(x~,q~)=(x,q)p=\Pr_{(\widetilde{x},\widetilde{q})\sim Q(D)}\inb{(\widetilde{x},\widetilde{q})=(x,q)}, p1=p0+pp_{1}=p_{0}+p, and p1′=p0′+p′p_{1}^{\prime}=p_{0}^{\prime}+p^{\prime}.

We define the highest score for a set (or a multiset) SS of tuples (x,q)(x,q) as

Since QQ is ε1\varepsilon_{1}-DP, we have that p,p0,p1p,p_{0},p_{1} are ε1\varepsilon_{1}-close (in a DP sense) to p′,p0′,p1′p^{\prime},p_{0}^{\prime},p_{1}^{\prime}, respectively. Then,

The following utility bound holds for this algorithm.

For p>0p>0, let Q(p)(D)=sup⁡{z:Pr⁡[Q(D)≥z]>p}Q^{(p)}(D)=\sup\{z:\Pr[Q(D)\geq z]>p\}. Then the output of LABEL:alg:maxRand has score at least Q(p)(D)Q^{(p)}(D) except with probability γ/p\gamma/p.

Instead of random stopping, one can also design a hard stopping variant of this algorithm similar to that of LABEL:alg:thresholding, and allow for (ε,δ)(\varepsilon,\delta)-DP input algorithms.

Fix any γ∈,δ2>0\gamma\in,\delta_{2}>0 and let T=1γlog⁡1δ2T=\frac{1}{\gamma}\log\frac{1}{\delta_{2}}. Consider a variant of LABEL:alg:maxRand that outputs the highest scored candidate from SS if jj reaches TT. If QQ is (ε1,δ1)(\varepsilon_{1},\delta_{1})-DP, then the output of this algorithm is (3ε1+32δ1,δ)(3\varepsilon_{1}+3\sqrt{2\delta_{1}},\delta)-DP for δ=2δ1T+δ2\delta=\sqrt{2\delta_{1}}T+\delta_{2}.

We simply reduce to Theorem 3.2 using simple properties of (ε,δ)(\varepsilon,\delta)-DP. We give details next, using folklore results proven in Appendix E. Fix a pair of neighboring datasets DD and D′D^{\prime}. Then we can define an event BB such that Pr⁡[B]≤δ1\Pr[B]\leq\sqrt{\delta_{1}} and that Q(D)∣BcQ(D)\mid B^{c} and Q(D′)∣BcQ(D^{\prime})\mid B^{c} are multiplicatively ε1+2δ1\varepsilon_{1}+\sqrt{2\delta_{1}} close. Let BjB_{j} be the event BB in the jjth call to QQ. Further, let CC be the event that the algorithm reaches step TT. Conditioned on (∪j=1TBj∪C)c(\cup_{j=1}^{T}B_{j}\cup C)^{c}, the run of this algorithm can be coupled with a run of LABEL:alg:maxRand for a pure DP QQ. Further, the probability of the event ∪jBj∪C\cup_{j}B_{j}\cup C is at most 2δ1T+δ2\sqrt{2\delta_{1}}T+\delta_{2}. The claim follows. ∎

Since δ1\delta_{1} is typically smaller than a polynomial, we have not attempted to optimize the δ\delta term in this theorem. We conclude with a remark that, in the case when QQ satisfies purely ε1\varepsilon_{1}-DP, one can show that the hard stopping variant of LABEL:alg:maxRand preserves purely ≈3ε1\approx 3\varepsilon_{1}-DP.

Fix any ε0∈(0,1/2),γ∈,δ2>0\varepsilon_{0}\in(0,1/2),\gamma\in,\delta_{2}>0 and let T=⌈1γ\inpln⁡2(1+γ)2ε0γ2+ln⁡ln⁡2(1+γ)2ε0γ2⌉T=\left\lceil\frac{1}{\gamma}\inp{\ln\frac{2(1+\gamma)^{2}}{\varepsilon_{0}\gamma^{2}}+\ln\ln\frac{2(1+\gamma)^{2}}{\varepsilon_{0}\gamma^{2}}}\right\rceil. Consider a variant of LABEL:alg:maxRand that outputs the highest scored candidate from SS if jj reaches TT. If QQ is ε1\varepsilon_{1}-DP, then the output of this algorithm is (3ε1+3ε0)(3\varepsilon_{1}+3\varepsilon_{0})-DP.

The proof of this theorem is quite involved and is deferred to Section A.2.

Searching for a percentile-threshold: privacy-preserving sparse vector

In this section we consider the problem of searching for a percentile-threshold τ\tau for any given percentile p∗p_{*} in a differentially private way. We start by defining some notations. Given any sequence of randomized queries {Qi}\left\{Q_{i}\right\}, we write qi∼Qi(D)q_{i}\sim Q_{i}(D) to indicate that qiq_{i} is obtained from running the randomized query QiQ_{i} on dataset DD. In other words, qi∼Qi(D)q_{i}\sim Q_{i}(D) means that qiq_{i} follows the output distribution of the randomized query QiQ_{i} on dataset DD. We will treat these Qi(D)Q_{i}(D) as samplable distributions, where each QiQ_{i} is ε1\varepsilon_{1}-DP. Then for any sequence of thresholds {τi}\left\{\tau_{i}\right\}, and a target threshold p∗∈(0,1)p_{*}\in(0,1), we would like to test if Pr⁡qi∼Qi(D)[qi≥τi]>p∗\Pr_{q_{i}\sim Q_{i}(D)}[q_{i}\geq\tau_{i}]>p_{*} and output the first one that is above the threshold, and in a differentially private way.

It is worth noting that this can be seen as an extension of the standard sparse vector algorithm for Lipschitz queries: given 11-Lipschitz queries f1,⋯ ,fkf_{1},\cdots,f_{k} and a threshold τ0\tau_{0}, if we set p∗=12p_{*}=\frac{1}{2}, Qi=fi+Lap\inp4ε1Q_{i}=f_{i}+\mathtt{Lap}\inp{\frac{4}{\varepsilon_{1}}} and τi=τ0\tau_{i}=\tau_{0}, then it is not hard to check that the queries QiQ_{i} are now ε1\varepsilon_{1}-DP, and the first query QiQ_{i} above the percentile-threshold is exactly the same as the first query fif_{i} above the query threshold τ0\tau_{0} (that is, the first fif_{i} with median score at least τ0\tau_{0}). Answering such a percentile query exactly is not private (see Section B.3 for an example for p∗=1/2p_{*}=1/2), so we will have to relax the goal of finding the first above percentile-threshold query. Similar to the standard setting, we would like that:

if a query is much below the threshold, that is, Pr⁡qi∼Qi(D)[qi≥τi]≪p∗\Pr_{q_{i}\sim Q_{i}(D)}[q_{i}\geq\tau_{i}]\ll p_{*}, then our algorithm should report “below threshold” (denoted by ⊥\bot);

if a query is much above the threshold, that is, \inp1−Pr⁡qi∼Qi(D)[qi≥τi]≪\inp1−p∗\inp{1-\Pr_{q_{i}\sim Q_{i}(D)}[q_{i}\geq\tau_{i}]}\ll\inp{1-p_{*}}, then our algorithm should report “above threshold” (denoted by ⊤\top).

In fact, our algorithm will be a natural extension of the standard sparse vector algorithm.

To illustrate ideas, we will start by assuming that we have access to an exact percentile oracle: p(τi,Qi):=Pr⁡qi∼Qi[qi≥τi]p(\tau_{i},Q_{i}):=\Pr_{q_{i}\sim Q_{i}}[q_{i}\geq\tau_{i}]. As a remark, such a percentile oracle is available in the standard sparse vector algorithm, which is just the cumulative distribution function of the Laplace distribution. We observe that if the randomized queries QiQ_{i} are ε1\varepsilon_{1}-DP, then both ln⁡p(τi,Qi)\ln p(\tau_{i},Q_{i}) and ln⁡\inp1−p(τi,Qi)\ln\inp{1-p(\tau_{i},Q_{i})} are ε1\varepsilon_{1}-Lipschitz. In other words, although we no longer have Lipschitzness in the “answer of a query” space (that is, the quantile space), the fact that each query is ε1\varepsilon_{1}-DP will ensure that we have Lipschitzness in the logarithm of the percentile space (that is, the log of the CDF). This allows us to adapt the sparse vector algorithm to the log of the percentile space.

Let Φ(x):=x1−x\Phi(x):=\frac{x}{1-x}. Note that ln⁡Φ\inpp(τi,Qi)\ln\Phi\inp{p(\tau_{i},Q_{i})} is 2ε12\varepsilon_{1}-Lipschitz: since both ln⁡p(τi,Qi)\ln p(\tau_{i},Q_{i}) and ln⁡\inp1−p(τi,Qi)\ln\inp{1-p(\tau_{i},Q_{i})} are ε1\varepsilon_{1}-Lipschitz, and ln⁡Φ\inpp(τi,Qi)\ln\Phi\inp{p(\tau_{i},Q_{i})} is just the difference of two ε1\varepsilon_{1}-Lipschitz functions. Also notice that Φ\Phi is a strictly increasing function for x∈(0,1)x\in(0,1). Given access to the oracle p(τi,Qi)p(\tau_{i},Q_{i}), we can then adapt the sparse vector algorithm as in LABEL:alg:gensparse0.

If for every ii, QiQ_{i} is ε1\varepsilon_{1}-DP, then

LABEL:alg:gensparse0 is ε3\varepsilon_{3}-DP.

Conditional on LABEL:alg:gensparse0 reporting the RR-th query QRQ_{R} is “above threshold”, we have that ∀β∈(0,1),Pr⁡\inbΦ\inpp(τR,QR)≤\inpβR+112ε1ε3Φ(p∗)≤β\forall\beta\in(0,1),\Pr\inb{\Phi\inp{p(\tau_{R},Q_{R})}\leq\inp{\frac{\beta}{R+1}}^{\frac{12\varepsilon_{1}}{\varepsilon_{3}}}\Phi(p_{*})}\leq\beta. In other words, the algorithm does not stop too early.

Conditional on LABEL:alg:gensparse0 reporting the RR-th query QRQ_{R} is “above threshold”, we have that ∀β∈(0,1),Pr⁡\inb∃i<R:Φ\inpp(τi,Qi)≥\inpR+1β12ε1ε3Φ(p∗)≤β\forall\beta\in(0,1),\Pr\inb{\exists i<R:\Phi\inp{p(\tau_{i},Q_{i})}\geq\inp{\frac{R+1}{\beta}}^{\frac{12\varepsilon_{1}}{\varepsilon_{3}}}\Phi(p_{*})}\leq\beta. In other words, the algorithm does not stop too late.

∀β∈(0,1)\forall\beta\in(0,1), if for some ii, Φ\inpp(τi,Qi)≥\inp1β12ε1ε3Φ(p∗),\Phi\inp{p(\tau_{i},Q_{i})}\geq\inp{\frac{1}{\beta}}^{\frac{12\varepsilon_{1}}{\varepsilon_{3}}}\Phi(p_{*}), then Pr⁡\inbai=⊤∣∀j<i,aj=⊥≤β\Pr\inb{a_{i}=\top|\forall j<i,a_{j}=\bot}\leq\beta. In other words, on a query that is way above the threshold the algorithm will likely halt.

(Sketch) Part (a), part (b) and part (c) all follow from the standard sparse vector analysis (see, e.g., ), and the fact that ln⁡Φ\inpp(τi,Qi)\ln\Phi\inp{p(\tau_{i},Q_{i})} is 2ε12\varepsilon_{1}-Lipschitz. Observe that the test eξi⋅Φ\inpp(τi,Qi)>eνΦ(p∗)e^{\xi_{i}}\cdot\Phi\inp{p(\tau_{i},Q_{i})}>e^{\nu}\Phi(p_{*}) is equivalent to ξi+ln⁡Φ\inpp(τi,Qi)>ν+ln⁡Φ(p∗)\xi_{i}+\ln\Phi\inp{p(\tau_{i},Q_{i})}>\nu+\ln\Phi(p_{*}). Therefore, if we view ln⁡Φ\inpp(τi,Qi)\ln\Phi\inp{p(\tau_{i},Q_{i})} as the ii-th query (which is 2ε12\varepsilon_{1}-Lipschitz) and ln⁡Φ(p∗)\ln\Phi(p_{*}) as the threshold, then this is indeed the standard sparse vector setting. The details are omitted here as we will see proofs for stronger claims for the actual algorithm in Theorem 4.4.

For part (d), observe that the test eξi⋅Φ\inpp(τi,Qi)>eνΦ(p∗)e^{\xi_{i}}\cdot\Phi\inp{p(\tau_{i},Q_{i})}>e^{\nu}\Phi(p_{*}) will pass if ξi≥−8ε1ε3ln⁡1β\xi_{i}\geq-\frac{8\varepsilon_{1}}{\varepsilon_{3}}\ln\frac{1}{\beta} and ν≤4ε1ε3ln⁡1β\nu\leq\frac{4\varepsilon_{1}}{\varepsilon_{3}}\ln\frac{1}{\beta}. By a union bound, with probability at least 1−β1-\beta, both will happen at the same time. In other words, the probability of not halting after seeing a query way above the threshold is at most β\beta. ∎

We give some estimates in the special case of p∗=1/2p_{*}=1/2, which corresponds to the range of the standard sparse vector setting, as quick corollaries. In fact, if one apply this to the standard sparse vector setting, one can recover guarantees that match the standard setting up to constant factors.

If p∗=1/2p_{*}=1/2, and for every ii, QiQ_{i} is ε1\varepsilon_{1}-DP, then

LABEL:alg:gensparse0 is ε3\varepsilon_{3}-DP.

Conditional on LABEL:alg:gensparse0 reporting the RR-th query QRQ_{R} is “above threshold”, we have that ∀β∈(0,1),Pr⁡\inbp(τR,QR)≤β12ε1ε3β12ε1ε3+(R+1)12ε1ε3≤β\forall\beta\in(0,1),\Pr\inb{p(\tau_{R},Q_{R})\leq\frac{\beta^{\frac{12\varepsilon_{1}}{\varepsilon_{3}}}}{\beta^{\frac{12\varepsilon_{1}}{\varepsilon_{3}}}+(R+1)^{\frac{12\varepsilon_{1}}{\varepsilon_{3}}}}}\leq\beta. In other words, the algorithm does not stop too early.

Conditional on LABEL:alg:gensparse0 reporting the RR-th query QRQ_{R} is “above threshold”, we have that ∀β∈(0,1),Pr⁡\inb∃i<R:p(τi,Qi)≥(R+1)12ε1ε3β12ε1ε3+(R+1)12ε1ε3≤β\forall\beta\in(0,1),\Pr\inb{\exists i<R:p(\tau_{i},Q_{i})\geq\frac{(R+1)^{\frac{12\varepsilon_{1}}{\varepsilon_{3}}}}{\beta^{\frac{12\varepsilon_{1}}{\varepsilon_{3}}}+(R+1)^{\frac{12\varepsilon_{1}}{\varepsilon_{3}}}}}\leq\beta. In other words, the algorithm does not stop too late.

∀β∈(0,1)\forall\beta\in(0,1), if for some ii, p(τi,Qi)≥1−β12ε1ε31+β12ε1ε3,p(\tau_{i},Q_{i})\geq 1-\frac{\beta^{\frac{12\varepsilon_{1}}{\varepsilon_{3}}}}{1+\beta^{\frac{12\varepsilon_{1}}{\varepsilon_{3}}}}, then Pr⁡\inbai=⊤∣∀j<i,aj=⊥≤β\Pr\inb{a_{i}=\top|\forall j<i,a_{j}=\bot}\leq\beta. In other words, the algorithm will likely halt on a query that is way above the threshold.

2. Sparse vector for online private queries

Next we show that one could replace the exact percentile oracles p(τi,Qi(D))p(\tau_{i},Q_{i}(D)) with unbiased estimators pi~\widetilde{p_{i}}. Assuming that we have unlimited access to the randomized queries {Qi(D)}\left\{Q_{i}(D)\right\}, we consider the following natural unbiased estimator for p(τi,Qi(D))p(\tau_{i},Q_{i}(D)): given iid samples qi,1,⋯ ,qi,Nq_{i,1},\cdots,q_{i,N}, where for each jj, qi,j∼Qi(D)q_{i,j}\sim Q_{i}(D), we define pi~:=1N∑j=1N\inbqi,j≥τi\widetilde{p_{i}}:=\frac{1}{N}\sum_{j=1}^{N}\inb{q_{i,j}\geq\tau_{i}}, where \inbqi,j≥τi\inb{q_{i,j}\geq\tau_{i}} is the Iverson bracket defined by

Since pi~\widetilde{p_{i}} is now a random function of the dataset, the usual Lipschitzness is not well-defined, unlike for the function p(τi,Qi(D))p(\tau_{i},Q_{i}(D)). One approach of defining “Lipschitzness” for such a random function would be to consider the earth mover distance. This is what we will do next.

Let pi~′\widetilde{p_{i}}^{\prime} be the analogous unbiased estimator for p(τi,Qi(D′))p(\tau_{i},Q_{i}(D^{\prime})) on a neighboring dataset D′D^{\prime}. By ε1\varepsilon_{1}-DP of QiQ_{i}, we have that

In order to adapt LABEL:alg:gensparse0, ideally we would like a probabilistic version of pi~≤eε1pi~′\widetilde{p_{i}}\leq e^{\varepsilon_{1}}\widetilde{p_{i}}^{\prime} to be true: if there is a coupling between pi~\widetilde{p_{i}} and pi~′\widetilde{p_{i}}^{\prime} such that ∣ln⁡pi~−ln⁡pi~′∣≤ε1\left|\ln\widetilde{p_{i}}-\ln\widetilde{p_{i}}^{\prime}\right|\leq\varepsilon_{1}, then we can replace p(τi,Qi(D))p(\tau_{i},Q_{i}(D)) with pi~\widetilde{p_{i}} in LABEL:alg:gensparse0. This turns out to be too much to ask for in such a general setting. We show in Lemma 4.3 that a slightly weaker statement in indeed true. This is the key lemma that leads us to LABEL:alg:gensparse1.

Let {X1,⋯ ,Xn}\left\{X_{1},\cdots,X_{n}\right\} and {Y1,⋯ ,Yn}\left\{Y_{1},\cdots,Y_{n}\right\} be two sequences of independent {0,1}\left\{0,1\right\} random variables, and let X=∑i=1nXiX=\sum_{i=1}^{n}X_{i}, Y=∑i=1nYiY=\sum_{i=1}^{n}Y_{i}. For any fixed ε1∈(0,1),ε0∈(0,1)\varepsilon_{1}\in(0,1),\varepsilon_{0}\in(0,1), δ0∈(0,1)\delta_{0}\in(0,1), let C=2(eε0+ε1+1+eε0/2)<21C=2(e^{\varepsilon_{0}+\varepsilon_{1}}+1+e^{\varepsilon_{0}/2})<21.

Equivalently, if we let Δ:=Cln⁡2δ0ε0\inpeε0+ε1−1=O\inp1ε02ln⁡1δ0\Delta:=\frac{C\ln\frac{2}{\delta_{0}}}{\varepsilon_{0}\inp{e^{\varepsilon_{0}+\varepsilon_{1}}-1}}=O\inp{\frac{1}{\varepsilon_{0}^{2}}\ln\frac{1}{\delta_{0}}}, then

We defer the proof of this lemma to Section A.3. Now we are ready to describe the extended version of the AboveThreshold algorithm. We now consider a potential function Φ(N,Δ)(x)=Nx+ΔN(1−x)+Δ\Phi^{(N,\Delta)}(x)=\frac{Nx+\Delta}{N(1-x)+\Delta}. As an intuition, we will see that thanks to Lemma 4.3, if QiQ_{i} is ε1\varepsilon_{1}-DP, then for suitable choices of ε0\varepsilon_{0} and Δ\Delta, there exists a coupling in which, with high probability, ln⁡Φ(N,Δ)\inppi~\ln\Phi^{(N,\Delta)}\inp{\widetilde{p_{i}}} is 2(ε0+ε1)2(\varepsilon_{0}+\varepsilon_{1})-Lipschitz.

For any fixed ε0∈(0,1)\varepsilon_{0}\in(0,1), δ∈(0,1)\delta\in(0,1), β∈(0,1)\beta\in(0,1) and an integer T>1T>1, let S=2(ε1+ε0)S=2(\varepsilon_{1}+\varepsilon_{0}), C=2(eε0+ε1+1+eε0/2)<21C=2(e^{\varepsilon_{0}+\varepsilon_{1}}+1+e^{\varepsilon_{0}/2})<21, and Δ=Cln⁡8Tδε0\inpeε0+ε1−1=O\inp1ε02ln⁡Tδ\Delta=\frac{C\ln\frac{8T}{\delta}}{\varepsilon_{0}\inp{e^{\varepsilon_{0}+\varepsilon_{1}}-1}}=O\inp{\frac{1}{\varepsilon_{0}^{2}}\ln\frac{T}{\delta}}. If for every ii, QiQ_{i} is ε1\varepsilon_{1}-DP, then:

LABEL:alg:gensparse1 with the above parameters is (ε3,δ)(\varepsilon_{3},\delta)-DP.

Conditional on LABEL:alg:gensparse1 reporting the RR-th query QRQ_{R} is “above threshold”, we have that ∀β∈(0,1),Pr⁡\inbΦ(N,Δ)\inpp(τR,QR)≤\inpβR+16Sε3⋅e−ε0⋅Φ(N,Δ)(p∗)≤β+δ/2\forall\beta\in(0,1),\Pr\inb{\Phi^{(N,\Delta)}\inp{p(\tau_{R},Q_{R})}\leq\inp{\frac{\beta}{R+1}}^{\frac{6S}{\varepsilon_{3}}}\cdot e^{-\varepsilon_{0}}\cdot\Phi^{(N,\Delta)}(p_{*})}\leq\beta+\delta/2. In other words, the algorithm does not stop too early. Moreover,

Conditional on LABEL:alg:gensparse1 reporting the RR-th query QRQ_{R} is “above threshold”, we have that ∀β∈(0,1),Pr⁡\inb∃i<R:Φ(N,Δ)\inpp(τi,Qi)≥\inpR+1β6Sε3⋅eε0⋅Φ(N,Δ)(p∗)≤β+δ/2\forall\beta\in(0,1),\Pr\inb{\exists i<R:\Phi^{(N,\Delta)}\inp{p(\tau_{i},Q_{i})}\geq\inp{\frac{R+1}{\beta}}^{\frac{6S}{\varepsilon_{3}}}\cdot e^{\varepsilon_{0}}\cdot\Phi^{(N,\Delta)}(p_{*})}\leq\beta+\delta/2. In other words, the algorithm does not stop too late. Moreover,

∀β∈(0,1)\forall\beta\in(0,1), if for some ii, Φ(N,Δ)\inpp(τi,Qi)≥eε0\inp1β6Sε3Φ(N,Δ)(p∗),\Phi^{(N,\Delta)}\inp{p(\tau_{i},Q_{i})}\geq e^{\varepsilon_{0}}\inp{\frac{1}{\beta}}^{\frac{6S}{\varepsilon_{3}}}\Phi^{(N,\Delta)}(p_{*}), then

In other words, on a query that is way above the threshold the algorithm will likely halt.

Before proving the theorem, we state the following sufficient condition for establishing (ε,δ)(\varepsilon,\delta)-DP.

Let XX and YY be two random variables that share the same sample space and σ\sigma-algebra, If there exists constants δ>0,ε>0\delta>0,\varepsilon>0, and for any event AA, there exists a joint event G:=G(X,Y)\mathcal{G}:=\mathcal{G}(X,Y) on XX and YY such that Pr⁡[G]≥1−δ\Pr[\mathcal{G}]\geq 1-\delta, and

Informally, in order to show (ε,δ)(\varepsilon,\delta)-DP, it suffices to construct a coupling where, except with probability δ\delta, the two neighboring distributions satisfy ε\varepsilon-DP. It is worth noting that XX and YY need not be independent. Thus one could optimize δ\delta by constructing a coupling between XX and YY that maximizes Pr⁡[G]\Pr[\mathcal{G}]. In addition, we note that the design of G\mathcal{G} and the coupling between XX and YY can be dependent on the event AA.

Proof of Theorem 4.4. For part (a), we follow the standard analysis of sparse vector. Fix any two neighboring datasets DD and D′D^{\prime}. By Lemma 4.5, in order to show (ε3,δ)(\varepsilon_{3},\delta)-DP, it suffices to find a conditioning event G\mathcal{G}, and a coupling between the output distribution of LABEL:alg:gensparse1 running on DD and D′D^{\prime}, such that they are ε3\varepsilon_{3}-close except with probability δ\delta. Observe that in order to obtain the same output, it suffices if we can couple all the noisy tests of the form eξi⋅Φ(N,Δ)\inppi~≥eνΦ(N,Δ)(p∗)e^{\xi_{i}}\cdot\Phi^{(N,\Delta)}\inp{\widetilde{p_{i}}}\geq e^{\nu}\Phi^{(N,\Delta)}(p_{*}). These tests depend only on two types of randomness: the perturbations to the current percentile (in the form of ξi\xi_{i}), and the perturbations to the desired percentile (in the form of ν\nu). We denote these randomness by {ξi}\left\{\xi_{i}\right\} and ν\nu when running on dataset DD , and by {ξi′}\left\{\xi_{i}^{\prime}\right\} and ν′\nu^{\prime} when running on D′D^{\prime}.

We consider the event that aR=⊤a_{R}=\top and ∀i<R,ai=⊥\forall i<R,a_{i}=\bot. Let Φ∗:=Φ(N,Δ)(p∗)\Phi*:=\Phi^{(N,\Delta)}(p_{*}), and

Now we are ready to specify the coupling. Given {ξi}\left\{\xi_{i}\right\} and ν\nu, we let ν′=ν+ln⁡g′g\nu^{\prime}=\nu+\ln\frac{g^{\prime}}{g}, and \xi_{i}^{\prime}=\begin{cases}\xi_{i},&\hbox{ ifi}\\ \xi_{R}+\ln\frac{g^{\prime}}{g}+\ln\frac{\Phi_{R}}{\Phi_{R}^{\prime}},&\hbox{ ifi=R}\end{cases}. Then, it is not hard to check that under this coupling,

In the following we will abuse notation, and write Pr⁡Lap[ξR]\Pr_{\mathtt{Lap}}[\xi_{R}] to denote the probability density function of the Laplace distribution. Then, let aia_{i} be the ii-th output of the algorithm running on dataset DD, and ai′a_{i}^{\prime} be that of D′D^{\prime}.

Similarly if we let X2=N(1−pi~)X_{2}=N(1-\widetilde{p_{i}}) and Y2=N(1−pi~′)Y_{2}=N(1-\widetilde{p_{i}}^{\prime}), then under the trivial coupling,

We consider the following conditioning event:

By a union bound, we have Pr⁡\inbG≥1−δ\Pr\inb{\mathcal{G}}\geq 1-\delta. Conditional on G\mathcal{G}, by triangle inequality we have:

In other words, conditional on G\mathcal{G},

where the last inequality uses the probability density function of the two Laplace distributions.

Finally consider the event that R=TR=T and ai=⊥a_{i}=\bot for all i∈[T]i\in[T], by a similar argument we have

Since our choice of RR is arbitrary, this shows that conditioned on G\mathcal{G}, we have ε3\varepsilon_{3}-DP for the output of our algorithm. Since Pr⁡[G]≥1−δ\Pr[\mathcal{G}]\geq 1-\delta, by Lemma 4.5 this concludes (ε3,δ)(\varepsilon_{3},\delta)-DP for the output unconditionally.

For part (b), we consider the events of non-concentration:

where the bounds for F1\mathcal{F}_{1} and F2\mathcal{F}_{2} follows directly from CDF of the Laplace distribution, and the bound for F3\mathcal{F}_{3} follows from a concentration bound (see Lemma A.4). Therefore, conditional on avoiding F1∪F2\mathcal{F}_{1}\cup\mathcal{F}_{2}, if the algorithm stops at the kk-th iteration, we have that

Next, conditioning further on avoiding F3\mathcal{F}_{3}, we have that

Let N≥eε0Δp∗\inpT+1β6Sε3N\geq\frac{e^{\varepsilon_{0}}\Delta}{p_{*}}\inp{\frac{T+1}{\beta}}^{\frac{6S}{\varepsilon_{3}}}, then we have

For part (c), it will be similar to part (b), except that we consider

Then, conditioning on avoiding F1,F2,F3\mathcal{F}_{1},\mathcal{F}_{2},\mathcal{F}_{3}, we have that

Let N≥eε0Δ1−p∗\inpT+1β6Sε3N\geq\frac{e^{\varepsilon_{0}}\Delta}{1-p_{*}}\inp{\frac{T+1}{\beta}}^{\frac{6S}{\varepsilon_{3}}}, then we have

3. A more efficient sparse vector for a one-sided guarantee

In this subsection we consider searching for the unknown “good” threshold τ\tau for LABEL:alg:thresholding in a more efficient yet private way. The idea is that, instead of trying to tackle adversarily chosen randomized online queries, here we design better queries for our algorithm.

Specifically, let Q(D)Q(D) be a distribution dependent on dataset DD, and let q∼Qq\sim Q. Let p(τ,Q):=Pr⁡q∼Q[q≥τ]p(\tau,Q):=\Pr_{q\sim Q}[q\geq\tau]. Then, given p∗∈(0,1)p_{*}\in(0,1), our goal is to find τ∗:=max⁡{τ:p(τ,Q)≥p∗}\tau_{*}:=\max\left\{\tau:p(\tau,Q)\geq p_{*}\right\} in a differentially private way.

Since τ∗\tau_{*} can be very sensitive for neighboring datasets (see Section B.3 for an example for p∗=1/2p_{*}=1/2), outputting τ∗\tau_{*} directly would not be private. The relaxed goal is to find, with high probability, a private threshold τ~\widetilde{\tau} so that:

τ~\widetilde{\tau} is almost as large as τ∗\tau_{*}, and p(τ~,Q)p(\widetilde{\tau},Q) is not much smaller than p∗p_{*}.

It is worth noting that, due to the one-sided nature of our goal (instead of asking p(τ~,Q)p(\widetilde{\tau},Q) to be close to p∗p_{*}, we only want p(τ~,Q)p(\widetilde{\tau},Q) to be not much smaller than p∗p_{*}), we find it much more convenient to shift the target by a constant factor: from p∗p_{*} to a smaller target ≈β6ε1ε3⋅p∗\approx\beta^{\frac{6\varepsilon_{1}}{\varepsilon_{3}}}\cdot p_{*}. Such a tradeoff enables us to find a τ~\widetilde{\tau} that is closer to τ∗\tau_{*}, at the cost of a potentially smaller p(τ~,Q)p(\widetilde{\tau},Q). In the settings that we consider, a higher τ~\widetilde{\tau} allows for better “quality” of the selected candidate, while a larger p∗p_{*} is usually only for smaller computational cost.

Let QQ be a ε1\varepsilon_{1}-DP distribution. For any fixed ε0∈(0,1)\varepsilon_{0}\in(0,1), δ∈(0,1)\delta\in(0,1), β∈(0,1)\beta\in(0,1) and an integer R>1R>1, let S=ε1+ε0S=\varepsilon_{1}+\varepsilon_{0}, C=2(eε0+ε1+1+eε0/2)<21C=2(e^{\varepsilon_{0}+\varepsilon_{1}}+1+e^{\varepsilon_{0}/2})<21, and Δ=Cln⁡4Rδε0\inpeε0+ε1−1=O\inp1ε02ln⁡Rδ\Delta=\frac{C\ln\frac{4R}{\delta}}{\varepsilon_{0}\inp{e^{\varepsilon_{0}+\varepsilon_{1}}-1}}=O\inp{\frac{1}{\varepsilon_{0}^{2}}\ln\frac{R}{\delta}}. Then the following holds for the output τ~\widetilde{\tau} of LABEL:alg:sparse1 with the above parameters:

τ~\widetilde{\tau} is (ε3,δ)(\varepsilon_{3},\delta)-DP.

Pr\inbτ~≤τ∗−1R≤2β+δ2RPr\inb{\widetilde{\tau}\leq\tau_{*}-\frac{1}{R}}\leq 2\beta+\frac{\delta}{2R}. In other words, the algorithm does not stop too late.

(Sketch) For part (a), this basically follows from the same proof of Theorem 4.4 part (a), except the following changes:

We consider Φ(N,Δ)(x)=Nx+Δ\Phi^{(N,\Delta)}(x)=Nx+\Delta. It is not hard to see that the proof only relies on the fact that Φ(N,Δ)(x)\Phi^{(N,\Delta)}(x) is monotone, and Φ(N,Δ)\inppi~\Phi^{(N,\Delta)}\inp{\widetilde{p_{i}}} can be coupled with Φ(N,Δ)\inppi~′\Phi^{(N,\Delta)}\inp{\widetilde{p_{i}}^{\prime}} multiplicatively.

Here we can re-use randomness, due to the fact that we essentially have the same distribution, and only need to change τi\tau_{i}. It is worth noting that we did not require independence of the {pi~}\left\{\widetilde{p_{i}}\right\} since we only used union bound.

We have also shifted the target of Φ(N,Δ)(p∗)\Phi^{(N,\Delta)}(p_{*}) multiplicatively. However it does not affect privacy, since one can view such a shift as considering a different p∗p_{*} to begin with.

For part (b), similarly we consider the events of non-concentration:

where the bounds for F1\mathcal{F}_{1} and F2\mathcal{F}_{2} follows directly from CDF of the Laplace distribution, and the bound for F3\mathcal{F}_{3} follows from a concentration bound (see Lemma A.4). Therefore, conditional on avoiding F1∪F2\mathcal{F}_{1}\cup\mathcal{F}_{2}, if the algorithm stops at the kk-th iteration, we have that

Set N=3Δeε0/2p∗⋅β−12Sε3(R+1)6Sε3N=\frac{3\Delta e^{\varepsilon_{0}/2}}{p_{*}}\cdot\beta^{\frac{-12S}{\varepsilon_{3}}}(R+1)^{\frac{6S}{\varepsilon_{3}}}, then we have

Next, conditioning further on avoiding F3\mathcal{F}_{3}, we have that

For part (c), as soon as τi≤τ∗\tau_{i}\leq\tau_{*}, we have p(τi,Q)≥p∗p(\tau_{i},Q)\geq p_{*}. Therefore the test exp⁡(ξi)⋅(Npi~+Δ)≥exp⁡\inpν−Λ⋅(Np∗+Δ)\exp(\xi_{i})\cdot(N\widetilde{p_{i}}+\Delta)\geq\exp\inp{\nu-\Lambda}\cdot(Np_{*}+\Delta) will pass if ξi≥−4Sε3ln⁡1β\xi_{i}\geq-\frac{4S}{\varepsilon_{3}}\ln\frac{1}{\beta}, ν≤2Sε3ln⁡1β\nu\leq\frac{2S}{\varepsilon_{3}}\ln\frac{1}{\beta}, and Npi~+Δ≥e−ε0/2\inpNp(τi,Q)+ΔN\widetilde{p_{i}}+\Delta\geq e^{-\varepsilon_{0}/2}\inp{Np(\tau_{i},Q)+\Delta}. Similar to part (b), we get that this will happen except with probability 2β+δ2R2\beta+\frac{\delta}{2R}. In other words, the probability of not halting after the first iteration with τi≤τ∗\tau_{i}\leq\tau_{*} is at most 2β+δ2R2\beta+\frac{\delta}{2R}. ∎

Finally, by combining Theorem 4.6 and Theorem 3.1, we get the following:

Furthermore, \Pr\inb{\mathcal{M}\hbox{outputs\bot}}\leq\beta+\delta.

Here we set p1=112K⋅\inpβ2R+16+12ε1ε0p_{1}=\frac{1}{12K}\cdot\inp{\frac{\beta^{2}}{R+1}}^{6+\frac{12\varepsilon_{1}}{\varepsilon_{0}}}, and γ=p1β\gamma=p_{1}\beta, ε3=ε0\varepsilon_{3}=\varepsilon_{0}.

Applications

Suppose that we are given KK choices of hyperparameters, and for each choice i∈[K]i\in[K], there is a differentially private learning algorithm Mi\mathcal{M}_{i}. Given a training dataset D1D_{1}, Mi(D1)\mathcal{M}_{i}(D_{1}) is a randomized mechanism that returns a model, which we often denote as mm. Next, for a validation dataset D2D_{2}, we let qi~(m,D2)\widetilde{q_{i}}(m,D_{2}) be the validation score of model mm and hyperparameter ii. Then the goal of hyperparameter selection is to find a pair (m,i∗)(m,i_{*}), that approximately maximizes the validation score.

It is worth noting that the dependencies on the validation set are only through the scoring functions qi~\widetilde{q_{i}}, which are usually counting queries and thus have small sensitivity. This is the setting we will consider. Therefore, we let qi:=qi~+Lap\inp1nε2q_{i}:=\widetilde{q_{i}}+\mathtt{Lap}\inp{\frac{1}{n\varepsilon_{2}}}, where nn is the size of the validation set. Then, we define Qi(D1,D2)Q_{i}(D_{1},D_{2}) to be the distribution of qi(m,D2)q_{i}(m,D_{2}) when m∼Mi(D1)m\sim\mathcal{M}_{i}(D_{1}). Finally we let QQ be the distribution of QiQ_{i} when we draw ii uniformly from [K][K].

Then, in order to apply Theorem 4.7 or Theorem 3.2, it remains to verify that QQ is differentially private with respect to both datasets.

The distribution Q(D1,D2)Q(D_{1},D_{2}) defined as above is always ε2\varepsilon_{2}-DP for the validation set D2D_{2}. Moreover:

if {Mi}i=1K\left\{\mathcal{M}_{i}\right\}_{i=1}^{K} are ε1\varepsilon_{1}-DP learning algorithms, then Q(D1,D2)Q(D_{1},D_{2}) is ε1\varepsilon_{1}-DP for the training set D1D_{1};

if {Mi}i=1K\left\{\mathcal{M}_{i}\right\}_{i=1}^{K} are (ε1,δ1)(\varepsilon_{1},\delta_{1})-DP learning algorithms, then Q(D1,D2)Q(D_{1},D_{2}) is (ε1,δ1)(\varepsilon_{1},\delta_{1})-DP for D1D_{1}.

It is worth noting that this holds for every mm in the support. Then ε2\varepsilon_{2}-DP for D2D_{2} follows from the fact that ξ\xi and ν\nu follow the same Lap\inp1nε2\mathtt{Lap}\inp{\frac{1}{n\varepsilon_{2}}} distribution and ∣ξ−ν∣≤1/n\left|\xi-\nu\right|\leq 1/n.

Then for D1D_{1}, note that the dependency of QiQ_{i} on D1D_{1} is only through Mi(D)\mathcal{M}_{i}(D), which is ε1\varepsilon_{1}-DP. Thus for every ii, Qi(D1,D2)Q_{i}(D_{1},D_{2}) is ε1\varepsilon_{1}-DP for D1D_{1}, thus QQ is also ε1\varepsilon_{1}-DP for D1D_{1}.

Similarly if Mi(D)\mathcal{M}_{i}(D) is (ε1,δ1)(\varepsilon_{1},\delta_{1})-DP, we have that for every ii, Qi(D1,D2)Q_{i}(D_{1},D_{2}) is (ε1,δ1)(\varepsilon_{1},\delta_{1})-DP for D1D_{1}, thus QQ is also (ε1,δ1)(\varepsilon_{1},\delta_{1})-DP for D1D_{1}. ∎

2. Adaptive Data Analsis Beyond Low Sensitivity Queries

Our results immediately have applications to designing differentially private algorithms where interemediate steps select the best amongst various private options. Since DP allows us to prove generalization bounds, these results have implications for adaptive data analysis too.

As an example, consider a data analysis algorithm which as an intermediate step runs kk-means clustering (or rank-kk PCA). Often in practice, one tries several values of kk and picks the best one according to some criteria (see e.g. Garg and Kalai ). While there are differentially private variants of the base problem of kk-means, naively selecting the best would require us to account for the privacy cost of computing all the kk-means objectives, for different value of kk. Theorem 4.7 allows us to select the best of these without any asymptotic overhead in privacy cost.

3. Generalizations of the Exponential Mechanism

The exponential mechanism solves the selection problem when the score functions are Lipschitz. Several variants of the Exponential Mechanism have been proposed in previous work. We next show that several of these can be derived as corollaries of our main result, by defining appropriate private variants of the score function.

Let {qi(⋅)}i=1K\{q_{i}(\cdot)\}_{i=1}^{K} be a set of score functions mapping datasets to reals. Let i⋆(D)=arg max⁡iqi(D)i^{\star}(D)=\operatorname*{arg\,max}_{i}q_{i}(D) and q⋆(D)=max⁡iqi(D)q^{\star}(D)=\max_{i}q_{i}(D).

Suppose that each qiq_{i} has sensitivity at most ss. Then there is an ε\varepsilon-DP mechanism that outputs an ii such that qi(D)≥q⋆(D)−O(slog⁡Kβ/ε)q_{i}(D)\geq q^{\star}(D)-O(s\log\frac{K}{\beta}/\varepsilon) except with probability β\beta.

Suppose that qiq_{i} has sensitivity at most sis_{i}. Then there is an (ε,δ)(\varepsilon,\delta)-DP mechanism that outputs an ii such that qi(D)≥q⋆(D)−O(si⋆log⁡Kβ/ε)q_{i}(D)\geq q^{\star}(D)-O(s_{i^{\star}}\log\frac{K}{\beta}/\varepsilon) except with probability β\beta.

Suppose that each qiq_{i} has sensitivity at most ss. There is an (ε,δ)(\varepsilon,\delta)-DP mechanism M\mathcal{M} that outputs i⋆i^{\star} except with probability β\beta whenever q⋆≥qi+Ω(slog⁡1βδ/ε)q^{\star}\geq q^{i}+\Omega(s\log\frac{1}{\beta\delta}/\varepsilon) for all i≠i⋆i\neq i^{\star}.

Suppose that qiq_{i} has (ε/(4ln⁡2δ))\left(\varepsilon/(4\ln\frac{2}{\delta})\right)-smoothed sensitivity at most sis_{i}. Then there is an (ε,δ)(\varepsilon,\delta)-DP mechanism that outputs an ii such that qi(D)≥q⋆(D)−O(si⋆log⁡Kβ/ε)q_{i}(D)\geq q^{\star}(D)-O(s_{i^{\star}}\log\frac{K}{\beta}/\varepsilon) except with probability β\beta.

The second part is similar, except that we set Mi(D)=(i,qi(D)−2silog⁡K/βε+Lap(siε))\mathcal{M}_{i}(D)=\left(i,q_{i}(D)-\frac{2s_{i}\log K/\beta}{\varepsilon}+Lap(\frac{s_{i}}{\varepsilon})\right). This shift ensures the realized score is no larger than qi(D)q_{i}(D) for all calls to Mi(D)\mathcal{M}_{i}(D). Now the median of Mi⋆\mathcal{M}_{i^{\star}} is at least q⋆(D)−−2si⋆log⁡K/βεq^{\star}(D)--\frac{2s_{i^{\star}}\log K/\beta}{\varepsilon}, which implies the claim.

The fourth part is similar to the Generalized exponential mechanism, except that we add noise from smooth-sensitivity-scaled Laplacian distribution using the Smoothed Sensitivity framework of [29, Cor. 2.4]. As long as η>ε/log⁡(K/β)\eta>\varepsilon/\log(K/\beta) (which is ensured when we set η=ε/4ln⁡2δ)\eta=\varepsilon/4\ln\frac{2}{\delta}) with δ<β/K\delta<\beta/K), it can be verified that the 2si2s_{i} is a smooth upper bound on the sensitivity of qi(D)−2si⋆log⁡K/βεq_{i}(D)-\frac{2s_{i^{\star}}\log K/\beta}{\varepsilon}. The claim follows by a simple computation. ∎

4. Private Amplification

Gupta et al. study the question of private amplification: given a DP algorithm that gets a certain utility in expectation, can we convert it into one that gets close to that utility with high probabilty? Their motivation came from combinatorial optimization problems, where they showed appoximation algorithms with certain guarantees in expectation. Using Markov’s inequality, one can convert the expectation guarantee to one that ensures a utility bound with some probability pp. Applying our results, one gets an algorithm that ensures that utility with high probability. This improves on the private amplification theorem proven in .

Conclusions

We have presented new differentially private algorithms for selecting the best amongst several differentially private algorithms. Our algorithm is near-optimal in terms of privacy overhead, computational cost and utility loss. We have shown how it applies to hyperparameter search and adaptive data analysis. We leave open the question of improving the constants in the run time of our threshold finding algorithm.

While random search is a surprisingly effective way to do hyperparameter optimization in machine learning , there are more complex adaptive algorithms that often do better. Our work says that random search- or grid search-based hyperparameter tuning can be made differentially private essentially for free. It is natural to ask if we can make the various adaptive algorithms differentially private.

References

Appendix A Deferred Proofs

We restate Theorem 3.1 here for convenience.

Fix any ε1>0,ε0∈,δ1>0,γ∈\varepsilon_{1}>0,\varepsilon_{0}\in,\delta_{1}>0,\gamma\in. Let TT be any integer such that T≥max⁡{1γln⁡2ε0,1+1eγ}T\geq\max\left\{\frac{1}{\gamma}\ln\frac{2}{\varepsilon_{0}},1+\frac{1}{e\gamma}\right\}, Then LABEL:alg:thresholding with these parameters satisfies the following:

If QQ is ε1\varepsilon_{1}-DP, then the output is (2ε1+ε0)(2\varepsilon_{1}+\varepsilon_{0})-DP.

If QQ is (ε1,δ1)(\varepsilon_{1},\delta_{1})-DP, then the output is \inp2ε1+ε0,  3e2ε1+ε0⋅δ1γ\inp{2\varepsilon_{1}+\varepsilon_{0},\;3e^{2\varepsilon_{1}+\varepsilon_{0}}\cdot\frac{\delta_{1}}{\gamma}}-DP.

Let T~\widetilde{T} be the number of iterations of the algorithm, and let p1=Pr⁡q∼Q(D)\inbq≥τp_{1}=\Pr_{q\sim Q(D)}\inb{q\geq\tau}, then

Furthermore, \Pr\inb{\hbox{output\bot}}\leq\frac{(1-p_{1})(1+\varepsilon_{0}/2)}{p_{1}}\gamma.

For part (a), let p(x,q):=Pr⁡(x~,q~)∼Q(D)[(x~,q~)=(x,q)]p(x,q):=\Pr_{(\widetilde{x},\widetilde{q})\sim Q(D)}[(\widetilde{x},\widetilde{q})=(x,q)]. Given a threshold τ\tau, we let p1=Pr⁡q∼Q(D)\inbq≥τp_{1}=\Pr_{q\sim Q(D)}\inb{q\geq\tau}, and p1′=Pr⁡q∼Q(D′)\inbq≥τp_{1}^{\prime}=\Pr_{q\sim Q(D^{\prime})}\inb{q\geq\tau}. Then we have

For part (b), since QQ is ε1\varepsilon_{1}-DP, we have that p1p_{1} is ε1\varepsilon_{1}-close to p1′p_{1}^{\prime}, and 1−p11-p_{1} is also ε1\varepsilon_{1}-close to 1−p1′1-p_{1}^{\prime}. Let p′(x,q):=Pr⁡(x~,q~)∼Q(D′)[(x~,q~)=(x,q)]p^{\prime}(x,q):=\Pr_{(\widetilde{x},\widetilde{q})\sim Q(D^{\prime})}[(\widetilde{x},\widetilde{q})=(x,q)], then we also have p(x,q)p(x,q) is ε1\varepsilon_{1}-close to p′(x,q)p^{\prime}(x,q).

Next we consider the event of outputting ⊥\bot on dataset DD.

where (†)(\dagger) follows from AM-GM inequality: recall that T>1T>1 is an integer, and 0≤p1≤10\leq p_{1}\leq 1, then

This concludes part (b). For part (c), it is worth noting that the privacy does not degrade as we increase TT (the number of iterations).

If QQ is (ε1,δ1)(\varepsilon_{1},\delta_{1})-DP, then we know that p≤eε1p′+δ1p\leq e^{\varepsilon_{1}}p^{\prime}+\delta_{1}, and p1′≤eε1p1+δ1p_{1}^{\prime}\leq e^{\varepsilon_{1}}p_{1}+\delta_{1}, or equivalently that p1≥max⁡{0,p1′−δ}e−ε1p_{1}\geq\max\left\{0,p_{1}^{\prime}-\delta\right\}e^{-\varepsilon_{1}}. Also notice that p≤p1p\leq p_{1} and p′≤p1′p^{\prime}\leq p_{1}^{\prime}. Then, by calculations in part (a), we have the following upperbound:

Furthermore we have the following lowerbound:

Then for an event F=E∖{⊥}F=E\setminus\left\{\bot\right\} (that is, FF does not contain ⊥\bot), we have

Next, notice that we also have 1−p1≤eε1(1−p1′)+δ11-p_{1}\leq e^{\varepsilon_{1}}(1-p_{1}^{\prime})+\delta_{1}, then for the output ⊥\bot we can upperbound

Finally, for an event EE that contains ⊥\bot, we let F=E∖{⊥}F=E\setminus\left\{\bot\right\}, and then

For part (d), notice that in each iteration, in order to not halt, qq has to be below τ\tau, and the γ\gamma-biased coin test did not pass. In other words, for each iteration, Pr⁡[halting in any iteration]=1−(1−p1)(1−γ)=p1(1−γ)+γ\Pr[\hbox{halting in any iteration}]=1-(1-p_{1})(1-\gamma)=p_{1}(1-\gamma)+\gamma. Therefore this can be stochastically dominated by a geometric distribution (which corresponds to setting T=∞T=\infty), with expected number of trials being at most 1p1(1−γ)+γ\frac{1}{p_{1}(1-\gamma)+\gamma}.

A.2. Proof of Theorem 3.5

Fix any ε0∈(0,1/2),γ∈,δ2>0\varepsilon_{0}\in(0,1/2),\gamma\in,\delta_{2}>0 and let T=⌈1γ\inpln⁡2(1+γ)2ε0γ2+ln⁡ln⁡2(1+γ)2ε0γ2⌉T=\left\lceil\frac{1}{\gamma}\inp{\ln\frac{2(1+\gamma)^{2}}{\varepsilon_{0}\gamma^{2}}+\ln\ln\frac{2(1+\gamma)^{2}}{\varepsilon_{0}\gamma^{2}}}\right\rceil. Consider a variant of LABEL:alg:maxRand that outputs the highest scored candidate from SS if jj reaches TT. If QQ is ε1\varepsilon_{1}-DP, then the output of this algorithm is (3ε1+3ε0)(3\varepsilon_{1}+3\varepsilon_{0})-DP.

We denote a:=(1−γ)(1−p0)a:=(1-\gamma)(1-p_{0}), b:=(1−γ)(1−p1)b:=(1-\gamma)(1-p_{1}), then

Observe that a−b=(1−γ)pa-b=(1-\gamma)p, and we have

Using the upper bound on aa, this also implies that

Now, if T≥1γ\inpln⁡2(1+γ)2ε0γ2+ln⁡ln⁡2(1+γ)2ε0γ2T\geq\frac{1}{\gamma}\inp{\ln\frac{2(1+\gamma)^{2}}{\varepsilon_{0}\gamma^{2}}+\ln\ln\frac{2(1+\gamma)^{2}}{\varepsilon_{0}\gamma^{2}}}, then we have T(1−γ)T≤ε0γ(1+γ)2T(1-\gamma)^{T}\leq\frac{\varepsilon_{0}\gamma}{(1+\gamma)^{2}}. Therefore we can upperbound

The first inequality above is a consequence of upper bounding the sum of the first TT terms in eq. 2 by the sum to infinity. Then we lowerbound

A.3. Proof of Lemma 4.3

We re-state Lemma 4.3 below for convenience.

Let {X1,⋯ ,Xn}\left\{X_{1},\cdots,X_{n}\right\} and {Y1,⋯ ,Yn}\left\{Y_{1},\cdots,Y_{n}\right\} be two sequences of independent {0,1}\left\{0,1\right\} random variables, and let X=∑i=1nXiX=\sum_{i=1}^{n}X_{i}, Y=∑i=1nYiY=\sum_{i=1}^{n}Y_{i}. For any fixed ε1∈(0,1),ε0∈(0,1)\varepsilon_{1}\in(0,1),\varepsilon_{0}\in(0,1), δ0∈(0,1)\delta_{0}\in(0,1), let C=2(eε0+ε1+1+eε0/2)<21C=2(e^{\varepsilon_{0}+\varepsilon_{1}}+1+e^{\varepsilon_{0}/2})<21.

Equivalently, if we let Δ:=Cln⁡2δ0ε0\inpeε0+ε1−1=O\inp1ε02ln⁡1δ0\Delta:=\frac{C\ln\frac{2}{\delta_{0}}}{\varepsilon_{0}\inp{e^{\varepsilon_{0}+\varepsilon_{1}}-1}}=O\inp{\frac{1}{\varepsilon_{0}^{2}}\ln\frac{1}{\delta_{0}}}, then

Before proving this lemma, it will be useful to show the following concentration bounds.

Let XX be a sum of independent {0,1}\left\{0,1\right\} random variables: X=∑i=1nXiX=\sum_{i=1}^{n}X_{i} as defined in Lemma 4.3, then ∀ε∈(0,1),δ∈(0,1)\forall\varepsilon\in(0,1),\delta\in(0,1),

Let Δ1=eε+1(eε−1)2ln⁡1δ\Delta_{1}=\frac{e^{\varepsilon}+1}{(e^{\varepsilon}-1)^{2}}\ln\frac{1}{\delta}, then we apply the standard Chernoff bound to X+Δ1X+\Delta_{1}:

Let YY be a sum of independent {0,1}\left\{0,1\right\} random variables: Y=∑i=1nXiY=\sum_{i=1}^{n}X_{i} as defined in Lemma 4.3, then ∀ε∈(0,1),δ∈(0,1)\forall\varepsilon\in(0,1),\delta\in(0,1),

Note that by a direct application of Chernoff bound, it holds that ∀δ∈(0,1)\forall\delta\in(0,1),

Finally, we are ready to prove Lemma 4.3.

Proof of Lemma 4.3. For any given ε0,δ0\varepsilon_{0},\delta_{0}, we set ε=ε0/2\varepsilon=\varepsilon_{0}/2, and δ=δ0/2\delta=\delta_{0}/2. Then we consider the following events, GXG_{X} and GYG_{Y} on the probability space of XX and YY respectively:

As discussed in Lemmas A.4 and A.5, we have

On the other hand, conditional on GXG_{X} and GYG_{Y}, we must have

Therefore, let C=2(eε0+ε1+1+eε0/2)C=2(e^{\varepsilon_{0}+\varepsilon_{1}}+1+e^{\varepsilon_{0}/2}), then

Appendix B Naive algorithms: tight examples and analysis

In this subsection we consider a naive algorithm where, one simply chooses the best candidate (with the highest score, e.g., in the hyperparameter selection setting, among the trained models one outputs the best performing model and its corresponding hyperparameter).

What is the best ε\varepsilon-DP bound, or (ε,δ)(\varepsilon,\delta)-DP bound that we can hope for? Basic composition theorem says that if there are KK candidates, and each candidate is ε\varepsilon-DP, then, outputting the best of the KK candidates is (Kε)(K\varepsilon)-DP. This is actually tight, thanks to the following example.

Here the probability are with respect to the randomness in the ε\varepsilon-DP candidate MM. Then for neighboring datasets d1d_{1} and d1′d_{1}^{\prime}, we get KK samples of the candidates (e.g. for each of the KK candidates, we draw a sample), and then we compare the event of choosing i=0i=0 as the best hyperparameter. It is easy to see that Pr⁡\inbi∗(d1)=0=2−K\Pr\inb{i_{*}(d_{1})=0}=2^{-K} and Pr⁡\inbi∗(d1′)=0=exp⁡\inpKε⋅2−K\Pr\inb{i_{*}(d_{1}^{\prime})=0}=\exp\inp{K\varepsilon}\cdot 2^{-K}, therefore,

What about (ε,δ)(\varepsilon,\delta)-DP bound? We show that outputting the maximum cannot do better than \inpΘ(ln⁡1δ)ε,δ\inp{\Theta(\ln\frac{1}{\delta})\varepsilon,\delta}-DP. Fix an integer KK, and δ∈(0,1)\delta\in(0,1).

Again for neighboring datasets d1d_{1} and d1′d_{1}^{\prime}, we get KK samples of the candidates (e.g. for each of the KK candidates, we draw a sample), and then we compare the event of choosing i=0i=0 as the best hyperparameter. It is easy to see that Pr⁡\inbi∗(d1)=0≈δ\Pr\inb{i_{*}(d_{1})=0}\approx\delta and Pr⁡\inbi∗(d1′)=0≈δ1−ε\Pr\inb{i_{*}(d_{1}^{\prime})=0}\approx\delta^{1-\varepsilon}, therefore,

B.2. Thresholding with decreasing thresholds

In this subsection we consider a natural variant of LABEL:alg:thresholding: in each iteration, instead of halting (and output ⊥\perp) with probability γ\gamma, what if we decrease the threshold? In particular, we will try a lower threshold with probability at least γ\gamma in each step. Is this good enough, so that we can avoid paying the privacy cost for the different thresholds that we tried along the way? See LABEL:alg:decremental-thresholding for formal description. For simplicity, we consider the special case where we do not stop the algorithm after some finite number of TT steps. The algorithm could run forever in the worst case. Note that in LABEL:alg:thresholding, running the algorithm longer only helps in privacy (recall that in Theorem 3.1, the larger TT is, the smaller ε0\varepsilon_{0} we can choose).

Note that as soon as τ=0\tau=0, the algorithm will output whichever samples of candidate that it gets, as q≥τq\geq\tau is trivially true.

Here is an example which shows that trying many thresholds are not free for privacy: if we plan to try RR thresholds, then we do have to pay a factor of RR in the privacy cost.

Notice that 1−pp(1−γ)+γ\frac{1-p}{p(1-\gamma)+\gamma} is monotone in pp, if (1−p)(1-p) changes to eε(1−p)e^{\varepsilon}(1-p), then the eεe^{\varepsilon} factor will be amplified RR times.

B.3. Outputting the p𝑝p-th percentile

Without loss of generality, we consider p=12p=\frac{1}{2}, that is, we output the median candidate. Also without loss of generality, let us say there are only two models, m1m_{1} and m2m_{2}, and q(m1)=0q(m_{1})=0, q(m2)=1q(m_{2})=1. Consider the following two distributions of Mi(D)M_{i}(D) and Mi(D′)M_{i}(D^{\prime}).

Clearly, the two distributions are O(ε)O(\varepsilon)-close, yet in one distribution, the median is m2m_{2}, while in the other the median is m1m_{1}. Therefore, the median of the distribution is not private. This is also the case if one takes the median of NN samples, assuming NN large enough (where we have concentration with high probability). This also applies if one pick an index kk from {1,2,⋯ ,⌈N/2⌉}\left\{1,2,\cdots,\lceil N/2\rceil\right\} uniformly at random, and then output the kk-th highest.

Appendix C Improved analysis of the private amplification algorithm in [19]

Let {Qi(D)}i=1N\left\{Q_{i}(D)\right\}_{i=1}^{N} be a sequence of independent distributions, let {qi(D)}i=1N\left\{q_{i}(D)\right\}_{i=1}^{N} be the random variables where qi∼Qiq_{i}\sim Q_{i}.

Utility: The mechanism outputs a dummy class with probability γ+1Npγ+1\frac{\gamma+1}{Np\gamma+1}, and

where the randomness is over both the internal randomness of exponential mechanism and the randomness of {qi}\left\{q_{i}\right\}.

Privacy: Eε2(A1,⋯ ,An)\mathcal{E}_{\varepsilon_{2}}(A_{1},\cdots,A_{n}) is (2ε1+8γ)(2\varepsilon_{1}+8\gamma)-DP.

It is worth noting that the privacy on the training set does not depend on ε2\varepsilon_{2}. In other words, one can even set ε2→∞\varepsilon_{2}\to\infty, which corresponds to sampling uniformly from the classes with a score exceeding some threshold and with one extra dummy class. The theorem says that doing so does not compromise the privacy of the training set at all.

Before we prove the theorem, we introduce a useful lemma similar to that of [25, Lemma C.1]. The key changes will be from a Binomial distribution to one that takes value from $$.

Let {Xi}i=1N\left\{X_{i}\right\}_{i=1}^{N} be a sequence of independent random variables over $$, then

The first inequality follows by Jensen’s inequality, since the function f(X)=11+Xf(X)=\frac{1}{1+X} is convex for X>−1X>-1.

Next we use a formula for negative moments . Note that for every u,x>0u,x>0,

Setting u=1u=1 and taking expectations over x=∑Xix=\sum X_{i},

Next we show that tx≤(t−1)x+1t^{x}\leq(t-1)x+1 for x∈x\in.

For any given tt, consider the following two points: t^{x}=\begin{cases}1,\hbox{ ifx=0}\\ t,\hbox{ ifx=1}\end{cases}. Thus (t−1)x+1(t-1)x+1 is the line joining these two points. Since tx=exln⁡tt^{x}=e^{x\ln t} is convex as long as t>0t>0, and txt^{x} meets (t−1)x+1(t-1)x+1 at the two points, we get that tx≤(t−1)x+1t^{x}\leq(t-1)x+1 for x∈x\in.

Proof of Theorem C.1. The probability of outputting a dummy is

where the inequality follows from the definition of pp and Lemma C.2. Then,

For the privacy part, consider any two neighboring datasets D1D_{1} and D2D_{2}. Let Ai=qi~(D1)A_{i}=\widetilde{q_{i}}(D_{1}), and Bi=qi~(D2)B_{i}=\widetilde{q_{i}}(D_{2}) for i≤Ni\leq N, and Ai=Bi=τA_{i}=B_{i}=\tau for i=N+1,⋯ ,N+1+1γi=N+1,\cdots,N+1+\frac{1}{\gamma}. Let M1:=Eε2\inpA1,⋯ ,AnM_{1}:=\mathcal{E}_{\varepsilon_{2}}\inp{A_{1},\cdots,A_{n}}, M2:=Eε2\inpB1,⋯ ,BnM_{2}:=\mathcal{E}_{\varepsilon_{2}}\inp{B_{1},\cdots,B_{n}} be the random variables of the two outcomes.

On the other hand, by Jensen’s inequality,

By symmetry we have the same bound for M2M_{2} and BjB_{j}. Therefore,

Appendix D Lower Bounds

When each of the input mechanisms Mi\mathcal{M}_{i} is ε\varepsilon-DP, our final algorithm has privacy guarantee 2ε+ε′2\varepsilon+\varepsilon^{\prime} where ε′\varepsilon^{\prime} can be made arbitrarily small. Recall that in this factor of two loss occurs already in the case when Mi\mathcal{M}_{i} is qi(⋅)+Lap(S/ε)q_{i}(\cdot)+Lap(S/\varepsilon) for some score functions with sensitivity SS: in this case the NoisyMax mechanism has 2ε2\varepsilon-DP, and the exponential mechanism with similar utility has the same factor of two loss. We next argue that this factor of two loss is necessary under weak utility assumptions. We start with a definition.

Suppose that M\mathcal{M} is an algorithm that takes as input a set of ε\varepsilon-DP mechanisms M1,…,MK\mathcal{M}_{1},\ldots,\mathcal{M}_{K} and outputs an index ii. We say that i∗i^{*} is γ\gamma-dominant in M1,…,MK\mathcal{M}_{1},\ldots,\mathcal{M}_{K} on DD if Pr⁡mi∼Mi(d)[arg max⁡imi=i∗]≥1−γ\Pr_{m_{i}\sim\mathcal{M}_{i}(d)}[\operatorname*{arg\,max}_{i}m_{i}=i^{*}]\geq 1-\gamma. We say that M\mathcal{M} is γ\gamma-weakly useful if Pr⁡[M(D)=i∗]≥γ\Pr[\mathcal{M}(D)=i^{*}]\geq\gamma whenever i∗i^{*} is γ\gamma-dominant in M1,…,MK\mathcal{M}_{1},\ldots,\mathcal{M}_{K} on DD.

The next theorem says that a fairly mild weak usefulness condition already implies that this factor of 22 loss is unavoidable.

Suppose that M\mathcal{M} is an algorithm that takes as input a set of ε\varepsilon-DP mechanisms M1,…,MK\mathcal{M}_{1},\ldots,\mathcal{M}_{K}, and outputs an index ii. If M\mathcal{M} is γ\gamma-weakly useful for γ=K−α\gamma=K^{-\alpha} for a small enough α>0\alpha>0, then M\mathcal{M} cannot by ε^\hat{\varepsilon}-DP for any ε^<(2−6α)ε\hat{\varepsilon}<(2-6\alpha)\varepsilon.

The proof is a simple packing argument. Our mechanisms Mi\mathcal{M}_{i} all have range {0,1}\{0,1\} and output 11 with probability pi(D)p_{i}(D) on dataset DD. We define a set of K+1K+1 datasets D0,D1,…,DKD_{0},D_{1},\ldots,D_{K} such that:

It is easy to check that if D0D_{0} and DiD_{i} are distance Δ=⌈(0.5+α)ln⁡Kε⌉\Delta=\lceil\frac{(0.5+\alpha)\ln K}{\varepsilon}\rceil, then the Mi\mathcal{M}_{i}’s can be extended to satisfy ε\varepsilon-DP. Moreover, any 1Kα\frac{1}{K^{\alpha}}-weakly useful algorithm on dataset DiD_{i} should output ii with probability at least 1Kα\frac{1}{K^{\alpha}}. Suppose that M\mathcal{M} is ε^\hat{\varepsilon}-DP. Then,

Since ∑iPr⁡[M(D0)=i]≤1\sum_{i}\Pr[\mathcal{M}(D_{0})=i]\leq 1, it follows that for some ii, this probability Pr⁡[M(D0)=i]≤1K\Pr[\mathcal{M}(D_{0})=i]\leq\frac{1}{K}. It follows that

For large enough KK, this implies that ε^≥2(1−3α)ε\hat{\varepsilon}\geq 2(1-3\alpha)\varepsilon. ∎

Appendix E Useful Properties of Differential Privacy

In this section, we prove some folklore properties of the distance implicit in the definition of differential privacy that are useful. We start with a definition of closeness.

For distributions PP and QQ, we say that PP is (ε,δ)(\varepsilon,\delta)-far from QQ, if for all events SS,

We say that P≡ε,δQP\equiv_{\varepsilon,\delta}Q if PP is (ε,δ)(\varepsilon,\delta)-far from QQ and QQ is (ε,δ)(\varepsilon,\delta)-far from PP.

Suppose that P≡ε,δQP\equiv_{\varepsilon,\delta}Q for δ<110\delta<\frac{1}{10}. Then for any ε′>ε\varepsilon^{\prime}>\varepsilon, there is an event BB such that (a) Pr⁡x∼P[x∈B]≤δ/(1−exp⁡(ε−ε′))\Pr_{x\sim P}[x\in B]\leq\delta/(1-\exp(\varepsilon-\varepsilon^{\prime})), and (b) P∣Bc≡ε′,0Q∣BcP\mid B^{c}\equiv_{\varepsilon^{\prime},0}Q\mid B^{c}. In particular, setting ε′=ε+2delta\varepsilon^{\prime}=\varepsilon+\sqrt{2delta}, we get Pr⁡P[B]≤δ\Pr_{P}[B]\leq\sqrt{\delta}.

Without loss of generalityThis can be ensured by having the mechanism outputting a uniform $r.v.inadditiontoitsoriginaloutput.,thedistributionshaveadensityfunction.Letr.v. in addition to its original output., the distributions have a density function. LetB=\{x:\frac{\Pr_{P}[x]}{\Pr_{Q}[x]}\geq\exp(\varepsilon^{\prime})\}$. Now note that

so that Pr⁡P[B]≤δ/(1−exp⁡(ε−ε′))\Pr_{P}[B]\leq\delta/(1-\exp(\varepsilon-\varepsilon^{\prime})). Setting ε′=ε+2δ\varepsilon^{\prime}=\varepsilon+\sqrt{2\delta}, and noting that exp⁡(−2δ)≤1−δ\exp(-\sqrt{2\delta})\leq 1-\sqrt{\delta} for δ<110\delta<\frac{1}{10}, the claim follows.

Suppose that there is an event BB such that P∣Bc≡ε,0Q∣BcP\mid B^{c}\equiv_{\varepsilon,0}Q\mid B^{c}, and that Pr⁡x∼P[B]≤δ\Pr_{x\sim P}[B]\leq\delta. Then P≡ε,δQP\equiv_{\varepsilon,\delta}Q.